:root {
  --ink: #18231e;
  --muted: #66726c;
  --line: #dfe7e2;
  --surface: #ffffff;
  --surface-soft: #f4f7f5;
  --green: #087b59;
  --green-deep: #04533d;
  --green-soft: #e8f7f0;
  --rose: #c53383;
  --rose-soft: #fff0f7;
  --amber: #9a5b05;
  --amber-soft: #fff6de;
  --shadow: 0 22px 60px rgba(24, 35, 30, 0.09);
  --radius: 24px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: #edf3ef;
}

@media (max-width: 560px) {
  .app-shell, .conversation, .message, .bubble { overflow: visible; }
  .sizing-summary { min-width: 0; }
  .size-list li { grid-template-columns: 1fr auto; }
  .size-list li .inline-action { grid-column: 1 / -1; justify-self: start; }
  body:has(.group-actions:not([hidden]))::before { content: ""; position: fixed; z-index: 20; inset: 0; background: rgba(9, 39, 29, 0.28); }
  .group-actions { position: fixed; z-index: 21; top: 50%; right: auto; left: 50%; display: flex; width: min(280px, calc(100vw - 32px)); min-width: 0; max-width: calc(100vw - 32px); padding: 14px; flex-direction: column; gap: 8px; transform: translate(-50%, -50%); border-radius: 18px; }
  .group-actions .inline-action { width: 100%; padding: 10px 12px; white-space: normal; text-align: center; }
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(197, 51, 131, 0.08), transparent 26rem),
    radial-gradient(circle at 92% 92%, rgba(8, 123, 89, 0.12), transparent 30rem),
    #edf3ef;
}

button,
input,
textarea {
  font: inherit;
}

button,
.attach-button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.attach-button:focus-within {
  outline: 3px solid rgba(197, 51, 131, 0.24);
  outline-offset: 2px;
}

.app-shell {
  width: min(1380px, calc(100% - 40px));
  min-height: calc(100vh - 40px);
  margin: 20px auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: white;
  font-family: Georgia, serif;
  font-size: 25px;
  font-style: italic;
  background: linear-gradient(145deg, var(--rose), #8e2462);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(197, 51, 131, 0.22);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--green);
  background: var(--green-soft);
}

.knowledge-link {
  margin-left: auto;
  margin-right: 10px;
  padding: 9px 12px;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  background: var(--green-soft);
  border: 1px solid #b8e3d1;
  border-radius: 999px;
}

.icon-button svg,
.attach-button svg,
.send-button svg,
.file-icon svg,
.privacy-note svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-layout {
  display: grid;
  min-height: calc(100vh - 118px);
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
}

.chat-panel {
  display: flex;
  min-width: 0;
  min-height: 720px;
  flex-direction: column;
  background:
    linear-gradient(rgba(250, 251, 250, 0.91), rgba(250, 251, 250, 0.91)),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 24px,
      rgba(8, 123, 89, 0.025) 24px,
      rgba(8, 123, 89, 0.025) 25px
    );
}

.conversation {
  display: flex;
  width: min(790px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 26px;
  flex: 1;
  flex-direction: column;
  gap: 18px;
}

.message {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  animation: message-in 240ms ease-out;
}

.message.user {
  justify-content: flex-end;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  color: white;
  font-family: Georgia, serif;
  font-style: italic;
  background: var(--rose);
  border-radius: 11px;
}

.bubble {
  max-width: min(660px, 86%);
  padding: 15px 17px;
  color: var(--ink);
  line-height: 1.55;
  white-space: pre-wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  box-shadow: 0 8px 28px rgba(24, 35, 30, 0.045);
}

.user .bubble {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  border-radius: 18px 18px 6px 18px;
  box-shadow: 0 8px 24px rgba(8, 123, 89, 0.16);
}

.bubble strong {
  font-weight: 750;
}

.message-status {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  text-align: right;
}

.attachment-message-image {
  display: block;
  width: min(360px, 100%);
  margin: 0 0 10px;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
}

.attachment-message-image img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
}

.typing .thinking-bubble {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-width: 224px;
  gap: 10px;
  padding: 11px 15px 11px 11px;
  color: #50615a;
  background: linear-gradient(135deg, #ffffff 0%, #f4fbf7 100%);
  border-color: #cfe7dc;
  box-shadow: 0 8px 22px rgba(8, 123, 89, 0.09);
}

.thinking-icon {
  position: relative;
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #087b59;
  background: #dff5eb;
  border: 1px solid #b9e4d1;
  border-radius: 50%;
}

.thinking-core,
.thinking-core::before,
.thinking-core::after {
  display: block;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}

.thinking-core {
  position: relative;
  opacity: 0.9;
}

.thinking-core::before,
.thinking-core::after {
  position: absolute;
  top: 0;
  content: "";
}

.thinking-core::before {
  left: -8px;
}

.thinking-core::after {
  right: -8px;
}

.thinking-pulse {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(8, 123, 89, 0.35);
  border-radius: 50%;
  animation: thinking-pulse 1.8s ease-out infinite;
}

.typing-label {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 1px;
}

.typing-dots i {
  width: 5px;
  height: 5px;
  background: #087b59;
  border-radius: 50%;
  animation: typing 1.1s infinite;
}

.typing-dots i:nth-child(2) {
  animation-delay: 160ms;
}

.typing-dots i:nth-child(3) {
  animation-delay: 320ms;
}

.quick-actions {
  display: flex;
  margin: -4px 0 2px 42px;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-action {
  padding: 9px 13px;
  color: var(--green-deep);
  font-weight: 700;
  background: var(--green-soft);
  border: 1px solid #b8e3d1;
  border-radius: 999px;
  cursor: pointer;
}

.quick-action:hover {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.sizing-summary {
  min-width: min(520px, calc(100vw - 110px));
}

.sizing-summary p { margin: 0 0 12px; line-height: 1.5; }

.size-list {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.size-list li {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.size-list li span { color: var(--muted); }
.size-list .italian-size { font-size: 0.85em; margin-left: 4px; }
.size-list li b { color: var(--green-deep); font-size: 17px; }
.size-list li.needs-review span { color: #8a5a13; }
.inline-action { padding: 5px 8px; color: var(--green-deep); font-size: 11px; font-weight: 700; background: var(--green-soft); border: 1px solid #b8e3d1; border-radius: 999px; cursor: pointer; }
.options-wrap { position: relative; display: flex; justify-content: flex-end; }
.options-toggle { display: grid; width: 30px; height: 30px; place-items: center; color: var(--green-deep); font-size: 20px; line-height: 1; background: var(--green-soft); border: 1px solid #b8e3d1; border-radius: 50%; cursor: pointer; }
.options-toggle:hover, .options-toggle[aria-expanded="true"] { color: white; background: var(--green); }
.group-actions { position: absolute; z-index: 2; top: calc(100% + 8px); right: 0; display: flex; min-width: max-content; padding: 8px; gap: 5px; flex-wrap: wrap; justify-content: flex-end; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px rgba(24, 35, 30, 0.12); }
.group-actions[hidden] { display: none; }
.summary-note { color: #8a5a13; }

.result-card,
.warning-card {
  width: min(660px, calc(100% - 42px));
  margin-left: 42px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(24, 35, 30, 0.055);
}

.result-card {
  border-top: 4px solid var(--green);
}

.warning-card {
  color: #613900;
  background: var(--amber-soft);
  border-color: #efd08d;
}

.result-card h3,
.warning-card h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.result-card p,
.warning-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.result-card .size {
  display: inline-grid;
  width: 58px;
  height: 58px;
  margin: 14px 0 10px;
  place-items: center;
  color: white;
  font-size: 24px;
  font-weight: 800;
  background: var(--green);
  border-radius: 17px;
}

.result-actions {
  display: flex;
  margin-top: 15px;
  gap: 8px;
  flex-wrap: wrap;
}

.composer,
.attachment-preview,
.composer-note {
  width: min(790px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.attachment-preview {
  display: flex;
  margin-bottom: 10px;
  padding: 10px 12px;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.attachment-preview[hidden] {
  display: none;
}

.attachment-preview .file-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--rose);
  background: var(--rose-soft);
  border-radius: 11px;
}

.attachment-thumbnail {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  place-items: center;
  background: var(--green-soft);
  border-radius: 11px;
}

.attachment-thumbnail[hidden] {
  display: none;
}

.attachment-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.paste-hint {
  display: block;
  margin: 0 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

.attachment-preview span {
  min-width: 0;
  flex: 1;
}

.attachment-preview strong,
.attachment-preview small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview small {
  margin-top: 2px;
  color: var(--muted);
}

.attachment-preview button {
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.composer {
  position: relative;
  padding: 12px 14px 10px;
  background: var(--surface);
  border: 1px solid #cad6cf;
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(24, 35, 30, 0.08);
}

.composer:focus-within {
  border-color: var(--green);
  box-shadow: 0 12px 38px rgba(8, 123, 89, 0.12);
}

.composer textarea {
  width: 100%;
  min-height: 66px;
  max-height: 180px;
  padding: 5px 2px;
  resize: none;
  color: var(--ink);
  line-height: 1.5;
  background: transparent;
  border: 0;
  outline: 0;
}

.composer textarea::placeholder {
  color: #96a19b;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.attach-button {
  display: inline-flex;
  padding: 7px 8px;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
}

.attach-button:hover {
  color: var(--green);
  background: var(--green-soft);
}

.send-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 13px;
  cursor: pointer;
}

.send-button:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
}

.composer-note {
  margin-top: 9px;
  margin-bottom: 18px;
  color: #87928c;
  font-size: 11px;
  text-align: center;
}

.info-panel {
  padding: 66px 42px;
  background: linear-gradient(150deg, #073c2f, #0d624a 64%, #087b59);
  color: white;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 9px;
  color: #bcebd8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.info-panel h1 {
  max-width: 520px;
  margin: 24px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 3.4vw, 58px);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.info-panel > p {
  max-width: 480px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 16px;
  line-height: 1.65;
}

.steps {
  display: grid;
  margin: 38px 0;
  padding: 0;
  gap: 16px;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 12px;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
}

.steps span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
}

.privacy-note {
  display: flex;
  max-width: 480px;
  padding: 16px;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
}

.privacy-note svg {
  flex: 0 0 24px;
  color: #a8e9d1;
}

.privacy-note strong,
.privacy-note span {
  display: block;
}

.privacy-note span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.45;
}

.privacy-note strong {
  margin-bottom: 3px;
  color: white;
}

.dialog {
  width: min(920px, calc(100% - 28px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
}

.dialog::backdrop {
  background: rgba(5, 20, 15, 0.58);
  backdrop-filter: blur(6px);
}

.dialog-card {
  display: flex;
  max-height: calc(100vh - 32px);
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.image-dialog-card {
  width: min(92vw, 980px);
  max-height: 92vh;
  padding: 16px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.image-dialog-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.image-dialog-card img {
  display: block;
  width: 100%;
  max-height: calc(92vh - 90px);
  object-fit: contain;
  border-radius: 12px;
}

.dialog-card > header,
.dialog-card > footer {
  display: flex;
  padding: 20px 22px;
  align-items: center;
  justify-content: space-between;
}

.dialog-card > header {
  border-bottom: 1px solid var(--line);
}

.dialog-card > header .eyebrow {
  color: var(--green);
  background: var(--green-soft);
  border-color: #c7e9dc;
}

.dialog-card h2 {
  margin: 9px 0 3px;
  font-size: 22px;
}

.dialog-card header p,
.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-body {
  padding: 22px;
  overflow: auto;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.range-row input,
.guardrail-table input {
  width: 100%;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #cbd6d0;
  border-radius: 10px;
}

.settings-body section {
  margin-top: 28px;
}

.section-heading {
  display: flex;
  margin-bottom: 12px;
  gap: 14px;
  align-items: end;
  justify-content: space-between;
}

.section-heading h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.text-button {
  padding: 7px;
  color: var(--green);
  font-weight: 750;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.range-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.range-row {
  display: grid;
  padding: 9px;
  gap: 8px;
  align-items: center;
  grid-template-columns: 50px minmax(0, 1fr) 14px minmax(0, 1fr);
  background: var(--surface-soft);
  border-radius: 12px;
}

.range-row strong {
  color: var(--green);
  text-align: center;
}

.range-row span {
  color: var(--muted);
  text-align: center;
}

.guardrail-editor {
  overflow-x: auto;
}

.guardrail-table {
  width: 100%;
  border-spacing: 0 7px;
}

.guardrail-table th {
  padding: 0 6px 5px;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
}

.guardrail-table td {
  padding: 6px;
  background: var(--surface-soft);
}

.guardrail-table td:first-child {
  color: var(--green);
  font-weight: 800;
  border-radius: 10px 0 0 10px;
}

.guardrail-table td:last-child {
  border-radius: 0 10px 10px 0;
}

.form-error {
  min-height: 18px;
  margin: 14px 0 0;
  color: #b42318;
  font-size: 13px;
}

.dialog-card > footer {
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.primary-button,
.secondary-button,
.whatsapp-button {
  padding: 11px 16px;
  font-weight: 750;
  border-radius: 12px;
  cursor: pointer;
}

.primary-button {
  color: white;
  background: var(--green);
  border: 1px solid var(--green);
}

.secondary-button {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
}

.whatsapp-button {
  color: white;
  background: #1aa466;
  border: 1px solid #1aa466;
}

.whatsapp-preview {
  display: block;
  width: calc(100% - 44px);
  min-height: 260px;
  box-sizing: border-box;
  margin: 22px;
  padding: 20px;
  overflow: auto;
  color: #1e2b24;
  line-height: 1.6;
  white-space: pre-wrap;
  background: #e7f9df;
  border: 1px solid #c7e9ba;
  border-radius: 18px 18px 4px 18px;
  resize: vertical;
  font: inherit;
}

.whatsapp-preview:focus {
  outline: none;
  border-color: #f0b9d7;
  box-shadow: 0 0 0 4px rgba(240, 185, 215, 0.65);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@keyframes thinking-pulse {
  0% {
    opacity: 0.75;
    transform: scale(0.82);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .thinking-pulse,
  .typing-dots i {
    animation: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .chat-layout {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    min-height: calc(100vh - 77px);
  }

  .info-panel {
    display: none;
  }
}

@media (max-width: 600px) {
  .topbar {
    min-height: 66px;
    padding: 10px 14px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .conversation,
  .composer,
  .attachment-preview,
  .composer-note {
    width: calc(100% - 24px);
  }

  .conversation {
    padding-top: 26px;
  }

  .bubble {
    max-width: 90%;
  }

  .quick-actions,
  .result-card,
  .warning-card {
    margin-left: 0;
  }

  .result-card,
  .warning-card {
    width: 100%;
  }

  .range-editor {
    grid-template-columns: 1fr;
  }

  .dialog-card > header,
  .dialog-card > footer,
  .settings-body {
    padding: 16px;
  }

  .dialog-card > footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .attach-button span {
    display: none;
  }
}

/* Mobile sizing options: keep the action panel inside the viewport. */
@media (max-width: 560px) {
  .app-shell {
    overflow: visible;
    backdrop-filter: none;
  }

  body:has(.group-actions:not([hidden]))::before {
    content: "";
    position: fixed;
    z-index: 20;
    inset: 0;
    background: rgba(9, 39, 29, 0.28);
    pointer-events: none;
  }

  .group-actions {
    position: fixed;
    z-index: 30;
    top: 50%;
    right: auto;
    left: 50%;
    display: flex;
    width: calc(100vw - 32px);
    min-width: 0;
    max-width: calc(100vw - 32px);
    padding: 14px;
    flex-direction: column;
    gap: 8px;
    transform: translate(-50%, -50%);
    border-radius: 18px;
  }

  .group-actions .inline-action {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    white-space: normal;
    text-align: center;
  }

  .options-toggle {
    position: relative;
    z-index: 22;
  }
}

.customer-check {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
}
.customer-check p { margin: 0 0 6px; }
.customer-check ul { margin: 0; padding-left: 18px; }
.customer-check li { margin: 4px 0; line-height: 1.45; }

/* HTML bubbles: template indentation must not render as blank space. */
.bubble.bubble-html { white-space: normal; }
.bubble-html p { margin: 0 0 10px; }
.bubble-html p:last-child { margin-bottom: 0; }

.confirm-section { margin-top: 12px; }
.table-wrap { overflow-x: auto; margin: 0 0 12px; -webkit-overflow-scrolling: touch; }
.confirm-table { border-collapse: collapse; font-size: 0.92em; min-width: 100%; }
.confirm-table th,
.confirm-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.confirm-table thead th { color: var(--muted); font-weight: 600; font-size: 0.9em; }
.confirm-table th[scope="row"],
.confirm-table thead th:first-child { text-align: left; }
.confirm-table td.doubtful { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.reading-issues { margin: 0 0 10px; padding-left: 18px; }
.reading-issues li { margin: 3px 0; }
.confirm-table thead th::first-letter { text-transform: uppercase; }
.confirm-table th[scope="row"] { position: sticky; left: 0; background: var(--surface); }
@media (max-width: 560px) {
  .confirm-table { font-size: 0.82em; }
  .confirm-table th,
  .confirm-table td { padding: 5px 6px; }
  .confirm-table thead th:last-child,
  .confirm-table td:last-child { white-space: normal; min-width: 64px; }
}
