/* EMedic AI patient chat: a modern chat-app layout */
:root {
  --bg: #ffffff;
  --sidebar: #f6f8f8;
  --surface: #ffffff;
  --surface-2: #f2f5f5;
  --hover: #e9eeee;
  --ink: #0e1a1f;
  --muted: #56636a;
  --faint: #8a969c;
  --line: #e2e8e9;
  --brand: #0f766e;
  --brand-soft: #e3f3f1;
  --glow: rgba(20, 184, 166, 0.13);
  --grad: linear-gradient(135deg, #0f766e 0%, #0e7490 55%, #1d4ed8 100%);
  --warn: #c2410c;
  --danger: #dc2626;
  --ok: #16a34a;
  --amber: #b45309;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --side-w: 268px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

/* Dark theme: follows the system unless the patient picked one (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14191b;
    --sidebar: #0f1315;
    --surface: #1b2225;
    --surface-2: #222a2d;
    --hover: #273033;
    --ink: #e8eef0;
    --muted: #a7b3b8;
    --faint: #7d8a90;
    --line: #2c3538;
    --brand: #2dd4bf;
    --brand-soft: #123330;
    --glow: rgba(45, 212, 191, 0.10);
    --warn: #fb923c;
    --danger: #f87171;
    --ok: #4ade80;
    --amber: #fbbf24;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14191b;
  --sidebar: #0f1315;
  --surface: #1b2225;
  --surface-2: #222a2d;
  --hover: #273033;
  --ink: #e8eef0;
  --muted: #a7b3b8;
  --faint: #7d8a90;
  --line: #2c3538;
  --brand: #2dd4bf;
  --brand-soft: #123330;
  --glow: rgba(45, 212, 191, 0.10);
  --warn: #fb923c;
  --danger: #f87171;
  --ok: #4ade80;
  --amber: #fbbf24;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
/* Smooth the switch without animating everything on page load. */
html.theme-anim, html.theme-anim * { transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease !important; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-size: 15.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--brand); }

.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; flex: none; }
.mark svg { width: 62%; height: 62%; }
.icon-btn { width: 38px; height: 38px; border: 0; background: transparent; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.only-mobile { display: none; }

/* ================= Layout ================= */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100dvh; }

.sidebar { background: var(--sidebar); display: flex; flex-direction: column; padding: 12px 10px; gap: 6px; min-height: 0; border-right: 1px solid var(--line); }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.new-chat { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; transition: background 0.15s; }
.new-chat:hover { background: var(--hover); }
.new-chat svg { width: 18px; height: 18px; }
.side-section { margin-top: 14px; min-height: 0; }
.side-section.grow { flex: 1; display: flex; flex-direction: column; }
.side-label { font-size: 12px; font-weight: 600; color: var(--faint); padding: 0 10px 6px; }
.quick, .recent { display: flex; flex-direction: column; gap: 1px; }
.recent { overflow-y: auto; flex: 1; min-height: 0; }
.quick button, .recent .open { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.qi svg { width: 15px; height: 15px; }
.quick button { color: var(--ink); }
.quick button:hover { background: var(--hover); }
.recent .open { flex: 1; min-width: 0; }
.recent .open span { overflow: hidden; text-overflow: ellipsis; }
.recent .empty-note { color: var(--faint); font-size: 13px; padding: 4px 10px; }
.side-foot { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.sos { font-size: 12.5px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 9%, transparent); color: var(--ink); }
.sos a { color: var(--danger); font-weight: 700; text-decoration: none; }
.about-btn { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; font-size: 14px; color: var(--muted); }
.about-btn:hover { background: var(--hover); color: var(--ink); }
.about-btn svg { width: 18px; height: 18px; }
.scrim { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.topbar { display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 16px; flex: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
body:not(.empty) .topbar { border-bottom-color: var(--line); }
.title { font-weight: 600; font-size: 17px; }
.title span { color: var(--faint); font-weight: 500; font-size: 14px; margin-left: 4px; }
.status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.dot.waiting { background: var(--amber); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.thread { flex: 1; overflow-y: auto; min-height: 0; scroll-behavior: smooth; }
.thread-inner { max-width: 780px; margin: 0 auto; padding: 12px 24px 32px; display: flex; flex-direction: column; gap: 22px; }

/* ---------- Empty state (Gemini/ChatGPT-style hero) ---------- */
.hero { display: none; position: relative; max-width: 780px; margin: 0 auto; padding: 7vh 24px 40px; text-align: center; }
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 460px; z-index: -1; pointer-events: none; background: radial-gradient(55% 50% at 50% 42%, var(--glow), transparent 72%); }
body.empty .hero { display: block; }
body.empty .thread-inner { display: none; }
.hero-mark { width: 60px; height: 60px; margin: 0 auto 20px; border-radius: 18px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 12px 30px -10px rgba(14, 116, 144, 0.7); }
.hero-mark svg { width: 30px; height: 30px; }
.hero h1 { font-size: clamp(30px, 4.5vw, 42px); font-weight: 700; letter-spacing: -0.035em; margin: 0 0 10px; line-height: 1.15; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grad { background: linear-gradient(90deg, #5eead4, #60a5fa); -webkit-background-clip: text; background-clip: text; } }
:root[data-theme="dark"] .grad { background: linear-gradient(90deg, #5eead4, #60a5fa); -webkit-background-clip: text; background-clip: text; }
.hero > p { color: var(--muted); font-size: 16.5px; max-width: 560px; margin: 0 auto; }
.who-label, .suggest-label { margin: 34px 0 12px; font-weight: 600; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.suggest-label { margin-top: 28px; }
.who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.who button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 18px; display: grid; gap: 3px; transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s; }
.who button:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow); }
.wi { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 8px; background: var(--brand-soft); color: var(--brand); transition: background 0.2s, color 0.2s; }
.wi svg { width: 20px; height: 20px; }
.who button:hover .wi { background: var(--brand); color: var(--bg); }
.who b { font-size: 15px; }
.who small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.suggest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.suggest button { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--ink); transition: background 0.15s, border-color 0.15s, transform 0.2s var(--ease); }
.si { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--muted); }
.si svg { width: 16px; height: 16px; }
.suggest button:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-1px); }
.suggest button:hover .si { color: var(--brand); background: var(--brand-soft); }

/* ---------- Messages ---------- */
.row { display: flex; gap: 14px; animation: rise 0.4s var(--ease) both; }
.row.static { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.row.user { justify-content: flex-end; }
.row.user .bubble { max-width: 78%; background: color-mix(in srgb, var(--brand) 9%, var(--surface-2)); padding: 10px 18px; border-radius: 22px 22px 6px 22px; white-space: pre-wrap; overflow-wrap: anywhere; }
.av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; margin-top: 2px; }
.av.bot { background: var(--grad); }
.av.bot svg { width: 17px; height: 17px; }
.av.nurse { background: color-mix(in srgb, var(--ok) 18%, var(--surface)); color: var(--ok); font-size: 12px; font-weight: 700; border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.content { min-width: 0; flex: 1; }
.content p { margin: 0 0 12px; }
.content p:last-child, .content ul:last-child { margin-bottom: 0; }
.content ul { margin: 6px 0 12px; padding-left: 22px; }
.content li { margin: 4px 0; }
.content strong { font-weight: 650; }
.who-name { font-size: 13px; font-weight: 600; color: var(--ok); margin-bottom: 2px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.row.system { justify-content: center; }
.row.system span { font-size: 13px; color: var(--muted); background: var(--surface-2); padding: 5px 14px; border-radius: 999px; text-align: center; }

.card-alert { border: 1.5px solid color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 7%, transparent); border-radius: 16px; padding: 14px 16px; }
.row.bot.emergency .av.bot { background: var(--danger); }
.card-update { border: 1.5px solid color-mix(in srgb, var(--brand) 45%, transparent); background: var(--brand-soft); border-radius: 16px; padding: 12px 16px; }
.card-declined { border-left: 3px solid var(--amber); padding-left: 14px; }

.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sources a, .sources span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; text-decoration: none; }
.sources a:hover { color: var(--ink); background: var(--hover); }
.general-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips button { border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 15px; font-size: 14px; font-weight: 500; transition: all 0.15s var(--ease); }
.chips button:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); transform: translateY(-1px); }

.msg-actions { display: flex; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity 0.15s; }
.row.bot:hover .msg-actions, .row.bot:focus-within .msg-actions { opacity: 1; }
.msg-actions button { border: 0; background: transparent; color: var(--faint); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.msg-actions button:hover { background: var(--hover); color: var(--ink); }
.msg-actions svg { width: 16px; height: 16px; }
@media (hover: none) { .msg-actions { opacity: 1; } }

.summary { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; background: var(--surface); }
.summary .row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; animation: none; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pill.high { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.summary ul { margin: 4px 0 0; padding-left: 18px; }
.summary .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 600; margin-top: 8px; }

.thinking { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14.5px; padding-top: 4px; }
.thinking b { font-weight: 500; background: linear-gradient(90deg, var(--muted) 0%, var(--ink) 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Composer ---------- */
.composer-wrap { flex: none; padding: 0 24px 10px; background: linear-gradient(to bottom, transparent, var(--bg) 22%); }
.composer { max-width: 780px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 10px 10px 10px 22px; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.04); transition: border-color 0.2s, box-shadow 0.2s; }
.composer:focus-within { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 0 0 4px var(--brand-soft), 0 10px 30px -18px rgba(0, 0, 0, 0.45); }
.composer textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; font: inherit; color: var(--ink); max-height: 200px; padding: 7px 0; line-height: 1.5; }
.composer textarea::placeholder { color: var(--faint); }
.send { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; transition: opacity 0.15s, transform 0.15s; box-shadow: 0 6px 16px -6px rgba(14, 116, 144, 0.7); }
.send:hover:not(:disabled) { transform: scale(1.06); }
.send:disabled { opacity: 0.3; cursor: default; background: var(--faint); box-shadow: none; }
.send svg { width: 18px; height: 18px; }
.disclaimer { text-align: center; color: var(--faint); font-size: 12px; margin: 8px 0 0; }

/* ---------- About dialog ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.45); animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { position: relative; width: min(720px, 100%); max-height: 88vh; overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); animation: rise 0.35s var(--ease); }
.modal-close { position: absolute; top: 12px; right: 12px; }
.modal .intro-card { background: var(--surface-2); border-color: var(--line); color: var(--ink); opacity: 1; transform: none; animation: none; }
.modal .intro-card h2 { color: var(--ink); }
.modal .intro-card p, .modal .intro-card li { color: var(--muted); }
.modal .intro-card b { color: var(--ink); }
.modal .safety { background: color-mix(in srgb, var(--danger) 8%, var(--surface-2)); }

/* ---------- Entrance after the splash ---------- */
body.booting .sidebar { transform: translateX(-24px); opacity: 0; }
body.booting .main { opacity: 0; transform: translateY(14px); }
body.ready .sidebar, body.ready .main { transition: transform 0.8s var(--ease), opacity 0.7s var(--ease); }
body.ready .main { transition-delay: 0.1s; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .only-mobile { display: grid; }
  .sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform 0.3s var(--ease); box-shadow: var(--shadow); }
  body.side-open .sidebar { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.4); }
  body.side-open .scrim { display: block; }
  .title span { display: none; }
  .status { font-size: 12px; padding: 4px 10px; white-space: nowrap; }
  .status:not(.live) { border: 0; padding: 0; }
  .status:not(.live) #statusText { display: none; }
  .thread-inner { padding: 8px 16px 24px; }
  .composer-wrap { padding: 0 12px 8px; }
  .who { grid-template-columns: 1fr; }
  .who button { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
  .who .wi { grid-row: span 2; margin: 0; }
  .suggest { grid-template-columns: 1fr; }
  .hero { padding-top: 3vh; }
  .row.user .bubble { max-width: 88%; }
  .av { width: 26px; height: 26px; }
}

/* ================= Splash → intro ================= */
.splash { position: fixed; inset: 0; z-index: 100; color: #fff; overflow-y: auto; overflow-x: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #0b4f5c 0%, #071c2b 55%, #040d16 100%);
  clip-path: circle(150% at var(--x, 50%) var(--y, 50%)); transition: clip-path 0.9s cubic-bezier(0.7, 0, 0.2, 1); }
.splash.leaving { clip-path: circle(0px at var(--x, 50%) var(--y, 50%)); pointer-events: none; }
.splash .orb { position: fixed; border-radius: 50%; filter: blur(70px); opacity: 0.5; animation: drift 9s ease-in-out infinite alternate; pointer-events: none; }
.splash .orb.a { width: 440px; height: 440px; background: #0f766e; top: -140px; left: -120px; }
.splash .orb.b { width: 380px; height: 380px; background: #34d399; bottom: -150px; right: -90px; animation-delay: -3s; opacity: 0.28; }
.splash .orb.c { width: 320px; height: 320px; background: #2563eb; top: 50%; left: 18%; animation-delay: -6s; opacity: 0.32; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }
.splash .grid { position: fixed; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at 50% 40%, black 0%, transparent 65%); }

.stage { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px 70px; transition: transform 0.7s var(--ease), opacity 0.5s; }
.splash.leaving .stage { transform: scale(0.92); opacity: 0; }
.brand-block { text-align: center; transition: all 0.8s var(--ease); }

.logo-big { position: relative; width: 112px; height: 112px; margin: 0 auto 26px; transition: all 0.8s var(--ease); }
.logo-big .ring { position: absolute; inset: -14px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.14); border-top-color: #5eead4; border-right-color: #34d399; animation: spin 1.6s linear infinite; }
.logo-big .ring.r2 { inset: -28px; border-color: rgba(255,255,255,0.06); border-bottom-color: rgba(96,165,250,0.85); animation-duration: 2.6s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo-big .tile { position: absolute; inset: 0; border-radius: 32px; background: var(--grad); box-shadow: 0 20px 60px -10px rgba(14, 116, 144, 0.85), inset 0 1px 0 rgba(255,255,255,0.35); display: grid; place-items: center; animation: tileIn 0.9s var(--ease) both; }
@keyframes tileIn { from { transform: scale(0.4) rotate(-20deg); opacity: 0; } }
.logo-big svg { width: 58px; height: 58px; overflow: visible; }
.logo-big .bubble { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw 1.1s 0.35s var(--ease) forwards; }
.logo-big .spark { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 0.8s 1.1s ease-out forwards, trace 2.4s 2.2s ease-in-out infinite; }
@keyframes trace { 0%, 70% { stroke-dashoffset: 0; } 85% { stroke-dashoffset: -24; } 85.01% { stroke-dashoffset: 24; } 100% { stroke-dashoffset: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sparkIn { to { transform: scale(1); } }
@keyframes beat { 15% { transform: scale(1.18); } 30% { transform: scale(1); } }

.wordmark { font-size: clamp(42px, 8vw, 70px); font-weight: 800; letter-spacing: -0.045em; margin: 0; line-height: 1.05; transition: font-size 0.8s var(--ease); }
.wordmark span { display: inline-block; opacity: 0; transform: translateY(0.5em); animation: letter 0.7s var(--ease) forwards; animation-delay: calc(0.5s + var(--i) * 0.045s); }
.wordmark .accent { background: linear-gradient(90deg, #5eead4, #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes letter { to { opacity: 1; transform: none; } }
.tagline { margin: 14px 0 0; color: rgba(255,255,255,0.68); font-size: 16px; opacity: 0; animation: fadeUp 0.8s 1.05s var(--ease) forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.loader { width: min(300px, 70vw); margin: 40px auto 0; opacity: 0; animation: fadeUp 0.6s 1.25s var(--ease) forwards; transition: opacity 0.4s, margin 0.6s var(--ease), max-height 0.6s var(--ease); max-height: 60px; overflow: hidden; }
.bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,0.1); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0%; border-radius: 4px; background: linear-gradient(90deg, #5eead4, #60a5fa); box-shadow: 0 0 12px #2dd4bf; transition: width 0.55s var(--ease); }
.step { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12.5px; color: rgba(255,255,255,0.6); font-variant-numeric: tabular-nums; }

/* Intro state: the logo tucks up and the reading content rises in */
.stage.intro-on { justify-content: flex-start; }
.stage.intro-on .logo-big { width: 64px; height: 64px; margin-bottom: 14px; }
.stage.intro-on .logo-big .tile { border-radius: 19px; }
.stage.intro-on .logo-big svg { width: 34px; height: 34px; }
.stage.intro-on .logo-big .ring { inset: -8px; }
.stage.intro-on .logo-big .ring.r2 { inset: -16px; }
.stage.intro-on .wordmark { font-size: clamp(32px, 5vw, 44px); }
.stage.intro-on .loader { opacity: 0 !important; max-height: 0; margin: 0; animation: none; }

.intro { width: min(860px, 100%); margin-top: 30px; }
#introBody { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.intro-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; padding: 20px 22px; backdrop-filter: blur(8px); opacity: 0; transform: translateY(18px); animation: cardIn 0.7s var(--ease) forwards; }
.intro-card.i1 { grid-column: 1 / -1; animation-delay: 0.1s; }
.intro-card.i2 { animation-delay: 0.25s; }
.intro-card.i3 { animation-delay: 0.4s; }
.intro-card.i4 { grid-column: 1 / -1; animation-delay: 0.55s; }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.intro-card h2 { margin: 0 0 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.intro-card p { margin: 0 0 10px; color: rgba(255,255,255,0.78); font-size: 15px; line-height: 1.65; }
.intro-card p:last-child { margin-bottom: 0; }
.intro-card b { color: #fff; }
.can-do { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.can-do li { display: flex; gap: 12px; font-size: 14px; color: rgba(255,255,255,0.72); line-height: 1.45; }
.can-do li svg { flex: none; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: #5eead4; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.can-do b { display: block; color: #fff; font-size: 14.5px; }
.how { margin: 0; padding-left: 22px; display: grid; gap: 10px; color: rgba(255,255,255,0.75); font-size: 14.5px; line-height: 1.5; }
.how li::marker { color: #5eead4; font-weight: 700; }
.how i { color: #5eead4; font-style: normal; }
.safety { background: rgba(220, 38, 38, 0.12); border-color: rgba(248, 113, 113, 0.35); }
.safety .fine { font-size: 13px; color: rgba(255,255,255,0.6); }

/* Pinned to the bottom of the screen so Start is always visible, however long the intro is. */
.intro-actions { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 22px; margin: 18px -20px 0; padding: 30px 20px max(16px, env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(6, 42, 51, 0), rgba(6, 42, 51, 0.9) 34%, rgba(6, 42, 51, 0.97)); opacity: 0; animation: cardIn 0.7s 0.75s var(--ease) forwards; }
.stage.intro-on { padding-bottom: 0; }
.more-hint { flex-basis: 100%; order: -1; margin-bottom: -2px; border: 0; background: none; color: rgba(255,255,255,0.8); font-size: 13px; font-weight: 600; transition: opacity 0.3s; }
.more-hint span { display: inline-block; animation: nudge 1.4s ease-in-out infinite; }
.more-hint:hover { color: #fff; }
.splash.at-end .more-hint { opacity: 0; pointer-events: none; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.start-btn { border: 0; background: #fff; color: #062a33; font-weight: 700; font-size: 16px; padding: 14px 28px; border-radius: 999px; box-shadow: 0 10px 30px -8px rgba(94, 234, 212, 0.6); transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.start-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -8px rgba(94, 234, 212, 0.75); }
.start-btn span { display: inline-block; transition: transform 0.2s; }
.start-btn:hover span { transform: translateX(4px); }
.remember { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255,255,255,0.7); cursor: pointer; }
.remember input { accent-color: #2dd4bf; width: 16px; height: 16px; }
.hint { font-size: 12.5px; color: rgba(255,255,255,0.45); }
kbd { font: inherit; font-size: 11.5px; padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.3); }
.skip { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 12.5px; color: rgba(255,255,255,0.45); background: none; border: 0; }
.skip:hover { color: rgba(255,255,255,0.85); }
.stage.intro-on ~ .skip { display: none; }

@media (max-width: 700px) {
  #introBody { grid-template-columns: 1fr; }
  .intro-card { padding: 16px 18px; }
  .stage { padding: 28px 16px 60px; }
  .intro-actions { margin-inline: -16px; padding-inline: 16px; gap: 10px 16px; }
  .intro-actions .hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition: none !important; }
}

/* Short windows (landscape phones, small laptops): keep the pinned intro bar compact. */
@media (max-height: 560px) {
  .intro-actions { padding-top: 18px; gap: 6px 16px; }
  .start-btn { padding: 10px 22px; font-size: 15px; }
  .intro-actions .hint { display: none; }
}

/* Patient name: welcome-screen field + sidebar chip */
.name-field { max-width: 420px; margin: 26px auto 0; text-align: left; }
.name-field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; text-align: center; }
.name-row { display: flex; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s; }
.name-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.name-row input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; padding: 6px 12px; outline: none; }
.name-row input::placeholder { color: var(--faint); }
.name-row button { border: 0; border-radius: 999px; padding: 8px 18px; font-weight: 600; font-size: 14px; background: var(--ink); color: var(--bg); }
.name-row button:hover { opacity: 0.88; }
.name-field.saved .name-row button { background: var(--ok); color: #fff; }
.me-btn { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 6px 10px; border-radius: 9px; font-size: 14px; color: var(--ink); text-align: left; }
.me-btn:hover { background: var(--hover); }
.me-av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.me-btn #meText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-btn.empty #meText { color: var(--muted); }
.me-input { width: 100%; border: 1px solid var(--brand); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; padding: 4px 8px; outline: none; }

/* Recent chats: rename / delete */
.chat-item { position: relative; display: flex; align-items: center; border-radius: 9px; }
.chat-item:hover, .chat-item.active, .chat-item:focus-within { background: var(--hover); }
.chat-item.active .open { font-weight: 600; }
.chat-acts { display: flex; align-items: center; gap: 2px; padding-right: 4px; opacity: 0; transition: opacity 0.15s; }
.chat-item:hover .chat-acts, .chat-item:focus-within .chat-acts, .chat-item.active .chat-acts, .chat-item.confirming .chat-acts { opacity: 1; }
.chat-acts button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); padding: 0; }
.chat-acts button:hover { background: var(--line); color: var(--ink); }
.chat-acts .delete:hover { color: var(--danger); }
.chat-acts svg { width: 15px; height: 15px; }
.chat-item.confirming .open { opacity: 0.55; }
.chat-acts .ask { font-size: 12.5px; color: var(--danger); font-weight: 600; margin-right: 4px; white-space: nowrap; }
.chat-acts .yes, .chat-acts .no { width: auto; height: 24px; padding: 0 8px; font-size: 12.5px; font-weight: 600; }
.chat-acts .yes { background: var(--danger); color: #fff; }
.chat-acts .yes:hover { background: var(--danger); color: #fff; opacity: 0.88; }
.chat-rename { width: 100%; margin: 2px 0; border: 1px solid var(--brand); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; padding: 6px 9px; outline: none; }
/* Touch screens have no hover: keep the icons visible. */
@media (hover: none) { .chat-acts { opacity: 1; } }

/* Source markers [1] inside answers */
.cite { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; margin: 0 1px; border-radius: 6px; font-size: 10.5px; font-weight: 700; line-height: 1; vertical-align: super; background: var(--brand-soft); color: var(--brand); }
.composer textarea { overflow-y: hidden; scrollbar-width: thin; }

/* ================= Settings panel ================= */
.settings-card { width: min(560px, 100%); padding: 26px 26px 22px; }
.settings-card h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.set-section { padding: 18px 0; border-top: 1px solid var(--line); }
.settings-card h2 + .set-section { border-top: 0; padding-top: 10px; }
.set-section h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.set-help { margin: -4px 0 12px; font-size: 13.5px; color: var(--muted); }
.set-form { display: grid; gap: 6px; }
.set-form label { font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.set-form input { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.set-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.set-err { font-size: 13px; color: var(--danger); }
.set-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.set-save { border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 600; font-size: 14px; background: var(--grad); color: #fff; }
.set-ok { font-size: 13.5px; font-weight: 600; color: var(--ok); }
.set-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 0 10px; font-weight: 600; font-size: 14.5px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 9px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.switch-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; cursor: pointer; }
.switch-line span { display: grid; gap: 1px; }
.switch-line b { font-size: 14.5px; font-weight: 600; }
.switch-line small { font-size: 13px; color: var(--muted); }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; margin: 0; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--ease); }
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible, .seg button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }
.set-reset { margin-top: 6px; border: 0; background: none; padding: 4px 0; color: var(--muted); font-size: 13px; text-decoration: underline; }
.set-reset:hover { color: var(--ink); }

/* ================= Accessibility options ================= */
/* Text size: a multiplier on the text sizes (messages, the message box, buttons, sidebar, settings). */
html[data-text="lg"] { --fs: 1.15; }
html[data-text="xl"] { --fs: 1.3; }
html[data-text] body { font-size: calc(15.5px * var(--fs)); }
html[data-text] .hero h1 { font-size: calc(clamp(30px, 4.5vw, 42px) * var(--fs)); }
html[data-text] .hero > p { font-size: calc(16.5px * var(--fs)); }
html[data-text] :is(.who b, .switch-line b, .set-line, .title) { font-size: calc(15px * var(--fs)); }
html[data-text] :is(.chips button, .suggest button, .quick button, .recent .open, .new-chat, .about-btn, .me-btn, .who small, .summary, .set-help, .switch-line small, .seg button, .set-form label, .set-form input, .name-row input, .name-field label, .who-label, .suggest-label, .status, .thinking) { font-size: calc(14px * var(--fs)); }
html[data-text] :is(.sources a, .general-note, .row.system span, .tag, .sos, .disclaimer, .side-label, .pill) { font-size: calc(12.5px * var(--fs)); }
/* High contrast: stronger secondary text and borders, visible focus, underlined links. */
:root.hc.hc { --muted: color-mix(in srgb, var(--ink) 88%, var(--bg)); --faint: color-mix(in srgb, var(--ink) 76%, var(--bg)); --line: color-mix(in srgb, var(--ink) 45%, var(--bg)); }
html.hc a { text-decoration: underline; }
html.hc :focus-visible { outline: 3px solid var(--brand) !important; outline-offset: 2px; }
html.hc .chips button, html.hc .who button, html.hc .suggest button, html.hc .composer { border-width: 2px; }
/* Easy-to-read font */
:root.readable.readable { font-family: "Atkinson Hyperlegible", "Inter", system-ui, sans-serif; letter-spacing: 0.01em; }
/* Reduce motion (also honors the device setting) */
html.rm *, html.rm *::before, html.rm *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ================= Forms inside the chat (visit details) ================= */
.intake { margin-top: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 16px 18px 14px; box-shadow: 0 8px 24px -18px rgba(0, 0, 0, 0.35); max-width: 560px; }
.f-head { font-weight: 700; font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.f-head::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.f-err { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.f-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.f-field { grid-column: 1 / -1; display: grid; gap: 4px; min-width: 0; }
.f-field.half { grid-column: span 1; }
.f-field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.f-opt { font-weight: 500; color: var(--faint); font-size: 12px; }
.intake :is(input:not([type="checkbox"]), select, textarea) { width: 100%; min-width: 0; font: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.intake textarea { resize: vertical; min-height: 60px; }
.intake :is(input, select, textarea):focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.f-check { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; cursor: pointer; padding: 4px 0; }
.f-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.f-invalid :is(input, select, textarea) { border-color: var(--danger) !important; }
.f-check.f-invalid span { color: var(--danger); }
.f-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.f-foot button { border: 0; border-radius: 999px; padding: 10px 22px; font-weight: 600; font-size: 14px; background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(14, 116, 144, 0.8); }
.f-note { font-size: 12px; color: var(--faint); }
.intake.locked { opacity: 0.65; box-shadow: none; }
.intake.locked .f-foot button { background: var(--surface-2); color: var(--muted); box-shadow: none; }
@media (max-width: 600px) { .f-field.half { grid-column: 1 / -1; } .intake { padding: 14px; } }

/* ================= Nurse cards (choose your nurse / directory) ================= */
.nurse-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.ncard { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 14px; transition: border-color 0.15s, transform 0.2s var(--ease), box-shadow 0.2s; }
.ncard:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-1px); box-shadow: var(--shadow); }
.ncard-top { display: flex; gap: 10px; align-items: center; margin-bottom: 2px; }
.ncard-top b { display: block; font-size: 15px; }
.ncard-top small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.n-av { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: var(--grad); }
.n-meta { font-size: 13px; color: var(--muted); }
.n-badge { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.n-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.n-tags span { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.n-next { font-size: 12.5px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.n-next b { color: var(--ink); font-weight: 600; }
.n-bio { font-size: 13px; color: var(--muted); line-height: 1.45; }
.n-pick { margin-top: 4px; border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 13.5px; border-radius: 10px; padding: 8px 10px; transition: background 0.15s, color 0.15s; }
.n-pick:hover:not(:disabled) { background: var(--brand); color: var(--bg); }
.nurse-cards.locked { opacity: 0.6; }
.nurse-cards.locked .ncard:hover { transform: none; box-shadow: none; }

/* Nurse directory */
.nurses-card { width: min(860px, 100%); }
.nurses-card h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.dir-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 14px; }
.dir-filters select { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.dir-grid { margin-top: 0; }
.dir-empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 24px; }

/* Real provider listings (NPI Registry) */
.provider-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 14px; }
.pcard { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 14px; }
.p-av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.pcard .ncard-top b { font-size: 14.5px; }
.p-spec { font-size: 13px; font-weight: 600; color: var(--brand); }
.p-addr { font-size: 13px; color: var(--muted); line-height: 1.45; }
.p-links { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.p-links a { flex: 1; text-align: center; font-size: 13px; font-weight: 600; text-decoration: none; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); background: var(--surface-2); }
.p-links a:hover { border-color: var(--brand); color: var(--brand); }
.p-source { margin-top: 8px; font-size: 12px; color: var(--faint); }
#provWhere { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; outline: none; }
#provWhere:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.loc-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--brand); background: var(--surface-2); cursor: pointer; }
.loc-btn:hover { border-color: var(--brand); }
.loc-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#provResults { min-height: 120px; }

/* Sidebar fit: Recent always keeps room for a few chats; on short screens the whole sidebar scrolls
   instead of squeezing Recent down to nothing. */
.sidebar { overflow-y: auto; overscroll-behavior: contain; }
.side-section.grow { flex: 1 0 auto; min-height: 140px; }
.recent { flex: 1 0 auto; overflow: visible; }
.quick button { padding: 6px 10px; }
.side-section { margin-top: 10px; }
.side-foot { flex: none; }
.sidebar > * { flex-shrink: 0; }
/* Emergency numbers, Settings and About stay pinned at the bottom; the lists above scroll behind them. */
.side-foot { position: sticky; bottom: -12px; margin-bottom: -12px; padding-bottom: 12px; background: var(--sidebar); z-index: 1; }
/* Quick actions as a compact two-column grid, so Recent chats have room. */
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 4px; }
.quick button { gap: 8px; padding: 6px 8px; font-size: 13px; }
.quick .qi { width: 24px; height: 24px; border-radius: 7px; }
.quick .qi svg { width: 14px; height: 14px; }
.quick button { white-space: normal; line-height: 1.25; overflow: visible; text-overflow: clip; min-height: 36px; padding: 5px 6px; }
:root { --side-w: 300px; }
.quick button { white-space: nowrap; min-height: 34px; padding: 5px 7px; gap: 7px; font-size: 13px; }
