/* Lantern (Han, 23 Nov 2026: the "MoonChat Lantern" brand plan): a deep teal night sky with a faint warm glow, a cream
   moon that is also a speech bubble, and amber as the ONLY "press this" colour; sea glass for icons and quiet highlights.
   Components use these tokens only, so light and dark are one switch (the phone's setting). Contrast (WCAG): cream on Night
   Teal 16.1, amber on Night Teal 9.9, Night Teal on amber 9.9, sea glass on Night Teal 9.4, Lagoon on cream 13.6, Amber
   Text on cream 5.1, Deep Sea on cream 5.4. Amber (#F2B26B) is never text on the light page: use --accent-text there. */
:root {
  --bg: #FBF4E6;                          /* Moon Cream: the page under the stars */
  --panel: #FEFBF2;                       /* solid surface: pop-ups, sheets, menus (the glass below, made opaque) */
  --glass: rgba(255, 252, 244, 0.85);     /* surface over the sky: sidebar, cards, message box, chips */
  --sidebar: rgba(255, 252, 244, 0.62);
  --text: #0F2B33;                        /* Lagoon */
  --muted: rgba(15, 43, 51, 0.68);
  --line: rgba(15, 43, 51, 0.20);
  --accent: #F2B26B;                      /* Lantern Amber: buttons, send, progress */
  --on-accent: #07161D;                   /* Night Teal on amber */
  --accent-text: #9A5714;                 /* Amber Text: amber words and links on the light page */
  --accent-soft: rgba(242, 178, 107, 0.18);
  --secondary: #1E6F73;                   /* Deep Sea: icons, focus ring */
  --secondary-soft: rgba(30, 111, 115, 0.10);
  --user-bubble: #0F2B33;                 /* your messages: the logo tile's Lagoon with cream words */
  --user-text: #FBEFD6;
  --bot-bubble: var(--glass);
  --code-bg: rgba(15, 43, 51, 0.06);
  --danger: #B3261E;
  --danger-soft: #FBE3DF;
  --good: #1F7A4D;
  --warn: #8A5A00;
  --warn-soft: #FFF1D0;
  --shadow: 0 6px 24px rgba(15, 43, 51, 0.10);
  --radius: 14px;
  /* the sky (see .sky below) */
  --glow-1: rgba(242, 178, 107, 0.32);
  --glow-2: rgba(124, 198, 190, 0.34);
  --star: rgba(15, 43, 51, 0.38);
  --star-2: rgba(154, 87, 20, 0.42);
  --font-body: "DM Sans", "MoonChat Myanmar", "Noto Sans Myanmar", "Myanmar Text", "Noto Sans Khmer", "Noto Sans Lao", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Fraunces", "MoonChat Myanmar Serif", "MoonChat Myanmar", "Noto Serif Myanmar", "Myanmar Text", Georgia, serif;
  font-family: var(--font-body);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07161D;                        /* Night Teal */
    --panel: #0C242B;                     /* Lagoon at 65% on Night Teal, made opaque */
    --glass: rgba(15, 43, 51, 0.65);
    --sidebar: rgba(15, 43, 51, 0.55);
    --text: #FBEFD6;                      /* Moon Cream */
    --muted: rgba(251, 239, 214, 0.64);
    --line: rgba(124, 198, 190, 0.28);
    --accent: #F2B26B;
    --on-accent: #07161D;
    --accent-text: #F2B26B;
    --accent-soft: rgba(242, 178, 107, 0.12);
    --secondary: #7CC6BE;                 /* Sea Glass */
    --secondary-soft: rgba(124, 198, 190, 0.12);
    --user-bubble: #174652;
    --user-text: #FBEFD6;
    --code-bg: rgba(7, 22, 29, 0.55);
    --danger: #FF9C8F;
    --danger-soft: rgba(255, 156, 143, 0.12);
    --good: #7FD8A8;
    --warn: #F2C76B;
    --warn-soft: rgba(242, 199, 107, 0.12);
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    --glow-1: rgba(242, 178, 107, 0.14);
    --glow-2: rgba(15, 90, 100, 0.30);
    --star: rgba(251, 239, 214, 0.62);
    --star-2: rgba(124, 198, 190, 0.70);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; }
/* Burmese: one standard Unicode font for every phone (only downloaded when Burmese text appears), and more
   room between lines for the stacked letters. */
@font-face { font-family: 'MoonChat Myanmar'; src: url(/fonts/NotoSansMyanmar.woff2) format('woff2'); font-weight: 100 900;
  font-display: swap; unicode-range: U+1000-109F, U+A9E0-A9FE, U+AA60-AA7F; }
html:lang(my) body { line-height: 1.75; }
html:lang(my) .bot-row-desc, html:lang(my) .result-snippet, html:lang(my) .export-sub { line-height: 1.6; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; } /* the app's fonts (Burmese too) in every text box */

.app { display: grid; grid-template-columns: 272px 1fr; height: 100dvh; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--sidebar); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 14px 12px; gap: 10px; overflow-y: auto;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.brand-mark {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-size: 16px;
}
.new-chat {
  border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 9px 12px;
  text-align: left; font-weight: 600; display: flex; gap: 8px; align-items: center;
}
.new-chat:hover { border-color: var(--accent); }

.wallet {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.wallet-label { font-size: 12px; color: var(--muted); }
.wallet-balance { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.wallet.low .wallet-balance { color: var(--danger); }
.small-btn {
  border: none; background: var(--accent-soft); color: var(--accent-text); font-weight: 600;
  border-radius: 8px; padding: 6px 10px; font-size: 13px;
}
.small-btn:hover { filter: brightness(0.97); }

.section-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 6px 0; }

.bot-list, .chat-list { display: flex; flex-direction: column; gap: 2px; }
.bot-item, .chat-item {
  display: flex; align-items: center; gap: 10px; border: none; background: transparent;
  text-align: left; padding: 8px; border-radius: 10px; width: 100%;
}
.bot-item:hover, .chat-item:hover { background: var(--panel); }
.bot-item.active, .chat-item.active { background: var(--accent-soft); }
.bot-item .bot-text { min-width: 0; flex: 1; }
.bot-item .bot-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.bot-item .bot-cost { font-size: 12px; color: var(--muted); }
.badge {
  font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
}
.unconfigured { opacity: .5; }

.chat-item { justify-content: space-between; }
.chat-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border: none; background: none; padding: 0; text-align: left; }
.chat-item .chat-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; flex: 1; }
.chat-open .chat-text { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.chat-open .chat-sub { display: flex; gap: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.chat-open .chat-sub .chat-bot { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chat-open .chat-sub .msg-time { flex: none; margin: 0; font-size: inherit; color: inherit; }
.chat-item .chat-del { opacity: 0; border: none; background: none; color: var(--muted); padding: 0 4px; }
.chat-item:hover .chat-del, .chat-item:focus-within .chat-del { opacity: 1; }
.chat-empty { color: var(--muted); font-size: 13px; padding: 4px 8px; }

.avatar {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  color: var(--on-accent); font-weight: 700; font-size: 13px; background: var(--accent);
}
.avatar.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; }

.avatar.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.avatar.xs { width: 20px; height: 20px; border-radius: 6px; font-size: 9px; }
/* AI maker logos (18 Nov 2026): on a white tile, so the dark ones show in dark mode too */
.avatar.logo { background: #fff; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .1); }
.avatar.logo img { width: 66%; height: 66%; object-fit: contain; display: block; }

/* ---------- Main ---------- */
.main { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
.topbar {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; min-height: 52px;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.topbar-title { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 6px; }
.icon-btn { border: none; background: none; font-size: 20px; padding: 6px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--text); }
.icon-btn:hover { background: var(--accent-soft); }

.messages { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 22px 16px 12px; overscroll-behavior: contain; }
.thread { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

/* Your messages: a bubble on the right. Bot replies: plain text across the page. */
.msg { display: flex; flex-direction: column; min-width: 0; }
.msg.user { align-items: flex-end; gap: 6px; }
.msg.user .bubble {
  background: var(--user-bubble); color: var(--user-text); border-radius: 18px 18px 6px 18px;
  padding: 9px 14px; max-width: min(620px, 85%); white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.bot .who { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.msg.bot .body { overflow-wrap: anywhere; min-width: 0; }
.msg .meta { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.msg .meta button { border: none; background: none; color: var(--muted); padding: 2px 0; font-size: 12.5px; }
.msg .meta button:hover { color: var(--accent-text); }
.msg .meta button.read-aloud.on { color: var(--accent-text); font-weight: 600; }
.msg-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.msg.user .msg-time { margin-top: -2px; padding-right: 4px; }
.msg.error .body { color: var(--danger); background: var(--danger-soft); border-radius: 12px; padding: 9px 12px; }

.body p, .bubble p { margin: 0 0 .7em; }
.body p:last-child { margin-bottom: 0; }
.body ul, .body ol { margin: .3em 0 .7em; padding-left: 1.4em; }
.body table { border-collapse: collapse; margin: .5em 0; font-size: 14px; display: block; overflow-x: auto; max-width: 100%; }
.body th, .body td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; }
.body code { background: var(--code-bg); padding: 1px 5px; border-radius: 5px; font-size: .9em; font-family: ui-monospace, Consolas, monospace; }
.body pre { position: relative; background: var(--code-bg); padding: 12px; border-radius: 10px; overflow-x: auto; max-width: 100%; }
.body pre code { background: none; padding: 0; }
.body img, .body video { max-width: 100%; height: auto; }
.body svg { max-width: 100%; height: auto; }
.body svg.drawn { display: block; max-height: 70vh; border-radius: 12px; margin: .4em 0; }
.copy-code {
  position: absolute; top: 6px; right: 6px; border: 1px solid var(--line); background: var(--panel);
  border-radius: 6px; font-size: 12px; padding: 2px 8px; color: var(--muted);
}

/* Generated pictures: as wide as the chat allows, never wider than the screen. Tap to open. */
.gen-img { display: block; border: none; padding: 0; background: none; border-radius: 14px; overflow: hidden; width: 100%; max-width: 440px; cursor: zoom-in; }
.gen-img img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; background: var(--code-bg); }
.img-placeholder {
  width: 100%; max-width: 440px; aspect-ratio: 1; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--muted); font-size: 14px;
  background: linear-gradient(110deg, var(--code-bg) 30%, var(--panel) 50%, var(--code-bg) 70%); background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Attachments on a sent message */
.msg-files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: min(620px, 85%); }
.msg-thumb { border: none; padding: 0; background: var(--code-bg); border-radius: 12px; overflow: hidden; width: 120px; height: 120px; cursor: zoom-in; }
.msg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-chip {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); background: var(--panel);
  border-radius: 12px; text-decoration: none; color: var(--text); max-width: 260px;
}
.file-chip-text { display: flex; flex-direction: column; min-width: 0; }
.file-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 12px; color: var(--muted); }
.file-icon {
  flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff; background: #6b7280; letter-spacing: .02em;
}
.file-icon.pdf { background: #d93f3f; }

.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 4px; animation: blink 1.2s infinite both; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Empty chat: a short greeting instead of a big list of bots */
.welcome { max-width: 520px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 8px 6vh; }
.welcome-mark {
  width: 44px; height: 44px; border-radius: 13px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
  font-size: 24px; margin-bottom: 14px;
}
.welcome h1 { font-size: 23px; margin: 0 0 6px; font-weight: 700; }
.welcome p { color: var(--muted); margin: 0; font-size: 14px; }

/* ---------- Message box ---------- */
.banner {
  max-width: 760px; margin: 0 auto 8px; width: calc(100% - 24px); padding: 9px 12px; border-radius: 12px;
  background: var(--danger-soft); color: var(--danger); font-size: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.composer {
  max-width: 760px; width: calc(100% - 24px); margin: 0 auto; display: flex; flex-direction: column; gap: 2px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 8px 8px 6px; box-shadow: var(--shadow);
}
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
/* Finishing the message from earlier ones: one tap (or Tab) fills it in. */
.autofill { display: flex; align-items: baseline; gap: 0; width: 100%; text-align: left; border: none; background: var(--accent-soft, color-mix(in srgb, var(--accent) 10%, transparent));
  color: var(--text); border-radius: 12px; padding: 6px 10px; font: inherit; font-size: 14px; cursor: pointer; overflow: hidden; }
.autofill[hidden] { display: none; }
.autofill .af-typed { color: var(--muted); white-space: pre; }
.autofill .af-rest { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.autofill .af-hint { flex: none; margin-left: 10px; font-size: 12px; color: var(--muted); }
/* Ideas: under the latest answer, and on a new chat. Tapping one fills the message box. */
.next-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 18px; }
.next-label { width: 100%; font-size: 12.5px; color: var(--muted); }
.next-chip, .starter-chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 7px 13px;
  font: inherit; font-size: 14px; line-height: 1.35; text-align: left; cursor: pointer; max-width: 100%; }
.next-chip:hover, .starter-chip:hover { border-color: var(--accent); color: var(--accent-text); }
/* Before a costly bot: the question, cheaper bots, then "send anyway". */
.cost-warn { margin: 0 0 14px; line-height: 1.55; }
.cost-choices { display: flex; flex-direction: column; gap: 8px; }
.cost-alt { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.cost-alt .tier { font-size: 12px; font-weight: 600; color: var(--muted); }
.cost-never { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
/* 16px stops iPhone from zooming in when the box is tapped. */
.composer textarea {
  border: none; outline: none; resize: none; background: transparent; color: var(--text);
  font: inherit; font-size: 16px; line-height: 1.45; max-height: 200px; padding: 6px 8px 4px; width: 100%;
}
.composer-bar { display: flex; align-items: center; gap: 4px; }
.spacer { flex: 1; }
.tool-btn {
  border: none; background: none; color: var(--muted); width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
}
.tool-btn:hover { background: var(--accent-soft); color: var(--text); }
.tool-btn.on { background: var(--danger-soft); color: var(--danger); }
.status-line { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.cut-off { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 14px; }
.cut-off span { flex: 1 1 220px; }
.cut-off .btn { padding: 6px 14px; font-size: 14px; }
.sources-label { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.source-chip {
  font-size: 12.5px; color: var(--text); text-decoration: none; background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.source-chip:hover { border-color: var(--accent); }
.bot-pill {
  display: inline-flex; align-items: center; gap: 6px; border: none; background: none; color: var(--muted);
  border-radius: 999px; padding: 6px 10px; font-size: 13.5px; font-weight: 500; max-width: 55%; min-width: 0;
}
.bot-pill:hover, .bot-pill[aria-expanded="true"] { background: var(--accent-soft); color: var(--text); }
.bot-pill-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.bot-pill-dot.has-logo { width: 20px; height: 20px; border-radius: 6px; background: #fff; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .1); }
.bot-pill-dot.has-logo img { width: 70%; height: 70%; object-fit: contain; }
.bot-pill-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.think-pill {
  display: inline-flex; align-items: center; gap: 4px; border: none; background: none; color: var(--muted);
  border-radius: 999px; padding: 6px 9px; font-size: 13px; font-weight: 500; flex: none; white-space: nowrap;
}
.think-pill[hidden] { display: none; }
.think-pill:hover, .think-pill[aria-expanded="true"] { background: var(--accent-soft); color: var(--text); }
.think-pill.on { color: var(--accent-text); }
.think-icon { font-size: 14px; }
/* Thinking level menu (Han, 20 Nov 2026), above the 🧠 button */
.think-menu {
  position: fixed; z-index: 60; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
  animation: think-in .16s ease-out;
}
@keyframes think-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .think-menu { animation: none; } }
.think-head { font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 10px 4px; }
.think-opt {
  display: flex; align-items: flex-start; gap: 10px; text-align: left; border: none; background: none; color: inherit;
  padding: 9px 10px; border-radius: 11px; width: 100%; font: inherit;
}
.think-opt:hover, .think-opt:focus-visible { background: var(--accent-soft); outline: none; }
.think-opt.on { background: var(--accent-soft); }
.think-opt-icon { font-size: 18px; line-height: 1.3; width: 22px; text-align: center; flex: none; }
.think-opt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.think-opt-body strong { font-size: 14.5px; }
.think-opt .think-opt-body .small { font-size: 12.5px; line-height: 1.35; margin-top: 0; }
.think-check { color: var(--accent-text); font-weight: 700; padding-top: 2px; }
.think-foot { margin: 4px 10px 4px !important; font-size: 12px; }
.send-btn {
  border: none; background: var(--text); color: var(--bg); width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
}
.send-btn:disabled { opacity: .25; cursor: default; }
.composer-hint { text-align: center; font-size: 11.5px; color: var(--muted); padding: 6px 16px calc(8px + env(safe-area-inset-bottom)); }

/* Attachments waiting to be sent */
.tray { display: flex; gap: 8px; padding: 4px 4px 6px; overflow-x: auto; }
.tray-item {
  position: relative; flex: none; height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg);
  display: flex; align-items: center; gap: 8px; padding: 0 28px 0 8px; max-width: 200px;
}
.tray-item.image { width: 64px; padding: 0; overflow: hidden; }
.tray-item.image img { width: 100%; height: 100%; object-fit: cover; }
.tray-item.failed { border-color: var(--danger); }
.tray-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-x {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.6); color: #fff; font-size: 15px; line-height: 1; display: grid; place-items: center; padding: 0;
}
.tray-busy { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--panel) 60%, transparent); }
.tray-err { position: absolute; left: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* Voice typing bar */
.rec { display: flex; align-items: center; gap: 10px; padding: 6px 6px 4px 10px; font-size: 14px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1.2s infinite both; }
.rec.working .rec-dot { background: var(--accent); }
.rec-label { flex: 1; color: var(--muted); }
.rec-time { font-variant-numeric: tabular-nums; color: var(--muted); }
.rec.working .rec-time { display: none; }
.rec-cancel, .rec-done { border: none; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13.5px; }
.rec-cancel { background: none; color: var(--muted); }
.rec-done { background: var(--accent); color: var(--on-accent); }

/* Bot picker: a small menu above the message box (computer) or a sheet from the bottom (phone) */
.menu-scrim { position: fixed; inset: 0; z-index: 39; background: transparent; }
.bot-menu {
  position: absolute; z-index: 40; bottom: 96px; left: max(12px, calc(50% - 380px)); width: min(400px, calc(100% - 24px));
  max-height: min(70vh, 560px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.bot-menu-head { padding: 10px 10px 6px; }
.bot-menu.from-typing .bot-menu-head { display: none; }
.bot-menu-head input {
  width: 100%; font: inherit; font-size: 16px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); outline: none;
}
.bot-menu-list { overflow-y: auto; padding: 0 6px 8px; }
.bot-menu-head { display: flex; gap: 6px; align-items: center; }
.bot-menu-close { display: none; flex: none; width: 40px; height: 40px; border: none; border-radius: 50%; background: none; color: var(--muted); font-size: 18px; }
.bot-menu.full .bot-menu-close { display: grid; place-items: center; }
.bot-menu.full .bot-menu-close:hover { background: var(--bg); color: var(--text); }
.bot-group { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 10px 8px 4px; }
.bot-row { display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: none; text-align: left; padding: 7px 8px; border-radius: 10px; }
.bot-row:hover, .bot-row:focus-visible { background: var(--bg); outline: none; }
.bot-row.active { background: var(--accent-soft); }
.bot-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bot-row-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.bot-row-desc { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-row-check { color: var(--accent-text); font-weight: 700; }
.badge {
  font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
}

/* Full-screen picture viewer */
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 16px 16px 72px; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.viewer-bar { position: absolute; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; gap: 10px; justify-content: center; }
.viewer-btn { border: none; border-radius: 999px; padding: 10px 22px; font-weight: 600; background: rgba(255,255,255,.16); color: #fff; }
.viewer-btn:first-child { background: #fff; color: #111; }
body.no-scroll { overflow: hidden; }

.only-mobile { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 29; }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 86vw; max-width: 320px; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .only-mobile { display: inline-grid; }
  .messages { padding: 16px 14px 10px; }
  .composer { width: calc(100% - 16px); border-radius: 20px; }
  .composer-hint { display: none; }
  .composer { margin-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .msg.user .bubble { max-width: 88%; }
  .msg-thumb { width: 104px; height: 104px; }
  .gen-img, .img-placeholder { max-width: 100%; }
  .menu-scrim { background: rgba(0,0,0,.35); }
  .bot-menu {
    position: fixed; left: 0; right: 0; bottom: 0; width: 100%; max-height: 75dvh;
    border-radius: 18px 18px 0 0; border-bottom: none; padding-bottom: env(safe-area-inset-bottom);
  }
  .bot-menu::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; }
  /* Search on a phone (Han, 19 Nov 2026, Poe screenshot: "the search transition should be smooth not abrupt and the background
     should still be visible but greyed"): a tall sheet that slides up, the chat greyed above it */
  .bot-menu.full { top: max(64px, 14dvh); bottom: 0; height: auto; max-height: none; border-radius: 20px 20px 0 0; }
  .bot-menu.full::before { display: none; }
  .bot-menu.full .bot-menu-head { padding: 12px 8px 8px 12px; }
  .bot-menu.full .bot-menu-list { flex: 1; }
  .menu-scrim { background: rgba(10, 10, 20, .45); animation: scrim-in .25s ease-out; }
  .bot-menu:not(.from-typing) { animation: sheet-up .32s cubic-bezier(.2, .8, .2, 1); }
  .bot-menu.closing { animation: sheet-down .22s ease-in forwards; }
  .menu-scrim.closing { animation: scrim-out .22s ease-in forwards; }
  .bot-row { padding: 10px 8px; }
}

/* Search above the box on a computer: the phone's tall sheet, centred and wider (Han, 20 Nov 2026: "too small to see") */
@media (min-width: 821px) {
  .bot-menu.full {
    position: fixed; top: max(64px, 10vh); bottom: 0; left: max(16px, calc(50% - 380px)); right: max(16px, calc(50% - 380px));
    width: auto; max-height: none; border-radius: 20px 20px 0 0; border-bottom: none; animation: sheet-up .32s cubic-bezier(.2, .8, .2, 1);
  }
  .bot-menu.full .bot-menu-head { padding: 16px 12px 10px 18px; }
  .bot-menu.full .bot-menu-head input { font-size: 17px; padding: 11px 14px; }
  .bot-menu.full .bot-menu-list { flex: 1; padding: 0 12px 16px; }
  .bot-menu.full .bot-row { padding: 10px 12px; }
  .bot-menu.full .bot-row-name { font-size: 15px; }
  .bot-menu.full .bot-row-desc { font-size: 13.5px; }
  .bot-menu.full .bot-group { font-size: 12.5px; padding: 14px 12px 6px; }
  .bot-menu.full.closing { animation: sheet-down .22s ease-in forwards; }
  .menu-scrim.dim { background: rgba(10, 10, 20, .45); animation: scrim-in .25s ease-out; }
  .menu-scrim.dim.closing { animation: scrim-out .22s ease-in forwards; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrim-out { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bot-menu, .bot-menu.closing, .menu-scrim, .menu-scrim.closing { animation: none !important; } }

/* ---------- Top-up dialog ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 10, 20, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 18px; box-shadow: var(--shadow); width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 18px 20px 20px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-head h2 { font-size: 19px; margin: 0; }
.modal .lead { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.sandbox-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #8a5a00; background: #fff2cc; border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pack { border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.pack:hover, .pack:focus-visible { border-color: var(--accent); }
.pack .pack-label { font-size: 12px; font-weight: 600; color: var(--accent-text); }
.pack .pack-price { font-size: clamp(17px, 4.8vw, 22px); font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; white-space: nowrap; }
.pack .pack-credits { font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.pack .pack-bonus { font-size: 13px; color: var(--good); font-weight: 700; }
.pack .pack-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pack .pack-extra { font-size: 11px; font-weight: 700; color: #fff; background: var(--good); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.pack .pack-math { display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.custom-amount { border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 12px; margin-top: 10px; }
.custom-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.custom-title { font-size: 12px; font-weight: 600; color: var(--accent-text); }
.custom-amount .pack-extra { font-size: 11px; font-weight: 700; color: #fff; background: var(--good); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.custom-hint { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.custom-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.custom-field { flex: 3 1 150px; min-width: 0; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 0 10px; }
.custom-field:focus-within { border-color: var(--accent); }
.custom-amount-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font-size: 18px; font-weight: 700; padding: 8px 0; font-variant-numeric: tabular-nums; outline: none; }
.custom-unit { font-size: 13px; font-weight: 600; color: var(--muted); }
.custom-go { flex: 1 0 auto; white-space: nowrap; }
.custom-go:disabled { opacity: .5; }
.custom-calc { font-size: 13px; color: var(--muted); margin-top: 8px; min-height: 18px; font-variant-numeric: tabular-nums; }
.custom-calc strong { color: var(--text); }
.custom-calc .pack-bonus { color: var(--good); font-weight: 700; }
.custom-calc.warn { color: var(--danger, #c0392b); }
.sales-line { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.sales-link { color: var(--accent-text); font-weight: 600; }
.pay-qr { text-align: center; }
.pay-qr img.pay-qr-code { width: 260px; max-width: 100%; background: #fff; }
.pay-amount { font-size: 22px; font-weight: 700; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.pay-status { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 14px; margin: 8px 0 14px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wallet-logos { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.modal-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 14px; font-weight: 600; text-decoration: none; color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.done-icon { font-size: 44px; text-align: center; }
.test-link { display: block; margin: 14px auto 0; border: none; background: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; }
.form-error { color: var(--danger); font-size: 13.5px; margin-top: 10px; text-align: center; }

/* ---------- Log in / create account ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--sidebar); }
.auth-card {
  width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 26px 24px 20px; display: flex; flex-direction: column; gap: 14px;
}
.auth-card .brand { font-size: 22px; }
.auth-lead { margin: 0; color: var(--muted); font-size: 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 10px; padding: 3px; gap: 3px; }
.auth-tabs button { border: none; background: none; border-radius: 8px; padding: 8px; font-weight: 600; color: var(--muted); }
.auth-tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
#authForm { display: flex; flex-direction: column; gap: 12px; }
.auth-foot { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.field-hint { font-weight: 400; font-size: 12px; }
.btn.block { width: 100%; padding: 11px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.danger { color: var(--danger); }
.btn:focus-visible, .small-btn:focus-visible, .link-btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#authForm .form-error { margin: 0; text-align: left; }

/* ---------- Search chats ---------- */
.chat-search { display: flex; align-items: center; gap: 6px; margin: 6px 2px 4px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel); color: var(--muted); }
.chat-search:focus-within { border-color: var(--accent); }
.chat-search input { flex: 1; min-width: 0; border: none; background: none; color: var(--text); padding: 8px 0; font-size: 16px; outline: none; }
.chat-open.result { align-items: flex-start; }
.result-text { display: flex; flex-direction: column; min-width: 0; flex: 1; text-align: left; }
.result-snippet { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.chat-list mark, .result-snippet mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.msg.found { animation: found 2.5s ease-out; border-radius: 12px; }
@keyframes found { 0%, 40% { background: var(--accent-soft); box-shadow: 0 0 0 8px var(--accent-soft); } 100% { background: transparent; box-shadow: 0 0 0 8px transparent; } }

/* ---------- Share or save a chat ---------- */
.export-opts { display: grid; gap: 8px; margin: 4px 0 12px; }
.export-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 12px 14px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.export-opt:hover { border-color: var(--accent); }
.export-label { font-weight: 600; font-size: 15px; }
.export-sub { font-size: 13px; color: var(--muted); }

/* ---------- Artifacts page (menu) ---------- */
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; margin-top: 6px; border: none; border-radius: 10px;
  background: none; color: var(--text); font-size: 14.5px; font-weight: 500; text-align: left; }
.nav-item:hover, .nav-item.active { background: var(--accent-soft); }
.nav-item.active { color: var(--accent-text); font-weight: 600; }
body.artifacts-page .composer, body.artifacts-page .composer-hint, body.artifacts-page #botRow, body.artifacts-page #freshBelow, body.artifacts-page #chatBotNote { display: none !important; }
.art-page { max-width: 960px; margin: 0 auto; padding: 8px 4px 40px; }
.art-page > .spinner { margin: 40px auto; }
.art-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.art-head h1 { font-size: 24px; margin: 0; }
.art-search { width: 100%; max-width: 420px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  color: var(--text); font-size: 16px; margin-bottom: 16px; }
.art-search:focus { outline: none; border-color: var(--accent); }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.art-tile { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--text); text-align: left; min-width: 0; }
.art-tile:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.art-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.art-chat { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }

/* ---------- English | မြန်မာ ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--panel); flex: none; }
.lang-switch button { border: none; background: none; color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; line-height: 1.4; }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.menu-lang { margin-top: auto; padding: 8px 2px; }
.menu-lang + .install-btn { margin-top: 0; }
.menu-lang ~ .account { margin-top: 0; }

/* ---------- Pages, charts and diagrams (artifacts): card in the reply, panel beside the chat ---------- */
.artifact-card { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 440px; margin: 10px 0; padding: 10px 14px 10px 10px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); text-align: left; }
.artifact-card:not(.writing):hover, .artifact-card.active { border-color: var(--accent); }
.artifact-card.active { background: var(--accent-soft); }
.artifact-card.writing { cursor: default; }
.ac-icon { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.ac-text { display: flex; flex-direction: column; min-width: 0; }
.ac-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-sub { font-size: 13px; color: var(--muted); }
.artifacts-btn { position: relative; }
.artifacts-count { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent);
  font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.artifacts-count:empty { display: none; }
.ap { display: flex; flex-direction: column; min-width: 0; height: 100dvh; background: var(--panel); border-left: 1px solid var(--line); }
.ap-head { display: flex; align-items: center; gap: 4px; padding: 8px 10px; min-height: 52px; border-bottom: 1px solid var(--line); }
.ap-head .icon-btn { font-size: 16px; color: var(--muted); }
.ap-head .icon-btn:hover { color: var(--text); }
.ap-head .icon-btn:disabled { opacity: .35; }
.ap-head .icon-btn.done { color: var(--good); }
.ap-nav { display: inline-flex; align-items: center; }
.ap-nav .icon-btn { font-size: 20px; padding: 2px 6px; }
.ap-count { font-size: 12.5px; color: var(--muted); min-width: 34px; text-align: center; }
.ap-title { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; }
.ap-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg); flex: none; margin-right: 4px; }
.ap-tabs button { border: none; background: none; color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.ap-tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ap-tabs button:disabled { opacity: .5; }
.ap-body { flex: 1; min-height: 0; display: flex; }
.ap-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #fff; }
.ap-code { flex: 1; margin: 0; overflow: auto; padding: 14px 16px; background: var(--code-bg); font: 13px/1.5 ui-monospace, Consolas, monospace; white-space: pre; border-radius: 0; }
.only-desktop { display: none; }
@media (min-width: 1000px) {
  .app.with-panel { grid-template-columns: 272px minmax(0, 1fr) minmax(380px, 48%); }
  .app.with-panel.panel-wide { grid-template-columns: 272px minmax(0, 1fr); }
  .app.with-panel.panel-wide .main { display: none; }
  .only-desktop { display: inline-grid; }
}
@media (max-width: 999.98px) {
  .ap { position: fixed; inset: 0; z-index: 55; height: 100dvh; border-left: none;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}
body.panel-open { overflow: hidden; }

/* ---------- English | မြန်မာ ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--panel); flex: none; }
.lang-switch button { border: none; background: none; color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; line-height: 1.4; }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.menu-lang { margin-top: auto; padding: 8px 2px; }
.menu-lang + .install-btn { margin-top: 0; }
.menu-lang ~ .account { margin-top: 0; }
/* "Answer out loud when I speak" */
.menu-toggle { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 8px 2px 0; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.menu-toggle input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; }
.menu-toggle + .menu-lang { margin-top: 0; }

/* ---------- Live previews (pages, charts, diagrams) ---------- */
.artifact { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 10px 0; background: var(--panel); }
.artifact.writing { display: flex; align-items: center; gap: 10px; padding: 14px; color: var(--muted); font-size: 14px; }
.artifact-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.artifact-title { flex: 1 1 140px; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.artifact-btn { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; }
.artifact-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.artifact-frame { display: block; width: 100%; height: 320px; border: 0; background: #fff; }
.artifact-code pre { margin: 0; border-radius: 0; max-height: 420px; overflow: auto; }
.artifact-full { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--panel);
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.artifact-full .artifact-frame { flex: 1; height: auto; }

/* ---------- Install the app ---------- */
.install-btn {
  margin-top: auto; display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; margin-bottom: 8px;
  border: 1px dashed var(--line); border-radius: 12px; background: none; color: var(--accent-text); font-weight: 600; font-size: 14px;
}
.install-btn:hover { background: var(--accent-soft); }
.install-btn:not([hidden]) + .account { margin-top: 0; }
.install-steps { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 12px; }
.install-steps li { display: flex; gap: 12px; align-items: flex-start; }
.step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; }

/* ---------- Account bar (bottom of sidebar) ---------- */
.account {
  margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 4px 2px;
  border-top: 1px solid var(--line);
}
.account .avatar { width: 28px; height: 28px; font-size: 12px; }
.me-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .icon-btn { font-size: 18px; color: var(--muted); }

/* ---------- Account / admin dialogs ---------- */
.modal.wide { width: min(920px, 100%); }
.modal h3 { font-size: 15px; margin: 20px 0 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.sheet-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.note { font-size: 13.5px; border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; overflow-wrap: anywhere; }
.note.ok { background: var(--accent-soft); color: var(--text); }
.note.bad { background: var(--danger-soft); color: var(--danger); }
.muted { color: var(--muted); font-size: 13.5px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.stat { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--muted); }

.inv-form { display: grid; grid-template-columns: 1fr 1fr 1.6fr auto; gap: 10px; align-items: end; }
.share { margin: 12px 0; padding: 12px; border: 1px dashed var(--accent); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.share-code { font-family: ui-monospace, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.share-text { white-space: pre-wrap; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; }
.admin-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.admin-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .badge { margin-left: 6px; }
.admin-table tr.dim td { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.amt { width: 80px; font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.link-btn { border: none; background: none; color: var(--accent-text); font-weight: 600; padding: 2px 0; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .inv-form { grid-template-columns: 1fr 1fr; }
  .inv-form .btn { grid-column: 1 / -1; }
}

/* ---------- Credit history ---------- */
.wallet .link-btn { font-size: 12px; padding: 0; margin-top: 2px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.sheet-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-head .btn { padding: 6px 12px; font-size: 14px; }
.usage-bars { display: flex; flex-direction: column; gap: 8px; }
.usage-row { display: grid; grid-template-columns: minmax(110px, 180px) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.usage-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.usage-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.usage-val { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table.history td { white-space: normal; }
.admin-table.history td.when, .admin-table.history td.num { white-space: nowrap; }
.admin-table .sub { font-size: 12px; color: var(--muted); }
.num.plus { color: var(--good); font-weight: 600; }
.muted.small { font-size: 12.5px; margin-top: 12px; }
@media (max-width: 820px) {
  .stats.three { grid-template-columns: 1fr 1fr; }
  .usage-row { grid-template-columns: 1fr auto; }
  .usage-bar { grid-column: 1 / -1; grid-row: 2; }
}

.date-m { display: none; }
@media (max-width: 820px) {
  .admin-table.history th:first-child, .admin-table.history td.when { display: none; }
  .date-m { display: block; }
}

/* ---------- Tools product (A/B test): its own colours, home screen of tools, and forms ---------- */
/* Lumi keeps its own look (not Lantern): the old neutral tokens with its orange. */
body.product-tools { --accent: #e8590c; --accent-soft: #fff0e6; --user-bubble: #e8590c; --bg: #faf7f4; --sidebar: #f4efea;
  --panel: #ffffff; --glass: #ffffff; --text: #1c1c22; --muted: #6b6b78; --line: #e3e3ea; --on-accent: #ffffff; --accent-text: #c2410c;
  --secondary: #e8590c; --secondary-soft: #fff0e6; --user-text: #ffffff; --bot-bubble: #ffffff; --code-bg: #f3f3f7;
  --danger: #c4314b; --danger-soft: #fdecee; --good: #0f8a4b; --warn: #8a5a00; --warn-soft: #fff4d6; --shadow: 0 6px 24px rgba(20, 20, 40, 0.08);
  --font-body: "MoonChat Myanmar", Inter, "Segoe UI", "Noto Sans Myanmar", "Myanmar Text", system-ui, -apple-system, sans-serif; --font-head: var(--font-body); }
@media (prefers-color-scheme: dark) {
  body.product-tools { --accent: #ff8a4c; --accent-soft: #3a2518; --user-bubble: #c2410c; --bg: #17140f; --sidebar: #12100c;
    --panel: #1c1c24; --glass: #1c1c24; --text: #ececf2; --muted: #9a9aab; --line: #2b2b36; --accent-text: #ff8a4c; --secondary: #ff8a4c;
    --secondary-soft: #3a2518; --bot-bubble: #1f1f29; --code-bg: #24242f; --danger: #ff7a8e; --danger-soft: #3a1d24; --good: #4cc98a;
    --warn: #f0c060; --warn-soft: #3a3020; --shadow: 0 6px 24px rgba(0, 0, 0, 0.4); }
}
.product-tools #botChip, .product-tools #artifactsNav, .product-tools #artifactsBtn { display: none !important; }
.tool-home .composer, .tool-home .composer-hint, .tool-image .composer, .tool-image .composer-hint { display: none; }
.tools-home { max-width: 760px; margin: 0 auto; padding: 28px 4px 40px; }
.tools-home h1 { font-size: 24px; margin: 0 0 6px; font-weight: 700; }
.tools-sub { color: var(--muted); margin: 0 0 20px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tool-card { display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); color: var(--text); cursor: pointer; font: inherit; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.tool-card.off { opacity: .55; cursor: default; transform: none; }
.tool-card-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); display: grid; place-items: center; font-size: 28px; }
.tool-card-text { display: grid; gap: 4px; min-width: 0; }
.tool-card-name { font-weight: 700; font-size: 16.5px; }
.tool-card-blurb { color: var(--muted); font-size: 14px; line-height: 1.5; }
.tool-card-cost { color: var(--accent-text); font-size: 12.5px; font-weight: 600; }
.tool-page { max-width: 600px; margin: 0 auto; padding: 14px 4px 40px; }
.tool-form { display: grid; gap: 14px; }
.tool-form .field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.tool-form .field[hidden] { display: none; }
.tool-form input[type=text], .tool-form textarea, .tool-form select { width: 100%; font: inherit; font-size: 16px; font-weight: 400; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.tool-form textarea { resize: vertical; min-height: 96px; }
.tool-form input:focus, .tool-form textarea:focus, .tool-form select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.tool-form .req { color: var(--accent-text); }
.tool-back { justify-self: start; background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; padding: 4px 0; }
.tool-back:hover { color: var(--text); }
.tool-head { display: flex; gap: 14px; align-items: center; }
.tool-head-icon { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); display: grid; place-items: center; font-size: 30px; }
.tool-head h1 { font-size: 21px; margin: 0 0 2px; }
.tool-head p { margin: 0; color: var(--muted); font-size: 14px; }
.tool-photo { position: relative; display: grid; gap: 10px; justify-items: start; padding: 14px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--panel); }
.tool-photo img { max-width: 100%; max-height: 260px; border-radius: 10px; display: block; }
.tool-photo-busy { position: absolute; top: 20px; left: 20px; background: var(--panel); border-radius: 50%; padding: 6px; display: grid; }
.tool-photo-btn { font-weight: 600; }
.tool-photo:not(.has-photo) .tool-photo-btn { width: 100%; padding: 18px; }
.tool-error { color: var(--danger); font-size: 14px; min-height: 0; }
.tool-error:empty { display: none; }
.tool-submit { padding: 14px; font-size: 16px; font-weight: 700; border-radius: 14px; }
.tool-cost { margin: -4px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.tool-avatar { width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); display: inline-grid; place-items: center; font-size: 13px; flex: none; }
.chat-open .tool-avatar { width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 18px; }
.chip-btn { font: inherit; font-size: 13.5px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.chip-btn.quiet { color: var(--muted); }
@media (max-width: 820px) {
  .tools-home { padding-top: 16px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { padding: 14px; }
}

/* ---------- Telegram: sign-in note and buttons ---------- */
.tg-note { background: var(--accent-soft); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }
.tg-login { margin-top: 14px; display: grid; gap: 12px; justify-items: center; }
.tg-login[hidden] { display: none; }
.or-line { width: 100%; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.tg-btn { background: #2aabee; border-color: #2aabee; color: #fff; }
a.tg-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; box-sizing: border-box; }
a.tg-btn[hidden] { display: none; }
.tg-wait { width: 100%; box-sizing: border-box; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--text); }
.tg-wait[hidden] { display: none; }
.tg-wait p { margin: 0 0 8px; }
.tg-wait-title { font-weight: 700; }
.tg-wait-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tg-wait-actions .small-btn { text-decoration: none; }
.tg-phone { font-weight: 500; text-align: center; }
.tg-phone[hidden] { display: none; }
#userRow[hidden], #passRow[hidden] { display: none; }

/* Error under a reply: the real reason, for admins only */
.err-detail { margin-top: 8px; font: 12.5px/1.45 ui-monospace, Consolas, monospace; color: var(--muted); white-space: pre-wrap; word-break: break-word; }

/* A similar bot answered because the chosen one was busy */
.sub-note { margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* Picking an answer up again after switching apps */
.live-note { display: flex; align-items: center; gap: 8px; }

/* Messages waiting to be sent (typed while a bot was answering) */
.msg.queued .bubble { opacity: .6; outline: 1.5px dashed var(--accent); outline-offset: -1.5px; }
.msg.queued .msg-files { opacity: .6; }
.queued-bar { display: flex; gap: 12px; align-items: center; justify-content: flex-end; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.queued-bar .link-btn { font-size: 12.5px; }
.queued-x { font-size: 14px; }

/* Bot picker: the short list the admin chose ("Main") and "All bots" */
.bot-tabs { display: flex; gap: 4px; padding: 0 10px 6px; }
.bot-tab { flex: 1; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13.5px; cursor: pointer; }
.bot-tab.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bot-more { display: block; width: calc(100% - 4px); margin: 6px 2px 2px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: transparent; color: var(--accent-text); font: inherit; font-size: 14px; cursor: pointer; }
.bot-more:hover { background: var(--hover, rgba(127,127,127,.08)); }

/* Bot picker: the Main list's categories and tiers (Top / Best value / Budget) */
.bot-group.cat { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.bot-group .cat-icon { font-size: 14px; }
.bot-group .cat-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 12px; }
.tier { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; vertical-align: 1px; white-space: nowrap; }
.tier-frontier { background: color-mix(in srgb, #7c3aed 16%, transparent); color: #7c3aed; }
.tier-value { background: color-mix(in srgb, #0f9d58 16%, transparent); color: #0b8043; }
.tier-budget { background: color-mix(in srgb, #64748b 18%, transparent); color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tier-frontier { color: #c4b5fd; } :root:not([data-theme="light"]) .tier-value { color: #86efac; } }
:root[data-theme="dark"] .tier-frontier { color: #c4b5fd; } :root[data-theme="dark"] .tier-value { color: #86efac; }

/* Video bots: length and shape under the message box, and the finished video */
.video-opts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 4px 6px; font-size: 13px; }
.video-opts[hidden] { display: none; }
.vopt-group { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.vopt { border: 0; background: transparent; color: var(--text); padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.vopt + .vopt { border-left: 1px solid var(--line); }
.vopt.on { background: var(--accent); color: var(--on-accent); }
.vopt-price { color: var(--muted); }
/* every length the router allows (20 Nov 2026): a slider when there are many; shapes as separate chips when more than 3 */
.vlen-group { align-items: center; gap: 6px; padding: 2px 10px; overflow: visible; }
.vlen { width: 150px; max-width: 42vw; accent-color: var(--accent); }
.vlen-end { color: var(--muted); font-size: 12px; }
.vlen-value { font-weight: 700; min-width: 3.2em; text-align: right; }
.vopt-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; border: 0; overflow: visible; }
.vopt-chips .vopt, .vopt-chips .vopt + .vopt { border: 1px solid var(--line); border-radius: 999px; }
.vopt-chips .vopt.on { border-color: var(--accent); }
.gen-video { display: block; width: 100%; max-width: 520px; max-height: 70vh; border-radius: 14px; background: #000; }

/* Pages read from links in a message, and links that couldn't be read */
.file-icon.page { font-size: 16px; background: transparent; }
.page-chip .file-name { max-width: 220px; }
.msg.user .link-note { align-self: flex-end; max-width: 85%; font-size: 12.5px; color: var(--muted); margin-top: 4px; text-align: right; }

/* A model a router added this week (lib/catalog.js) */
.badge.badge-new { background: var(--accent, #4D6BFE); color: #fff; }

/* Help & contact page (app.js openHelpPage; words in help.js) */
.help-page { max-width: 760px; }
.help-page h2 { font-size: 17px; margin: 0 0 8px; }
.help-page p, .help-page li { line-height: 1.6; }
.help-contact { background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; }
.help-contact p { margin: 0 0 10px; }
.help-sec { margin: 20px 0; }
.help-steps { padding-left: 22px; margin: 6px 0; }
.help-steps li { margin: 4px 0; }
.help-faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
.help-faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.help-faq p { margin: 8px 0 2px; }
.help-tour { margin: 22px 0 40px; }

/* First-time tour (app.js startTour): a dimmed screen with a hole around the thing explained, and a card */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour.no-target { background: rgba(0, 0, 0, .55); }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); pointer-events: none; transition: all .2s ease; }
.tour-card { position: fixed; background: var(--panel, #fff); color: var(--text, inherit); border-radius: 14px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.tour-card h3 { margin: 2px 0 6px; font-size: 17px; }
.tour-card p { margin: 0 0 12px; line-height: 1.55; }
.tour-count { font-size: 12px; color: var(--muted, #6b7280); }
.tour-buttons { display: flex; align-items: center; gap: 8px; }
.tour-buttons .spacer { flex: 1; }
.tour-buttons .small-btn.ghost { background: transparent; color: var(--accent-text); border: 1px solid var(--line); }
.help-contact .help-contact-btn { background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 10px; font-weight: 600; }

/* Chat with the team inside the app (Help & contact; app.js supportChatBox) */
.help-contact-lead { margin: 0 0 10px; }
.sup-box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
/* (the list scrolls inside the panel, .sup-body) */
.sup-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; line-height: 1.5; }
.sup-msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); }
.sup-msg.team { align-self: flex-start; background: var(--accent-soft); }
.sup-who { font-size: 12px; opacity: .75; margin-bottom: 2px; }
.sup-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sup-img { display: block; max-width: 220px; max-height: 220px; border-radius: 10px; margin: 4px 0; }
.sup-compose { display: flex; align-items: flex-end; gap: 8px; }
.sup-input { flex: 1; resize: none; font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg); color: var(--text); }
.sup-tray { display: flex; gap: 6px; margin-bottom: 6px; }
.sup-tray:empty { display: none; }
.sup-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.sup-note { font-size: 13px; color: var(--muted); margin-top: 6px; min-height: 1em; }
.help-tg-line { margin: 10px 0 0; font-size: 14px; }
/* A dot when the team has answered (Help & contact; the phone's menu button) */
#helpNav.has-dot, #openSidebar.has-dot { position: relative; }
#helpNav.has-dot::after, #openSidebar.has-dot::after { content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; top: 8px; right: 10px; }
#openSidebar.has-dot::after { top: 4px; right: 4px; }

.sup-msg.ai { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.sup-typing { font-style: italic; color: var(--muted); }
.sup-msg.pending { opacity: .7; }
.sup-human { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 10px; font-size: 14px; }
.sup-human .small-btn.ghost { background: transparent; color: var(--accent-text); border: 1px solid var(--accent); }

/* Customer support: a chat button at the bottom right and its panel (app.js "Customer support") */
.sup-fab { position: fixed; right: 18px; bottom: 20px; z-index: 900; width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
.sup-fab:hover { filter: brightness(1.06); }
.sup-fab.open { background: var(--text); }
.sup-fab-dot { position: absolute; top: 3px; right: 3px; width: 13px; height: 13px; border-radius: 50%; background: #e5484d; border: 2px solid var(--bg); }
.sup-panel { position: fixed; right: 18px; bottom: calc(var(--sup-bottom, 20px) + 68px); z-index: 901; width: 380px; max-width: calc(100vw - 24px);
  height: min(580px, calc(100vh - var(--sup-bottom, 20px) - 100px)); display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); overflow: hidden; }
.sup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--accent); color: var(--on-accent); }
.sup-head .icon-btn { color: var(--on-accent); }
.sup-title { font-weight: 700; font-size: 16px; }
.sup-sub { font-size: 13px; opacity: .9; line-height: 1.4; margin-top: 2px; }
.sup-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; }
.sup-empty { color: var(--muted); font-size: 14px; line-height: 1.5; padding: 8px 4px; }
.sup-past-btn { align-self: flex-end; font-size: 13px; margin-bottom: 6px; }
.sup-solved { font-size: 13.5px; line-height: 1.5; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.sup-past { display: flex; flex-direction: column; gap: 8px; }
.sup-back { align-self: flex-start; font-size: 13.5px; }
.sup-past-title { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 4px; }
.sup-past-row { text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 10px 12px; color: var(--text); display: flex; flex-direction: column; gap: 3px; }
.sup-past-row:hover, .sup-past-row:focus-visible { border-color: var(--accent); }
.sup-past-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.sup-past-when { font-size: 12px; color: var(--muted); }
.sup-past-text { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-past-state { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--line); color: var(--muted); white-space: nowrap; }
.sup-past-state.resolved { background: var(--good); color: #fff; }
.sup-past-state.open { background: var(--accent); color: var(--on-accent); }
.sup-list { display: flex; flex-direction: column; gap: 8px; }
.sup-line { align-self: center; text-align: center; font-size: 13px; color: var(--muted); padding: 4px 10px; max-width: 90%; }
.sup-foot { border-top: 1px solid var(--line); padding: 8px 10px 10px; }
.sup-compose { display: flex; align-items: flex-end; gap: 6px; }
.sup-input { flex: 1; resize: none; font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: 18px; padding: 8px 12px; background: var(--bg); color: var(--text); max-height: 120px; }
.sup-send { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; flex: none; }
.sup-send:disabled { opacity: .5; }
.sup-photo { flex: none; }
body.sup-on .sup-fab { z-index: 902; }
@media (max-width: 640px) {
  .sup-panel { inset: 0; width: auto; max-width: none; height: auto; border-radius: 0; border: 0; }
  body.sup-on .sup-fab { display: none; }
  /* Han, 17 Nov 2026: the 💬 button was always in the way on phones; there it is "Chat with us" in the menu. */
  #supportFab { display: none; }
}
#supportNav[hidden] { display: none; }
.nav-dot { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; }
.nav-dot[hidden] { display: none; }
#openSidebar { position: relative; }
#openSidebar.has-dot::after { content: ''; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; border: 2px solid var(--bg); }
.sup-note:empty { display: none; }
.help-contact .help-chat-btn { background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 10px; font-weight: 600; }

/* Customer support v3: 👍/👎, "Talk to a person", the problem-type chooser, the hint while the team has it */
.sup-feedback, .sup-human { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 0 10px; font-size: 13.5px; }
.sup-feedback[hidden], .sup-human[hidden], .sup-choose[hidden], .sup-hint[hidden] { display: none; }
.sup-choose { display: grid; gap: 8px; margin: 4px 0 10px; }
.sup-choose-title { font-size: 14px; font-weight: 600; }
.sup-topic { text-align: left; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text);
  font: inherit; font-size: 15px; cursor: pointer; }
.sup-topic:hover, .sup-topic.picked { border-color: var(--accent); }
.sup-choose-cancel { justify-self: start; }
.sup-hint { font-size: 12.5px; color: var(--muted); padding: 0 2px 6px; }

/* 👍 / 👎 under an answer */
.meta .rate-btn { padding: 0 4px; filter: grayscale(1); opacity: .55; }
.meta .rate-btn:hover, .meta .rate-btn.on { filter: none; opacity: 1; }
/* "Not enough credits": the note that nothing was charged, and Add credits, inside the red note */
.msg.error .err-note { margin-top: 6px; font-size: 14px; color: var(--muted); }
.msg.error .err-action { margin-top: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent-text); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
/* What a bot is good at: chips on "All bots" and small icons on each bot (app.js SKILLS) */
.skill-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 12px 8px; }
.skill-chip { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.skill-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bot-skills { margin-left: 6px; font-size: 12px; letter-spacing: 1px; opacity: .85; }

/* the bot picker is open: the 💬 help button would sit on top of its list */
body.picker-open #supportFab { display: none; }

/* A bot's whole description: ⓘ beside each bot in the picker, a card beside the list on computers, and the new chat screen */
.bot-item { display: flex; flex-wrap: wrap; align-items: center; }
.bot-item > .bot-row { flex: 1; min-width: 0; }
.bot-info { flex: none; width: 36px; height: 36px; border: none; background: none; color: var(--muted); font-size: 18px; border-radius: 50%; cursor: pointer; }
.bot-info:hover, .bot-info[aria-expanded="true"] { background: var(--panel); color: var(--text); }
.bot-about { flex-basis: 100%; margin: 0 8px 8px 50px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.about-body p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.about-body p:last-child { margin-bottom: 0; }
.about-body .about-skills, .about-body .about-price { color: var(--muted); }
.about-labels { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.about-label { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.about-wait { margin: 0; font-size: 13px; color: var(--muted); }
.about-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.bot-pop { position: fixed; z-index: 60; max-height: 70vh; overflow: hidden; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); pointer-events: none; }
.welcome-about { margin: 16px auto 0; max-width: 480px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.welcome-about .about-body.folded { max-height: 4.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.about-more { margin-top: 6px; font-size: 13px; }
html:lang(my) .about-body p { line-height: 1.7; }
.linklike { background: none; border: none; padding: 0; color: var(--accent-text); cursor: pointer; text-decoration: underline; font: inherit; }

/* Painting what to erase or change (photo tools that need a mask) */
.painter { position: fixed; inset: 0; z-index: 80; background: #111; color: #fff; display: flex; flex-direction: column; }
.painter-top, .painter-bottom { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.painter-top { justify-content: space-between; }
.painter-title { flex: 1; font-weight: 600; text-align: center; }
.painter-x { border: none; background: none; color: #fff; font-size: 20px; width: 40px; height: 40px; cursor: pointer; }
.painter-done { min-width: 84px; }
.painter-hint { text-align: center; font-size: 13px; color: #ddd; padding: 0 14px 6px; }
.painter-hint.shake { animation: painter-shake 0.35s; color: #ffb4ae; }
@keyframes painter-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.painter-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 10px; }
.painter-canvas { touch-action: none; max-width: 100%; max-height: 100%; cursor: crosshair; border-radius: 6px; }
.painter-bottom { justify-content: center; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.painter-sizes { display: flex; gap: 6px; margin-right: 8px; }
.painter .small-btn { color: #fff; border-color: #555; background: #222; }
.painter .vopt { color: #fff; background: #222; border-color: #555; }
.painter .vopt.on { background: #fff; color: #111; }
.tray-paint { position: absolute; left: 4px; bottom: 4px; min-width: 26px; height: 26px; border-radius: 13px; border: none; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 13px; cursor: pointer; }
.tray-paint.done { background: #1f9d55; }
body.painting #supportFab { display: none; } /* the 💬 help button would sit on the photo */

/* The payment screen, laid out by MyanMyanPay's rules (Han, 17 Nov 2026) */
.pay-qr img.pay-mmqr-logo { display: block; height: 96px; width: auto; max-width: none; margin: 0 auto 10px; padding: 0; border: none; border-radius: 0; background: none; } /* MyanMyanPay: the logo as it is, never stretched */
.pay-qr-frame { display: inline-block; background: #ffffff; padding: 0; border: 1px solid var(--line); line-height: 0; }
.pay-qr .pay-qr-code { width: 244px; max-width: 100%; height: auto; image-rendering: pixelated; border: none; border-radius: 0; padding: 0; background: #ffffff; }
.pay-powered { margin: 8px 0 2px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--text); }
.pay-credits { color: var(--muted); font-size: 14px; }
.pay-timer { margin: 12px auto 4px; padding: 8px 16px; border-radius: 12px; background: var(--panel); display: inline-block; min-width: 170px; }
.pay-timer-label { font-size: 12.5px; color: var(--muted); }
.pay-timer-time { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.pay-timer.low .pay-timer-time { color: #d93025; }
.pay-qr.expired .pay-qr-frame { opacity: 0.25; }
.pay-actions { flex-wrap: wrap; justify-content: center; }
.pay-result { font-weight: 600; }

/* the help button stays out of the way while paying */
body.topup-open #supportFab { display: none; }
/* amount and timer side by side; on phones a smaller logo and QR so everything, the timer too, shows without scrolling */
.pay-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 2px; flex-wrap: wrap; }
.pay-row .pay-amount { margin: 0; }
.pay-row .pay-timer { margin: 0; }
@media (max-width: 520px) {
  .pay-qr img.pay-mmqr-logo { height: 64px; margin-bottom: 6px; }
  .pay-qr img.pay-qr-code { width: 208px; }
  .pay-timer { min-width: 0; padding: 6px 12px; }
  .pay-timer-time { font-size: 26px; }
  .pay-qr .wallet-logos { font-size: 12.5px; }
  .pay-qr .pay-status { margin: 6px 0 10px; }
}

/* credits each choice would use, in the "top bot" sheet */
.cost-alt-name { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.cost-go .cost-alt-name { align-items: center; text-align: center; }
.cost-credits { font-size: 13px; font-weight: 500; opacity: 0.8; font-variant-numeric: tabular-nums; }
.cost-credits:empty { display: none; }
.cost-note { font-size: 12.5px; margin: 8px 0 0; }
.cost-balance { font-size: 13px; margin: 2px 0 0; }
.cost-balance:empty { display: none; }

/* "Forgot your password?" on the login screen */
.auth-foot:empty { display: none; }
.auth-forgot { display: block; margin: 0 auto; padding: 8px 10px; background: none; border: 0; color: var(--accent-text); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.auth-forgot[hidden] { display: none; }
.auth-card.resetting > :not(.auth-top):not(.reset-box) { display: none !important; }
.reset-box { display: flex; flex-direction: column; gap: 12px; }
.reset-box p { margin: 0; line-height: 1.5; }
.reset-title { margin: 4px 0 0; font-size: 19px; }
.reset-form { display: flex; flex-direction: column; gap: 12px; }
.reset-form textarea { font: inherit; font-size: 16px; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; resize: vertical; }
.reset-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.reset-box > p:not(.muted) { font-size: 15px; }
.reset-tg { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--accent-soft); }
.reset-tg p { font-size: 14px; }
.reset-why { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); }

/* Invite friends (referrals) */
#referNav[hidden] { display: none; }
.refer-hero { background: var(--accent-soft); border-radius: 16px; padding: 18px; margin: 4px 0 18px; }
.refer-hero h2 { margin: 0 0 6px; font-size: 20px; }
.refer-hero p { margin: 0 0 12px; }
.refer-link { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; margin-bottom: 12px; }
.refer-link code { font-size: 14px; }
.refer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.refer-actions a.small-btn { text-decoration: none; display: inline-flex; align-items: center; }
.refer-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.refer-tile { border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.refer-num { font-size: clamp(17px, 5vw, 24px); font-weight: 700; }
.refer-label { font-size: 13px; color: var(--muted); }
.refer-list { list-style: none; padding: 0; margin: 0; }
.refer-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.refer-plus { color: #1a7f37; font-weight: 700; }
.refer-minus { color: var(--muted); font-weight: 700; }
.refer-tile .refer-num { overflow-wrap: anywhere; }
/* A partner paid in cash: what is still to be paid to them (Han, 24 Nov 2026) */
.refer-owed { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 0 0 12px; background: var(--glass, var(--panel)); text-align: center; }
.refer-owed-label { font-size: 13px; color: var(--muted); }
.refer-owed-num { font-family: 'Fraunces', serif; font-size: clamp(26px, 8vw, 34px); font-weight: 600; margin: 2px 0 4px; }
.refer-account { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin: 4px 0 12px; font-size: 14px; }
.refer-account[hidden] { display: none; }

/* Two-step login */
.two-fa { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 4px 0 14px; }
.two-fa h3 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.two-fa-state { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }
.two-fa-state.on { background: #dafbe1; color: #1a7f37; }
.two-fa-list { list-style: none; padding: 0; margin: 0 0 10px; }
.two-fa-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.two-fa-qr { display: flex; justify-content: center; margin: 8px 0; }
.two-fa-qr img { background: #fff; border-radius: 8px; image-rendering: pixelated; }
.two-fa-steps { padding-left: 20px; margin: 0 0 6px; }
.two-fa-codes { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.two-fa-codes pre { font-size: 15px; line-height: 1.6; margin: 6px 0 10px; white-space: pre-wrap; }
.two-fa-key { margin-top: 12px; }
.two-fa .btn-row, .two-fa-codes .btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.center { text-align: center; }
.warn-note { color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 8px 10px; }
.tg-pin { font-size: 28px; letter-spacing: 2px; color: var(--accent-text); vertical-align: middle; margin-left: 4px; }
.tg-pin-line { margin: 4px 0; }
#resetBox .approve-pins { display: flex; justify-content: center; gap: 12px; flex-wrap: nowrap; }
#resetBox .approve-pins .btn { flex: 1; width: auto; margin: 0; }
.approve-pin { min-width: 76px; font-size: 22px; }
.tg-switch { margin-top: 10px; }
.pack .pack-total { font-size: 14px; }

/* ---------- Live answers (18 Nov 2026): thinking animation, smooth text, messages gliding in ---------- */
.msg { animation: msg-in .34s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px); } }
.thinking { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14.5px; }
.think-orb { display: inline-flex; gap: 5px; align-items: center; height: 16px; }
.think-orb i {
  width: 8px; height: 8px; border-radius: 50%; display: block;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  animation: think-wave 1.2s ease-in-out infinite;
}
.think-orb i:nth-child(2) { animation-delay: .15s; }
.think-orb i:nth-child(3) { animation-delay: .3s; }
@keyframes think-wave { 0%, 60%, 100% { transform: translateY(0) scale(.75); opacity: .45; } 30% { transform: translateY(-6px) scale(1); opacity: 1; } }
.thinking.deep .think-orb i { background: linear-gradient(135deg, #8b5cf6, #06b6d4); }
.think-label {
  font-weight: 600;
  background: linear-gradient(90deg, var(--muted) 20%, var(--text) 50%, var(--muted) 80%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: think-shimmer 2s linear infinite;
}
@keyframes think-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.think-secs { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.msg.bot.live .who .avatar { animation: live-pulse 1.8s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(93, 92, 222, .45); } 50% { box-shadow: 0 0 0 7px rgba(93, 92, 222, 0); } }
.thought-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 0 0 6px; animation: msg-in .3s ease both; }
.caret {
  display: inline-block; width: .55em; height: .55em; margin-left: 4px; vertical-align: .05em; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ec4899); animation: caret-glow 1s ease-in-out infinite;
}
@keyframes caret-glow { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .msg, .thought-line, .think-orb i, .think-label, .caret, .msg.bot.live .who .avatar { animation: none !important; }
  .think-label { color: var(--muted); background: none; }
}

/* ---------- Folded menu: a strip of icons on computers (18 Nov 2026) ---------- */
.rail-btn { display: none; color: var(--muted); }
@media (min-width: 821px) {
  .app { transition: grid-template-columns .22s ease; }
  .rail-btn { display: inline-grid; }
  .app.rail { grid-template-columns: 68px 1fr; }
  .app.rail .sidebar { padding: 14px 8px; align-items: center; overflow-x: hidden; }
  .app.rail .sidebar-head { flex-direction: column; gap: 10px; padding: 0; }
  .app.rail .brand-name, .app.rail .section-title, .app.rail .chat-search, .app.rail .chat-text, .app.rail .chat-del,
  .app.rail .menu-toggle, .app.rail .menu-lang, .app.rail .install-btn, .app.rail .me-name, .app.rail #adminBtn, .app.rail #inboxBtn,
  .app.rail .wallet-label, .app.rail #historyBtn, .app.rail .chat-empty { display: none !important; }
  .app.rail .new-chat, .app.rail .nav-item { width: 44px; height: 44px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .app.rail .new-chat span { font-size: 18px; }
  .app.rail .nav-item { position: relative; }
  .app.rail .nav-item .nav-dot { position: absolute; top: 8px; right: 8px; }
  .app.rail .wallet { flex-direction: column; padding: 8px 4px; width: 52px; gap: 6px; }
  .app.rail .wallet-balance { font-size: 11px; text-align: center; }
  .app.rail #addCreditsBtn { font-size: 0; width: 32px; height: 28px; padding: 0; }
  .app.rail #addCreditsBtn::before { content: '+'; font-size: 18px; line-height: 1; }
  .app.rail .chat-list { width: 100%; align-items: center; }
  .app.rail .chat-item { width: 44px; justify-content: center; padding: 6px; }
  .app.rail .chat-open { flex: none; gap: 0; }
  .app.rail .account { flex-direction: column; gap: 8px; padding: 6px 0; border: none; }
  .app.rail.with-panel { grid-template-columns: 68px minmax(0, 1fr) minmax(380px, 48%); }
  .app.rail.with-panel.panel-wide { grid-template-columns: 68px minmax(0, 1fr); }
}

/* ---------- Fun: level card, journey, celebrations, livelier welcome (18 Nov 2026) ---------- */
.fun-card {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 12px; text-align: left;
  border: 1px solid var(--line); background: linear-gradient(135deg, var(--accent-soft), var(--panel) 70%); color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fun-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.fun-moon { font-size: 24px; line-height: 1; animation: moon-bob 3.2s ease-in-out infinite; }
@keyframes moon-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2px) rotate(-8deg); } }
.fun-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.fun-level { font-weight: 700; font-size: 13.5px; display: flex; gap: 6px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.fun-lv { font-weight: 600; font-size: 11px; color: var(--muted); }
.fun-bar, .jr-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.fun-bar i, .jr-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ec4899); transition: width .6s ease; }
.fun-streak { font-weight: 700; font-size: 13px; padding: 3px 8px; border-radius: 99px; background: #fff3e0; color: #c2410c; white-space: nowrap; }
.fun-streak.off { filter: grayscale(1); opacity: .6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fun-streak { background: #3b2410; color: #fdba74; } }
:root[data-theme="dark"] .fun-streak { background: #3b2410; color: #fdba74; }
@media (min-width: 821px) {
  .app.rail .fun-card { width: 52px; flex-direction: column; gap: 4px; padding: 8px 4px; }
  .app.rail .fun-text { display: none; }
  .app.rail .fun-streak { font-size: 11px; padding: 1px 5px; }
}
.jr-head { display: flex; align-items: center; gap: 14px; }
.jr-moon { font-size: 46px; line-height: 1; animation: moon-bob 3.2s ease-in-out infinite; }
.jr-level { font-size: 20px; font-weight: 800; }
.jr-bar { height: 10px; margin: 14px 0 6px; }
.jr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.jr-stat { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 12px; background: var(--accent-soft); text-align: center; }
.jr-stat strong { font-size: 20px; }
.jr-stat span { font-size: 11.5px; color: var(--muted); }
.jr-h { margin: 14px 0 8px; font-size: 15px; }
.jr-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.jr-badge { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.jr-badge strong { font-size: 13px; }
.jr-badge-icon { font-size: 24px; filter: grayscale(1); opacity: .55; }
.jr-badge.got { border-style: solid; border-color: transparent; background: linear-gradient(135deg, #fff7e6, #fdeaff); color: #4b3b2a; }
.jr-badge.got .jr-badge-icon { filter: none; opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jr-badge.got { background: linear-gradient(135deg, #3a2c16, #3a1f45); color: #f5e6d3; } }
:root[data-theme="dark"] .jr-badge.got { background: linear-gradient(135deg, #3a2c16, #3a1f45); color: #f5e6d3; }
@media (max-width: 480px) { .jr-stats { grid-template-columns: repeat(2, 1fr); } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 200; }
.celebrate {
  position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 201; display: flex; flex-direction: column; gap: 8px;
  width: min(380px, calc(100vw - 32px)); cursor: pointer; animation: pop-in .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.celebrate.out { animation: pop-out .5s ease both; }
.celebrate-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--panel); box-shadow: 0 12px 40px rgba(20, 20, 40, .22); border: 1px solid var(--line); font-size: 13.5px; }
.celebrate-item strong { font-size: 15px; }
.celebrate-icon { font-size: 34px; animation: badge-spin .9s ease both; }
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -20px) scale(.9); } }
@keyframes pop-out { to { opacity: 0; transform: translate(-50%, -16px) scale(.96); } }
@keyframes badge-spin { from { transform: scale(.2) rotate(-180deg); } 70% { transform: scale(1.2) rotate(10deg); } to { transform: none; } }
.welcome-hi { font-size: 14px; font-weight: 600; color: var(--accent-text); margin-bottom: 4px; animation: msg-in .5s ease both; }
.welcome h1 {
  background: linear-gradient(90deg, var(--text), var(--accent) 55%, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.welcome-mark { animation: moon-bob 3.2s ease-in-out infinite; }
.welcome-streak { margin: 6px auto 10px; border: none; background: #fff3e0; color: #c2410c; font-weight: 600; font-size: 13px; padding: 5px 12px; border-radius: 99px; cursor: pointer; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .welcome-streak { background: #3b2410; color: #fdba74; } }
:root[data-theme="dark"] .welcome-streak { background: #3b2410; color: #fdba74; }
.starters button, .next-steps button { transition: transform .15s ease, border-color .15s ease; }
.starters button:hover, .next-steps button:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .fun-moon, .jr-moon, .welcome-mark, .celebrate, .celebrate.out, .celebrate-icon, .welcome-hi { animation: none !important; }
}

/* ---------- New chat, Poe-style (18 Nov 2026): bots above the box, the box in the middle on computers ---------- */
/* #botRow, not .bot-row: that class is also every row of the bot list. Tasks wrap onto several lines on every screen
   (Han, 19 Nov 2026: "should be displayed on two or more columns just like on desktop"), no sideways scrolling. */
#botRow:hover { background: none; }
#botRow {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center;
  max-width: 760px; width: calc(100% - 24px); margin: 0 auto 8px; padding: 2px;
}
.bot-row-chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 5px 12px 5px 6px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.bot-row-chip:hover { background: var(--panel); color: var(--text); transform: translateY(-1px); }
.bot-row-chip.on { background: var(--panel); border-color: var(--line); color: var(--text); box-shadow: 0 1px 4px rgba(20, 20, 40, .08); }
.bot-row-chip .avatar { width: 22px; height: 22px; border-radius: 7px; }
.bot-row-search { flex: none; width: 34px; height: 34px; border-radius: 50%; border: none; background: transparent; color: var(--muted); display: grid; place-items: center; }
.bot-row-search:hover { background: var(--panel); color: var(--text); }
.fresh-below { display: none; }
/* New chat (Han, 18 Nov 2026): the box in the middle on every screen, phones too, with what the chosen bot does under it */
.main.fresh .messages { flex: 1 1 0; display: flex; flex-direction: column; padding-bottom: 10px; }
/* margin-top: auto (not justify-content: flex-end) keeps the greeting near the box AND lets a short screen scroll up to the
   ☾ mark instead of cutting it off (Han, 19 Nov 2026: "logo disappered") */
.main.fresh .welcome { min-height: 0; padding: 0 8px 14px; justify-content: flex-end; margin-top: auto; flex: none; }
.main.fresh .composer { box-shadow: 0 10px 40px rgba(20, 20, 40, .12); border-radius: 24px; padding: 12px 12px 8px; }
.main.fresh #input { min-height: 52px; font-size: 16px; }
.main.fresh .composer-hint { padding-bottom: 4px; }
.main.fresh .fresh-below { display: block; flex: 1 1 0; overflow-y: auto; max-width: 760px; width: calc(100% - 24px); margin: 0 auto; padding: 8px 0 16px; }
@media (max-width: 640px) {
  .main.fresh .messages { flex-grow: 1.2; }
  .main.fresh .welcome h1 { font-size: 21px; }
  .main.fresh .welcome-mark { width: 38px; height: 38px; font-size: 20px; margin-bottom: 8px; border-radius: 11px; } /* smaller, still shown */
}
/* not enough room above the box (app.js fitWelcome): the streak line goes first, then the mark */
.main.fresh.tight .welcome-streak, .main.fresh.tighter .welcome-mark { display: none; }
/* very short phones (iPhone SE): the greeting and heading matter more than the mark and the streak line */
@media (max-width: 640px) and (max-height: 600px) {
  .main.fresh .welcome-mark, .main.fresh .welcome-streak { display: none; }
}
.bot-note { display: flex; gap: 10px; align-items: flex-start; max-width: 560px; margin: 0 auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); text-align: left; font-size: 13.5px; color: var(--muted); }
.bot-note .avatar { flex: none; width: 28px; height: 28px; border-radius: 8px; }
.bot-note-body { min-width: 0; flex: 1; }
.bot-note-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.bot-note-text b { color: var(--text); font-weight: 650; }
.bot-note .about-body { color: var(--text); max-height: 40vh; overflow-y: auto; }
.bot-note .about-body p { margin: 0 0 6px; }
.bot-note-more { border: none; background: none; padding: 2px 0 0; color: var(--accent-text); font-weight: 600; font-size: 13px; cursor: pointer; }
.chat-bot-note { position: relative; max-width: 760px; width: calc(100% - 24px); margin: 0 auto 6px; }
.chat-bot-note .bot-note { max-width: none; padding-right: 34px; }
.bot-note-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: none; background: none; color: var(--muted); border-radius: 50%; }
.bot-note-x:hover { background: var(--bg); color: var(--text); }
/* Task chips (18 Nov 2026): what you can do, above the box; 🔍 Search first */
.task-chip { padding: 6px 13px 6px 9px; border-color: var(--line); background: var(--panel); color: var(--text); font-weight: 600; }
.task-chip .task-icon { font-size: 16px; line-height: 1; }
.task-chip.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.bot-row-search { width: auto; height: auto; padding: 6px 12px; border-radius: 999px; gap: 6px; display: inline-flex; align-items: center; border: 1px dashed var(--line); font-weight: 600; font-size: 13.5px; }
@media (max-width: 640px) {
  #botRow { gap: 6px 5px; }
  #botRow .task-chip, #botRow .bot-row-search { padding: 5px 10px 5px 8px; font-size: 13px; }
  #botRow .task-chip .task-icon { font-size: 14px; }
}
.task-hits .skill-chip { font-weight: 600; }
/* "A friend joined with your link" (Han, 20 Nov 2026): stays until closed */
.refer-news {
  position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 201; width: min(400px, calc(100vw - 32px));
  max-height: calc(100dvh - 96px); overflow: auto; padding: 14px 16px 16px; border-radius: 18px; background: var(--panel);
  border: 1px solid var(--line); box-shadow: 0 16px 48px rgba(20, 20, 40, .26); font-size: 14px;
  animation: pop-in .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.refer-news.out { animation: pop-out .4s ease both; }
.refer-news-head { display: flex; align-items: center; gap: 10px; padding-right: 28px; margin-bottom: 6px; }
.refer-news-head strong { font-size: 16px; }
.refer-news ul { list-style: none; margin: 4px 0 8px; padding: 0; }
.refer-news li { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.refer-news li:last-child { border-bottom: 0; }
.refer-news p { margin: 4px 0 10px; }
.refer-news-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.refer-news-x:hover { background: var(--accent-soft); }
.refer-friends li { grid-template-columns: 1fr auto; align-items: center; }
.refer-invited { margin: -6px 0 14px; }
.refer-hint { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }

/* ======================================================================================================================
   Lantern (Han, 23 Nov 2026: "MoonChat Lantern brand and rollout plan" + "Lantern, by day"). Calm, trustworthy, a
   companion: a starry teal night (or warm cream day) behind see-through cards, Fraunces headings, DM Sans text, amber as the
   only "press this" colour, sea glass for icons and the focus ring. Lumi (body.product-tools) keeps its own look.
   ====================================================================================================================== */
/* Fonts (OFL, self-hosted; see public/fonts/README.md). Latin ~46 KB in all; the Burmese serif only downloads when a Burmese
   heading is on screen (unicode-range), the Burmese sans as before. */
@font-face { font-family: 'Fraunces'; src: url(/fonts/Fraunces-600.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; src: url(/fonts/DMSans-400.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; src: url(/fonts/DMSans-600.woff2) format('woff2'); font-weight: 600 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'MoonChat Myanmar Serif'; src: url(/fonts/NotoSerifMyanmar-600.woff2) format('woff2'); font-weight: 500 800; font-display: swap;
  unicode-range: U+1000-109F, U+A9E0-A9FE, U+AA60-AA7F; }
body { font-family: var(--font-body); }
h1, h2, h3, .modal-head h2, .welcome h1, .jr-level, .brand-name, .wallet-balance { font-family: var(--font-head); font-weight: 600; letter-spacing: 0; }
html:lang(my) h1, html:lang(my) h2, html:lang(my) h3 { line-height: 1.6; }   /* stacked Burmese marks are not clipped */

/* The sky: two soft glows and a few tiny stars, CSS only (no image), static (no animation, no battery use), one fixed layer
   behind everything. Not under Lumi. */
body:not(.product-tools)::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 50% 40% at 80% 10%, var(--glow-1), transparent 70%),
    radial-gradient(ellipse 55% 50% at 8% 85%, var(--glow-2), transparent 70%),
    radial-gradient(1px 1px at 34px 48px, var(--star), transparent),
    radial-gradient(1px 1px at 150px 172px, var(--star-2), transparent),
    radial-gradient(1.4px 1.4px at 240px 90px, var(--star-2), transparent),
    radial-gradient(1px 1px at 410px 300px, var(--star), transparent);
  background-size: 100% 100%, 100% 100%, 220px 220px, 220px 220px, 340px 340px, 530px 530px;
}
/* the big areas let the sky through; cards are see-through glass (no blur: slow on cheap Android phones) */
body:not(.product-tools) .topbar { background: transparent; border-bottom-color: var(--line); }
body:not(.product-tools) .sidebar { background: var(--sidebar); border-right-color: var(--line); }
body:not(.product-tools) .auth { background: transparent; }
body:not(.product-tools) .auth-card { background: var(--glass); }
@media (max-width: 820px) { body:not(.product-tools) .sidebar { background: var(--panel); } } /* the phone drawer covers the chat: solid */

/* Wordmark and mark: "Moon" in the text colour, "Chat" in amber (Amber Text on the light page); the moon tile as the logo */
.wm-chat { color: var(--accent-text); }
.brand { font-size: 20px; gap: 10px; }
body:not(.product-tools) .brand-mark, body:not(.product-tools) .welcome-mark {
  background: url(/icons/icon.svg) center / cover no-repeat; color: transparent; font-size: 0; border-radius: 25%;
  box-shadow: 0 0 0 1px rgba(124, 198, 190, 0.18);
}
body:not(.product-tools) .brand-mark { width: 32px; height: 32px; }
body:not(.product-tools) .welcome-mark { width: 64px; height: 64px; animation: none; box-shadow: 0 0 34px rgba(242, 178, 107, 0.18); }

/* Welcome: greeting in amber, a warm serif headline (no gradient: calm) */
body:not(.product-tools) .welcome-hi { color: var(--accent-text); font-size: 16px; font-weight: 600; }
body:not(.product-tools) .welcome h1 { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--text);
  font-size: clamp(30px, 7.5vw, 42px); line-height: 1.15; margin: 2px 0 10px; }
html:lang(my) body:not(.product-tools) .welcome h1 { font-size: clamp(26px, 6.5vw, 36px); line-height: 1.5; }
body:not(.product-tools) .welcome-streak, .fun-streak { background: var(--accent-soft); color: var(--accent-text); }

/* Buttons: amber fill + Night Teal words for the main action (12 px corners, 44 px tall); amber outline + tint for the
   second one ("New chat") */
.btn { border-radius: 12px; min-height: 44px; }
.btn.primary:hover, .send-btn:hover:not(:disabled) { filter: brightness(0.94); }
.btn.primary:active, .send-btn:active:not(:disabled) { filter: brightness(0.9); }
.btn.primary:disabled { opacity: .4; box-shadow: none; }
body:not(.product-tools) .new-chat { background: rgba(242, 178, 107, 0.10); border: 1px solid rgba(242, 178, 107, 0.35); border-radius: 12px; min-height: 44px; }
body:not(.product-tools) .new-chat:hover { background: rgba(242, 178, 107, 0.16); border-color: rgba(242, 178, 107, 0.6); }
.nav-item svg { color: var(--secondary); }
.nav-item:hover { background: var(--secondary-soft); }

/* Credits card: the number in Fraunces, amber "Add credits" button, amber text link */
body:not(.product-tools) .wallet { background: var(--glass); border-radius: 14px; }
.wallet-balance { font-size: 26px; line-height: 1.15; }
.wallet.low .wallet-balance { color: var(--accent-text); }
body:not(.product-tools) .wallet .small-btn { background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 9px 12px; min-height: 40px; }

/* Level card: a glowing moon disc (its phase is the level, app.js moonDisc) and an amber progress bar */
body:not(.product-tools) .fun-card { background: var(--glass); border-radius: 14px; }
.fun-bar i, .jr-bar i { background: var(--accent); }
.fun-moon, .jr-moon, .welcome-mark { animation: none; }
.moon-disc { display: block; border-radius: 50%; filter: drop-shadow(0 0 6px rgba(242, 178, 107, 0.35)); }
.fun-card.glow { animation: lantern-glow 2.4s ease-in-out 2; }
@keyframes lantern-glow { 50% { box-shadow: 0 0 0 1px rgba(242, 178, 107, 0.45), 0 0 26px rgba(242, 178, 107, 0.35); } }
.jr-stat { background: var(--secondary-soft); }
.jr-badge.got, :root[data-theme="dark"] .jr-badge.got { background: var(--accent-soft); color: var(--text); border-color: rgba(242, 178, 107, 0.35); border-style: solid; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jr-badge.got { background: var(--accent-soft); color: var(--text); } }

/* Message box: a 26 px glass card, amber send circle */
body:not(.product-tools) .composer { background: var(--glass); border-radius: 26px; }
.composer:focus-within { border-color: color-mix(in srgb, var(--secondary) 55%, var(--line)); }
.send-btn { background: var(--accent); color: var(--on-accent); width: 40px; height: 40px; }
.send-btn:disabled { opacity: .4; }

/* Chips: glass pills, 15 px, amber border when chosen */
body:not(.product-tools) .task-chip, body:not(.product-tools) .next-chip, body:not(.product-tools) .chip-btn { background: var(--glass); font-size: 15px; font-weight: 500; }
.task-chip.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.next-chip:hover, .chip-btn:hover, .task-chip:hover { border-color: var(--accent); }

/* Messages: yours on the logo's Lagoon, answers as plain text; glass for the assistant's cards */
.msg.user .bubble { border-radius: 18px 18px 6px 18px; }
.sup-msg.ai, .sup-past-row, .sup-solved { background: var(--glass); }

/* Picker tiers: Top in amber, Best value in sea glass, Budget muted (no purple) */
.tier-frontier, :root[data-theme="dark"] .tier-frontier { background: var(--accent-soft); color: var(--accent-text); }
.tier-value, :root[data-theme="dark"] .tier-value { background: var(--secondary-soft); color: var(--secondary); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tier-frontier { color: var(--accent-text); } :root:not([data-theme="light"]) .tier-value { color: var(--secondary); } }

/* Thinking: amber dots (sea glass when thinking deeply), amber caret, a soft amber glow on the bot's logo */
.think-orb i, .caret { background: var(--accent); }
.thinking.deep .think-orb i { background: var(--secondary); }
@keyframes live-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 178, 107, .40); } 50% { box-shadow: 0 0 0 7px rgba(242, 178, 107, 0); } }

/* Bonus and "solved" badges: a word on a calm tint (readable in both modes) */
.pack .pack-extra, .custom-amount .pack-extra { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.sup-past-state.resolved { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.badge.badge-new { color: var(--on-accent); }

/* Celebrations stay small: a gentle glow, no bouncing (the plan: "no confetti") */
body:not(.product-tools) .celebrate { animation: lantern-fade .4s ease both; }
body:not(.product-tools) .celebrate.out { animation: lantern-fade-out .4s ease both; }
body:not(.product-tools) .celebrate-icon { animation: none; }
body:not(.product-tools) .celebrate-item { background: var(--panel); border: 1px solid rgba(242, 178, 107, 0.4); box-shadow: 0 0 30px rgba(242, 178, 107, 0.18), var(--shadow); }
@keyframes lantern-fade { from { opacity: 0; transform: translate(-50%, -6px); } }
@keyframes lantern-fade-out { to { opacity: 0; transform: translate(-50%, -6px); } }

/* Keyboard focus: a 2 px sea glass ring (Deep Sea on the light page), never removed */
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.task-chip:focus-visible, .btn:focus-visible, .send-btn:focus-visible, .nav-item:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
/* A cheaper bot answered because the credits were too few for the chosen one (24 Nov 2026) */
.low-credit-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text); background: var(--glass, transparent); border: 1px solid var(--border, rgba(0,0,0,.12)); border-radius: 12px; padding: 8px 10px; }
.low-credit-note .btn.small { min-height: 32px; padding: 4px 12px; font-size: 13px; }
