/* =====================================================================
   Rubik AI - v2 interface (21 Oct 2026)
   Editorial and crisp: warm paper / graphite surfaces, hairline borders,
   ink-and-lime accents from the cube logo, Geist type. Light + dark themes.
   Theme: <html data-theme="light|dark"> set before paint by index.html.
   ===================================================================== */
[hidden] { display: none !important; }

:root {
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --r-sm: 10px; --r: 14px; --r-lg: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* light (default) */
  --bg: #f5f5ef;
  --surface: #ffffff;
  --surface-2: #eeeee6;
  --surface-3: #e4e4da;
  --line: rgba(15, 19, 17, .08);
  --line-2: rgba(15, 19, 17, .15);
  --text: #0f1311;
  --muted: #59615c;
  --faint: #8b928d;
  --accent: #157a3a;          /* leaf green - links, focus, active */
  --hi: #c6f135;              /* lime highlighter - small brand moments */
  --hi-soft: rgba(198, 241, 53, .55);
  --ink: #0f1311;             /* primary buttons */
  --ink-text: #ffffff;
  --user-bg: #0f1311;         /* your messages */
  --user-text: #f5f5ef;
  --danger: #c2410c;
  --shadow-sm: 0 1px 2px rgba(15, 19, 17, .05);
  --shadow: 0 1px 2px rgba(15, 19, 17, .04), 0 12px 32px rgba(15, 19, 17, .08);
  --shadow-lg: 0 24px 64px rgba(15, 19, 17, .18);
  --dots: rgba(15, 19, 17, .07);
  --logo-glow: drop-shadow(0 4px 10px rgba(21, 122, 58, .25));
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0d0c;
  --surface: #131615;
  --surface-2: #1a1e1c;
  --surface-3: #232825;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #eceeea;
  --muted: #9aa29d;
  --faint: #69716c;
  --accent: #b9e82a;
  --hi: #c6f135;
  --hi-soft: rgba(198, 241, 53, .28);
  --ink: #c6f135;
  --ink-text: #0b0d0c;
  --user-bg: #1f2a14;
  --user-text: #eef9d4;
  --danger: #fb923c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px rgba(0, 0, 0, .35);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, .6);
  --dots: rgba(255, 255, 255, .06);
  --logo-glow: drop-shadow(0 0 14px rgba(185, 232, 42, .28));
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }   /* stop iOS auto-resizing text differently each launch */
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { overflow: hidden; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "ss01", "cv11"; transition: background-color .25s, color .25s; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
textarea, input, select { font: inherit; color: inherit; }
::selection { background: var(--hi-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* the old glow layers are gone */
.aurora, .grain { display: none; }

/* ---------- logo ---------- */
.orb { width: 32px; height: 32px; flex: none; position: relative; background: transparent url(icons/logo-cutout-256.webp?v=6) center/contain no-repeat; filter: var(--logo-glow); }
.orb.big { width: 88px; height: 88px; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-4px) rotate(-2deg); } }
.orb.thinking { animation: cube 1.2s var(--ease) infinite; }
@keyframes cube { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(-12deg) scale(1.08); } }

/* highlighter instead of gradient text */
.grad-text { color: var(--text); background: linear-gradient(transparent 60%, var(--hi-soft) 60%, var(--hi-soft) 92%, transparent 92%); padding: 0 .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- login ---------- */
#login { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; overflow-y: auto;
  background: radial-gradient(var(--dots) 1px, transparent 1.2px) 0 0 / 22px 22px, var(--bg); }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 34px 26px 24px; box-shadow: var(--shadow); text-align: center; }
.login-card h1 { margin: 16px 0 2px; font-size: 28px; font-weight: 650; letter-spacing: -.03em; }
.login-card p { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.field { width: 100%; padding: 14px 15px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg); outline: none; margin-bottom: 10px; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field::placeholder { color: var(--faint); }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.btn-primary { width: 100%; padding: 14px; border-radius: var(--r); background: var(--ink); color: var(--ink-text); font-weight: 600; font-size: 16px; letter-spacing: -.01em; transition: transform .12s, opacity .15s; }
.btn-primary:hover { opacity: .92; }
.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { opacity: .45; }
.btn-bio { width: 100%; margin-top: 10px; padding: 13px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 600; }
.login-err { color: var(--danger); min-height: 20px; margin-top: 10px; font-size: 14px; }
.login-foot { margin-top: 16px; color: var(--faint); font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.link-btn { color: var(--muted); font-size: 14px; margin-top: 6px; padding: 6px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.link-btn:hover { color: var(--text); }
#resetForm .field { margin-bottom: 10px; }
.pw-wrap { position: relative; }
.pw-wrap .field { padding-right: 52px; }
.pw-eye { position: absolute; right: 6px; top: 5px; width: 42px; height: 42px; font-size: 22px; line-height: 42px; border-radius: var(--r-sm); transition: transform .15s; }
.pw-eye:active { transform: scale(.85); }

/* ---------- app shell ---------- */
#app { position: fixed; inset: 0; z-index: 1; display: flex; }
.sidebar { width: 284px; flex: none; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line);
  padding: calc(14px + var(--sat)) 12px calc(12px + var(--sab)) calc(12px + var(--sal)); z-index: 3; }
.side-head { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; }
.side-head b { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.side-head .grad-text { background: none; padding: 0; }
.new-chat { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: var(--r); background: var(--ink); color: var(--ink-text); font-weight: 600; margin-bottom: 10px; transition: opacity .15s; }
.new-chat:hover { opacity: .9; }
.search { width: 100%; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid transparent; outline: none; margin-bottom: 6px; font-size: 15px; }
.search:focus { border-color: var(--line-2); background: var(--surface); }
.chat-list { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.chat-group { color: var(--faint); font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; margin: 18px 10px 8px; }
.chat-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; border-radius: var(--r-sm); color: var(--muted); font-size: 14.5px; position: relative; }
.chat-item span { flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.chat-item span > :first-child, .chat-item span { text-overflow: ellipsis; white-space: nowrap; }
.chat-item, .chat-group { cursor: pointer; -webkit-user-select: none; user-select: none; }
.chat-item:hover { background: var(--surface-2); color: var(--text); }
.chat-item.active { background: var(--surface-2); color: var(--text); font-weight: 500; }
.chat-item.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.snip { color: var(--faint); font-size: 12px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .del, .chat-item .more { opacity: 0; padding: 2px 8px; border-radius: 8px; color: var(--faint); font-size: 17px; line-height: 1; }
.chat-item:hover .del, .chat-item.active .del, .chat-item:hover .more, .chat-item.active .more { opacity: 1; }
.chat-item .del:hover { color: var(--danger); }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--hi); color: #0f1311; display: grid; place-items: center; font-weight: 700; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who small { color: var(--faint); font-size: 12px; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); flex: none; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 4px; padding: calc(8px + var(--sat)) calc(10px + var(--sar)) 8px calc(10px + var(--sal)); z-index: 2;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .title { flex: 1; min-width: 0; padding: 0 6px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }

/* ---------- mode chooser (now a small button in the composer) ---------- */
.mode-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 9px; border-radius: 12px; color: var(--muted); font-size: 14px; font-weight: 500; flex: none; transition: background .15s, color .15s; white-space: nowrap; }
.mode-btn:hover { background: var(--surface-2); color: var(--text); }
.mode-btn .chev { width: 10px; height: 10px; opacity: .6; }
.mode-btn.set { color: var(--text); background: var(--surface-2); }
.mode-pop { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; display: none; min-width: 250px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
.mode-pop.on { display: block; animation: pop .16s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.mode-pop .mp-title { padding: 8px 10px 6px; color: var(--faint); font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.modes { display: flex; flex-direction: column; gap: 2px; }
.modes button { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm); text-align: left; font-size: 14.5px; }
.modes button .mi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); font-size: 15px; }
.modes button small { display: block; color: var(--faint); font-size: 12px; line-height: 1.3; }
.modes button:hover { background: var(--surface-2); }
.modes button.on::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.modes button .lbl { font-weight: 500; }

/* ---------- messages ---------- */
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.thread { max-width: 780px; margin: 0 auto; padding: 22px calc(18px + var(--sar)) 28px calc(18px + var(--sal)); }
.msg { margin: 0 0 26px; animation: rise .3s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; position: relative; }
/* never lose a message (3 Nov 2026): waiting-to-send bubbles, offline bar, saved voice notes */
.msg.user.pending .bubble-user, .msg.user.sending .bubble-user { opacity: .72; }
.msg.user .pend { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.msg.user .pend-t { display: inline-flex; align-items: center; gap: 5px; }
.msg.user .pend-t svg { width: 14px; height: 14px; }
.msg.user .pend button, .voice-pend button { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.net-bar { margin: 0 auto 8px; width: fit-content; max-width: 92%; text-align: center; font-size: 12.5px; line-height: 1.35; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.net-bar.tap { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.net-bar[hidden], .voice-pend[hidden] { display: none !important; }
.voice-pend { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 2px; }
.voice-pend .vp { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.voice-pend .vp-t { flex: 1; min-width: 0; }
.voice-pend button[data-v="del"] { padding: 4px 9px; color: var(--muted); }
.bubble-user { max-width: min(84%, 620px); background: var(--user-bg); color: var(--user-text); padding: 11px 16px; border-radius: 20px 20px 6px 20px; white-space: pre-wrap; word-wrap: break-word; font-size: 15.5px; }
.user-imgs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 8px; }
.user-imgs img { width: 112px; height: 112px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); cursor: zoom-in; }
.user-files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-bottom: 8px; }
.msg.ai { display: flex; gap: 12px; }
.msg.ai .orb { width: 26px; height: 26px; margin-top: 2px; }
.ai-body { flex: 1; min-width: 0; }
.badge { display: none !important; }
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 3px 0 8px; }
.status::before { content: ""; width: 18px; height: 6px; flex: none;
  background: radial-gradient(circle, var(--accent) 2.6px, transparent 3px) 0 50% / 6px 6px repeat-x; animation: dots 1.2s steps(3, jump-none) infinite; }
@keyframes dots { 0% { clip-path: inset(0 66% 0 0); } 100% { clip-path: inset(0 0 0 0); } }
.md { word-wrap: break-word; overflow-wrap: anywhere; font-size: 16px; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 12px; }
.md h1, .md h2, .md h3, .md h4 { margin: 22px 0 8px; line-height: 1.25; letter-spacing: -.02em; font-weight: 650; }
.md h1 { font-size: 1.4em; } .md h2 { font-size: 1.22em; } .md h3 { font-size: 1.08em; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 1.3em; }
.md li { margin: 4px 0; }
.md li::marker { color: var(--faint); }
.md a { color: var(--accent); text-underline-offset: 3px; }
.md strong { color: var(--text); font-weight: 650; }
.md blockquote { margin: 0 0 12px; padding: 6px 14px; border-left: 3px solid var(--hi); color: var(--muted); }
.md table { border-collapse: collapse; width: 100%; margin: 0 0 14px; font-size: 14.5px; display: block; overflow-x: auto; }
.md th, .md td { border-bottom: 1px solid var(--line-2); padding: 8px 10px; text-align: left; }
.md th { font-weight: 600; background: var(--surface-2); }
.md code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 6px; }
.md hr { border: 0; border-top: 1px solid var(--line-2); margin: 18px 0; }
.code-wrap { position: relative; margin: 0 0 14px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #111513; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; color: #8b928d; background: #181d1a; font: 500 11.5px/1.6 var(--mono); }
.code-head button { color: #c9d1cb; }
.code-wrap pre { margin: 0; padding: 14px; overflow-x: auto; }
.code-wrap pre code { background: none; border: 0; padding: 0; font-size: 13.5px; color: #e6ebe7; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 6px 0; }
.katex { font-size: 1.06em; }
.caret::after { content: ""; display: inline-block; width: 7px; height: 1em; vertical-align: -2px; margin-left: 3px; border-radius: 2px; background: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.gen-img { display: block; width: min(100%, 520px); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; margin: 4px 0 10px; }
.gen-video { display: block; width: min(100%, 620px); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow); margin: 4px 0 10px; background: #000; }
.img-skel { width: min(100%, 420px); aspect-ratio: 1; border-radius: var(--r-lg); display: grid; place-items: center; color: var(--muted); font-size: 14px; border: 1px solid var(--line);
  background: linear-gradient(110deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.actions { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.actions button { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--faint); padding: 6px 9px; border-radius: 9px; transition: background .15s, color .15s; }
.actions button:hover { background: var(--surface-2); color: var(--text); }
.actions button.playing { color: var(--accent); }
.actions svg { width: 15px; height: 15px; }
.err { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); padding: 10px 14px; border-radius: var(--r); }

.think { margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.think summary { cursor: pointer; padding: 8px 12px; font-size: 13px; color: var(--muted); list-style: none; }
.think summary::-webkit-details-marker { display: none; }
.think summary::after { content: " ▾"; opacity: .6; }
.think[open] summary::after { content: " ▴"; }
.think-body { padding: 0 14px 10px; font-size: 13.5px; color: var(--muted); max-height: 260px; overflow-y: auto; }
.think-body p { margin: 0 0 8px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 14px; text-align: left; transition: border-color .15s, transform .12s; animation: rise .35s var(--ease) both; }
.chip:hover { border-color: var(--accent); }
.chip:active { transform: scale(.97); }
.user-tools { display: flex; gap: 2px; margin-top: 4px; opacity: 0; transition: opacity .2s; }
.msg.user:hover .user-tools, .msg.user.last .user-tools { opacity: .8; }
.msg.user:not(.last) [data-ut=edit] { display: none; }
.user-tools button { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--faint); }
.user-tools button:hover { background: var(--surface-2); color: var(--text); }
.user-tools svg { width: 15px; height: 15px; }
.msg.ai:not(.last) .redo { display: none; }

/* ---------- empty state ---------- */
.hero { max-width: 680px; margin: 0 auto; padding: 9vh 20px 24px; text-align: center; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 300px; z-index: -1; pointer-events: none;
  background: radial-gradient(var(--dots) 1px, transparent 1.2px) 0 0 / 22px 22px; -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 30%, transparent 75%); }
.hero h2 { font-size: clamp(28px, 5.4vw, 40px); font-weight: 650; margin: 20px 0 8px; letter-spacing: -.035em; line-height: 1.12; }
.hero p { color: var(--muted); margin: 0 auto 26px; font-size: 16px; max-width: 460px; }
.countdown { display: inline-block; margin: 0 0 14px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; text-align: left; }
.card { text-align: left; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.card:active { transform: scale(.985); }
.card .e { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); font-size: 19px; }
.card b { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.card small { color: var(--faint); font-size: 12.5px; line-height: 1.3; }

/* ---------- composer ---------- */
.composer-wrap { padding: 6px calc(12px + var(--sar)) calc(10px + var(--sab)) calc(12px + var(--sal)); }
.composer { max-width: 780px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; padding: 6px; position: relative; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, var(--line-2)); }
.composer.drag { border-color: var(--accent); border-style: dashed; }
body.dropping::after { content: "Drop to attach · photos, PDF, Word, Excel, PowerPoint"; position: fixed; inset: 10px; z-index: 60; pointer-events: none; display: grid; place-items: center;
  border: 2px dashed var(--accent); border-radius: 18px; background: color-mix(in srgb, var(--bg) 78%, transparent); color: var(--text); font-size: 18px; font-weight: 600; }
.thumbs { display: flex; gap: 8px; padding: 6px 6px 8px; flex-wrap: wrap; }
.thumb { position: relative; }
.thumb img { width: 60px; height: 60px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.thumb button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); font-size: 12px; line-height: 1; box-shadow: var(--shadow-sm); }
.thumb .fchip { height: 60px; }
.row { display: flex; align-items: flex-end; gap: 2px; }
#input { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; padding: 10px 6px; max-height: 40vh; min-height: 40px; font-size: 16px; line-height: 1.45; }
#input::placeholder { color: var(--faint); }
.send { width: 40px; height: 40px; border-radius: 13px; background: var(--ink); color: var(--ink-text); display: grid; place-items: center; flex: none; transition: transform .12s, opacity .15s; }
.send:disabled { background: var(--surface-3); color: var(--faint); }
.send:active { transform: scale(.92); }
.send svg { width: 19px; height: 19px; }
.mic.rec { background: color-mix(in srgb, #e11d48 14%, transparent); color: #e11d48; animation: recpulse 1.2s ease-in-out infinite; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, #e11d48 12%, transparent); } }
.rec-bar { display: none; align-items: center; gap: 10px; padding: 8px 10px; color: #e11d48; font-variant-numeric: tabular-nums; }
.rec-bar.on { display: flex; }
.rec-bar canvas { flex: 1 1 0; min-width: 0; width: 0; height: 30px; }   /* fixed size: the drawing resolution must not feed back into the layout (Android grew it every frame until it broke) */
.hint { text-align: center; color: var(--faint); font-size: 11.5px; margin-top: 7px; }
.edit-bar { max-width: 780px; margin: 0 auto 8px; padding: 8px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.edit-bar button { color: var(--accent); font-weight: 600; }
.install { margin: 10px auto 0; max-width: 780px; display: none; gap: 10px; align-items: center; padding: 9px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); font-size: 14px; }
.install.on { display: flex; }
.install span { flex: 1; }
.fchip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; max-width: 240px; }
.fchip b { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 10.5px; color: #fff; flex: none; background: #475569; }
.fchip b.pdf { background: #dc2626; } .fchip b.docx { background: #2b579a; } .fchip b.xlsx, .fchip b.csv { background: #217346; } .fchip b.pptx { background: #d24726; }
.fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* video settings */
.vbar-opts { max-width: 780px; margin: 0 auto 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); }
.vbar-opts .vlabel { font-weight: 600; font-size: 14px; margin-right: 2px; }
.vbar-opts select, .vcard select { appearance: none; -webkit-appearance: none; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238b928d'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line); color: var(--text); border-radius: 11px; padding: 8px 28px 8px 11px; font-size: 14px; cursor: pointer; }
.vbar-opts select:focus, .vcard select:focus { outline: none; border-color: var(--accent); }
.vcard { width: min(100%, 560px); margin: 6px 0 10px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); }
.vcard textarea { width: 100%; min-height: 70px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 14.5px; outline: none; }
.vcard .vrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.vcard .go { width: 100%; padding: 12px; border-radius: var(--r); background: var(--ink); color: var(--ink-text); font-weight: 600; font-size: 15px; }
.vcard .go:disabled { opacity: .45; }
.vcard small { display: block; color: var(--faint); margin-top: 8px; font-size: 12.5px; }

.file-card { display: flex; align-items: center; gap: 14px; width: min(100%, 460px); padding: 12px 14px; margin: 4px 0 10px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.file-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.file-card .fi { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; }
.fi.docx { background: #2b579a; } .fi.xlsx { background: #217346; } .fi.pptx { background: #d24726; } .fi.pdf { background: #b91c1c; font-size: 11px; }
.file-card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-card small { color: var(--faint); }
.file-card .dl { margin-left: auto; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: var(--ink-text); font-weight: 700; flex: none; }

/* crisis help */
.crisis-card { border: 1px solid color-mix(in srgb, #16a34a 40%, transparent); background: color-mix(in srgb, #16a34a 8%, var(--surface)); border-radius: var(--r-lg); padding: 14px; margin: 4px 0 12px; max-width: 560px; }
.crisis-card b { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.crisis-card p { margin: 0 0 8px; color: var(--muted); }
.crisis-line { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; margin-top: 6px; border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; border: 1px solid var(--line); }
.crisis-line strong { white-space: nowrap; color: #16a34a; }

/* ---------- overlays ---------- */
.viewer { position: fixed; inset: 0; z-index: 20; background: rgba(8, 10, 9, .9); display: none; place-items: center; padding: 20px; }
.viewer.on { display: grid; }
.viewer img { max-width: 100%; max-height: 82vh; border-radius: 16px; }
.viewer .vbar { position: absolute; bottom: calc(24px + var(--sab)); display: flex; gap: 10px; }
.viewer .pill { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #fff; }
.pill { padding: 10px 18px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; font-size: 14.5px; text-decoration: none; color: var(--text); }
.toast { position: fixed; left: 50%; bottom: calc(108px + var(--sab)); transform: translateX(-50%) translateY(16px); opacity: 0; z-index: 30; background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); transition: all .22s var(--ease); pointer-events: none; font-size: 14px; font-weight: 500; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.scrim { display: none; }
.menu { position: fixed; z-index: 40; min-width: 210px; display: none; flex-direction: column; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
.menu.on { display: flex; animation: pop .15s var(--ease) both; }
.menu button { text-align: left; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; }
.menu button:hover { background: var(--surface-2); }
.menu .danger { color: var(--danger); }
.modal { position: fixed; inset: 0; z-index: 35; display: none; place-items: center; padding: 18px; background: rgba(8, 10, 9, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal.on { display: grid; }
.sheet { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-lg); animation: pop .2s var(--ease) both; }
.sheet h3 { margin: 0 0 16px; font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.sheet label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
.sheet textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); outline: none; resize: vertical; font-size: 15px; }
.sheet textarea:focus { border-color: var(--accent); }
.sheet .field { margin: 6px 0 0; }
.sheet select.field { margin-top: 6px; }
.sheet .check { display: flex; gap: 10px; align-items: center; color: var(--text); font-weight: 400; }
.sheet .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.sheet-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.seg { display: flex; gap: 4px; padding: 4px; margin-top: 6px; border-radius: 12px; background: var(--surface-2); }
.seg button { flex: 1; padding: 8px 6px; border-radius: 9px; font-size: 14px; color: var(--muted); font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 100; background: #060807; display: grid; place-items: center; transition: opacity .7s ease; }
.intro.out { opacity: 0; pointer-events: none; }
.intro video { width: 100%; height: 100%; object-fit: cover; }
@media (min-aspect-ratio: 4/5) { .intro video { object-fit: contain; } }
.intro-skip { position: absolute; right: calc(16px + var(--sar)); bottom: calc(20px + var(--sab)); padding: 9px 16px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #e7f7c9; font-size: 14px; backdrop-filter: blur(8px); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; transform: translateX(-105%); transition: transform .28s var(--ease); width: min(86vw, 320px); box-shadow: var(--shadow-lg); }
  #app.drawer .sidebar { transform: none; }
  #app.drawer .scrim { display: block; position: fixed; inset: 0; z-index: 2; background: rgba(8, 10, 9, .4); }
  .menu-btn { display: grid; }
}
@media (max-width: 560px) {
  .thread { padding-top: 14px; }
  .bubble-user { max-width: 88%; }
  .hero { padding-top: 6vh; }
  .cards { gap: 8px; }
  .card { grid-template-columns: 1fr; grid-template-rows: auto auto; padding: 12px; row-gap: 8px; }
  .card .e { grid-row: auto; width: 34px; height: 34px; font-size: 17px; }
  .card small { display: none; }
  .mode-btn .lbl { display: none; }
  .mode-btn { padding: 0 8px; }
  .hint { display: none; }
}
@media (hover: none) { .chat-item .del, .chat-item .more { opacity: .6; } .user-tools { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

@media print {
  body { overflow: visible; background: #fff; color: #000; }
  .sidebar, .topbar, .composer-wrap, .actions, .suggest, .user-tools, .think, .orb { display: none !important; }
  #app, .main, .scroll { position: static; overflow: visible; display: block; }
  .bubble-user { background: #eee; color: #000; }
  .md, .md strong { color: #000; }
}

/* connections (calendar, health) */
.conn { margin: 0 0 16px; padding: 12px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.conn-title { font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin: 2px 2px 10px; display: flex; justify-content: space-between; }
.conn-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 2px; }
.conn-row + .conn-row { border-top: 1px solid var(--line); }
.conn-row .mi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); }
.conn-row b { display: block; font-size: 14.5px; color: var(--text); font-weight: 600; }
.conn-row small { display: block; color: var(--faint); font-size: 12px; line-height: 1.35; font-weight: 400; }
.conn-row .pill { padding: 7px 13px; font-size: 13px; }
.conn-row .pill.on { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
.conn-row .pill:disabled { opacity: .45; }
.conn-note { display: block; color: var(--faint); font-size: 12px; margin: 6px 2px 0; }
.cal-card { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; width: min(100%, 480px); padding: 10px 12px; margin: 6px 0 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); }
.cal-card .mi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); font-size: 18px; }
.cal-card b { display: block; font-weight: 600; }
.cal-card small { color: var(--muted); font-size: 13px; }
.cal-card .cal-add { background: var(--ink); color: var(--ink-text); border-color: transparent; padding: 8px 16px; }
.cal-card .cal-add:disabled { background: var(--surface-2); color: var(--muted); }

/* beast mode lock */
.beast-btn .ul { display: none; }
.beast-btn.on { color: var(--ink-text); background: var(--ink); }
.beast-btn.on .ul { display: block; }
.beast-btn.on .lk { display: none; }
#routList .pill { padding: 6px 10px; font-size: 12.5px; }

/* ---------- 🚗 drive mode ---------- */
.drive { position: fixed; inset: 0; z-index: 60; background: #070908; color: #eceeea; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(18px + var(--sat)) calc(18px + var(--sar)) calc(22px + var(--sab)) calc(18px + var(--sal)); }
.drive-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: #8b928d; }
.drive-time { font-variant-numeric: tabular-nums; }
.drive-orb { --lvl: 0; position: relative; width: min(64vw, 300px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; }
.drive-orb .orb.big { width: 46%; height: 46%; transform: scale(calc(1 + var(--lvl) * .35)); transition: transform .08s linear; animation: none; filter: drop-shadow(0 0 30px rgba(198,241,53,.35)); }
.drive-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(198,241,53,.25); transform: scale(calc(.8 + var(--lvl) * .4)); transition: transform .08s linear, border-color .3s; }
.drive[data-state="listen"] .drive-ring { border-color: rgba(198,241,53,.55); animation: drv-breathe 2.4s ease-in-out infinite; }
.drive[data-state="speak"] .drive-ring { border-color: #c6f135; box-shadow: 0 0 60px rgba(198,241,53,.25); }
.drive[data-state="busy"] .drive-orb .orb.big { animation: cube 1.2s var(--ease) infinite; }
@keyframes drv-breathe { 50% { transform: scale(.9); } }
.drive-status { font-size: clamp(28px, 8vw, 40px); font-weight: 650; letter-spacing: -.03em; text-align: center; }
.drive-hint { color: #8b928d; font-size: 15px; text-align: center; max-width: 320px; margin-top: -10px; }
.drive-btns { width: 100%; max-width: 460px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drive-b { padding: 22px 10px; border-radius: 22px; font-size: 20px; font-weight: 650; background: #1a1e1c; color: #eceeea; border: 1px solid rgba(255,255,255,.1); }
.drive-b.end { background: #e11d48; border-color: transparent; color: #fff; }
.drive-b:active { transform: scale(.97); }

/* phones: message box on its own full-width line, buttons underneath (no more squashed, scrolling text box) */
@media (max-width: 640px) {
  .composer .row { flex-wrap: wrap; row-gap: 2px; }
  .composer #input { order: -1; flex: 1 1 100%; padding: 9px 10px 4px; min-height: 42px; }
  .composer .row .mode-btn { margin-right: auto; }
}

/* phones: Personalise is a fixed sheet that slides down from the top - it no longer re-centres
   (and jumps) while connections / routines load in */
@media (max-width: 640px) {
  #settings { place-items: start stretch; padding: 0; }
  #settings .sheet { width: 100%; max-width: none; height: 94dvh; max-height: none; border-radius: 0 0 24px 24px; border-top: 0;
    padding-top: calc(18px + var(--sat)); overscroll-behavior: contain; animation: sheetdown .32s var(--ease) both; }
  #settings .sheet-btns { position: sticky; bottom: -22px; margin: 8px -22px -22px; padding: 12px 22px calc(14px + var(--sab)); background: var(--surface); border-top: 1px solid var(--line); }
}
@keyframes sheetdown { from { transform: translateY(-100%); } }

/* beast mode pill */
.beast-btn { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px 0 9px; margin-right: 2px; border-radius: 999px; flex: none;
  font-size: 13px; font-weight: 650; letter-spacing: -.01em; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); }
.beast-btn .bi { font-size: 14px; }
.beast-btn.on { background: #c6f135; color: #0f1311; border-color: transparent; box-shadow: 0 0 0 3px rgba(198,241,53,.25); }

/* phones: answers use the full width - no cube column eating the left margin */
@media (max-width: 640px) {
  .msg.ai { display: block; }
  .msg.ai > .orb { display: none; }
  .msg.ai .ai-body .md table { font-size: 14px; }
  .thread { padding-left: calc(14px + var(--sal)); padding-right: calc(14px + var(--sar)); }
}

/* beast mode mascot: sleepy kitten when locked, roaring lion when unlocked */
.beast-btn { padding: 0 12px 0 4px; gap: 4px; }
.beast-btn .bi { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.beast-btn:not(.on) .bi { opacity: .9; filter: grayscale(.25) drop-shadow(0 1px 2px rgba(0,0,0,.2)); }
.beast-btn.on { background: #0f1311; color: #c6f135; box-shadow: 0 0 0 1px rgba(198,241,53,.55), 0 0 18px rgba(198,241,53,.35); }
:root[data-theme="dark"] .beast-btn.on { background: #182010; }
.beast-btn.roar .bi { animation: roar .7s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes roar { 0% { transform: scale(.6) rotate(-12deg); } 45% { transform: scale(1.45) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }

/* =====================================================================
   v2.1 refinements (21 Oct 2026) - from the GPT design review: subtract, raise contrast, calmer states
   ===================================================================== */
:root { --faint: #68716b; --line-2: rgba(15, 19, 17, .17); --logo-glow: drop-shadow(0 2px 6px rgba(21, 122, 58, .18)); --selected: #edf2df; --focus: #157a3a; }
:root[data-theme="dark"] { --faint: #929b94; --line-2: rgba(255, 255, 255, .14); --logo-glow: drop-shadow(0 0 8px rgba(185, 232, 42, .18)); --selected: #242d18; --focus: #c6f135; }
body { transition: background-color .12s, color .12s; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* sign-in */
.login-card .orb.big { width: 64px; height: 64px; animation: none; }
.login-card h1 { margin-top: 20px; font-size: 28px; font-weight: 650; letter-spacing: -.8px; }
.login-card p { margin-bottom: 24px; }
.btn-primary { min-height: 52px; font-weight: 600; }
.field { min-height: 52px; }
.field:focus { box-shadow: none; outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.login-foot { font: 400 11px/16px var(--font); letter-spacing: 0; text-transform: none; }
#login { background: radial-gradient(var(--dots) 1px, transparent 1.2px) 0 0 / 24px 24px, var(--bg); }

/* home */
.hero .orb.big { width: 56px; height: 56px; animation: none; }
.hero-hi { margin: 20px 0 8px !important; font-size: 15px !important; color: var(--muted); }
.hero-hi .grad-text { color: var(--text); font-weight: 600; }
.hero h2 { margin: 0 auto 12px; font-size: 26px; line-height: 31px; font-weight: 600; letter-spacing: -.7px; max-width: 320px; }
.hero p#heroSub { font-size: 15px; line-height: 22px; max-width: 310px; margin-bottom: 24px; }
.card { min-height: 88px; box-shadow: none; }
.card b { font-weight: 500; }
@media (max-width: 640px) { .cards .card:nth-child(n+5) { display: none; } }

/* composer: calm at rest, a clear ring only while typing */
.composer { border-color: var(--line-2); box-shadow: 0 1px 2px rgba(15,19,17,.04), 0 8px 24px rgba(15,19,17,.06); }
:root[data-theme="dark"] .composer { box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.composer:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 2px var(--focus); }
.mode-btn .mi svg { width: 18px; height: 18px; display: block; }
.mode-btn .mi { display: grid; place-items: center; color: var(--accent); }

/* install banner only on the home screen */
#app.has-chat .install { display: none !important; }

/* toolbar: theme lives in Personalise on phones, giving the title room */
@media (max-width: 640px) { #themeBtn { display: none; } }

/* answers: lighter emphasis, calmer rhythm, readable actions */
.md strong { font-weight: 600; }
.md p { margin-bottom: 14px; }
.md h1, .md h2, .md h3 { font-weight: 600; margin-top: 24px; }
.actions button { color: var(--muted); min-height: 40px; }
.md blockquote { border-left-width: 2px; border-left-color: var(--accent); }

/* mode menu: SVG icons, check + fill for the selection, softer shadow */
.mode-pop { width: min(304px, calc(100vw - 24px)); border-radius: 20px; padding: 8px; border-color: var(--line); box-shadow: 0 2px 6px rgba(15,19,17,.03), 0 12px 28px rgba(15,19,17,.08); }
:root[data-theme="dark"] .mode-pop { box-shadow: 0 2px 6px rgba(0,0,0,.15), 0 12px 28px rgba(0,0,0,.25); }
.modes button { grid-template-columns: 28px 1fr 18px; min-height: 56px; border-radius: 12px; padding: 10px 12px; }
.modes button .mi { width: 28px; height: 28px; background: none; color: var(--muted); }
.modes button .mi svg { width: 20px; height: 20px; }
.modes button .lbl { font-size: 15px; }
.modes button small { color: var(--muted); font-size: 13px; }
.modes button.on { background: var(--selected); }
.modes button.on .mi { color: var(--accent); }
.modes button.on::after { width: 18px; height: 18px; border-radius: 0; background: none;
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23157a3a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .modes button.on::after { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c6f135' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* drawer */
.new-chat { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); min-height: 44px; font-weight: 500; }
.chat-item { min-height: 44px; }
.chat-item.active::before { top: 50%; bottom: auto; height: 20px; width: 2px; transform: translateY(-50%); }
.side-head .orb { width: 26px; height: 26px; filter: none; }

/* settings */
.seg button.on { font-weight: 600; }
.seg { min-height: 48px; border-radius: 14px; }
.seg button { min-height: 40px; border-radius: 10px; }
.conn-row { grid-template-columns: 34px 1fr; grid-template-areas: "icon text" ". act"; row-gap: 8px; padding: 12px 2px; }
.conn-row > .mi { grid-area: icon; align-self: start; }
.conn-row > span:nth-child(2) { grid-area: text; }
.conn-row > .pill, .conn-row > .conn-avail, .conn-row > span:nth-child(3) { grid-area: act; justify-self: start; }
.conn-row small { color: var(--muted); font-size: 13px; line-height: 19px; margin-top: 2px; }
.conn-avail { display: block; color: var(--muted); font-size: 12px; }
.sheet-btns .pill, .sheet-btns .btn-primary { min-height: 48px; border-radius: 14px !important; }

/* drive mode */
.drive-hint { margin-top: -6px; font-size: 16px; color: #a3aba5; }
.drive-status { font-size: 30px; line-height: 36px; }
.drive-orb .orb.big { filter: none; }
.drive-b { min-height: 72px; border-radius: 20px; font-size: 20px; }
.drive-b.on { border-color: #c6f135; color: #c6f135; }
.drive-b.end { background: #b4233b; }
.drive-top { letter-spacing: .08em; }

.conn-outlook { color: var(--accent) !important; font-weight: 600; margin-top: 6px; }

/* read aloud: loading spinner + stop */
.actions button svg.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions button.playing { color: var(--accent); font-weight: 600; }

/* sign-up, plans, account (21 Oct 2026) */
.signup-cta { margin-top: 14px; font-size: 14px; color: var(--muted); }
.link-btn.strong { color: var(--accent); font-weight: 600; text-decoration: none; padding: 4px; }
.su-check { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 13.5px; color: var(--muted); margin: 6px 2px 12px; line-height: 1.45; }
.su-check input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.su-check a { color: var(--accent); }
/* sign-in / sign-up card taller than the screen (phones): scroll from the top instead of clipping it */
#login { align-items: start; }
#login > .login-card { margin: auto 0; }
.login-err.flash { animation: errFlash .5s; }
@keyframes errFlash { 0%, 100% { opacity: 1; } 40% { opacity: .2; } }
.plan-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-line b { display: block; font-size: 15px; } .plan-line small { color: var(--muted); font-size: 12.5px; }
.allow { height: 6px; border-radius: 6px; background: var(--surface-3); margin: 10px 0 4px; overflow: hidden; }
.allow i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s var(--ease); }
.fam-add summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; padding: 10px 2px; }
.fam-add .field { margin: 6px 0 0; }
.danger-link { color: var(--danger); margin-top: 12px; }
.sheet.plans { max-width: 480px; }
.plans-status { color: var(--muted); margin: -6px 0 14px; font-size: 14px; }
.plan-trial { margin-bottom: 12px; }
.plan-card { border: 1px solid var(--line-2); border-radius: 18px; padding: 16px; margin-bottom: 12px; background: var(--surface); }
.plan-card.current { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.plan-top { display: flex; justify-content: space-between; align-items: baseline; }
.plan-top b { font-size: 18px; } .plan-price { font-size: 24px; font-weight: 700; letter-spacing: -.5px; } .plan-price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.plan-card ul { margin: 10px 0 14px; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pack { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 8px; background: var(--surface-2); }
.pack b { display: block; font-size: 18px; } .pack small { color: var(--muted); font-size: 12px; }
.plans-legal { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 14px; }
.plans-legal a { color: var(--accent); }

/* import history + what Rubik AI knows */
.know-intro { margin: 0 2px 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.know-btns { display: flex; gap: 8px; flex-wrap: wrap; }
#impPaste textarea { display: block; width: 100%; margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); outline: none; resize: vertical; font-size: 15px; }
.know-how summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; padding: 12px 2px 4px; }
.know-how p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 8px 2px; }
.know-item { display: flex; gap: 8px; align-items: flex-start; padding: 10px 2px; border-top: 1px solid var(--line); }
.know-item > div { flex: 1; min-width: 0; } .know-item b { display: block; font-size: 14px; color: var(--text); }
.know-item small { color: var(--muted); font-size: 12.5px; line-height: 1.45; display: block; }
.know-item .icon-btn { width: 32px; height: 32px; font-size: 13px; }

/* sheets scroll up/down only - iOS was letting the settings panel drift sideways */
.modal { overflow: hidden; overscroll-behavior: contain; }
.sheet { overflow-x: hidden; overscroll-behavior-x: none; touch-action: pan-y; }
.sheet * { max-width: 100%; }
.sheet .sheet-btns, .sheet .seg, .sheet .seg * { max-width: none; }
.sheet a, .sheet small, .sheet p { overflow-wrap: anywhere; }

/* beast mode: lives in Personalise, a lime glow around the whole screen shows it is on */
.beast-box.on { border-color: rgba(185,232,42,.55); box-shadow: 0 0 0 3px rgba(185,232,42,.14); }
.beast-mi { width: 40px; height: 40px; display: grid; place-items: center; }
.beast-mi .bi { width: 34px; height: 34px; object-fit: contain; }
.beast-mi .bi.roar { animation: roar .7s cubic-bezier(.2,1.6,.4,1) both; }
#beastBtn.on { background: var(--ink); color: var(--ink-text); }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9999; opacity: 0; transition: opacity .5s ease;
  background: linear-gradient(90deg, rgba(185,232,42,.95) 0, rgba(185,232,42,.35) 3px, rgba(185,232,42,.12) 12px, transparent 26px),
              linear-gradient(270deg, rgba(185,232,42,.95) 0, rgba(185,232,42,.35) 3px, rgba(185,232,42,.12) 12px, transparent 26px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%); }
body.beast-on::after { opacity: 1; animation: beastBreathe 4.5s ease-in-out infinite; }
body.beast-wake::after { animation: beastWake 1.2s ease-out, beastBreathe 4.5s ease-in-out 1.2s infinite; }
@keyframes beastBreathe { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes beastWake { 0% { opacity: 0; } 35% { opacity: 1; filter: brightness(1.6); } 100% { opacity: 1; filter: none; } }
@media (prefers-reduced-motion: reduce) { body.beast-on::after, body.beast-wake::after { animation: none; opacity: 1; } }

/* jump-to-latest button + replies that don't drag the page while you read */
.composer-wrap { position: relative; }
.to-latest { position: absolute; left: 50%; top: -48px; transform: translateX(-50%); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; z-index: 5;
  background: var(--surface, #fff); color: var(--text); border: 1px solid var(--line-2, var(--line)); box-shadow: 0 4px 14px rgba(0,0,0,.14); cursor: pointer; transition: opacity .2s, transform .2s; }
.to-latest svg { width: 18px; height: 18px; }
.to-latest[hidden] { display: grid !important; opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(8px); }
.scroll { overflow-anchor: none; }

/* refined: softer entrance for new messages */
.msg.fresh { animation: msgIn .45s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.msg.pressed { transform: scale(.985); transition: transform .2s var(--ease); }
/* image / video placeholders shimmer while they are being made */
.img-skel { position: relative; overflow: hidden; }
.img-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); animation: skelSweep 1.6s ease-in-out infinite;
  background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--surface) 60%, transparent) 50%, transparent 80%); }
@keyframes skelSweep { to { transform: translateX(100%); } }
/* tidy actions: icons only on older answers, labels on the latest */
.msg.ai:not(.last) .actions .al { display: none; }
.msg.ai:not(.last) .actions { opacity: .55; transition: opacity .2s; }
.msg.ai:not(.last):hover .actions { opacity: 1; }
.msg.ai:not(.last) .actions button { padding: 6px 8px; }
@media (hover: none) { .msg { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }
/* long-press menu: a glass action sheet */
.press-menu { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; padding: 0 12px calc(14px + var(--sab));
  background: rgba(8,10,9,0); transition: background .2s; }
.press-menu[hidden], .today[hidden] { display: none !important; }
.press-menu.on { background: rgba(8,10,9,.28); }
.pm-sheet { width: min(420px, 100%); border-radius: 22px; padding: 6px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.22);
  transform: translateY(24px); opacity: 0; transition: transform .25s var(--ease), opacity .2s; }
.press-menu.on .pm-sheet { transform: none; opacity: 1; }
.pm-sheet button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 14px; border-radius: 14px; font-size: 16px; color: var(--text); text-align: left; }
.pm-sheet button + button { border-top: 1px solid var(--line); border-radius: 0; }
.pm-sheet button:active { background: var(--surface-2); }
.pm-sheet svg { width: 19px; height: 19px; color: var(--muted); }
.sel-text { white-space: pre-wrap; -webkit-user-select: text; user-select: text; max-height: 55vh; overflow: auto; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 15px; line-height: 1.55; }
/* "Today" quick chips on the empty screen */
.today { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -8px auto 18px; }
.today-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 550; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); transition: transform .15s; }
.today-chip:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { .msg.fresh, .img-skel::after { animation: none; } }

/* step 3: light glass - blur only on two small elements (message box + jump button); big panels get a glass sheen without blur */
:root { --glass: color-mix(in srgb, var(--surface) 78%, transparent); --glass-line: color-mix(in srgb, var(--text) 10%, transparent); }
.composer { background: var(--glass); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  border-color: var(--glass-line); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 22px rgba(15,19,17,.08); }
:root[data-theme="dark"] .composer { box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 6px 22px rgba(0,0,0,.35); }
.to-latest { background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-color: var(--glass-line); }
.sheet, .pm-sheet { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), var(--shadow-lg, 0 18px 50px rgba(0,0,0,.22)); border-color: var(--glass-line); }
:root[data-theme="dark"] .sheet, :root[data-theme="dark"] .pm-sheet { box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 50px rgba(0,0,0,.5); }
.today-chip { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 8px rgba(15,19,17,.06); }

/* pinned Milo tech-support chat */
.milo-item { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.milo-item .milo-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); flex: none; font-size: 16px; }
.milo-item b, .milo-item > span:last-child { font-weight: 600; }
body.milo-on #modeBtn, body.milo-on #driveBtn { opacity: .35; pointer-events: none; }
.erp-toggle { display: block; width: 100%; text-align: left; cursor: pointer; background: none; border: 0; }

/* intro video: always fits the screen (letterboxed on wide screens) */
.intro video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: 100vw; max-height: 100dvh; object-fit: cover; }
@media (min-aspect-ratio: 4/5) { .intro video { object-fit: contain; } }
/* back to the Rubik Console for staff */
.console-link { display: flex; align-items: center; gap: 8px; margin: 6px 10px 4px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; border: 1px solid var(--line); background: var(--surface); }
.console-link[hidden] { display: none; }
.console-link span { color: var(--accent); font-size: 16px; }
.console-link:hover { border-color: var(--line-2); }

/* ── 23 Oct 2026 refresh: clean white, glass user bubbles, tables that don't squash on phones, beast-mode light bar ── */
:root:not([data-theme="dark"]) { --bg: #fbfcfb; --surface: #ffffff; --surface-2: #f2f4f3; --surface-3: #e7ebe9; --line: rgba(15, 23, 20, .07); --line-2: rgba(15, 23, 20, .13); --dots: rgba(15, 23, 20, .05); }
/* your messages: light glass (layered translucency - no backdrop blur, it white-screens older iPhones) */
.bubble-user { background: linear-gradient(135deg, rgba(198, 241, 53, .20), rgba(21, 122, 58, .07)); color: var(--text);
  border: 1px solid rgba(21, 122, 58, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 6px 18px rgba(15, 23, 20, .06); }
:root[data-theme="dark"] .bubble-user { background: linear-gradient(135deg, rgba(198, 241, 53, .13), rgba(198, 241, 53, .04)); color: #eef9d4;
  border-color: rgba(198, 241, 53, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 22px rgba(0, 0, 0, .35); }
/* tables: words never split letter-by-letter; a wide table scrolls sideways instead of squashing */
.md table { -webkit-overflow-scrolling: touch; }
.md th, .md td { overflow-wrap: normal; word-break: normal; min-width: 8.5em; vertical-align: top; }
.md th:first-child, .md td:first-child { min-width: 6em; max-width: 10em; font-weight: 600; }
/* beast mode: no more glow round the screen edges - a light sweeps along under the header instead */
body.beast-on::after, body.beast-wake::after { opacity: 0 !important; animation: none !important; }
.topbar { position: relative; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background: linear-gradient(90deg, transparent 0%, rgba(185, 232, 42, 0) 20%, #c6f135 45%, #5eead4 55%, rgba(185, 232, 42, 0) 80%, transparent 100%);
  background-size: 220% 100%; filter: drop-shadow(0 0 6px rgba(198, 241, 53, .7)); }
body.beast-on .topbar::after { opacity: 1; animation: beastSweep 3.2s ease-in-out infinite; }
body.beast-wake .topbar::after { opacity: 1; animation: beastSweep 1.1s ease-out, beastSweep 3.2s ease-in-out 1.1s infinite; }
@keyframes beastSweep { 0% { background-position: 110% 0; } 100% { background-position: -110% 0; } }
@media (prefers-reduced-motion: reduce) { body.beast-on .topbar::after { animation: none; background-position: 50% 0; } }

/* 2026-10-23: press menu never blocks taps while closing; visible Save button under videos */
.press-menu:not(.on) { pointer-events: none; }
.media-save { display: inline-flex; align-items: center; gap: 8px; margin: -2px 0 10px; padding: 10px 16px; min-height: 42px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: 14px; font-weight: 600; }
.media-save svg { width: 16px; height: 16px; }
.media-save:active { opacity: .7; }

/* 2026-10-23: long chats + memory list */
.load-earlier { display: block; margin: 4px auto 18px; padding: 9px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.know-sub { color: var(--faint); font-size: 12.5px; margin: 4px 2px 6px; }

/* 2026-10-25: queue a message while an answer is streaming */
.msg.user.queued { opacity: .55; }
.queued-tag { font-size: 12px; color: var(--faint); margin: 4px 0 0; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.queued-tag button { color: var(--faint); font-size: 13px; padding: 2px 6px; border-radius: 8px; border: 1px solid var(--line); }
.stop-pill { position: absolute; right: 12px; top: -38px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; box-shadow: var(--shadow-sm); }
#send.queue { background: var(--accent); }

/* 2026-10-25: files drawer */
/* selfops-test-marker */
.files-btn { position: relative; }
.files-count { position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
#filesList .file-card { margin: 0 0 8px; }
#filesList .file-card.older { opacity: .6; margin-left: 18px; }
#filesList .fgroup { margin-bottom: 10px; }

/* brand kits (Settings › Brand & documents) + brand row on the Create video card */
.brand-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; } .brand-top select { flex: 1; margin: 0; }
.bk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .bk-grid .field { margin: 0; padding: 10px 12px; font-size: 14px; }
#bkColours { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 4px; }
.bk-col { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--faint); } .bk-col input { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0; background: none; }
#bkSwatches { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; } .sw { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); cursor: pointer; display: inline-block; }
.bk-assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 10px 0; }
.bk-tile { position: relative; aspect-ratio: 1; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; cursor: pointer; text-align: center; }
.bk-tile.has { border-style: solid; } .bk-tile img { width: 100%; height: 46px; object-fit: contain; } .bk-tile small { font-size: 10.5px; line-height: 1.2; color: var(--faint); } .bk-ico { font-size: 20px; color: var(--faint); }
.bk-x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--ink-text); font-size: 11px; line-height: 20px; }
#bk_brief { width: 100%; min-height: 84px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 14px; }
.vbrand { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; } .v-togs { display: flex; gap: 12px; flex-wrap: wrap; } .v-tog { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text); } .v-tog input { width: 16px; height: 16px; margin: 0; }
.cal-card .sig-pass { margin: 8px 0 0; padding: 9px 12px; font-size: 14px; }

/* Send now / Queue chooser (typed while an answer is running) */
.send-choice { position: absolute; right: 10px; bottom: calc(100% + 8px); z-index: 30; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.25)); min-width: 230px; }
.send-choice button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 10px 12px; border-radius: 11px; background: transparent; color: var(--text); text-align: left; }
.send-choice button:hover, .send-choice button:active { background: var(--surface-2); }
.send-choice b { font-size: 14.5px; font-weight: 600; } .send-choice small { font-size: 12px; color: var(--faint); }
.send-choice button[data-c=now] b::before { content: '⚡ '; }
.msg.interjected .bubble { outline: 1px dashed var(--accent); }

/* plan card (set_plan) + project brief */
.plan-card { margin: 4px 0 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); width: min(100%, 520px); }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; } .plan-head b { font-size: 13px; } .plan-head small { color: var(--faint); font-size: 12px; }
.plan-step { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: center; padding: 3px 0; font-size: 14px; }
.plan-step .plan-tick { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 11px; color: #fff; }
.plan-step.done .plan-tick { background: var(--accent); border-color: var(--accent); } .plan-step.done span:last-child { color: var(--faint); text-decoration: line-through; }
.plan-note { margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.brief-btn { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); margin-left: 6px; }
#briefText { width: 100%; min-height: 160px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 14px; }

/* live page previews (create_page) + extra media under an answer */
.page-card { width: min(100%, 640px); margin: 6px 0 10px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); overflow: hidden; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); } .page-head b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .page-head .pill { padding: 6px 12px; font-size: 13px; }
.page-card iframe { display: block; width: 100%; height: 420px; border: 0; background: #fff; }
.media-extra { margin: 6px 0 4px; } .media-extra .gen-img { max-width: min(100%, 560px); border-radius: 14px; border: 1px solid var(--line-2); }
.fi.csv, .fi.txt, .fi.json, .fi.md { background: #475569; font-size: 11px; } .fi.html { background: #0ea5e9; }

/* background jobs pill */
.jobs-pill { margin: 0 12px 6px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* calendar picker (first "Add to calendar") */
.cal-pick { display: grid; gap: 8px; margin: 12px 0 4px; max-height: 50vh; overflow-y: auto; }
.cal-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.cal-opt:active { transform: scale(.98); }
.cal-opt i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.cal-opt span { display: flex; flex-direction: column; min-width: 0; }
.cal-opt small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cancel { background: none; border: 0; color: var(--muted); font: inherit; padding: 10px 16px; cursor: pointer; }
.conn-calpick .link-btn { display: inline; padding: 0; font-size: inherit; }
.sheet-note { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 6px 0 10px; text-align: left; }

/* ── MAX mode (customers): Fable 5.1 on request. Its own look: lime → teal → violet light, a chevron mark, an ignition moment ── */
.max-mark { width: 22px; height: 22px; flex: none; }
.max-mark.sm { width: 20px; height: 20px; }
.max-lbl { font-weight: 800; letter-spacing: .16em; background: linear-gradient(90deg, #8fbf1c, #14b8a6, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.max-card { position: relative; overflow: hidden; isolation: isolate; border-radius: 20px; padding: 18px 18px 16px; margin: 16px 0 8px; color: #eef5ec; background: #0b0f0d; text-align: left; }
.max-card::before { content: ""; position: absolute; inset: -80%; z-index: -2; background: conic-gradient(from 0deg, #c6f135, #2dd4bf, #a78bfa, #f0abfc, #c6f135); opacity: .45; animation: maxSpin 9s linear infinite; }
.max-card::after { content: ""; position: absolute; inset: 1.5px; z-index: -1; border-radius: 18.5px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(167,139,250,.20), transparent 55%), radial-gradient(110% 80% at 100% 100%, rgba(45,212,191,.16), transparent 60%), #0b0f0d; }
.max-card.on::before { opacity: 1; animation-duration: 4s; }
.max-card.on { box-shadow: 0 0 0 1px rgba(167,139,250,.25), 0 10px 40px -8px rgba(139,92,246,.45), 0 0 30px -10px rgba(45,212,191,.5); }
.max-head { display: flex; align-items: center; gap: 12px; }
.max-head .max-mark { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.max-word { font-size: 26px; line-height: 1; font-weight: 800; letter-spacing: .22em; background: linear-gradient(90deg, #c6f135, #2dd4bf 45%, #a78bfa 75%, #c6f135); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: maxShine 5s linear infinite; }
.max-model { font-size: 12.5px; color: rgba(238,245,236,.62); margin-top: 5px; letter-spacing: .01em; }
.max-state { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; color: rgba(238,245,236,.6); background: rgba(255,255,255,.07); }
.max-card.on .max-state { color: #0b0f0d; background: linear-gradient(90deg, #c6f135, #2dd4bf); }
.max-perks { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; color: rgba(238,245,236,.82); }
.max-perks li { display: flex; gap: 9px; align-items: baseline; }
.max-perks li::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 2px; transform: rotate(45deg) translateY(-1px); background: linear-gradient(135deg, #c6f135, #a78bfa); }
.max-btn { width: 100%; height: 46px; border: 0; border-radius: 14px; font: inherit; font-weight: 700; letter-spacing: .02em; cursor: pointer; color: #0b0f0d;
  background: linear-gradient(90deg, #c6f135, #2dd4bf 50%, #a78bfa, #c6f135); background-size: 200% 100%; animation: maxShine 6s linear infinite; box-shadow: 0 6px 24px -6px rgba(45,212,191,.6); }
.max-btn:active { transform: scale(.98); }
.max-card.on .max-btn { color: #eef5ec; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); animation: none; }
/* confirm sheet */
.max-modal .sheet.max-sheet { position: relative; overflow: hidden; isolation: isolate; color: #eef5ec; background: #0b0f0d; text-align: left; border: 1px solid rgba(167,139,250,.3); box-shadow: 0 30px 80px -20px rgba(139,92,246,.55); }
.max-sheet::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 60% at 0% 0%, rgba(167,139,250,.25), transparent 60%), radial-gradient(80% 60% at 100% 100%, rgba(45,212,191,.2), transparent 60%); }
.max-sheet p { color: rgba(238,245,236,.82); font-size: 14.5px; line-height: 1.55; margin: 14px 0 4px; }
.max-sheet .sheet-btns { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.max-sheet .max-btn { width: auto; padding: 0 22px; }
.max-sheet .cal-cancel { color: rgba(238,245,236,.6); }
/* ignition */
.max-ignite { position: fixed; inset: 0; z-index: 9999; pointer-events: none; display: grid; place-items: center; animation: igDim 1.6s ease forwards; }
.max-ignite .ring { position: absolute; width: 60px; height: 60px; border-radius: 50%; border: 2px solid #2dd4bf; box-shadow: 0 0 40px #a78bfa, inset 0 0 24px #c6f135; opacity: 0; animation: igRing 1.3s cubic-bezier(.15,.8,.2,1) forwards; }
.max-ignite .ring.r2 { border-color: #c6f135; animation-delay: .15s; }
.max-ignite .word { font-size: 64px; font-weight: 800; letter-spacing: .35em; padding-left: .35em; background: linear-gradient(90deg, #c6f135, #2dd4bf, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(45,212,191,.6)); opacity: 0; animation: igWord 1.5s cubic-bezier(.2,1.3,.35,1) forwards; }
@keyframes igDim { 0% { background: rgba(5,8,7,0); } 25% { background: rgba(5,8,7,.8); } 70% { background: rgba(5,8,7,.8); } 100% { background: rgba(5,8,7,0); } }
@keyframes igRing { 0% { transform: scale(.2); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(14); opacity: 0; } }
@keyframes igWord { 0% { transform: scale(.6); opacity: 0; } 30% { opacity: 1; } 55% { transform: scale(1.04); } 80% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@keyframes maxSpin { to { transform: rotate(360deg); } }
@keyframes maxShine { to { background-position: -200% 0; } }
/* while on: an aurora line under the header and a lit composer edge */
.topbar::before { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; opacity: 0; transition: opacity .6s ease;
  background: linear-gradient(90deg, transparent, #c6f135 25%, #2dd4bf 50%, #a78bfa 75%, transparent); background-size: 200% 100%; filter: drop-shadow(0 0 6px rgba(45,212,191,.7)); }
body.max-on .topbar::before { opacity: 1; animation: maxShine 4s linear infinite; }
body.max-on .composer { border-color: transparent; box-shadow: 0 0 0 1.5px rgba(45,212,191,.55), 0 0 0 4px rgba(167,139,250,.12), 0 10px 30px -10px rgba(139,92,246,.35); }
.mode-btn.max { color: var(--text); background: linear-gradient(90deg, rgba(198,241,53,.16), rgba(45,212,191,.14), rgba(167,139,250,.18)); }
.mode-btn.max .lbl { font-weight: 800; letter-spacing: .16em; background: linear-gradient(90deg, #8fbf1c, #14b8a6, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: reduce) { .max-card::before, .max-word, .max-btn, body.max-on .topbar::before { animation: none; } .max-ignite { display: none; } }

/* ── Settings redesign (27 Oct 2026): plan hero on top, quiet grouped lists, line icons, chevron rows. Scoped to #settings. ── */
#settings {
  --s-bg: #ffffff; --s-group: #f5f7f5; --s-control: #eceeeb; --s-ink: #0f1311; --s-muted: #5f6862;
  --s-line: #e4e8e4; --s-accent: #157a3a; --s-danger: #b42318;
}
:root[data-theme="dark"] #settings {
  --s-bg: #111613; --s-group: #19201b; --s-control: #27302a; --s-ink: #f2f5f1; --s-muted: #a3aea6;
  --s-line: #2c372f; --s-accent: #b9e82a; --s-danger: #ff8c82;
}
#settings .sheet { background: var(--s-bg); color: var(--s-ink); }
#settings .sheet h3 { margin: 2px 0 20px; font-size: 26px; line-height: 32px; font-weight: 650; letter-spacing: -.03em; }
#settings .sheet > label, #settings .set-label { color: var(--s-ink); font-size: 14px; font-weight: 600; }

/* groups: one quiet surface each, no outlines */
#settings .conn { margin: 0 0 22px; padding: 14px 16px; border: 0; border-radius: 18px; background: var(--s-group); box-shadow: none; }
#settings .conn-title { display: flex; align-items: baseline; gap: 4px 10px; margin: 2px 0 6px; color: var(--s-ink);
  font: 600 15px/21px var(--font); text-transform: none; letter-spacing: -.005em; }
#settings .conn-title span { margin-left: auto; color: var(--s-muted); font: 400 12.5px/18px var(--font); text-transform: none; letter-spacing: 0; }

/* rows: icon · title + subtitle · control, on one line */
#settings .conn-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: none; align-items: center; column-gap: 12px; row-gap: 0; min-height: 56px; padding: 12px 0; }
#settings .conn-row > * { grid-area: auto; min-width: 0; }
#settings .conn-row > .mi { width: 32px; height: 32px; border-radius: 10px; background: transparent; color: var(--s-muted); align-self: center; }
#settings .conn-row > .pill, #settings .conn-row > .conn-avail, #settings .conn-row > span:nth-child(3) { justify-self: end; }
#settings .conn-row + .conn-row { border-top: 1px solid var(--s-line); }
#settings .conn-row b { font-size: 15px; line-height: 21px; font-weight: 600; color: var(--s-ink); }
#settings .conn-row small, #settings .conn-note { margin-top: 2px; color: var(--s-muted); font-size: 13px; line-height: 18px; }
#settings .conn-avail { color: var(--s-muted); font-size: 12.5px; }

/* buttons: quiet secondary, one strong primary - no fat ovals */
#settings .pill { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 14px; border: 0; border-radius: 11px;
  background: var(--s-control); color: var(--s-ink); font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; transition: background-color .14s ease, opacity .14s ease; }
#settings .pill.on { background: color-mix(in srgb, var(--s-accent) 16%, transparent); color: var(--s-accent); }
#settings .pill:active:not(:disabled), #settings .chevron-row:active { opacity: .7; }
#settings .btn-primary { border-radius: 12px; background: var(--s-ink); color: var(--s-bg); }

/* plan hero */
#settings .plan-hero { padding: 18px 18px 8px; }
#settings .plan-hero .conn-title { margin-bottom: 2px; color: var(--s-muted); font-size: 13px; font-weight: 500; }
#settings #acctEmail { display: block; margin: 0 0 12px; color: var(--s-muted); font: 400 13px/18px var(--font); overflow-wrap: anywhere; }
#settings .plan-line { display: block; }
#settings .plan-line b { display: block; font-size: 22px; line-height: 28px; font-weight: 650; letter-spacing: -.02em; }
#settings .plan-line small { display: block; margin-top: 3px; color: var(--s-muted); font-size: 13.5px; line-height: 19px; }
#settings .allow { height: 5px; margin: 14px 0 6px; border-radius: 5px; background: var(--s-line); }
#settings .allow i { background: var(--s-accent); }
#settings .chevron-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 50px; padding: 12px 0; margin: 4px 0 0;
  border: 0; border-top: 1px solid var(--s-line); border-radius: 0; background: transparent; color: var(--s-ink); font: 600 15px/21px var(--font); text-align: left; cursor: pointer; }
#settings .chev-r { width: 18px; height: 18px; flex: none; color: var(--s-muted); }
#settings .plan-hero .max-card { margin: 6px 0 12px; }

/* family list inside the hero */
#settings #familyBox { border-top: 1px solid var(--s-line); margin-top: 4px; padding-top: 6px; }

/* import box */
#settings .know-intro { color: var(--s-muted); font-size: 13.5px; line-height: 19px; margin: 0 0 12px; }
#settings .know-btns { display: flex; gap: 8px; flex-wrap: wrap; }
#settings .know-how summary { color: var(--s-accent); font-size: 13.5px; font-weight: 600; cursor: pointer; margin: 12px 0 4px; }

/* text fields, checkboxes */
#settings textarea, #settings .field, #settings select { border-radius: 14px; background: var(--s-group); border: 1px solid transparent; color: var(--s-ink); }
#settings textarea:focus, #settings .field:focus, #settings select:focus { border-color: color-mix(in srgb, var(--s-accent) 55%, transparent); outline: none; background: var(--s-bg); }
#settings .check { color: var(--s-ink); font-weight: 500; }
#settings .check input { accent-color: var(--s-accent); width: 18px; height: 18px; }

/* delete account: quiet, at the very bottom */
#settings .danger-zone { margin: 8px 0 4px; padding-top: 14px; border-top: 1px solid var(--s-line); }
#settings .danger-link { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 0; color: var(--s-danger); font-size: 14px; font-weight: 500; text-decoration: none; background: none; border: 0; }

@media (max-width: 360px) {
  #settings .conn-row { grid-template-columns: 32px minmax(0, 1fr); }
  #settings .conn-row > .pill, #settings .conn-row > .conn-avail { grid-column: 2; justify-self: start; margin-top: 8px; }
}
#settings .sheet-btns .pill { background: var(--s-control) !important; color: var(--s-ink) !important; border: 0; }
#settings .sheet-btns { background: var(--s-bg); border-top-color: var(--s-line); }
/* iPhone zooms the whole page in when a text box under 16px is tapped - keep every editable field at 16px on touch screens */
@media (pointer: coarse) { textarea, select, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) { font-size: 16px !important; } }

/* ── Settings pass 2: foldable groups, signature pad, no sideways overflow ── */
#settings .fold-title { cursor: pointer; user-select: none; -webkit-user-select: none; align-items: center; min-height: 30px; margin: 0; }
#settings .fold-chev { width: 18px; height: 18px; flex: none; margin-left: auto; color: var(--s-muted); transition: transform .2s var(--ease); }
#settings .conn-title span ~ .fold-chev { margin-left: 8px; }
#settings .conn.folded .fold-chev { transform: rotate(-90deg); }
#settings .conn.folded > .conn-body { display: none; }
#settings .conn-body { padding-top: 4px; }
#settings .conn.folded { padding-top: 12px; padding-bottom: 12px; }
/* nothing may push the sheet sideways (iPhone) */
#settings .sheet { overflow-x: hidden; }
#settings .conn-row > span:nth-child(2), #settings .conn-row b, #settings .conn-row small { overflow-wrap: anywhere; }
.bk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-grid .field { min-width: 0; width: 100%; }
@media (max-width: 480px) { .bk-grid { grid-template-columns: minmax(0, 1fr); } }
/* signature pad: white paper, a signing line, ink that feels like a pen */
.sigpad-sheet h3 { margin-bottom: 4px; }
.sigpad-wrap { position: relative; margin: 14px 0 8px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(15,19,17,.12), 0 6px 24px -10px rgba(15,19,17,.25); overflow: hidden; }
.sigpad { display: block; width: 100%; height: 220px; touch-action: none; cursor: crosshair; position: relative; z-index: 1; }
.sigpad-line { position: absolute; left: 40px; right: 22px; bottom: 54px; height: 1.5px; background: rgba(15,19,17,.22); }
.sigpad-x { position: absolute; left: 18px; bottom: 56px; font-size: 22px; line-height: 1; color: rgba(15,19,17,.45); }
.sigpad-hint { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; font-size: 12.5px; color: rgba(15,19,17,.4); }
.sigpad-sheet .sheet-btns { display: flex; align-items: center; gap: 8px; }

/* predictive text strip (wordbar.js) */
.wordbar { display: flex; gap: 6px; padding: 6px 6px 2px; overflow-x: auto; scrollbar-width: none; }
.wordbar::-webkit-scrollbar { display: none; }
.wordbar[hidden] { display: none; }
.wordbar button { flex: 1 1 0; min-width: 0; max-width: 33%; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text, inherit); font: inherit; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.wordbar button.fix { border-color: var(--accent, #7ac943); font-weight: 600; }
/* pinch-zoom viewer (zoom.js) */
.viewer { overflow: hidden; touch-action: none; }
.viewer img { touch-action: none; user-select: none; -webkit-user-select: none; }

/* share button (share.js) */
.media-share { margin-left: 8px; }
.img-share { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 10px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
/* chat look (chatlook.js) */
main.main { isolation: isolate; }
#chatBg { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; pointer-events: none; }
body.has-wall .main { background: transparent; }
body.has-wall .msg.ai .ai-body { background: color-mix(in srgb, var(--surface) 90%, transparent); border-radius: 16px; padding: 10px 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
body.has-wall .hero h1, body.has-wall .hero p { text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.look-box { margin: 16px 0 6px; }
.look-note { display: block; color: var(--muted); font-size: 12.5px; margin: 4px 0 10px; }
.look-walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.look-walls button { aspect-ratio: 9/16; border-radius: 10px; border: 2px solid var(--line-2); padding: 0; overflow: hidden; background: var(--surface-2) center/cover; cursor: pointer; display: grid; place-items: center; font: 600 11px var(--font, inherit); color: var(--muted); }
.look-walls button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.look-walls button.on, .look-bubbles button.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.look-bubbles { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.look-bubbles button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; font: 600 11px inherit; color: var(--text); }
.look-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.look-custom input { width: 34px; height: 34px; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
/* vertical-only scrolling on phones (Jeff, 31 Oct): nothing in the chat or the chats menu may slide sideways */
.main .scroll { overflow-x: hidden; overscroll-behavior-x: none; }
.sidebar, .chat-list { overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y; }
.thread, .msg, .ai-body, .md { min-width: 0; max-width: 100%; }
.ai-body, .bubble-user { overflow-wrap: anywhere; }
.md pre { max-width: 100%; overflow-x: auto; touch-action: pan-x pan-y; }
.md table { display: block; max-width: 100%; overflow-x: auto; touch-action: pan-x pan-y; }
.modal .sheet { overflow-x: hidden; }

/* music (1 Nov 2026) */
.mcard .m-title { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; font-weight: 600; outline: none; }
.mcard .m-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.mcard .m-chips .chip.on { background: var(--ink); color: var(--ink-text); }
.mcard .m-lbl { display: block; font-size: 12.5px; color: var(--faint); margin: 10px 0 4px; }
.mcard .m-lyrics { min-height: 150px; font-size: 14px; line-height: 1.45; }
.mcard .m-inst { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); }
.songs { display: flex; flex-direction: column; gap: 10px; width: min(100%, 560px); margin: 6px 0 10px; }
.song { padding: 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); display: grid; gap: 8px; }
.song b { font-size: 14px; } .song audio { width: 100%; min-width: 0; }
.song .media-save { justify-self: start; }
