/* DermLens: phone-first, Typeless-style. Prompt for display type, Inter for everything else.
   Fonts are self-hosted: the CSP allows no third-party requests from pages that show PHI. */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/public/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/public/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/public/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/public/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Prompt'; font-weight: 500; font-display: swap; src: url('/public/fonts/prompt-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Prompt'; font-weight: 600; font-display: swap; src: url('/public/fonts/prompt-latin-600-normal.woff2') format('woff2'); }

:root {
  --ink: #111111;
  --gray-lg: #8a8a8a;   /* large gray: headline second half (3:1 at 24px+) */
  --gray: #6e6e6e;      /* small gray text (4.5:1) */
  --gray-mid: #555555;
  --pill: #1d1a1a;
  --chip: #f2f2f2;
  --panel: #f6f6f6;
  --line: #ebebeb;
  --mint: #ddf6ec;
  --mint-ink: #0b7a55;
  --mint-soft: #effaf5;
  --mint-line: #bdebd8;
  --peach: #fff0e5;
  --peach-ink: #a1450f;
  --skip-fill: #ffe3d0;
  --rec: #ff5a36;
  --radius-card: 24px;
  --radius-row: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: #fff;
  letter-spacing: 0.01em;
}
a { color: var(--ink); }
a:hover { color: var(--gray-mid); }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #3b82f6; outline-offset: 2px; }
/* `hidden` must win over the flex/grid display of classes like .stack and .pill. */
[hidden] { display: none !important; }
/* What a patient or the team typed can be one long unbroken string (a pasted link): wrap it anywhere. */
.need blockquote, .bubble-in, .inset, .msg, .exchange p, .pre, .note-list li, .who, .you-said .lead { overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Small helpers (the CSP forbids inline style attributes, so everything is a class). */
.ink { color: var(--ink); }
.text-mid { color: var(--gray-mid); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.w-full { width: 100%; }
.center { text-align: center; }
.card-title { font-size: 16px; font-weight: 600; }
.plain-btn { background: none; border: none; cursor: pointer; padding: 0; color: var(--ink); }
.tight-link { gap: 2px; font-size: 14px; font-weight: 600; }
.glass-pill { background: rgba(255, 255, 255, 0.85); }
.btn-quiet { min-height: 44px; color: var(--ink); background: none; }
.note-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.pre { white-space: pre-wrap; font-size: 15px; line-height: 1.55; margin: 0; font-family: inherit; }
.mt-auto { margin-top: auto; }
.screen-pad { padding: 12px 16px 0; }
.hidden-copy { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Frame: a phone column, centered on bigger screens ── */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.app.wide { max-width: 960px; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 20px 16px 26px; }
.screen.roomy { gap: 18px; }
.dev-banner { background: #fff7d6; color: #6b5200; font-size: 12px; font-weight: 600; text-align: center; padding: 4px 8px; }
.dev-banner a { color: inherit; }

/* ── Top bar ── */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.topbar .right { display: flex; gap: 6px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding-right: 8px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink); }
.brand { font-family: 'Prompt', 'Inter', sans-serif; font-weight: 600; font-size: 20px; text-decoration: none; }

/* ── Type ── */
.display { font-family: 'Prompt', 'Inter', sans-serif; font-weight: 500; font-size: 32px; line-height: 1.12; letter-spacing: 0.01em; }
.display.xl { font-size: 38px; line-height: 1.08; }
.display .soft, .soft-lg { color: var(--gray-lg); }
.eyebrow { font-size: 14px; font-weight: 500; color: var(--gray); }
.sub { font-size: 14px; color: var(--gray); }
.fine { font-size: 13px; color: var(--gray); line-height: 1.5; }
.muted { color: var(--gray); }
.lead { font-size: 16px; line-height: 1.5; }
.lead .soft { color: #5e5e5e; }
.h2 { font-size: 16px; font-weight: 700; }
.h3 { font-size: 13px; font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-sm { display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* ── Buttons: black pills and gray pills ── */
.btn, .pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; font-weight: 600; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn { min-height: 54px; padding: 0 20px; font-size: 16px; }
.pill { min-height: 44px; padding: 0 14px; font-size: 14px; background: var(--chip); color: var(--ink); }
.btn-primary { background: var(--pill); color: #fff; }
.btn-primary:hover { color: #fff; background: #000; }
.btn-secondary { background: var(--chip); color: var(--ink); }
.btn-white { background: #fff; color: var(--ink); }
.btn-danger-link { background: none; color: var(--peach-ink); min-height: 44px; font-weight: 600; border: none; cursor: pointer; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.5; pointer-events: none; }
.actions { display: flex; gap: 10px; }
.actions > .grow { flex: 1; }
.actions.bottom { margin-top: auto; padding-top: 6px; }
.link-button { background: none; border: none; padding: 0; min-height: 32px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: underline; }
form.inline { display: inline; }

/* ── Chips ── */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--chip); }
.chip-mint { background: var(--mint); color: var(--mint-ink); }
.chip-peach { background: var(--peach); color: var(--peach-ink); }
.chip-dark { background: #111; color: #fff; }
.tag-added { padding: 1px 8px; border-radius: 999px; background: var(--mint); color: var(--mint-ink); font-size: 12px; font-weight: 600; }
.tag-stopped { padding: 1px 8px; border-radius: 999px; background: var(--peach); color: var(--peach-ink); font-size: 12px; font-weight: 600; }

/* ── Surfaces ── */
.panel { background: var(--panel); border-radius: var(--radius-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.panel.tight { padding: 16px 18px; gap: 12px; }
.card-line { border: 1px solid var(--line); border-radius: var(--radius-row); padding: 14px 16px; }
.inset { background: #fff; border-radius: 16px; padding: 12px 14px; }
.section-title { font-size: 15px; font-weight: 700; }
.note-section { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.note-section ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
.empty { color: var(--gray); font-size: 14px; }

/* ── Today ── */
.visit-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-row); background: var(--panel); text-decoration: none; color: var(--ink); }
.visit-row.plain { background: none; padding: 12px 16px; }
.visit-row .time { width: 48px; flex-shrink: 0; font-size: 14px; font-weight: 500; color: var(--gray); }
.visit-row .who { font-size: 16px; font-weight: 600; }
.visit-row.plain .who { font-weight: 500; }
.visit-row .what { font-size: 13px; color: var(--gray); }
.status-ok { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--mint-ink); }
.now-card { background: #111; color: #fff; border-radius: var(--radius-card); padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.now-card .time { width: 48px; font-size: 14px; font-weight: 600; }
.now-card .who { font-size: 17px; font-weight: 600; }
.now-card .what { font-size: 13px; color: #b5b5b5; }
.now-card .btn-white { min-height: 52px; }
.needs { display: flex; flex-direction: column; gap: 10px; }
.need { border-radius: var(--radius-row); background: var(--peach); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.need .reason { font-size: 13px; font-weight: 700; color: var(--peach-ink); }
.need blockquote { margin: 0; font-size: 15px; }
.need .actions { flex-wrap: wrap; gap: 8px; }
.need .pill { background: #fff; }
.footer-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray); padding: 8px 4px 0; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: 50px; z-index: 20; min-width: 220px; background: #fff; border-radius: 18px; box-shadow: 0 12px 32px rgba(17, 17, 17, 0.16); padding: 8px; display: flex; flex-direction: column; }
.menu-list a, .menu-list button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 12px; text-decoration: none; font-size: 15px; font-weight: 500; background: none; border: none; text-align: left; cursor: pointer; width: 100%; }
.menu-list a:hover, .menu-list button:hover { background: var(--chip); color: var(--ink); }

/* ── Voice screens: pastel wash, black listening pill ── */
.voice {
  background: radial-gradient(90% 55% at 85% 12%, #ffe3d3 0%, rgba(255, 227, 211, 0) 62%),
    radial-gradient(95% 60% at 8% 88%, #dce8ff 0%, rgba(220, 232, 255, 0) 66%), #f4f6fa;
}
.voice .screen { gap: 18px; padding-top: 32px; }
.glass { background: rgba(255, 255, 255, 0.82); border-radius: var(--radius-card); padding: 16px 18px; }
.who-chip { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); font-size: 14px; font-weight: 600; }
.rec-pill {
  display: inline-flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 22px; border-radius: 999px;
  background: var(--pill); color: #fff; border: none; text-decoration: none; cursor: pointer; font-size: 15px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.18);
}
.rec-pill:hover { color: #fff; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); flex-shrink: 0; }
.rec-dot.paused { background: #8a8a8a; }
.wave { display: inline-flex; align-items: center; gap: 5px; }
.wave i { display: block; width: 5px; height: 5px; border-radius: 3px; background: #fff; }
.wave i:nth-child(2) { height: 12px; }
.wave i:nth-child(3) { height: 18px; }
.wave i:nth-child(4) { height: 10px; }
.wave i:nth-child(n + 5) { background: #8a8a8a; }
.listening .wave i { animation: pulse 1.2s ease-in-out infinite; }
.listening .wave i:nth-child(2n) { animation-delay: 0.2s; }
.listening .wave i:nth-child(3n) { animation-delay: 0.4s; }
@keyframes pulse { 50% { transform: scaleY(0.55); opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) { .listening .wave i { animation: none; } }
.rec-sep { width: 1px; height: 22px; background: #4a4a4a; }
.rec-bar { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: auto; }
.upload-state { font-size: 13px; color: #5e5e5e; min-height: 18px; text-align: center; }
.upload-state.warn { color: var(--peach-ink); font-weight: 600; }

/* Since-last-visit glance (recording screen) */
.since-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); cursor: pointer; border: none; text-align: left; width: 100%; }
.since-grid { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; font-size: 14px; }

/* ── Night strips: one bar per night ── */
.strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; }
.strip.mini { gap: 3px; }
.bar { display: flex; align-items: center; justify-content: center; height: 30px; border-radius: 6px; }
.strip.mini .bar { height: 18px; border-radius: 3px; }
.strip.small .bar { height: 18px; border-radius: 4px; }
.bar.done { background: var(--mint-ink); }
.bar.skipped { background: var(--skip-fill); border: 1.5px solid var(--peach-ink); color: var(--peach-ink); }
.bar.no_reply { background: #fff; border: 1.5px dashed #8a8a8a; color: var(--gray); }
.bar.waiting { background: #fff; border: 1.5px solid #cfcfcf; }
.bar.rest { background: #e6e6e6; }
.markers { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; min-height: 14px; }
.markers span { display: flex; justify-content: center; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--gray-mid); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 10px; height: 14px; border-radius: 3px; }
.legend .swatch.done { background: var(--mint-ink); }
.legend .swatch.skipped { background: var(--skip-fill); border: 1.5px solid var(--peach-ink); }
.legend .swatch.no_reply { background: #fff; border: 1.5px dashed #8a8a8a; }
.legend .swatch.rest { background: #e6e6e6; }

/* ── Segmented control (Casey / Drew) ── */
.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--chip); }
.segmented a, .segmented button {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--gray-mid); text-decoration: none; background: none; border: none; cursor: pointer;
}
.segmented [aria-current='page'], .segmented [aria-pressed='true'] { background: #111; color: #fff; }

/* ── Past visits ── */
details.visit-card { border: 1px solid var(--line); border-radius: var(--radius-row); }
details.visit-card > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; cursor: pointer; }
details.visit-card > summary::-webkit-details-marker { display: none; }
details.visit-card > summary .chev { transition: transform 0.2s; flex-shrink: 0; }
details.visit-card[open] > summary .chev { transform: rotate(180deg); }
details.visit-card .body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
details.visit-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.nights { display: flex; flex-direction: column; gap: 8px; padding: 4px 18px 2px; }
.exchange { background: #fff; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.exchange .meta { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gray); }
.overlay { position: fixed; inset: 0; z-index: 50; background: #fff; overflow-y: auto; display: flex; flex-direction: column; }
.overlay[hidden] { display: none; }
.overlay-inner { max-width: 480px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; flex: 1; }
.overlay .rec-bar { position: sticky; bottom: 0; padding: 10px 16px 26px; background: linear-gradient(rgba(255, 255, 255, 0), #fff 30%); }

/* ── Consent sheet ── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(40, 40, 40, 0.28); display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop[hidden] { display: none; }
.sheet { width: 100%; max-width: 480px; background: #fff; border-radius: 32px 32px 0 0; padding: 12px 20px 30px; display: flex; flex-direction: column; gap: 20px; }
.grabber { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: #dadada; }
.say-aloud { padding: 18px; border-radius: 20px; background: var(--panel); display: flex; flex-direction: column; gap: 10px; }
.say-aloud p { font-size: 17px; line-height: 1.5; font-weight: 500; }

/* ── Review ── */
.plan-group { display: flex; flex-direction: column; gap: 4px; }
.plan-line { display: flex; align-items: center; gap: 8px; }
.plan-line p { flex: 1; font-size: 16px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: #fff; color: var(--ink); border: none; cursor: pointer; }
.check-row { background: var(--peach); border-radius: 16px; padding: 12px 14px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.check-row strong { color: var(--peach-ink); }
.first-text { border: 1px solid var(--line); border-radius: var(--radius-row); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.bubble-in { padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--chip); font-size: 14px; line-height: 1.45; }
.texts-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.texts-list .when { font-size: 12px; font-weight: 600; color: var(--gray); }
.processing { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.dots-loader { display: inline-flex; gap: 6px; }
.dots-loader i { width: 8px; height: 8px; border-radius: 50%; background: #111; animation: pulse 1.2s infinite; }
.dots-loader i:nth-child(2) { animation-delay: 0.2s; }
.dots-loader i:nth-child(3) { animation-delay: 0.4s; }

/* ── Voice edit ── */
.diff-old { padding: 1px 4px; border-radius: 4px; background: var(--mint); color: #5e5e5e; text-decoration: line-through; }
.diff-new { padding: 10px 12px; border-radius: 14px; background: var(--mint-soft); border: 1px solid var(--mint-line); }
.you-said { padding: 16px; border-radius: 20px; background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.proposal { padding: 16px; border-radius: 20px; background: var(--mint-soft); border: 1px solid var(--mint-line); display: flex; flex-direction: column; gap: 6px; }
.proposal .label { font-size: 13px; font-weight: 600; color: var(--mint-ink); }
.hold-btn { align-self: center; user-select: none; -webkit-user-select: none; touch-action: none; }
.hold-btn.holding { background: #000; transform: scale(1.03); }
.bottom-sheet { margin-top: auto; background: #fff; border-radius: 32px 32px 0 0; padding: 12px 20px 30px; display: flex; flex-direction: column; gap: 16px; }

/* ── Forms ── */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--gray-mid); }
input[type='text'], input[type='password'], input[type='tel'], input[type='date'], input[type='time'], input[type='number'], input:not([type]), select, textarea {
  font-size: 16px; min-height: 48px; padding: 12px 16px; border-radius: 14px; border: 1px solid #e0e0e0; background: #fff; width: 100%;
}
textarea { min-height: 120px; line-height: 1.45; resize: vertical; }
textarea.transcript { min-height: 260px; font-size: 15px; }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checkline input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; }
.chips-choose { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-choose label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 500; cursor: pointer; }
.chips-choose input { width: 16px; height: 16px; }
.error { background: var(--peach); color: var(--peach-ink); border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.notice { background: var(--mint); color: var(--mint-ink); border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.field-error { color: var(--peach-ink); font-size: 13px; font-weight: 600; }
.code-input { font-size: 28px !important; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { background: #fff; border-radius: 20px; padding: 16px; align-self: center; border: 1px solid var(--line); }
.qr svg { display: block; width: 200px; height: 200px; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; letter-spacing: 0.08em; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; }
.codes span { background: var(--panel); border-radius: 12px; padding: 10px; text-align: center; }

/* ── Plan form (precise editing) ── */
fieldset.item { border: 1px solid var(--line); border-radius: var(--radius-row); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
fieldset.item legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
fieldset.item.new { border-style: dashed; }
.phase-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.phase-block { background: var(--panel); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.warnings { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.warnings li { background: var(--peach); color: var(--peach-ink); border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 600; }

/* ── Tables (audit log, admin) ── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--gray); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* ── Patient's phone (dev fake phone, looks like Messages) ── */
.phone { display: flex; flex-direction: column; flex: 1; }
.phone-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 16px 12px; border-bottom: 1px solid #f0f0f0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: #111; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; }
.thread { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; }
.msg { max-width: 290px; padding: 10px 14px; border-radius: 20px 20px 20px 6px; background: var(--chip); align-self: flex-start; white-space: pre-wrap; }
.msg.in { align-self: flex-end; background: #111; color: #fff; border-radius: 20px 20px 6px 20px; }
.msg-time { align-self: center; font-size: 12px; font-weight: 500; color: var(--gray); padding-top: 6px; }
.composer { display: flex; gap: 10px; align-items: center; padding: 10px 14px 20px; border-top: 1px solid #f0f0f0; }
.composer input { border-radius: 999px; background: var(--chip); border: none; }
.quick { display: flex; gap: 8px; padding: 0 14px 20px; }
.quick button { flex: 1; min-height: 44px; border-radius: 999px; border: none; background: var(--chip); font-weight: 700; cursor: pointer; }
fieldset.stack { border: none; padding: 0; margin: 0; min-width: 0; }
fieldset.stack legend { padding: 0; margin-bottom: 8px; }
