/* Ignis. Colours are tokens: light by default, dark when the device prefers it, and either one when the member
   picks it with the toggle (html[data-theme], kept on the device). */

:root {
  --bg: #f6f2ea;
  --surface: #fffdf8;
  --surface-2: #efe9de;
  --line: #e2d9ca;
  --ink: #1f1c18;
  --ink-2: #5d564c;
  --ink-3: #8c8476;
  --accent: #9a5b22;
  --time-cold: #2f6fd1;
  --pv-rep: #c25e00;
  --warm: #8e2443;
  --busy: #d9a514;
  --fresh: #2fa35a;
  --pv-ref: #d23c3c;
  --pv-trig: #0a78b4;
  --time-render: #c2407e;
  --accent-ink: #fffaf2;
  --accent-soft: #f3e4cf;
  --live: #23804c; /* a call that is on (the Home ring) */
  --silver: #7d889c;
  --danger: #b3261e;
  --me: #ece3d3;
  --shadow: 0 1px 2px rgb(60 40 10 / 6%), 0 8px 24px rgb(60 40 10 / 8%);
  --serif: 'Cormorant Garamond', 'Noto Naskh Arabic', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 14px;
  /* The phone's bars over the page: 0 in a browser; inside the Android app the page runs under them, and the app
     sets --safe-area-inset-* (right on every Android version, where env() is not). */
  --inset-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --inset-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #12110f;
    --surface: #1b1916;
    --surface-2: #24211d;
    --line: #2f2b26;
    --ink: #ede6da;
    --ink-2: #b4ab9c;
    --ink-3: #807868;
    --accent: #d9a35b;
    --time-cold: #7fb4ff;
  --pv-rep: #ffb15c;
  --warm: #c2385f;
  --busy: #f0c23a;
  --fresh: #45c474;
  --pv-ref: #ff6b6b;
  --pv-trig: #6fd0ff;
    --pv-rep: #ffb15c;
    --warm: #c2385f;
    --busy: #f0c23a;
    --fresh: #45c474;
    --pv-ref: #ff6b6b;
    --pv-trig: #6fd0ff;
    --time-render: #f29ac4;
    --accent-ink: #1a140b;
    --accent-soft: #352816;
    --live: #7fd6a0;
    --silver: #c3cad8;
    --danger: #f2867e;
    --me: #2a2620;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #12110f;
  --surface: #1b1916;
  --surface-2: #24211d;
  --line: #2f2b26;
  --ink: #ede6da;
  --ink-2: #b4ab9c;
  --ink-3: #807868;
  --accent: #d9a35b;
  --time-cold: #7fb4ff;
  --time-render: #f29ac4;
  --accent-ink: #1a140b;
  --accent-soft: #352816;
  --live: #7fd6a0;
  --silver: #c3cad8;
  --danger: #f2867e;
  --me: #2a2620;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
  color-scheme: dark;
}

/* Wine: the colour of the app icon, deep enough to read on for long, with its gold for the accent. */
:root[data-theme='wine'] {
  --bg: #210c14;
  --surface: #2c111b;
  --surface-2: #371622;
  --line: #48202f;
  --ink: #f5e9df;
  --ink-2: #d4bab0;
  --ink-3: #a3857c;
  --accent: #e3b46a;
  --accent-ink: #2a0f17;
  --accent-soft: #4a2a1c;
  --live: #86d8a6;
  --silver: #d9cdd6;
  --danger: #ff9a90;
  --me: #3d1826;
  --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 8px 24px rgb(0 0 0 / 40%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

/* ---------- shared pieces ---------- */

.brand {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 2.6rem;
  line-height: 1;
  margin: 0;
}
.brand .mark { color: var(--accent); }
.tagline { color: var(--ink-3); margin: 0.6rem 0 0; font-size: 0.95rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: 1px solid transparent; border-radius: 999px;
  padding: 0.7rem 1.3rem; font-weight: 600; font-size: 0.95rem;
  background: var(--accent); color: var(--accent-ink);
  transition: filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.55; cursor: default; filter: none; }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.block { width: 100%; }
/* rare or undoing actions (delete, wipe): a plain underlined line in the quiet ink, never a red pill; each asks first */
.btn.quiet { background: none; border: 0; padding: 0.4rem 0; color: var(--ink-3); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.btn.quiet:hover { color: var(--ink-2); filter: none; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.field { display: block; margin-bottom: 0.9rem; }
.field span { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.35rem; }
.field input, .field select {
  width: 100%; padding: 0.75rem 0.95rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); outline: none;
}
.field select { color: var(--ink); font: inherit; appearance: auto; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.7rem; }
.field small { display: block; color: var(--ink-3); font-size: 0.78rem; margin-top: 0.3rem; }
.error { color: var(--danger); font-size: 0.88rem; min-height: 1.3em; margin: 0.2rem 0 0.8rem; }

/* the admin page's theme button goes light → dark → wine → light, and shows the next one: a moon in light, a drop
   in dark, a sun in wine (the app's button has one icon and opens its theme screen) */
.theme-toggle .sun, .theme-toggle .drop { display: none; }
:root[data-theme='dark'] .theme-toggle .moon { display: none; }
:root[data-theme='dark'] .theme-toggle .drop { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .moon { display: none; }
  :root:not([data-theme]) .theme-toggle .drop { display: block; }
}
:root[data-theme='wine'] .theme-toggle .moon { display: none; }
:root[data-theme='wine'] .theme-toggle .sun { display: block; }

/* ---------- sign in, register, pending ---------- */

.gate {
  min-height: 100%;
  display: grid; place-items: center;
  /* room at the top for the corner buttons (globe, light/dark), so a tall card never runs under them */
  padding: calc(72px + var(--inset-top)) 16px calc(2rem + var(--inset-bottom));
  background:
    radial-gradient(60rem 30rem at 50% -10%, var(--accent-soft), transparent 70%),
    var(--bg);
}
.gate .corner { position: fixed; top: calc(16px + var(--inset-top)); right: 16px; }
.gate .corner-left { position: fixed; top: calc(16px + var(--inset-top)); left: 16px; }

/* the language pill (globe + EN or BM): opens the first screen again */
.region {
  display: inline-flex; align-items: center; gap: 0.35rem; height: 40px; padding: 0 0.8rem 0 0.7rem;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em;
}
.region:hover { background: var(--surface-2); color: var(--ink); }
.region svg { width: 17px; height: 17px; }
.card {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 2rem 1.6rem 1.6rem; box-shadow: var(--shadow);
}
.card header { text-align: center; margin-bottom: 1.6rem; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 1.4rem; }
.tabs button { border: 0; background: transparent; border-radius: 999px; padding: 0.5rem; font-weight: 600; color: var(--ink-3); }
.tabs button[aria-selected='true'], .tabs button[aria-checked='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 10%); }

/* the first screen: language, then country */
.pick-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); margin: 0 0 0.45rem; }
#welcome.lang-only #country-label, #welcome.lang-only #country-pick { display: none; }
.choices { display: grid; gap: 0.4rem; margin-bottom: 1.4rem; }
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%;
  padding: 0.7rem 0.95rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  text-align: left; color: var(--ink);
}
.choice:hover { border-color: var(--ink-3); }
.choice[aria-checked='true'] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.choice svg { width: 18px; height: 18px; flex: none; color: var(--accent); visibility: hidden; }
.choice[aria-checked='true'] svg { visibility: visible; }

/* the second screen: light or dark. Each preview keeps its own colours, whatever the page shows. */
.look-title, .card-title { font-family: var(--serif); font-weight: 600; font-size: 1.75rem; line-height: 1.15; text-align: center; margin: 0.2rem 0 1.4rem; }
.looks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 1.4rem; }
.look-pick, .menu-pick { display: grid; gap: 0.6rem; padding: 0; border: 0; background: none; color: var(--ink); text-align: center; }
.preview {
  --pv-bg: #f6f2ea; --pv-surface: #fffdf8; --pv-line: #e2d9ca; --pv-ink: #8c8476; --pv-me: #ece3d3; --pv-accent: #9a5b22; --pv-soft: #f3e4cf;
  display: flex; flex-direction: column; gap: 9px; height: 168px; padding: 12px 10px 10px;
  border-radius: 14px; border: 1px solid var(--pv-line); background: var(--pv-bg);
  transition: box-shadow 0.15s;
}
.looks.three { grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
.preview.wine { --pv-bg: #210c14; --pv-surface: #2c111b; --pv-line: #48202f; --pv-ink: #a3857c; --pv-me: #3d1826; --pv-accent: #e3b46a; --pv-soft: #4a2a1c; }
.preview.dark { --pv-bg: #12110f; --pv-surface: #1b1916; --pv-line: #2f2b26; --pv-ink: #807868; --pv-me: #2a2620; --pv-accent: #d9a35b; --pv-soft: #352816; }
.preview i { display: block; }
.pv-title { width: 46%; height: 7px; border-radius: 4px; background: var(--pv-ink); opacity: 0.7; }
.pv-me { width: 58%; height: 20px; margin-left: auto; border-radius: 10px 10px 3px 10px; background: var(--pv-me); }
.pv-ai { display: flex; gap: 6px; }
.pv-who { width: 14px; height: 14px; flex: none; border-radius: 99px; background: var(--pv-soft); }
.pv-lines { flex: 1; display: grid; gap: 5px; padding-top: 2px; }
.pv-lines i { height: 5px; border-radius: 3px; background: var(--pv-ink); opacity: 0.55; }
.pv-lines i:nth-child(2) { width: 85%; }
.pv-lines i:nth-child(3) { width: 60%; }
.pv-input { margin-top: auto; height: 22px; border-radius: 99px; border: 1px solid var(--pv-line); background: var(--pv-surface); position: relative; }
.pv-input i { position: absolute; right: 3px; top: 3px; width: 14px; height: 14px; border-radius: 99px; background: var(--pv-accent); }
.look-pick[aria-checked='true'] .preview, .menu-pick[aria-checked='true'] .preview { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.look-name { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; font-weight: 600; font-size: 0.95rem; color: var(--ink-2); }
.look-pick[aria-checked='true'] .look-name, .menu-pick[aria-checked='true'] .look-name { color: var(--ink); }
.look-name .dot { width: 16px; height: 16px; border-radius: 99px; border: 2px solid var(--ink-3); }
.look-pick[aria-checked='true'] .dot, .menu-pick[aria-checked='true'] .dot { border: 5px solid var(--accent); }

/* the third screen: the Home style, each preview a small Home. Minimal follows the page's theme; Vivid is the night sky. */
.menu-pick { align-content: start; }
.menu-sub { font-size: 0.8rem; line-height: 1.35; color: var(--ink-3); margin-top: -0.3rem; }
.home-pv { position: relative; overflow: hidden; align-items: center; gap: 6px; padding-top: 30px; }
.home-pv.minimal { --pv-bg: var(--bg); --pv-surface: var(--surface); --pv-line: var(--line); --pv-ink: var(--ink-3); --pv-accent: var(--accent); }
.home-pv.vivid { --pv-line: #2a3158; --pv-ink: #d9d3c6; --pv-surface: rgb(255 253 248 / 12%); --pv-accent: #e8b56c;
  background: radial-gradient(1px 1px at 20% 18%, #fff 50%, transparent), radial-gradient(1px 1px at 70% 30%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 40% 12%, #fff 50%, transparent), radial-gradient(1px 1px at 85% 52%, #fff 50%, transparent),
    radial-gradient(1px 1px at 12% 46%, #fff 50%, transparent), linear-gradient(180deg, #0b1027 0%, #1d1b3d 55%, #3a2742 100%); }
.hp-ic { width: 12px; height: 12px; border-radius: 99px; background: var(--pv-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pv-accent) 25%, transparent); }
.hp-moon { position: absolute; right: 18px; top: 12px; width: 16px; height: 16px; border-radius: 99px; box-shadow: -4px 2px 0 0 #f1dfb8; }
.hp-when { width: 34%; height: 4px; border-radius: 2px; background: var(--pv-ink); opacity: 0.45; }
.hp-title { width: 62%; height: 8px; border-radius: 4px; background: var(--pv-ink); opacity: 0.8; }
.hp-hills { position: absolute; left: -10%; right: -10%; bottom: 0; height: 42%;
  background: radial-gradient(60% 70% at 25% 100%, #2c2752 98%, transparent), radial-gradient(70% 60% at 80% 100%, #231e42 98%, transparent); }
.home-pv .hp-dock { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 24px; display: flex; align-items: center; justify-content: space-around;
  border-radius: 9px; border: 1px solid var(--pv-line); background: var(--pv-surface); }
.home-pv .hp-dock i { width: 9px; height: 9px; border-radius: 3px; background: var(--pv-ink); opacity: 0.75; }
.home-pv .hp-dock i:last-child { background: var(--pv-accent); opacity: 1; }
.fineprint { text-align: center; color: var(--ink-3); font-size: 0.8rem; margin: 1rem 0 0; }
.fineprint a, .side-privacy { color: var(--ink-3); }
.side-privacy { display: block; padding: 0.4rem 0.6rem; font-size: 0.78rem; text-decoration: none; }
.side-privacy:hover { text-decoration: underline; }

.pending { text-align: center; }
.pending .seal {
  width: 72px; height: 72px; margin: 0.4rem auto 1.2rem; border-radius: 999px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.pending .seal svg { width: 32px; height: 32px; }
.pending h2 { font-family: var(--serif); font-size: 2rem; font-weight: 600; margin: 0 0 0.4rem; }
.pending p { color: var(--ink-2); margin: 0 0 1.4rem; }
.pending .row { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

/* ---------- chat ---------- */

/* --vvh: the height the keyboard leaves (app.js), so the box and the last lines sit just above it */
.chat { display: grid; grid-template-columns: 280px 1fr; height: var(--vvh, 100dvh); }
.side {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border-right: 1px solid var(--line);
  padding: calc(1rem + var(--inset-top)) 0.75rem calc(0.75rem + var(--inset-bottom));
}
.side .top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0 0.4rem 1rem; }
.side .tools { display: flex; gap: 0.4rem; }
.side .region { height: 34px; padding: 0 0.65rem 0 0.55rem; }
.side .theme-toggle { width: 34px; height: 34px; }
.side .brand { font-size: 1.7rem; }
.side .new { margin: 0 0.25rem 0.9rem; }
.side nav { flex: 1; overflow-y: auto; min-height: 0; }
.side .label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding: 0.4rem 0.6rem; }
.chat-link {
  display: flex; align-items: center; gap: 0.3rem; width: 100%;
  border: 0; background: transparent; text-align: left;
  padding: 0.55rem 0.6rem; border-radius: 10px; color: var(--ink-2);
}
.chat-link:hover { background: var(--surface-2); color: var(--ink); }
.chat-link.on { background: var(--accent-soft); color: var(--ink); }
.chat-link .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.92rem; }
.chat-link .del { opacity: 0; border: 0; background: none; color: var(--ink-3); padding: 0.1rem 0.3rem; border-radius: 6px; }
.chat-link:hover .del, .chat-link.on .del { opacity: 1; }
.chat-link .del:hover { color: var(--danger); }
.side .me {
  display: flex; align-items: center; gap: 0.6rem;
  border-top: 1px solid var(--line); padding: 0.8rem 0.4rem 0; margin-top: 0.6rem;
}
.avatar {
  width: 34px; height: 34px; border-radius: 999px; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
  background: var(--accent); color: var(--accent-ink);
}
.side .me .name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .me .icon-btn { width: 34px; height: 34px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: calc(0.7rem + var(--inset-top)) 16px 0.7rem; border-bottom: 1px solid var(--line); background: var(--bg);
}
/* (no name at the top of a chat: the bar is its buttons alone, Faris 2026-10-27; the title keeps their place) */
.bar .title { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; visibility: hidden; }
.bar .menu { display: none; }

.thread { flex: 1; overflow-y: auto; min-height: 0; padding: 1.5rem 16px 1rem; }
.thread .inner { max-width: 760px; margin: 0 auto; }
.empty { text-align: center; padding: 12vh 0 2rem; animation: rise 0.6s ease both; }
.empty .sky { width: 44px; height: 44px; margin: 0 auto 0.9rem; color: var(--accent); }
.empty .sky svg { width: 100%; height: 100%; }
.empty h2 { font-family: var(--serif); font-weight: 600; font-size: 2.3rem; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .empty { animation: none; } }

.msg { display: flex; gap: 0.8rem; margin: 0 0 1.4rem; }
.msg.me { justify-content: flex-end; }
.msg.me .body {
  background: var(--me); border-radius: 18px 18px 4px 18px; padding: 0.65rem 1rem;
  max-width: min(80%, 560px); white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.ai .who {
  width: 30px; height: 30px; border-radius: 999px; flex: none; margin-top: 2px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  font-family: var(--serif); font-weight: 700;
}
.msg.ai .body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* the chat's text size, theirs (Settings › Appearance, Faris 2026-10-27): every message, a typed chat's and a group's */
.msg .body { font-size: calc(1em * var(--chat-scale, 1)); }
/* a few words in colour in an answer (js/markdown.js {red}…{/red}), readable on every theme */
.tc-red { color: var(--tc-red, #c8443a); } .tc-green { color: var(--tc-green, #2f9a5f); } .tc-yellow { color: var(--tc-yellow, #a87c00); }
.tc-blue { color: var(--tc-blue, #3f7fd0); } .tc-gray { color: var(--ink-3); }
/* links, copy blocks and web pictures in an answer (js/markdown.js, Faris 2026-10-27) */
.msg .body a.md-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; -webkit-touch-callout: none; }
.md-code { position: relative; margin: 0 0 0.8rem; }
.md-code pre { margin: 0; padding-top: 2.1rem; }
.md-copy { position: absolute; top: 6px; right: 6px; z-index: 1; font: inherit; font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.md-address { position: fixed; z-index: 120; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: min(340px, calc(100vw - 16px)); box-sizing: border-box; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.md-address p { flex: 1 0 100%; margin: 0; font-size: 0.8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.md-img { display: flex; flex-direction: column; gap: 4px; max-width: min(100%, 320px); margin: 6px 0; } /* (its own line, even placed mid-sentence) */
.md-img-open { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.md-img img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; background: color-mix(in srgb, var(--ink) 6%, transparent); }
/* large (![…|large](…)): the message's whole width, the picture whole */
.md-img.large { display: flex; width: 100%; max-width: 100%; margin: 6px 0; }
.md-img.large img { max-height: 75vh; }
.md-cap { font-size: 0.78rem; color: var(--ink-3); line-height: 1.3; }
.md-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 0 0 0.8rem; }
.md-gallery .md-img { max-width: none; margin: 0; }
.md-gallery .md-img img { aspect-ratio: 1; max-height: none; object-fit: cover; }
.md-gallery.large { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.md-gallery.large .md-img img { aspect-ratio: auto; object-fit: contain; }
/* a picture whose address could not be read (R12): said, not split into text; its address in the title */
.md-broken { display: inline-block; margin: 4px 0; padding: 3px 10px; border: 1px dashed var(--danger); border-radius: 8px; font-size: 0.78rem; color: var(--danger); cursor: help; }
/* a named section of pictures (::: YouTube … :::): a thin frame, its name cutting the top-left of the border */
.md-set { margin: 10px 0 0.9rem; padding: 4px 10px 10px; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 12px; min-width: 0; }
.md-set > legend { padding: 0 6px; margin-left: 4px; font-size: 0.74rem; letter-spacing: 0.04em; color: var(--ink-2); }
.md-set > :last-child { margin-bottom: 0; }
.md-set .md-gallery { margin-bottom: 0; }
:root[data-theme='dark'], :root[data-theme='wine'] { --tc-red: #ff7a6e; --tc-green: #5fd38f; --tc-yellow: #f2c94c; --tc-blue: #7ab4ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { --tc-red: #ff7a6e; --tc-green: #5fd38f; --tc-yellow: #f2c94c; --tc-blue: #7ab4ff; } }
/* a call in a typed chat (js/app.js callInChat): their words while heard, a little faded; and what the call does */
.msg.live .body { opacity: 0.6; }
.msg.ai.live .body { opacity: 1; white-space: pre-wrap; }
/* the word she is saying: colour only (a shadow for its edges: no padding, so no word moves); not said yet: soft */
.msg.ai.live mark.now { background: color-mix(in srgb, var(--accent) 30%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0; }
.msg.ai.live .unsaid { color: color-mix(in srgb, var(--ink) 45%, transparent); }
.call-status { margin: -0.6rem 0 1.2rem; font-size: 0.85rem; color: var(--ink-2); text-align: center; }
.call-status[data-kind="thinking"]::after, .call-status[data-kind="remembering"]::after, .call-status[data-kind="writing"]::after { content: '• • •'; letter-spacing: 0.2em; animation: call-dots 1.2s ease-in-out infinite; }
@keyframes call-dots { 50% { opacity: 0.3; } }
.msg.ai .body > :first-child { margin-top: 0; }
.msg.ai .body > :last-child { margin-bottom: 0; }
.msg.ai .body p, .msg.ai .body ul, .msg.ai .body ol, .msg.ai .body pre, .msg.ai .body blockquote, .msg.ai .body table { margin: 0 0 0.8rem; }
.msg.ai .body h1, .msg.ai .body h2, .msg.ai .body h3 { font-size: 1.1rem; margin: 1.1rem 0 0.5rem; }
.msg.ai .body ul, .msg.ai .body ol { padding-left: 1.4rem; }
.msg.ai .body code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
.msg.ai .body pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; overflow-x: auto; }
.msg.ai .body pre code { background: none; padding: 0; font-size: 0.85rem; }
.msg.ai .body blockquote { border-left: 3px solid var(--accent); padding-left: 0.9rem; color: var(--ink-2); }
.msg.ai .body table { border-collapse: collapse; display: block; overflow-x: auto; }
.msg.ai .body th, .msg.ai .body td { border: 1px solid var(--line); padding: 0.35rem 0.6rem; text-align: left; }
.msg.ai .body hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.msg .fail { color: var(--danger); font-size: 0.88rem; margin: 0.4rem 0 0.5rem; }
.msg.ai .body .note { color: var(--ink-3); font-size: 0.82rem; margin: 0.4rem 0 0; }

/* under an answer: Copy, and Retry on the last one; light until touched */
.acts { display: flex; gap: 2px; margin: 0.3rem 0 0 -7px; }
.acts .act, .fail .act {
  width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--ink-3); opacity: 0.8;
}
.acts .act:hover, .fail .act:hover { background: var(--surface-2); color: var(--ink-2); opacity: 1; }
.acts .act svg, .fail .act svg { width: 16px; height: 16px; }

/* a long press on the member's own message: Copy */
.msg.me { position: relative; }
.msg.me.held .body { filter: brightness(0.94); }
.hold-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 5; }
.hold-menu.below { bottom: auto; top: calc(100% + 6px); }
.hold-menu button {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 0.9rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  font-size: 0.9rem; font-weight: 500; box-shadow: var(--shadow);
}
.hold-menu svg { width: 16px; height: 16px; color: var(--ink-2); }
@media (pointer: coarse) {
  .msg.me .body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}
.msg .retry { padding: 0.4rem 1rem; font-size: 0.85rem; }
.typing { display: inline-flex; gap: 4px; padding: 0.6rem 0; }
/* "Thinking" and its moving dots while an answer is made: a tap shows the thinking (js/app.js thinkingLine) */
.thinking-line { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0; border: 0; background: none; font: inherit; font-style: italic; color: var(--ink-3); cursor: pointer; }
.thinking-line.bare { gap: 0; }
.thinking-line:hover > span:first-child, .thinking-line:active > span:first-child { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.alive .thinking-line .typing { padding: 0; }
.typing i { width: 7px; height: 7px; border-radius: 99px; background: var(--ink-3); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.composer { padding: 0.6rem 16px calc(0.9rem + var(--inset-bottom)); }
.composer form {
  max-width: 760px; margin: 0 auto; display: grid; gap: 0.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 0.55rem 0.5rem 0.5rem 0.9rem; box-shadow: var(--shadow);
}
/* under what they write: + , the model, its thinking, Send (js/compose.js) */
.c-row { display: flex; align-items: center; gap: 0.35rem; min-width: 0; margin-inline-start: -0.4rem; }
.c-grow { flex: 1; }
.c-plus { width: 34px; height: 34px; flex: none; }
.c-plus svg { width: 18px; height: 18px; }
.c-pill { display: inline-flex; align-items: center; gap: 0.2rem; min-width: 0; flex: 0 1 auto; font: inherit; font-size: 0.82rem; color: var(--ink-2); background: none; border: 0; border-radius: 99px; padding: 0.35rem 0.55rem; cursor: pointer; }
.c-pill:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.c-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-pill svg { width: 14px; height: 14px; flex: none; }
.c-think { flex: none; }
.c-think .bulb { width: 15px; height: 15px; }
.c-think.on { color: var(--accent); }
.chat.is-group .c-tool { display: none; }
.c-files { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.1rem 0 0.3rem; }
.c-files[hidden] { display: none; }
.c-file { position: relative; flex: none; display: flex; align-items: center; gap: 0.4rem; height: 56px; max-width: 200px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.c-file img { width: 56px; height: 56px; object-fit: cover; }
.c-file.busy { opacity: 0.55; }
.c-file.failed { border-color: var(--danger, #c0392b); }
.c-file-ico { flex: none; width: 40px; height: 40px; margin-inline-start: 8px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 0.65rem; font-weight: 700; }
.c-file-name { font-size: 0.8rem; padding-inline-end: 26px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-file-x { position: absolute; top: 3px; inset-inline-end: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.65rem; cursor: pointer; display: grid; place-items: center; }
.c-menu { position: fixed; z-index: 96; min-width: 200px; max-width: calc(100vw - 16px); max-height: 50vh; overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); color: var(--ink); }
.c-menu button { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: start; font: inherit; font-size: 0.92rem; color: var(--ink); background: none; border: 0; border-radius: 9px; padding: 0.55rem 0.6rem; cursor: pointer; }
.c-menu button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.c-menu-mark { width: 18px; display: grid; place-items: center; color: var(--accent); }
.c-menu-mark svg { width: 18px; height: 18px; color: var(--ink-2); }
.c-menu-note { margin-inline-start: auto; padding-inline-start: 0.8rem; font-size: 0.78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.c-menu button:disabled { cursor: default; color: var(--ink-3); }
.c-menu button:disabled .c-menu-note { white-space: normal; text-align: end; }
.c-menu button:disabled:hover { background: none; }
.menu-face { width: 18px; height: 18px; }
.c-menu-head { padding: 0.45rem 0.6rem 0.2rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
/* what they attached, in their sent message */
.m-files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem; margin-bottom: 0.35rem; }
.m-pic img { display: block; max-width: 180px; max-height: 180px; border-radius: 12px; object-fit: cover; }
.m-file { display: inline-flex; align-items: center; max-width: 240px; padding: 0.45rem 0.7rem; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-file b { color: var(--accent); margin-inline-end: 0.25rem; }
.composer form:focus-within { border-color: var(--accent); }
.composer textarea {
  flex: 1; border: 0; outline: none; background: transparent; resize: none;
  max-height: 40vh; padding: 0.5rem 0; line-height: 1.45;
}
.composer .send { width: 40px; height: 40px; padding: 0; flex: none; }
.composer .send svg { width: 18px; height: 18px; }
.composer .send .square { display: none; }
.composer .send.stop .arrow { display: none; }
.composer .send.stop .square { display: block; }
.composer .hint { max-width: 760px; margin: 0.4rem auto 0; text-align: center; color: var(--ink-3); font-size: 0.75rem; }

.scrim { display: none; }

/* ---------- home: the sky of the hour, the greeting, the tools in a dock ---------- */

.home {
  --sky-ink: #f3e9d8; --sky-ink-2: rgb(243 233 216 / 70%); --sky-acc: #e8b56c; --sky-live: #7fd6a0;
  --glass: rgb(255 253 248 / 10%); --glass-line: rgb(255 255 255 / 16%);
  position: relative; min-height: 100dvh; overflow: hidden; display: flex; flex-direction: column;
  color: var(--sky-ink); isolation: isolate;
}
.home[data-sky='light'] {
  --sky-ink: #2a2116; --sky-ink-2: rgb(42 33 22 / 70%); --sky-acc: #a8662a; --sky-live: #23804c;
  --glass: rgb(255 253 248 / 42%); --glass-line: rgb(255 255 255 / 60%);
}
.sky-scene { position: absolute; inset: 0; z-index: -1; background: #0b1027; transition: background 0.6s; }
.home[data-part='late'] .sky-scene { background: linear-gradient(180deg, #070b1f 0%, #10142f 45%, #1d1a38 75%, #2a1f3d 100%); }
.home[data-part='night'] .sky-scene { background: linear-gradient(180deg, #0b1027 0%, #1d1b3d 45%, #3a2742 72%, #6e4630 100%); }
/* dawn and dusk: the night, lit silver from behind the hills (never orange) */
.home[data-part='dawn'] .sky-scene { background: linear-gradient(180deg, #0d1330 0%, #18234a 30%, #34507e 52%, #8eaacb 66%, #dce7f2 72%, #8eaacb 80%, #34507e 100%); }
.home[data-part='evening'] .sky-scene { background: linear-gradient(180deg, #0b1027 0%, #141c3a 34%, #283a62 56%, #5f7aa3 67%, #8ea6c6 72%, #3a4f78 82%, #1b2442 100%); }
/* day: warm parchment, a soft sun */
.home[data-sky='light'] .sky-scene { background: linear-gradient(180deg, #efe2cb 0%, #f2dfc0 35%, #f5e9d5 65%, #f8f1e4 100%); }
.home[data-sky='light'] .sky-scene::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.45; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.15  0 0 0 0 0.1  0 0 0 0.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

.stars i { position: absolute; width: 2px; height: 2px; border-radius: 99px; background: #fff; animation: twinkle 4s ease-in-out infinite; }
.stars i.big { width: 3px; height: 3px; box-shadow: 0 0 6px rgb(255 255 255 / 70%); }
@keyframes twinkle { 50% { opacity: 0.2; } }
.orb { position: absolute; transform: translate(-50%, -50%); border-radius: 99px; }
.orb.moon { width: 52px; height: 52px; box-shadow: -13px 6px 0 0 #f1dfb8; filter: drop-shadow(0 0 18px rgb(241 223 184 / 25%)); }
/* the day's sun: a wide soft glow with a fine ring, no disc */
.orb.sun { width: 300px; height: 300px;
  background: radial-gradient(circle, rgb(255 250 236 / 95%) 0%, rgb(255 244 218 / 70%) 22%, rgb(255 238 204 / 30%) 45%, transparent 70%); }
.orb.sun::after { content: ''; position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; transform: translate(-50%, -50%);
  border-radius: 99px; border: 1.5px solid rgb(176 128 64 / 50%); }
.glow { position: absolute; left: 0; right: 0; top: 58%; height: 26%; pointer-events: none; display: none;
  background: radial-gradient(60% 55% at 50% 60%, rgb(220 232 245 / 55%) 0%, rgb(170 195 225 / 18%) 55%, transparent 80%); }
.home[data-part='dawn'] .glow { display: block; }
.home[data-part='evening'] .glow { display: block; opacity: 0.55; }

/* the hills: four ridges, far to near, with mist between; colours per sky */
.hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 40%; }
.home { --h1a: #2c2752; --h1b: #241f44; --h2a: #231e42; --h2b: #1a1633; --h3a: #19152f; --h3b: #120f24; --h4a: #100d1f; --h4b: #0a0814; --mist: rgb(150 150 205 / 12%); }
.home[data-part='dawn'], .home[data-part='evening'] { --h1a: #4f6690; --h1b: #3b5078; --h2a: #364b70; --h2b: #283a5a; --h3a: #233250; --h3b: #1a2640; --h4a: #141c31; --h4b: #0d1324; --mist: rgb(215 228 244 / 26%); }
.home[data-sky='light'] { --h1a: #e3d5bb; --h1b: #d8c7a8; --h2a: #d0bc99; --h2b: #c2ab85; --h3a: #b49c78; --h3b: #a38a66; --h4a: #8f785a; --h4b: #7a6449; --mist: rgb(255 251 242 / 60%); }
.hills .h1a { stop-color: var(--h1a); } .hills .h1b { stop-color: var(--h1b); }
.hills .h2a { stop-color: var(--h2a); } .hills .h2b { stop-color: var(--h2b); }
.hills .h3a { stop-color: var(--h3a); } .hills .h3b { stop-color: var(--h3b); }
.hills .h4a { stop-color: var(--h4a); } .hills .h4b { stop-color: var(--h4b); }
.hills .mist0 { stop-color: var(--mist); stop-opacity: 0; } .hills .mist1 { stop-color: var(--mist); }

.home-top {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; max-width: 760px; margin: 0 auto;
  padding: calc(0.8rem + var(--inset-top)) 16px 0;
}
.home-top .brand { font-size: 1.7rem; color: var(--sky-ink); }
.home[data-sky='dark'] .home-top .brand .mark { color: #e8b56c; }
.home[data-sky='light'] .home-top .brand .mark { color: #9a5b22; }
.home-top .tools { display: flex; gap: 0.4rem; }
.home-top .region, .home-top .icon-btn { height: 36px; background: var(--glass); border-color: var(--glass-line); color: var(--sky-ink); backdrop-filter: blur(10px); }
.home-top .icon-btn { width: 36px; }

.hello { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 2rem 24px 40vh; animation: rise 0.6s ease both; }
.hello .when { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sky-ink-2); }
.hello h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.3rem, 9vw, 3.4rem); line-height: 1.08; margin: 0.6rem 0 0; max-width: 14em; overflow-wrap: anywhere;
  text-shadow: 0 2px 24px rgb(0 0 0 / 18%); }

/* Voice: a light ring with no fill, in the middle just above the hills; the same place in every style and theme */
.voice { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; animation: rise 0.6s ease both; }
.voice-btn { position: relative; width: 74px; height: 74px; border-radius: 99px; display: grid; place-items: center; background: none; color: var(--sky-ink);
  border: 1.5px solid color-mix(in srgb, var(--sky-ink) 70%, transparent); transition: transform 0.12s, border-color 0.2s; }
.voice-btn svg { width: 34px; height: 34px; overflow: visible; }
.voice-btn .accs { fill: none; stroke: var(--sky-acc); }
.voice-btn .acc { fill: var(--sky-acc); }
.voice-btn:active { transform: scale(0.94); }
.voice-name { font: 600 0.95rem/1 var(--serif); color: var(--sky-ink-2); letter-spacing: 0.02em; }
.voice-name { transition: transform 0.3s; }
/* Voice off for them (the admin's Voice › Access): the ring stays, faded like a Home button that is off; a tap says why */
.voice.soon { opacity: 0.45; }
.voice.soon .voice-btn { filter: grayscale(0.6); }
.voice-name .live { display: none; }
/* In a call the call stays right here: the ring turns green (Faris: it should say "I'm in a call"), its bars move with
   whoever talks (--b1 to --b5, 0 to 1, from voice.js), a soft halo grows with the voice (--level), and the rest of
   Home steps back. Green bars: the AI talks. */
.voice:not([data-state='off'], [data-state='connecting']) { --sky-acc: var(--sky-live); }
.voice-btn::before { content: ''; position: absolute; inset: -1.5px; border-radius: 99px; pointer-events: none; opacity: 0;
  border: 1.5px solid color-mix(in srgb, var(--sky-acc) 60%, transparent); transition: opacity 0.3s; }
.voice-btn path { transform-box: fill-box; transform-origin: center; transition: transform 0.25s ease, stroke 0.3s; }
.voice:not([data-state='off']) .voice-btn { border-color: color-mix(in srgb, var(--sky-acc) 85%, transparent); }
.voice:not([data-state='off']) .voice-btn::before { opacity: calc(0.15 + var(--level, 0) * 0.6); transform: scale(calc(1.08 + var(--level, 0) * 0.22)); transition: none; }
.voice[data-state='listening'] .voice-btn::before { animation: halo 4s ease-in-out infinite; }
@keyframes halo { 50% { opacity: 0.4; } }
.voice:not([data-state='off']) .voice-btn path { transition: transform 0.06s linear, stroke 0.3s; }
.voice:not([data-state='off']) .b1 { transform: scaleY(calc(0.6 + var(--b1, 0) * 1.6)); }
.voice:not([data-state='off']) .b5 { transform: scaleY(calc(0.6 + var(--b5, 0) * 1.6)); }
.voice:not([data-state='off']) .b2 { transform: scaleY(calc(0.3 + var(--b2, 0) * 0.95)); }
.voice:not([data-state='off']) .b4 { transform: scaleY(calc(0.3 + var(--b4, 0) * 0.95)); }
.voice:not([data-state='off']) .b3 { transform: scaleY(calc(0.22 + var(--b3, 0) * 0.98)); }
.voice:not([data-state='off']) path:not(.accs) { stroke: var(--sky-ink); }
.voice[data-state='speaking'] .voice-btn path { stroke: var(--sky-acc); }
.voice[data-state='thinking'] .voice-btn path:not(.accs) { stroke: var(--sky-ink-2); }
.voice:not([data-state='off']) .voice-name { transform: translateY(10px); } /* clear of the halo; the ring stays put */
.voice:not([data-state='off']) .voice-name .idle { display: none; }
.voice:not([data-state='off']) .voice-name .live { display: inline; }
/* Connecting (the tap, until the microphone hears and the server is awake): the ring keeps its colour and the icon its
   shape, a little faded, while an amber arc runs around it; then it turns green with the call's sound. */
.voice[data-state='connecting'] .voice-btn { border-color: color-mix(in srgb, var(--sky-ink) 45%, transparent); }
.voice[data-state='connecting'] .voice-btn::before { opacity: 0; animation: none; }
.voice[data-state='connecting'] .voice-btn path { transform: none; opacity: 0.55; }
.voice-btn::after { content: ''; position: absolute; inset: -1.5px; border-radius: 99px; pointer-events: none; opacity: 0;
  background: conic-gradient(from 0deg, transparent 0 62%, var(--sky-acc));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); transition: opacity 0.25s; }
.voice[data-state='connecting'] .voice-btn::after { opacity: 1; animation: dial 0.9s linear infinite; }
@keyframes dial { to { transform: rotate(1turn); } }
.dock-wrap { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px calc(14px + var(--inset-bottom)); display: grid; justify-items: center; }
.dock {
  width: 100%; max-width: 520px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 14px 6px;
  border-radius: 28px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.dock .tool { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 0; color: var(--sky-ink); font: 600 1.05rem/1.1 var(--serif); }
.dock .ic { width: 58px; height: 54px; display: grid; place-items: center; transition: transform 0.12s; }
.dock .ic svg { width: 50px; height: 50px; overflow: visible; }
.dock .ic .acc { fill: var(--sky-acc); }
.dock .tool:active .ic { transform: scale(0.92); }
.dock .tool.soon { opacity: 0.8; }
.soon-toast {
  margin-bottom: 10px; padding: 0.45rem 0.9rem; border-radius: 99px; font-size: 0.82rem; font-weight: 600;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--sky-ink); backdrop-filter: blur(10px);
}

/* Minimal: the theme's own plain page, the same greeting and dock; the part of the day is only the icon before the
   greeting, in the app's amber (and silver in the early morning). */
.part-ic { display: none; }
.home[data-style='minimal'] {
  --sky-ink: var(--ink); --sky-ink-2: var(--ink-3); --sky-acc: var(--accent); --sky-live: var(--live);
  --glass: var(--surface); --glass-line: var(--line);
  background: var(--bg);
}
.home[data-style='minimal'] .sky-scene { display: none; }
.home[data-style='minimal'] .hello h1 { text-shadow: none; }
.home[data-style='minimal'] .dock { box-shadow: var(--shadow); backdrop-filter: none; -webkit-backdrop-filter: none; }
.home[data-style='minimal'] .part-ic { display: inline-block; width: 0.82em; height: 0.82em; margin-right: 0.26em; vertical-align: -0.06em; }
.part-ic svg { width: 100%; height: 100%; overflow: visible; }
.part-ic .acc { fill: var(--sky-acc); }
.part-ic .accs { fill: none; stroke: var(--sky-acc); stroke-width: 2.6; stroke-linecap: round; }
.part-ic .ink { fill: var(--sky-ink); }
.part-ic .silver { fill: var(--silver); }
/* The call on hold while an H3 video plays on the phone (public/js/voice.js hold): the ring rests, faded */
.voice[data-state='held'], .call-mini[data-state='held'] { opacity: 0.5; }
.voice[data-state='held'] .voice-btn::before { animation: none; }

/* The call away from Home (index.html #call-mini): the theme's live green, bars moving with whoever talks (--b1 to --b5
   from voice.js, as on Home's ring). corner: a small ring in the top bar's free corner; float: a bigger ring above the
   screen's bottom buttons; strip: a band across the top that moves the screen down (its height is added to the top
   inset every screen already keeps clear). */
.call-mini { position: fixed; z-index: 60; color: var(--ink); }
.cm-ring { width: 40px; height: 40px; border-radius: 99px; display: grid; place-items: center; padding: 0; color: var(--ink);
  background: color-mix(in srgb, var(--bg) 80%, transparent); border: 1.5px solid var(--live);
  box-shadow: 0 0 0 calc(3px + var(--level, 0) * 6px) color-mix(in srgb, var(--live) 18%, transparent); backdrop-filter: blur(8px); }
.cm-ring svg { width: 22px; height: 22px; overflow: visible; }
.cm-ring path { transform-box: fill-box; transform-origin: center; transition: transform 0.06s linear; }
.call-mini .b1 { transform: scaleY(calc(0.6 + var(--b1, 0) * 1.6)); }
.call-mini .b5 { transform: scaleY(calc(0.6 + var(--b5, 0) * 1.6)); }
.call-mini .b2 { transform: scaleY(calc(0.3 + var(--b2, 0) * 0.95)); }
.call-mini .b4 { transform: scaleY(calc(0.3 + var(--b4, 0) * 0.95)); }
.call-mini .b3 { transform: scaleY(calc(0.22 + var(--b3, 0) * 0.98)); }
.call-mini[data-state='speaking'] .cm-ring path { stroke: var(--live); }
.call-mini[data-state='thinking'] .cm-ring path { stroke: var(--ink-3); }
/* Between calls (data-state off): quiet, no glow; a tap calls. The chat's top bar keeps its corner clear for it. */
.call-mini[data-state='off'] .cm-ring { border-color: var(--line); box-shadow: none; color: var(--ink-2); }
.call-corner .chat .bar { padding-right: 64px; }
.cm-who, .cm-end { display: none; }
.call-mini[data-style='corner'] { top: calc(0.75rem + var(--inset-top)); right: 16px; }
/* the group's call ring (index.html #g-call): the same ring, with a badge of whose turn it is (the group icon between calls) */
.g-call .g-call-who { position: absolute; left: -6px; bottom: -6px; min-width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; font-size: 0.75rem; line-height: 1; background: var(--surface); border: 1px solid var(--line); pointer-events: none; }
.g-call .g-call-who:empty { display: none; }
.g-call.g-speaking .g-call-who { border-color: var(--live); }
.call-mini[data-style='float'] { right: 16px; bottom: calc(150px + var(--inset-bottom)); }
.call-mini[data-style='float'] .cm-ring { width: 58px; height: 58px; }
.call-mini[data-style='float'] .cm-ring svg { width: 30px; height: 30px; }
.call-mini[data-style='strip'] { left: 0; right: 0; top: 0; height: var(--strip); display: flex; align-items: center; gap: 10px; box-sizing: border-box;
  padding: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) 16px 0; background: color-mix(in srgb, var(--live) 16%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--live) 40%, transparent); }
.call-mini[data-style='strip'] .cm-ring { width: 28px; height: 28px; border: 0; box-shadow: none; background: none; }
.call-mini[data-style='strip'] .cm-who { display: inline; font-weight: 600; font-size: 0.9rem; }
.call-mini[data-style='strip'] .cm-end { display: inline-block; margin-left: auto; padding: 0.3rem 0.8rem; border-radius: 99px; border: 0;
  background: var(--danger); color: #fff; font-family: inherit; font-weight: 600; font-size: 0.82rem; line-height: 1; }
/* The call's AI points at a button (places.js highlight): a soft live-green ring that breathes, until tapped or let go. */
.guided { outline: 2px solid var(--live); outline-offset: 3px; animation: guided 1.6s ease-in-out infinite; }
@keyframes guided { 50% { outline-offset: 7px; outline-color: color-mix(in srgb, var(--live) 30%, transparent); } }
/* The call's AI is looking at the picture (voice.js lookAt): a light runs round the ring, Home's and the small one. */
.cm-ring { position: relative; }
.call-mini[data-looking] .cm-ring::after, .voice[data-looking] .voice-btn::after { content: ''; position: absolute; inset: -1.5px; border-radius: 99px;
  pointer-events: none; opacity: 1; background: conic-gradient(from 0deg, transparent 0 55%, var(--live));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); animation: dial 1.1s linear infinite; }
body.call-strip { --strip: calc(40px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))); --inset-top: var(--strip); }
@media (prefers-reduced-motion: reduce) { .stars i, .hello, .voice-btn::before, .guided { animation: none; } .voice[data-state='connecting'] .voice-btn::after { animation-duration: 3s; } }


@media (max-width: 800px) {
  .chat { grid-template-columns: 1fr; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: min(84vw, 300px); z-index: 20;
    transform: translateX(-102%); transition: transform 0.22s ease; box-shadow: var(--shadow);
  }
  .chat.open .side { transform: none; }
  .chat.open .scrim { display: block; position: fixed; inset: 0; z-index: 10; background: rgb(0 0 0 / 35%); }
  .bar .menu { display: inline-grid; }
  .chat-link .del { opacity: 1; }
}

/* ---------- Arabic: right to left ---------- */

/* The language picker holds three. */
#lang-pick { grid-template-columns: repeat(2, 1fr); } /* six languages: three rows of two */
/* Korean breaks lines between words, not inside one; Japanese keeps its closing marks off a line's start */
html[lang='ko'] body { word-break: keep-all; overflow-wrap: anywhere; }
html[lang='ja'] body { line-break: strict; word-break: auto-phrase; } /* breaks between phrases (Chrome), not inside a word */
/* Korean and Japanese letters are never spread out: the small spaced-out labels are for Latin capitals */
:root:is([lang='ko'], [lang='ja']) :is(.hello .when, .side .label, .c-menu-head, .g-label, .pick-label) { letter-spacing: 0; }
#lang-pick button { padding-inline: 0.3rem; font-size: 0.88rem; line-height: 1.2; }

/* Arabic letters join: no letter spacing and no capitals on the small labels. */
:root[lang='ar'] .hello .when, :root[lang='ar'] .side .label, :root[lang='ar'] .ip-when, :root[lang='ar'] .im-day,
:root[lang='ar'] .pick-label { letter-spacing: 0; text-transform: none; }

/* Everything that sits on one side moves to the other. */
[dir='rtl'] .gate .corner { right: auto; left: 16px; }
[dir='rtl'] .gate .corner-left { left: auto; right: 16px; }
[dir='rtl'] .choice, [dir='rtl'] .chat-link { text-align: right; }
[dir='rtl'] .pv-me { margin-left: 0; margin-right: auto; border-radius: 10px 10px 10px 3px; }
[dir='rtl'] .pv-input i { right: auto; left: 3px; }
[dir='rtl'] .side { border-right: 0; border-left: 1px solid var(--line); }
[dir='rtl'] .msg.me .body { border-radius: 18px 18px 18px 4px; }
/* lists, quotes and tables follow each message's own direction (an English answer in the Arabic app reads left to right) */
[dir='rtl'] .msg.ai .body ul, [dir='rtl'] .msg.ai .body ol { padding-left: 0; padding-inline-start: 1.4rem; }
[dir='rtl'] .msg.ai .body blockquote { border-left: 0; padding-left: 0; border-inline-start: 3px solid var(--accent); padding-inline-start: 0.9rem; }
[dir='rtl'] .msg.ai .body th, [dir='rtl'] .msg.ai .body td { text-align: start; }
[dir='rtl'] .hold-menu { right: auto; left: 0; }
[dir='rtl'] .home[data-style='minimal'] .part-ic { margin-right: 0; margin-left: 0.26em; }
/* code stays left to right */
[dir='rtl'] .msg.ai .body pre, [dir='rtl'] .msg.ai .body code { direction: ltr; text-align: left; }
@media (max-width: 800px) {
  [dir='rtl'] .side { inset: 0 0 0 auto; transform: translateX(102%); }
  [dir='rtl'] .chat.open .side { transform: none; }
}

/* the Android app's Back on Home: a short word at the bottom, over everything */
.back-toast {
  position: fixed; left: 50%; bottom: calc(28px + var(--inset-bottom)); transform: translateX(-50%); z-index: 100;
  max-width: calc(100% - 32px); padding: 0.55rem 1rem; border-radius: 99px; font-size: 0.85rem; font-weight: 600;
  background: rgb(20 18 16 / 88%); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); pointer-events: none;
}

/* A newer Android app (js/update.js): a light banner at the top on every screen (not during a call): the words, Update,
   and × (not again for a day); while it downloads, a thin bar along its bottom edge. */
.upd {
  position: fixed; z-index: 90; top: calc(10px + var(--inset-top)); left: 50%; width: min(520px, calc(100% - 24px)); box-sizing: border-box;
  display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.45rem 0.5rem 0.9rem; overflow: hidden;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  transform: translate(-50%, -12px); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease;
}
.upd.open { transform: translate(-50%, 0); opacity: 1; }
.upd[hidden] { display: none; }
.upd > svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.upd-text { flex: 1; min-width: 0; margin: 0; font-size: 0.88rem; font-weight: 600; line-height: 1.35; }
.upd-go { flex: none; border: 0; border-radius: 999px; padding: 0.5rem 0.95rem; font: 600 0.85rem/1 var(--sans); background: var(--accent); color: var(--accent-ink); }
.upd-go:disabled { opacity: 0.55; }
.upd-x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 999px; background: none; color: var(--ink-3); }
.upd-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.upd-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--surface-2); }
.upd-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }

/* Waiting with notifications off: a quiet note under the text, with Turn on (app.js drawNotifyOff) */
.notify-off { margin: 0.4rem 0 1rem; padding: 0.7rem 0.9rem; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, transparent); display: grid; gap: 0.5rem; justify-items: center; }
.notify-off p { margin: 0; font-size: 0.88rem; color: var(--ink-2); line-height: 1.45; }

/* The admin asked for a permission (js/update.js askFor): a card over the app with why, and Allow or Open settings */
/* above Settings (.st-sheet 95): Settings › Places opens its location question from there */
.ask { position: fixed; inset: 0; z-index: 98; display: grid; place-items: end center; padding: 1rem 1rem calc(1rem + var(--inset-bottom)); background: rgb(0 0 0 / 0%); transition: background 0.25s ease; }
.ask.open { background: rgb(0 0 0 / 45%); }
.ask-card { width: min(420px, 100%); box-sizing: border-box; padding: 1.3rem 1.2rem 1.1rem; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateY(24px); opacity: 0; transition: transform 0.25s ease, opacity 0.25s ease; }
.ask.open .ask-card { transform: none; opacity: 1; }
.ask-card h3 { margin: 0 0 0.4rem; font: 600 1.45rem/1.2 var(--serif); color: var(--ink); }
.ask-card p { margin: 0 0 0.6rem; font-size: 0.93rem; line-height: 1.5; color: var(--ink-2); }
.ask-steps { padding: 0.6rem 0.75rem; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink) !important; }
.ask-row { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.4rem; }

/* Wake-up calls to come (js/wake.js), under the call ring on Home: small chips, ✕ cancels */
.wakes { position: absolute; left: 50%; top: calc(58% + 64px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(92vw, 360px); z-index: 2; }
.wake-list:not([hidden]) { display: contents; }
.wake.car { color: var(--accent); }
.wake { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 4px 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--sky-ink, var(--ink)) 10%, transparent); color: var(--sky-ink-2, var(--ink-2)); font-size: 0.82rem; }
.wake > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wake button { flex: none; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 0.75rem; cursor: pointer; }

/* Group chats (js/group.js): the New chat menu, the setup sheet with its bot cards, the bots by the chat's name and
   above the box, their messages and who is writing */
.g-menu, .g-pop { position: fixed; z-index: 90; min-width: 190px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); color: var(--ink); }
.g-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.g-item:hover, .g-item:focus-visible { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.g-ico { width: 1.5em; text-align: center; }
.g-label { padding: 8px 12px 4px; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.g-pop { padding: 12px 14px; display: grid; gap: 8px; }
.g-pop .g-turn { flex: 1; white-space: nowrap; }
.g-head-ico.floor { box-shadow: 0 0 0 2px var(--accent); }
.g-pop .btn { justify-self: start; }
.g-pop-name { display: flex; gap: 8px; align-items: center; font-weight: 600; overflow-wrap: anywhere; }
.g-sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.35); }
.g-sheet.g-top { z-index: 85; }
.g-panel { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; display: grid; gap: 12px; padding: 18px; border-radius: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.g-panel.g-wide { width: min(760px, 100%); }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.g-head h2 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; flex: 1; }
.g-reset { flex: none; white-space: nowrap; }
.g-tools { justify-content: flex-start; margin-top: -4px; }
.g-check { cursor: pointer; }
.g-check input { margin: 0; accent-color: var(--accent); }
.g-check.off { opacity: 0.5; cursor: default; }
.g-step { flex: none; width: 30px; height: 30px; font-size: 1.05rem; line-height: 1; }
.g-toast {
  position: fixed; left: 50%; bottom: calc(150px + var(--inset-bottom, 0px)); z-index: 120; max-width: calc(100vw - 32px);
  padding: 0.4rem 0.85rem; border-radius: 99px; font-size: 0.8rem; font-weight: 500; text-align: center;
  /* the app's own colors (light, dark, wine), a little see-through: a note, not an interruption */
  background: color-mix(in srgb, var(--surface) 72%, transparent); color: var(--ink-2); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  opacity: 0; transform: translate(-50%, 6px); transition: opacity 0.15s, transform 0.15s; pointer-events: none;
}
.g-toast.on { opacity: 1; transform: translate(-50%, 0); }
.g-reply { display: flex; gap: 8px; align-items: center; margin: 0 auto 6px; max-width: 760px; padding: 6px 6px 6px 12px; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--surface-2); font-size: 0.85rem; color: var(--ink-2); }
.g-reply span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-quote { margin: 0 0 6px; padding: 4px 8px; border-left: 3px solid var(--accent); border-radius: 6px; background: rgba(0, 0, 0, 0.05); font-size: 0.82rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.g-passes { display: grid; gap: 14px; overflow-y: auto; max-height: 65vh; }
.g-pass { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.g-pass .g-thinking { max-height: none; }
.g-live { border-bottom: 0; }
.g-live-head { color: var(--accent); font-weight: 600; }
.g-thinking { white-space: pre-wrap; overflow-wrap: anywhere; overflow-y: auto; max-height: 65vh; font-size: 0.92rem; line-height: 1.5; color: var(--ink-2); }
.g-reset.armed { background: #b3261e; border-color: #b3261e; color: #fff; }
.g-cards { display: grid; gap: 10px; }
.g-card { display: grid; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.g-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.g-row > select { flex: 1; min-width: 0; }
.g-end { justify-content: space-between; }
.g-card input, .g-card select, .g-big { font: inherit; color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.g-icon { width: 3.2em; text-align: center; font-size: 1.1rem; }
.g-name { flex: 1; min-width: 0; }
.g-slides { display: grid; gap: 6px; }
.g-slides.faint { opacity: 0.45; }
.g-slide, .g-pulse { display: grid; grid-template-columns: 6.5rem 1fr 3rem; gap: 8px; align-items: center; font-size: 0.9rem; }
.g-slide input, .g-pulse input { padding: 0; accent-color: var(--accent); }
.g-slide output, .g-pulse output { text-align: right; color: var(--ink-2); font-size: 0.85rem; }
.g-pulse { grid-template-columns: auto auto minmax(0, 1fr) auto 2.6rem; }
.g-pulse input { min-width: 0; width: 100%; }
.g-prompt { display: block; width: 100%; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.g-card, .g-panel, .g-cards { min-width: 0; }
.g-add { justify-self: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 1.4rem; }
.g-meta { margin: 0; font-size: 0.8rem; color: var(--ink-3); }
.g-voice-pick { position: relative; flex-wrap: wrap; }
.g-voice-btn { flex: 1; min-width: 0; text-align: start; font: inherit; color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.g-voice-btn::after { content: ' ▾'; color: var(--ink-3); }
.g-voice-list { flex-basis: 100%; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 4px; }
.g-voice-list[hidden] { display: none; }
.g-voice-row { display: flex; align-items: center; gap: 6px; border-radius: 8px; }
.g-voice-row.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.g-voice-play { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 0.8rem; cursor: pointer; }
.g-voice-play.none { visibility: hidden; }
.g-voice-name { flex: 1; text-align: start; font: inherit; color: var(--ink); background: none; border: 0; padding: 8px 6px; cursor: pointer; }
.g-voice-name:hover { color: var(--accent); }
.g-mem { justify-content: space-between; flex-wrap: wrap; }
.g-go { justify-self: stretch; }
.g-big { width: 100%; min-height: 55dvh; resize: vertical; line-height: 1.5; }
.g-x { flex: none; }
.bar { position: relative; }
.g-pulsebar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; }
.g-pulsebar i { display: block; height: 100%; background: var(--accent); opacity: 0.55; transform-origin: left; transform: scaleX(0); }
.g-pulsebar.held i { opacity: 0.2; }
.chat.is-group .bar .title { font-size: 0.95rem; max-width: 30vw; }
.g-mine { flex: none; width: 32px; height: 32px; margin-left: auto; }
.g-mine svg { width: 16px; height: 16px; }
.g-mine:not([hidden]) + .g-cost { margin-left: 0; }
.c-key { flex: none; width: 32px; height: 32px; margin-left: auto; }
.c-key svg { width: 16px; height: 16px; }
.g-mine:not([hidden]) ~ .c-key, .c-key:not([hidden]) ~ .g-cost { margin-left: 0; }
.c-media { flex: none; width: 32px; height: 32px; margin-left: auto; }
.c-media svg { width: 17px; height: 17px; }
.c-media:not([hidden]) ~ .c-key { margin-left: 0; }
/* a construct's Media (js/media.js): its pictures from the Jerbett image app, a day at a time, the prompt under each */
.media-sheet { position: fixed; inset: 0; z-index: 55; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--bg); color: var(--ink); }
.media-head { display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--inset-top, 0px)) 76px 10px 12px; border-bottom: 1px solid var(--line); }
.media-x { flex: none; font-size: 1.6rem; line-height: 1; }
.media-trash { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; width: auto; padding: 0 10px; color: #e06a52; }
.media-trash svg { width: 20px; height: 20px; }
/* + : their own pictures into the Gallery (js/media.js), top right; the trash after it while picking */
.media-add { margin-left: auto; flex: none; }
.media-add svg { width: 22px; height: 22px; }
.media-add.busy { opacity: 0.45; animation: vid-var-pulse 1.4s ease-in-out infinite; }
.media-add:not([hidden]) ~ .media-trash, .media-merge:not([hidden]) ~ .media-trash { margin-left: 0; }
/* merge (js/media.js): beside the trash while two or more videos are picked; each picked one shows its number */
.media-merge { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; width: auto; padding: 0 10px; color: var(--accent); }
.media-merge svg { width: 22px; height: 22px; }
.media-merge b { font-size: 0.85rem; }
.media-add:not([hidden]) ~ .media-merge { margin-left: 0; }
.media-sheet .img-tile.picked[data-order]::after { content: attr(data-order); }
.merge-pop .info-card { display: grid; gap: 8px; max-width: 340px; }
.merge-words { margin: 0; font-variant-numeric: tabular-nums; }
.media-trash b { font-size: 0.85rem; }
.media-sheet .img-tile.md-img-open { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.media-sheet .img-tile.picked { outline: 3px solid var(--accent); outline-offset: -3px; }
.media-sheet .img-tile.picked::after { content: '✓'; position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.85rem; }
.media-sheet.picking .tile-thumbs { display: none; }
.media-head h2 { margin: 0; font: 600 1.25rem var(--serif, inherit); }
.media-head small { color: var(--ink-3); }
/* its video server, awake or asleep (js/videos.js warmDot): burgundy and a full ring when just used, emptying as it
   nears sleep; grey asleep */
.vid-warm { margin-left: auto; display: grid; justify-items: center; gap: 1px; color: var(--ink-3); }
.vid-warm[hidden] { display: none; }
.vid-warm-b { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: inherit; }
.vid-warm-b svg { width: 100%; height: 100%; display: block; }
.vid-warm .trk { fill: none; stroke: color-mix(in srgb, currentColor 22%, transparent); stroke-width: 3; }
.vid-warm .arc { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.9s linear; }
.vid-warm .srv { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.vid-warm-t { font-size: 0.66rem; line-height: 1; font-variant-numeric: tabular-nums; color: inherit; min-height: 0.66rem; }
.vid-warm[data-state='warm'], .vid-warm[data-state='busy'], .vid-warm[data-state='waking'] { color: var(--warm); }
.vid-warm[data-state='waking'] .arc { animation: warm-pulse 1.2s ease-in-out infinite; }
/* under a minute left: a tap keeps it awake (keepalive) */
.vid-warm.renew .vid-warm-b { animation: warm-pulse 1.2s ease-in-out infinite; }
.vid-warm.asking { opacity: 0.5; }
@keyframes warm-pulse { 50% { opacity: 0.35; } }
.media-sheet:has(> .media-kinds) { grid-template-rows: auto auto minmax(0, 1fr); }
.media-body { overflow-y: auto; padding: 0 16px calc(24px + var(--inset-bottom, 0px)); overscroll-behavior: contain; }
.media-ask { padding: 4px 0 14px; }
.media-ask .img-tiles { margin: 6px 0 8px; }
.media-words { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; width: 100%; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 0.92rem; line-height: 1.45; text-align: start; cursor: pointer; }
.media-words.open { display: block; color: var(--ink); }
/* a prompt and its copy (js/media.js): the copy at the prompt's first line, in the sheet's own colours */
.media-words-row { display: flex; align-items: flex-start; gap: 6px; }
.media-words-row .media-words { flex: 1; min-width: 0; }
.media-copy { color: var(--ink-3); margin-top: -1px; }
.media-copy:hover { color: var(--ink); background: var(--surface-2); }
.media-neg { display: flex; align-items: flex-start; gap: 6px; }
.media-neg > span { flex: 1; min-width: 0; }
.media-more { display: grid; gap: 4px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 0.85rem; color: var(--ink-2); overflow-wrap: anywhere; }
.media-more p { margin: 0; }
.media-more b { color: var(--ink); font-weight: 600; }
.media-more code { font-size: 0.8rem; }
.media-err { color: #b2452f; }
.media-menu { min-width: 160px; }
/* their LoRAs for a chat (js/media.js): tabs by group; tick (on, with its strength), red cross (off for good) */
.media-kinds { display: flex; gap: 4px; padding: 4px; margin: 10px 16px 0; border-radius: 999px; background: var(--surface-2); }
.media-kind { flex: 1; padding: 7px 12px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.media-kind.on { background: var(--accent); color: var(--accent-ink); }
/* a video LoRA's ⓘ (js/media.js): top right of its card; its catalog entry opens inside the card */
.lora-row { position: relative; }
.lora-info-btn { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid var(--line); font: italic 600 0.85rem Georgia, serif; color: var(--ink-2); background: var(--surface-2); }
.lora-info-btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lora-row:has(.lora-info-btn) .lora-text { padding-right: 30px; }
.lora-info { display: grid; gap: 5px; margin-top: 8px; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); font-size: 0.8rem; line-height: 1.4; color: var(--ink-2); }
.lora-info[hidden] { display: none; }
.lora-info p { margin: 0; }
.lora-info b { color: var(--ink); font-weight: 600; }
.lora-tabs { position: sticky; top: 0; z-index: 6; display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 10px; background: var(--bg); scrollbar-width: none; }
.lora-tabs::-webkit-scrollbar { display: none; }
.media-folders { padding-inline: 16px; margin-inline: -16px; }
.media-folders .lora-tab { text-transform: none; } /* (a folder's name as he wrote it) */
.lora-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--ink-2); font: inherit; font-size: 0.85rem; text-transform: capitalize; cursor: pointer; }
.lora-tab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lora-tab b { font-size: 0.72rem; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, currentColor 18%, transparent); }
.lora-list { display: grid; gap: 8px; padding-bottom: 16px; }
.lora-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
.lora-row.on { border-color: #2f8f5b; }
.lora-row.off { border-color: #b2452f; opacity: 0.8; }
.lora-state { flex: none; width: 30px; height: 30px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line); background: none; color: #fff; font-size: 1rem; font-weight: 700; display: grid; place-items: center; padding: 0; cursor: pointer; }
.lora-state.on { background: #2f8f5b; border-color: #2f8f5b; }
.lora-state.off { background: #b2452f; border-color: #b2452f; }
.lora-text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.lora-text small { color: var(--ink-3); font-size: 0.8rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lora-strength { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.lora-strength input { flex: 1; min-width: 0; accent-color: #2f8f5b; }
.replace-rows { display: grid; gap: 8px; margin: 12px 0; }
.replace-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.replace-row input { width: 100%; box-sizing: border-box; min-width: 0; }
.replace-arrow { color: var(--ink-3); }
.replace-drop { width: 32px; height: 32px; }
.replace-add { justify-self: start; }
.replace-actions { display: flex; justify-content: flex-end; padding: 12px 0; }
.lora-strength output { font-variant-numeric: tabular-nums; font-size: 0.85rem; min-width: 3.2em; text-align: end; }
.key-pop { z-index: 100; width: min(340px, calc(100vw - 16px)); } /* over Settings (95) */
.st-mem-key { justify-self: end; display: inline-flex; gap: 6px; align-items: center; }
.st-mem-key svg { width: 14px; height: 14px; }
.key-head { font-weight: 600; }
.key-row { display: flex; gap: 8px; align-items: center; }
.key-code { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-size: 0.75rem; overflow-wrap: anywhere; user-select: all; }
.key-why { margin: 0; font-size: 0.75rem; color: var(--ink-2); }
.g-cost { flex: none; margin-left: auto; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.g-costs { display: grid; gap: 8px; min-width: 240px; }
.g-costs .row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; }
.g-costs .row b { font-variant-numeric: tabular-nums; }
.g-costs .sub { grid-column: 2 / 4; margin: -6px 0 0; }
.g-costs .total { border-top: 1px solid var(--line); padding-top: 8px; }
.g-pulses { position: absolute; right: 12px; bottom: -17px; z-index: 2; font-size: 0.66rem; line-height: 1; color: var(--ink-3); opacity: 0.75; font-variant-numeric: tabular-nums; pointer-events: none; }
/* a phone keeps :hover on what was tapped; these buttons must not look stuck */
@media (hover: none) { .g-bar .icon-btn:hover { background: var(--surface); color: var(--ink-2); } }
.g-head-ico, .g-to button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.05rem; line-height: 1; cursor: pointer; padding: 0; }
.g-note { width: fit-content; max-width: 90%; margin: 6px auto; padding: 3px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 0.8rem; text-align: center; }
.g-to button { position: relative; }
.g-to { padding: 6px 6px 4px; }
/* each bot's heartbeat: a ring around its icon filling up, as the context ring does */
.g-ring { position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--accent) calc(var(--beat, 0) * 1turn), color-mix(in srgb, var(--line) 80%, transparent) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); }
.g-head-ico.off .g-ring { opacity: 0.4; }
.g-head-ico.off { filter: grayscale(1); opacity: 0.45; border-style: dashed; }
.g-bar { display: flex; gap: 8px; align-items: center; margin: 0 auto 6px; max-width: 760px; min-width: 0; }
.g-to { display: flex; gap: 6px; align-items: center; flex: 1; min-width: 0; overflow-x: auto; }
.g-pause, .g-edit, .g-skip { flex: none; white-space: nowrap; }
.g-copy { justify-self: start; }
.g-size { margin: -4px 0 0 4px; }
.btn.g-pause.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.g-who { font-size: 1.05rem; }
.g-name-line { font-size: 0.78rem; font-weight: 600; color: var(--ink-3); margin-bottom: 2px; }
.composer { position: relative; }
.g-typing {
  position: absolute; left: 16px; bottom: 100%; z-index: 3; display: flex; gap: 8px; align-items: center; height: 26px;
  padding: 0 10px; border-radius: 99px; color: var(--ink-3); font-size: 0.85rem; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.2s;
}
.g-typing.on { opacity: 1; }
.g-typing .typing { padding: 0; }

/* Report what the AI made (js/report.js): a small sheet, a reason to pick, a note, Send */
.rp-sheet { position: fixed; inset: 0; z-index: 95; display: grid; place-items: end center; padding: 16px; padding-bottom: calc(16px + var(--inset-bottom, 0px)); background: rgba(0, 0, 0, 0.35); }
.rp-panel { width: min(480px, 100%); display: grid; gap: 12px; padding: 18px; border-radius: 22px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); }
.rp-panel h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.5rem; }
.rp-sub { margin: -6px 0 0; color: var(--ink-2); font-size: 0.9rem; }
.rp-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-choice { padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.9rem; cursor: pointer; }
.rp-choice.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rp-note { width: 100%; box-sizing: border-box; resize: vertical; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 0.95rem; }
.rp-row { display: flex; justify-content: flex-end; gap: 8px; }
.rp-toast { position: fixed; left: 50%; bottom: calc(110px + var(--inset-bottom, 0px)); z-index: 96; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; padding: 8px 14px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 0.85rem; transition: opacity 0.2s, transform 0.2s; max-width: 86vw; text-align: center; }
.rp-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Delete my account (js/account.js): the side panel's link as a button, the danger button, the band while it waits */
button.side-privacy { background: none; border: 0; text-align: start; font: inherit; font-size: 0.78rem; cursor: pointer; width: 100%; }
.btn.danger { background: #b2452f; border-color: #b2452f; color: #fff; }
.del-band { position: fixed; left: 50%; top: calc(8px + var(--inset-top, 0px)); transform: translateX(-50%); z-index: 97; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 8px 8px 8px 14px; border-radius: 99px; background: #b2452f; color: #fff; font-size: 0.85rem; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
.del-band .btn { background: #fff; color: #b2452f; border-color: #fff; white-space: nowrap; }
.fineprint .linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-3); text-decoration: underline; cursor: pointer; }

/* Settings (js/settings.js): categories down the side, the settings beside them; stacked on a phone */
.st-sheet { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.4); }
.st-panel { width: min(760px, 100%); height: min(560px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto 1fr; border-radius: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.st-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.st-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.5rem; }
.st-main { display: grid; grid-template-columns: 190px 1fr; min-height: 0; }
.st-nav { display: grid; align-content: start; gap: 2px; padding: 10px; border-inline-end: 1px solid var(--line); }
.st-tab { text-align: start; font: inherit; color: var(--ink-2); background: none; border: 0; border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.st-tab:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.st-tab[aria-current='true'] { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); font-weight: 600; }
/* only the developer has it (js/devtag.js) */
/* small on purpose (Faris 2026-11-07: "much much smaller", not "the word dev everywhere being very big") */
.st-dev { display: inline-block; margin-inline-start: 4px; padding: 0 3px; border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 4px; color: var(--accent); font-size: 0.5rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.3; vertical-align: middle; white-space: nowrap; }
.wake .st-dev { flex: none; margin: 0; } /* Places on Home: between the words and ✕ (the chip's own gap spaces it) */
.st-body { overflow-y: auto; padding: 16px 20px 24px; display: grid; align-content: start; gap: 14px; min-width: 0; }
.st-body h3 { margin: 0 0 2px; font-size: 1.05rem; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.st-ver { font-variant-numeric: tabular-nums; font-size: 1rem; }
.st-label { display: grid; gap: 2px; min-width: 0; }
.st-label small, .st-note { color: var(--ink-3); font-size: 0.82rem; margin: 0; }
.st-block { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.st-block .st-label { grid-template-columns: 1fr auto; align-items: baseline; }
.st-block .st-label small { grid-column: 1 / -1; }
.st-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.st-seg button { font: inherit; font-size: 0.88rem; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; }
.st-seg button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.st-slide { display: flex; align-items: center; gap: 10px; }
.st-slide input { flex: 1; accent-color: var(--accent); }
.st-who { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.st-who span { color: var(--ink-3); font-size: 0.88rem; }
.st-said { min-height: 1.2em; }
.st-said:empty { display: none; }
@media (max-width: 600px) {
  .st-sheet { padding: 0; place-items: stretch; }
  .st-panel { height: 100dvh; width: 100%; border-radius: 0; border: 0; padding-bottom: var(--inset-bottom, 0px); }
  .st-head { padding-top: calc(14px + var(--inset-top, 0px)); }
  .st-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .st-nav { display: flex; gap: 6px; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .st-tab { white-space: nowrap; }
}

/* the context ring by Send (js/compose.js): its edge fills; green, amber from half, red from 90 % */
.c-ring { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.c-ring[hidden] { display: none; }
.c-ring svg { width: 30px; height: 30px; transform: rotate(-90deg); }
.c-ring circle { fill: none; stroke-width: 3.2; }
.c-ring .track { stroke: color-mix(in srgb, var(--ink) 12%, transparent); }
.c-ring .fill { stroke: #3fae6a; stroke-linecap: round; stroke-dasharray: calc(var(--fill, 0) * 100) 100; transition: stroke-dasharray 0.4s; }
.c-ring[data-level='amber'] .fill { stroke: #e0a032; }
.c-ring[data-level='red'] .fill { stroke: #d9534f; }
.c-ring text { transform: rotate(90deg); transform-origin: 18px 18px; font-size: 10px; font-weight: 700; text-anchor: middle; fill: var(--ink-2); letter-spacing: -0.3px; }
.c-ring text .pct { font-size: 6.5px; font-weight: 600; }
.c-ring text.wide { font-size: 8.5px; }
.c-pill.construct { color: var(--ink); }
/* Settings › Constructs */
.st-cons { display: grid; gap: 8px; }
.st-con { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; text-align: start; font: inherit; color: var(--ink); background: none; width: 100%; }
.st-con:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.st-con .ico { font-size: 1.4rem; width: 32px; text-align: center; }
.st-con span { display: grid; min-width: 0; }
.st-con small { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-con-text { flex: 1; }
.st-dup { margin-inline-start: auto; flex: none; color: var(--ink-3); }
.st-dup svg { width: 20px; height: 20px; }
.st-con.st-new { animation: st-new 1.6s ease-out; }
@keyframes st-new { from { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); } }
.st-form { display: grid; gap: 12px; }
.st-form label { display: grid; gap: 4px; font-size: 0.88rem; color: var(--ink-2); }
.st-form input[type='text'], .st-form select, .st-form textarea { font: inherit; color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.st-form textarea { min-height: 160px; resize: vertical; }
.st-form output { color: var(--ink); }
.st-actions { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.compacted { margin: 0.6rem auto; text-align: center; font-size: 0.78rem; color: var(--ink-3); border-top: 1px dashed var(--line); padding-top: 0.5rem; max-width: 760px; }
.compacted.working { border-top: 0; }
.alive { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; color: var(--ink-3); font-style: italic; }
.compacted.working.alive { display: flex; justify-content: center; }

/* a construct's face (js/faces.js): its picture or icon in a circle */
.face { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); font-size: 1.15rem; line-height: 1; }
.face img { width: 100%; height: 100%; object-fit: cover; }
.st-face { width: 40px; height: 40px; }
/* a group's setup: the member's constructs, tap to put in or take out (in the order picked) */
.g-picks { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; }
.g-pick { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; font: inherit; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; cursor: pointer; }
.g-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.g-pick-name { display: grid; flex: 1; min-width: 0; }
.g-pick-name small { color: var(--ink-3); }
.g-pick-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.g-pick-n:empty { background: none; border: 1px solid var(--line); }
.g-pens { display: grid; gap: 6px; }
.g-pen { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; cursor: pointer; }
.g-between { justify-content: space-between; }
/* Settings › Constructs: its voice on a call (a list with ▶) */
.st-voice-field { display: grid; gap: 6px; }
.st-voice-pick { display: grid; gap: 6px; }
.st-voice-btn { text-align: start; font: inherit; color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.st-voice-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.st-voice-list[hidden] { display: none; }
.st-voice-head { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; padding: 9px 8px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); font: inherit; font-weight: 600; text-align: start; cursor: pointer; position: sticky; top: 0; z-index: 1; }
.st-voice-head small { color: var(--ink-3); font-weight: 400; }
.st-voice-chev { margin-inline-start: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform 0.2s; }
.st-voice-head.open .st-voice-chev { transform: rotate(45deg); }
.st-voice-list { max-height: 340px; }
.st-voice-row { display: flex; align-items: center; gap: 6px; border-radius: 8px; }
.st-voice-row.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.st-voice-play { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; }
.st-voice-play[hidden] { visibility: hidden; display: inline-block; }
.st-voice-name { flex: 1; text-align: start; font: inherit; color: var(--ink); background: none; border: 0; padding: 8px 6px; cursor: pointer; }

/* a construct's picture in its editor */
.st-avatar { display: flex; align-items: center; gap: 14px; }
.st-face-big { width: 84px; height: 84px; font-size: 2.2rem; }
.st-avatar-acts { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; }
/* its own row: it once sat in .st-two, the old emoji-and-name row, whose first column is 64px wide */
.st-pic-btns { display: flex; flex-wrap: wrap; gap: 8px; }
/* (a long name wraps inside its button: "Let Grand Opus make its picture" kept on one line pushed the page wider than
   the phone, Faris 2026-10-27) */
.st-pic-btns button { white-space: normal; text-align: start; max-width: 100%; }

.pill-face { width: 20px; height: 20px; font-size: 0.75rem; margin-inline-end: 2px; }
.list-face { width: 22px; height: 22px; font-size: 0.8rem; vertical-align: middle; margin-inline-end: 6px; }
.g-head-ico.pic { padding: 0; }
.g-head-face { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.who.face { width: 28px; height: 28px; }
.g-call-who .g-ring-face { width: 18px; height: 18px; }

/* the ring's popup (js/compose.js contextPop): what fills the context, in soft bars */
.ctx-pop { --k-chat: #7fbf9a; --k-memory: #e3a76f; --k-construct: #b49ad6; --k-instructions: #8fa3bf; --k-files: #d79bb0; --k-tools: #8cc3d4; --k-web: #cdb873; --k-answer: #b3aca2;
  position: fixed; z-index: 96; width: min(320px, calc(100vw - 16px)); max-height: 60vh; overflow-y: auto; padding: 14px 14px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22); color: var(--ink); animation: ctx-in 0.18s ease-out; }
@keyframes ctx-in { from { opacity: 0; transform: translateY(6px); } }
.ctx-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.ctx-head span { font-size: 0.78rem; color: var(--ink-3); }
.ctx-window { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; margin-bottom: 12px; }
.ctx-window > i { display: block; height: 100%; min-width: 4px; border-radius: 99px; overflow: hidden; background: var(--k-answer); }
.ctx-strip { display: flex; height: 100%; }
.ctx-strip i, .ctx-fill, .ctx-dot { background: var(--k); }
.k-chat { --k: var(--k-chat); } .k-memory { --k: var(--k-memory); } .k-construct { --k: var(--k-construct); } .k-instructions { --k: var(--k-instructions); }
.k-files { --k: var(--k-files); } .k-tools { --k: var(--k-tools); } .k-web { --k: var(--k-web); } .k-answer { --k: var(--k-answer); }
.ctx-row { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; padding: 6px 4px; border-radius: 10px; font-size: 0.86rem; }
.ctx-row.open-able { cursor: pointer; }
.ctx-row.open-able:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.ctx-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ctx-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ctx-n { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 0.8rem; }
.ctx-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 6%, transparent); overflow: hidden; }
.ctx-fill { display: block; height: 100%; width: 0; border-radius: 99px; opacity: 0.85; transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.ctx-chev { color: var(--ink-3); transition: transform 0.2s; }
.ctx-row.open .ctx-chev { transform: rotate(90deg); }
.ctx-subs { margin: 0 0 4px 14px; padding-inline-start: 8px; border-inline-start: 2px solid color-mix(in srgb, var(--k-memory) 40%, transparent); }
.ctx-subs .ctx-row { font-size: 0.8rem; padding: 4px; }
.ctx-subs .ctx-fill { opacity: 0.6; }
.ctx-none { font-size: 0.82rem; color: var(--ink-3); margin: 0; }

/* a construct's picture full size (js/faces.js showPicture) */
.face.can-open { cursor: zoom-in; }
.face-full { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 56px 16px calc(24px + var(--inset-bottom)); background: rgba(0, 0, 0, 0.88); animation: face-in 0.18s ease-out; }
@keyframes face-in { from { opacity: 0; } }
.face-full img { max-width: 100%; max-height: calc(100% - 48px); border-radius: 18px; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.face-full p { margin: 0; color: #f2ede4; font-weight: 600; }
.face-full-x { position: absolute; top: calc(12px + var(--inset-top)); right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; font-size: 1.1rem; color: #fff; background: rgba(255, 255, 255, 0.14); cursor: pointer; }

/* its picture in its settings: one it does not like is faded, with its words under it */
.st-face-big.disliked { opacity: 0.55; filter: saturate(0.6); outline: 2px dashed color-mix(in srgb, var(--danger) 55%, transparent); outline-offset: 3px; }
.st-pic-said { font-style: italic; }
.st-pic-said.no { color: var(--danger); font-style: normal; }
.st-pic-going:empty, .st-pic-said:empty { display: none; }
/* its picture journal (See previous): a thumbnail column (empty when no picture came of it) and its words */
.st-pic-field { display: grid; gap: 12px; }
.st-pic-log { display: grid; gap: 14px; padding: 4px 0 0; border-top: 1px solid var(--line); padding-top: 12px; }
.st-pic-log[hidden] { display: none; }
.st-pic-entry { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.st-pic-entry img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; }
.st-pic-entry small { display: block; color: var(--ink-3); font-size: 0.78rem; }
.st-pic-entry p { margin: 2px 0 0; font-style: italic; color: var(--ink-2); font-size: 0.9rem; overflow-wrap: anywhere; }

/* /cons: how much to keep (js/app.js consChoices) */
.cons-pick { position: relative; margin: 12px auto; max-width: 520px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cons-pick > p { margin: 0 28px 10px 2px; font-weight: 600; }
.cons-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; }
.cons-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cons-level { display: grid; gap: 4px; text-align: start; align-content: start; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.cons-level:hover { border-color: var(--accent); }
.cons-level small { color: var(--ink-3); font-size: 0.74rem; line-height: 1.3; }
.cons-level.high b { color: var(--accent); }
@media (max-width: 420px) { .cons-levels { grid-template-columns: 1fr; } }
/* a message sent while /cons works: it waits */
.msg.me.queued .body { opacity: 0.6; }
.msg.me.queued .q-mark { width: 0.95em; height: 0.95em; margin-inline-start: 6px; vertical-align: -0.12em; opacity: 0.8; }
.msg.me.queued.failed .q-mark { color: var(--danger); }

.st-reset-row { display: flex; justify-content: flex-end; margin-top: 4px; }
/* a construct's Instructions tab (Faris 2026-10-27): framed boxes; each part folds, closed when the tab opens; a small
   Back to default under each that has one */
.st-box { display: grid; gap: 4px; padding: 6px 12px 8px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.st-box-h { margin: 6px 0 2px; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.st-fold { border-top: 1px solid var(--line); padding: 2px 0; }
.st-box > .st-fold:first-child, .st-box-h + .st-fold { border-top: 0; }
.st-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; cursor: pointer; list-style: none; }
.st-fold > summary::-webkit-details-marker { display: none; }
.st-fold > summary::after { content: '▸'; color: var(--ink-3); transition: transform 0.2s ease; }
.st-fold[open] > summary::after { transform: rotate(90deg); }
.st-fold > .st-note { margin: 0 0 6px; }
.st-fold textarea { width: 100%; box-sizing: border-box; }
.btn.st-reset { padding: 3px 10px; min-height: 0; font-size: 0.74rem; }

/* line icons (js/glyphs.js): the text's size and colour */
.glyph { width: 1em; height: 1em; vertical-align: -0.14em; flex: none; }
.list-glyph { margin-inline-end: 6px; color: var(--ink-3); }
.g-call-who .glyph { width: 13px; height: 13px; }

/* a construct's switches (its settings) */
/* .st-form .st-check, not .st-check: the form's own label rule (a stacked grid) is more specific and won, putting
   the box above its words */
.st-form .st-check { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; cursor: pointer; }
.st-form .st-check input { margin: 2px 0 0; width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.st-check span { display: grid; gap: 2px; }

/* a chat's cost so far (the owner's): the group's pill, not in a group */
.is-group .c-cost { display: none; }

/* their own message: a pencil under it, and its words in a box while they edit it (js/app.js mine) */
.msg.me { flex-wrap: wrap; row-gap: 2px; }
/* the pencil: the same quiet button as copy and retry under an answer (it had none: a browser's grey box) */
.me-acts { flex-basis: 100%; display: flex; justify-content: flex-end; margin-right: -7px; }
.me-acts .act {
  width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--ink-3); opacity: 0.8; cursor: pointer;
}
.me-acts .act svg { width: 16px; height: 16px; }
@media (hover: hover) { .me-acts .act:hover { background: var(--surface-2); color: var(--ink-2); opacity: 1; } }
.msg.me.editing > .body, .msg.me.editing > .me-acts { display: none; }
.me-editing { flex-basis: 100%; display: grid; gap: 8px; justify-items: end; }
.me-box { width: min(100%, 560px); box-sizing: border-box; min-height: 44px; resize: none; font: inherit; color: var(--ink); background: var(--me); border: 1px solid var(--accent); border-radius: 18px; padding: 0.65rem 1rem; outline: none; }
.me-edit-bar { display: flex; gap: 8px; }

/* slash commands above the box (js/app.js COMMANDS) */
.slash-menu { display: grid; gap: 2px; margin: 0 0 8px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.slash-menu[hidden] { display: none; }
.slash-item { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: start; padding: 0.55rem 0.7rem; border: 0; border-radius: 9px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.slash-item:hover, .slash-item:first-child { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.slash-item b { font-family: var(--mono); font-size: 0.9rem; color: var(--accent); }
.slash-item span { font-size: 0.82rem; color: var(--ink-2); }
.slash-item.off { opacity: 0.55; }

/* a construct's editor in tabs (js/settings.js): General, Instructions, Voice, Memory */
.st-subtabs { display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.st-subtab { flex: 1 1 auto; min-width: 0; padding: 8px 6px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: inherit; font-size: 0.86rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-subtab[aria-selected='true'] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
/* Custom Tools (js/settings.js drawCustomTools): its tools as subtabs that scroll sideways; General's counts and rows */
.st-ct { display: grid; gap: 12px; }
.st-ct-tabs { overflow-x: auto; scrollbar-width: none; }
.st-ct-tabs::-webkit-scrollbar { display: none; }
.st-ct-tabs .st-subtab { flex: 0 0 auto; max-width: 70%; padding: 8px 12px; }
.st-ct-pane { display: grid; gap: 8px; }
.st-ct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-ct-stats > div { display: grid; justify-items: center; padding: 10px 6px; border-radius: 12px; background: var(--surface-2); }
.st-ct-stats b { font-size: 1.35rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.st-ct-stats small { color: var(--ink-3); font-size: 0.72rem; text-align: center; }
.st-ct-row { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.st-ct-row small { color: var(--ink-3); }
.st-ct-import { margin-top: 6px; }
.st-ct-h { margin: 10px 0 0; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.st-ct-who summary { display: flex; align-items: center; gap: 8px; }
.st-ct-who summary .st-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-ct-who summary small { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.st-ct-face { width: 26px; height: 26px; flex: none; }
.st-ct-call { padding: 6px 0; border-bottom: 1px solid var(--line); }
.st-ct-app { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink-3); font-size: 0.68rem; font-weight: 500; }
.st-pane { display: grid; gap: 14px; }
.st-pane[hidden] { display: none; }
/* its memory */
.st-mem { display: grid; gap: 6px; }
.st-mem-head { display: grid; gap: 6px; margin-bottom: 4px; }
.st-mem-head p { margin: 0; }
.st-mem-strip { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; }
.st-mem-topic { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 8px; width: 100%; padding: 8px 6px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.st-mem-topic:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.st-mem-topic small { color: var(--ink-3); }
.st-mem-dot { width: 8px; height: 8px; border-radius: 50%; }
.st-mem-bar { grid-column: 1 / -1; height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 6%, transparent); overflow: hidden; }
.st-mem-bar i { display: block; height: 100%; border-radius: 99px; opacity: 0.85; }
.st-mem-notes { display: grid; gap: 2px; margin: 0 0 6px 22px; }
.st-mem-notes[hidden] { display: none; }
.st-mem-note { display: flex; justify-content: space-between; gap: 8px; font-size: 0.82rem; color: var(--ink-2); padding: 3px 0; }
.st-mem-always { flex: none; color: var(--accent); font-size: 0.72rem; }
.st-mem-h { margin: 10px 0 0; font-size: 0.85rem; color: var(--ink-2); }
.st-mem-chat { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 6px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.st-mem-chat small { color: var(--ink-3); flex: none; }
.st-mem-text { margin: 0 6px 8px; white-space: pre-wrap; font-size: 0.82rem; color: var(--ink-2); max-height: 260px; overflow-y: auto; }
.st-mem-text[hidden] { display: none; }

/* (i) beside a label: its words only when asked (js/settings.js withInfo) */
.st-field { display: grid; gap: 6px; }
.st-info-row { display: flex; align-items: center; gap: 6px; }
.st-info-row > p { margin: 0; }
.st-info { flex: none; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; }
.st-info svg { width: 16px; height: 16px; }
.st-info:hover { color: var(--ink-2); }
.st-info-text { margin: 0; font-size: 0.8rem; line-height: 1.45; color: var(--ink-3); }
.st-info-text[hidden] { display: none; }
.st-form .st-info-row .st-check { align-items: center; }

/* Teaching Ignis your voice (js/voice-enroll.js): a card like the Image pop-up, the passage with the word they are on
   lit, one big record button. Read words in ink, the word now in the accent, the rest quiet. */
.ve-scrim {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: rgb(8 6 10 / 45%); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  animation: ve-fade 0.22s ease both;
}
.ve-card {
  position: relative; width: 100%; max-width: 400px; max-height: calc(100dvh - 32px); overflow-y: auto; box-sizing: border-box;
  border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 60px rgb(0 0 0 / 35%);
  padding: 26px 20px 16px; text-align: center; color: var(--ink); display: grid; gap: 14px; justify-items: center;
  animation: ve-pop 0.3s cubic-bezier(0.2, 0.9, 0.25, 1.12) both;
}
.ve-card h2 { font: 600 1.55rem/1.15 var(--serif); margin: 0; padding: 0 28px; }
.ve-hint { margin: -4px 0 0; color: var(--ink-2); font-size: 0.92rem; }
.ve-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; }
.ve-close svg { width: 18px; height: 18px; }
.ve-dots { display: flex; gap: 6px; justify-content: center; }
.ve-dots span { width: 22px; height: 4px; border-radius: 2px; background: var(--line); transition: background 0.2s; }
.ve-dots span.now { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ve-dots span.done { background: var(--accent); }
.ve-line {
  margin: 4px 0; padding: 16px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); width: 100%; box-sizing: border-box;
  font-size: 1.3rem; line-height: 1.5; text-align: center; color: var(--ink-3); min-height: 3em;
}
.ve-line span { transition: color 0.15s ease; }
/* while it hears them: a soft light sweeping the line (it does not know which word they are on) */
.ve-line.hearing { background-image: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--accent) 16%, transparent) 50%, transparent 70%); background-size: 250% 100%; animation: ve-sweep 1.4s linear infinite; }
.ve-line.hearing span:not(.ok):not(.miss):not(.read):not(.now) { color: var(--ink-2); }
@keyframes ve-sweep { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.ve-line span.read, .ve-line.hearing span.read { color: var(--ink); }
.ve-line span.now, .ve-line.hearing span.now { color: var(--accent); }
.ve-line span.ok { color: var(--ink); }
/* a word it did not hear: the danger colour, underlined */
.ve-line span.miss { color: var(--danger); text-decoration: underline wavy; text-underline-offset: 5px; }
.ve-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ve-row[hidden], .ve-row .btn[hidden] { display: none; }
.ve-rec {
  width: 76px; height: 76px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-size: 30px; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}
.ve-rec[hidden] { display: none; }
.ve-rec:disabled { opacity: 0.6; }
.ve-card.recording .ve-rec { animation: ve-breathe 1.6s ease-in-out infinite; }
.ve-stop { width: 22px; height: 22px; border-radius: 5px; background: currentColor; }
.ve-status { margin: 0; min-height: 1.3em; color: var(--ink-2); font-size: 0.92rem; }
.ve-card.done .ve-status { color: var(--ink); font-weight: 600; }
.ve-main { min-width: 60%; }
/* learning their voice: the words and steps give way to a glowing orb (bars that move like a voice), a check once done */
.ve-card.learning :is(.ve-hint, .ve-dots, .ve-line), .ve-card.done :is(.ve-hint, .ve-dots, .ve-line) { display: none; }
.ve-orb {
  width: 112px; height: 112px; border-radius: 50%; margin: 18px 0 6px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 85%, white), var(--accent) 60%, color-mix(in srgb, var(--accent) 70%, black));
  color: var(--accent-ink); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); animation: ve-glow 1.8s ease-in-out infinite;
}
.ve-orb span { width: 6px; height: 34px; border-radius: 3px; background: currentColor; animation: ve-bar 0.9s ease-in-out infinite; transform-origin: center; }
.ve-orb span:nth-child(2) { animation-delay: -0.2s; height: 46px; }
.ve-orb span:nth-child(3) { animation-delay: -0.45s; height: 56px; }
.ve-orb span:nth-child(4) { animation-delay: -0.1s; height: 46px; }
.ve-orb span:nth-child(5) { animation-delay: -0.35s; }
.ve-card.done .ve-orb { animation: ve-pop 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.12) both; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.ve-orb .glyph { width: 52px; height: 52px; stroke-width: 2.6; }
.ve-card.learning .ve-status, .ve-card.done .ve-status { font-size: 1.05rem; }
@keyframes ve-bar { 50% { transform: scaleY(0.35); } }
@keyframes ve-glow { 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--accent) 0%, transparent), 0 0 36px color-mix(in srgb, var(--accent) 45%, transparent); } }
.ve-skip { justify-self: center; }
.ve-main[hidden], .ve-skip[hidden] { display: none; }
@keyframes ve-fade { from { opacity: 0; } }
@keyframes ve-pop { from { opacity: 0; transform: translateY(10px) scale(0.94); } }
@keyframes ve-breathe { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 18%, transparent); } }

/* Settings › Voice › Your voice: the checkbox beside its label, as in the construct editor */
.st-your-voice { display: grid; gap: 8px; }
/* a switch that slides left and right (Faris 2026-10-27: priority mode) */
.st-fast input.st-switch, .g-pens input.st-switch { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 24px; margin: 0; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background 0.2s; }
.st-fast input.st-switch::after, .g-pens input.st-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 30%); transition: transform 0.2s; }
.st-fast input.st-switch:checked, .g-pens input.st-switch:checked { background: var(--accent); }
.st-fast input.st-switch:checked::after, .g-pens input.st-switch:checked::after { transform: translateX(18px); }
.st-fast .st-check { display: flex; flex-direction: row; align-items: center; gap: 12px; cursor: pointer; }
.st-fast small { color: var(--ink-2); }
.st-fast-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.st-places { display: grid; gap: 14px; }
.st-places .st-check { display: flex; flex-direction: row; align-items: center; gap: 12px; cursor: pointer; }
.st-places .st-check input { margin: 0; width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.st-places .st-ok { color: var(--ok, #2e7d32); font-size: 0.9rem; }
.st-spots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st-spots li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.st-spots li > div { display: grid; gap: 2px; min-width: 0; }
.st-spots small { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-places .st-pic-btns { display: flex; align-items: center; gap: 10px; }
.st-cars { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-lines { margin: 0 0 0.8rem; padding-left: 1.1rem; display: grid; gap: 4px; font-size: 0.93rem; color: var(--ink-2); }
.st-your-voice .st-check { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; cursor: pointer; }
.st-your-voice .st-check input { margin: 2px 0 0; width: 20px; height: 20px; accent-color: var(--accent); flex: none; }

/* Construction (Faris 2026-10-27): a construct bringing another to life. An ember that breathes, the new one's name,
   the steps lighting up one by one; once they are born it glows while they paint their own picture. */
.birth { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 10px; padding: 14px 16px; border-radius: 20px; max-width: 420px;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.birth-ember { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.birth-ember i { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, #fff6d8 0%, var(--accent) 45%, transparent 72%);
  box-shadow: 0 0 18px 6px color-mix(in srgb, var(--accent) 45%, transparent); animation: birth-breathe 2.2s ease-in-out infinite; }
.birth.alive .birth-ember i { width: 26px; height: 26px; animation-duration: 1.4s; }
@keyframes birth-breathe { 0%, 100% { transform: scale(0.8); opacity: 0.75; } 50% { transform: scale(1.15); opacity: 1; } }
.birth-text { display: grid; gap: 2px; min-width: 0; }
.birth-text small { color: var(--ink-3); letter-spacing: 0.04em; }
.birth-text b { font-size: 1.15rem; }
.birth-text ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: 0.88rem; }
.birth-text li { color: var(--ink-3); transition: color 0.4s, opacity 0.4s; padding-inline-start: 16px; position: relative; }
.birth-text li::before { content: ''; position: absolute; inset-inline-start: 2px; top: 0.5em; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.birth-text li.next { opacity: 0.55; }
.birth-text li.done { color: var(--ink-2); }
.birth-text li.done::before { background: var(--accent); }
.birth-text li.now { color: var(--ink); font-weight: 600; }
.birth-text li.now::before { background: var(--accent); box-shadow: 0 0 8px 2px color-mix(in srgb, var(--accent) 60%, transparent); animation: birth-breathe 1.2s ease-in-out infinite; }
.call-status[data-kind="constructing"]::after { content: '• • •'; letter-spacing: 0.2em; animation: call-dots 1.2s ease-in-out infinite; }
/* a picture shown to another in a group (picture asks): the line, the picture, the words with it */
.g-shown { display: grid; justify-items: center; gap: 6px; margin: 8px auto; max-width: 90%; }
.g-shown .g-note { margin: 0; }
.g-shown-pic { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }
.g-shown-words { margin: 0; font-size: 0.85rem; color: var(--ink-2); text-align: center; font-style: italic; }

/* What a construct kept, as a character growing (Faris 2026-10-27): green +N pills; one holding an always-in-mind
   note wears a reddish-orange frame. */
.gains { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.gain { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; color: var(--ink-2);
  background: color-mix(in srgb, #2fbf71 12%, var(--surface)); border: 1px solid color-mix(in srgb, #2fbf71 35%, transparent); animation: gain-in 0.5s ease-out both; }
.gain b { color: #2fbf71; font-weight: 800; }
/* changed: green with a thin yellow edge; dropped: red; one label's kinds side by side in a dashed frame */
.gain.k-update { border: 1px solid #d9b93a; }
.gain.k-drop { background: color-mix(in srgb, #e04848 12%, var(--surface)); border-color: color-mix(in srgb, #e04848 45%, transparent); }
.gain.k-drop b, .gain-pop .ctx-head b.k-drop { color: #e04848; }
.gain-set { display: inline-flex; gap: 4px; padding: 2px; border: 1px dashed color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 999px; }
.st-mem-latests { display: grid; gap: 6px; margin: 4px 0 10px; }
.st-mem-latest { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: start; font: inherit; color: var(--ink);
  background: color-mix(in srgb, var(--ink) 4%, transparent); border: 1px solid var(--line); cursor: pointer; }
.st-mem-latest.none { cursor: default; opacity: 0.7; }
.st-mem-latest small { color: var(--ink-3); font-size: 0.78rem; }
.st-mem-latest.open { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.gain.always { border: 1.5px solid #e2572b; box-shadow: 0 0 8px color-mix(in srgb, #e2572b 35%, transparent); }
@keyframes gain-in { from { transform: translateY(4px) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
/* a pill is a button: its notes pop up, a line each, a tap opens one in full (js/gains.js) */
button.gain { font: inherit; font-size: 0.78rem; cursor: pointer; }
.gain-pop .ctx-head b { color: #2fbf71; }
.gp-note { display: block; width: 100%; text-align: start; font: inherit; color: var(--ink); background: none; border: 0; border-top: 1px solid var(--line); padding: 9px 4px; cursor: pointer; }
.gp-note b { display: block; font-size: 0.86rem; font-weight: 600; }
.gp-note span { display: block; margin-top: 2px; font-size: 0.8rem; line-height: 1.4; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-note.open span { white-space: normal; overflow: visible; }
.gp-note.always b::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-inline-end: 6px; border-radius: 50%; background: #e2572b; vertical-align: 1px; }

/* its memory by the context ring: a small cylinder, its notes and (green) what this chat added, side by side (Faris
   2026-10-27: stacked, they sat on top of each other) */
.c-mind { flex: none; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 4px; min-width: 30px; height: 30px; padding: 0 10px; box-sizing: border-box; white-space: nowrap;
  border-radius: 9px / 6px; border: 1.5px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface) 60%);
  box-shadow: inset 0 3px 0 -1px color-mix(in srgb, var(--accent) 25%, transparent); line-height: 1; font-variant-numeric: tabular-nums; }
.c-mind[hidden] { display: none; }
.c-mind b { font-size: 0.7rem; color: var(--ink); }
.c-mind small { font-size: 0.62rem; font-weight: 700; color: #2fbf71; }
.c-mind small:empty { display: none; }

/* a picture a construct made, where it placed it: a small card; full size on a tap */
.pic-card { display: block; padding: 0; margin: 8px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; width: 160px; max-width: 60%; aspect-ratio: 1; background: var(--surface-2); cursor: zoom-in; }
.pic-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
p .pic-card { display: inline-block; vertical-align: middle; }
.pic-view { position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / 94%); display: grid; grid-template-rows: minmax(0, 1fr) auto auto; place-items: center; padding: 48px 16px calc(24px + var(--inset-bottom)); touch-action: none; overscroll-behavior: contain; }
.pic-view img { transform-origin: center; will-change: transform; user-select: none; -webkit-user-drag: none; }
.pic-view.zoomed { cursor: grab; }
/* the section a picture in the full view is in: a thin gold line at the bottom centre */
.pic-set { padding-top: 12px; font-size: 0.8rem; font-weight: 300; letter-spacing: 0.08em; color: #e0b36a; text-align: center; }
.pic-set:empty { display: none; }
.pic-view img { width: 100%; height: 100%; min-height: 0; object-fit: contain; border-radius: 12px; image-rendering: auto; }
.pic-view .pic-x { position: absolute; top: 12px; right: 12px; color: #fff; background: rgb(255 255 255 / 12%); }
.pic-acts { display: flex; gap: 10px; padding-top: 16px; }
/* (above the picture always: zoomed in, its transform lifts it over what comes after it, Faris 2026-10-29: "the thumbs
   up and down and other buttons… sometimes show behind the pic") */
.pic-view > img { position: relative; z-index: 1; }
.pic-view .pic-acts, .pic-view .pic-set, .pic-view .pic-x { position: relative; z-index: 3; }
.pic-view .pic-x { position: absolute; }

/* a construct's Tools: the engines under Image generation */
.st-subs { display: grid; gap: 6px; margin-inline-start: 26px; }
.st-subs[hidden] { display: none; }
.st-sub .st-check span { font-size: 0.9rem; }
/* a picture with its caption; gold while its caption is being said (Faris 2026-10-27) */
.pic { display: inline-grid; gap: 4px; margin: 8px 0; vertical-align: top; max-width: 60%; }
.pic .pic-card { margin: 0; width: 160px; max-width: 100%; transition: box-shadow 0.3s, border-color 0.3s; }
.pic-cap { font-size: 0.8rem; color: var(--ink-2); line-height: 1.3; }
.pic.speaking .pic-card { border-color: #e8b54a; box-shadow: 0 0 0 3px #e8b54a, 0 0 18px 4px color-mix(in srgb, #e8b54a 55%, transparent); }
.pic.speaking .pic-cap { color: var(--ink); }

/* What a construct asks for (Faris 2026-10-27: our app's own taste, never a form): its face and a line, what it would
   do in a soft panel, why, the engine and how many for pictures, then Reject and Approve. Answered, it settles. */
.rq-cards { display: grid; gap: 10px; margin: 10px 0 4px; }
.rq-card { display: grid; gap: 12px; padding: 16px; border-radius: 22px; max-width: 440px;
  background: radial-gradient(140% 120% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); box-shadow: 0 6px 24px -14px rgb(0 0 0 / 45%); }
.rq-card.k-core { border-color: color-mix(in srgb, #e2572b 45%, var(--line));
  background: radial-gradient(140% 120% at 100% 0%, color-mix(in srgb, #e2572b 14%, transparent), transparent 55%), var(--surface); }
.rq-head { display: flex; align-items: center; gap: 10px; }
.rq-head p { margin: 0; font-weight: 650; line-height: 1.3; }
.rq-face { width: 34px; height: 34px; flex: none; border-radius: 50%; overflow: hidden; }
.rq-what, .rq-why { display: grid; gap: 4px; }
.rq-what { padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
.rq-what p, .rq-why p { margin: 0; line-height: 1.45; }
.rq-what small, .rq-why small { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.rq-why p { color: var(--ink-2); font-size: 0.94rem; }
.rq-tune { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rq-engines { display: inline-flex; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); }
.rq-engine { border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 0.88rem; padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: background 0.2s, color 0.2s; }
.rq-engine.on { background: var(--accent); color: var(--accent-ink); font-weight: 650; }
.rq-count { display: inline-flex; align-items: center; gap: 6px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); }
.rq-step { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); font-size: 1.1rem; cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / 15%); }
.rq-step:disabled { opacity: 0.35; cursor: default; }
.rq-n { display: inline-grid; place-items: center; width: 44px; }
.rq-n b { font-size: 1.15rem; font-variant-numeric: tabular-nums; line-height: 1; }
.rq-foot { display: flex; justify-content: flex-end; gap: 8px; }
.rq-state { margin: 0; font-size: 0.86rem; font-weight: 600; }
.rq-state.yes { color: #2fbf71; }
.rq-state.no { color: var(--ink-3); }
.rq-card.done { box-shadow: none; opacity: 0.92; }
.g-ask { display: grid; justify-items: center; gap: 8px; margin: 8px auto; max-width: 94%; }
.g-ask .g-note { margin: 0; }
.c-mind { cursor: pointer; font: inherit; color: inherit; }
.mind-pop .mind-h { margin: 10px 0 4px; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.mind-pop .mind-note { margin-inline-start: 6px; color: var(--ink-3); font-size: 0.72rem; }
.ctx-dot.k-core, .ctx-fill.k-core { background: #e2572b; }

/* its core in its settings: each line with its size; a tap shows it whole, Pause or Resume, Delete */
.st-core { display: grid; gap: 8px; margin-bottom: 18px; }
.st-core-title { display: flex; align-items: center; gap: 6px; }
.st-core-line { border: 1px solid color-mix(in srgb, #e2572b 40%, var(--line)); border-radius: 14px; background: var(--surface); overflow: hidden; }
.st-core-line.paused { opacity: 0.6; border-style: dashed; }
.st-core-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.st-core-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-core-line.open .st-core-text { white-space: normal; }
.st-core-head small { flex: none; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.st-core-more { padding: 0 12px 12px; display: grid; gap: 8px; }
.st-core-more[hidden] { display: none; }
.st-core-why { margin: 0; color: var(--ink-2); font-size: 0.9rem; }
.st-core-acts { display: flex; gap: 8px; justify-content: flex-end; }
.st-core-del { color: #d64545; }
/* Counter: between Reject and Approve; countered, a quiet amber line */
.rq-counter { border-color: color-mix(in srgb, #e8b54a 55%, var(--line)); color: var(--ink); }
.rq-state.counter { color: #c9962f; }
/* a request waiting for an answer: Send waits too */
.btn.send.locked { opacity: 0.4; filter: grayscale(0.6); }

/* an answer's info (js/app.js showInfo): what happened, OpenRouter's own words included */
.info-pop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / 45%); }
.info-card { position: relative; width: min(440px, 100%); max-height: 80vh; overflow: auto; box-sizing: border-box; padding: 16px 16px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.info-card h3 { margin: 0 0 10px; font-size: 1rem; }
.info-card .info-x { position: absolute; top: 8px; right: 8px; }
.info-card dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; font-size: 0.82rem; }
.info-card dt { color: var(--ink-3); }
.info-card dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; user-select: text; }
.fail .fail-info { display: inline-flex; vertical-align: middle; margin-inline-start: 6px; }

/* a construct's secrets (Settings › Constructs › Secrets) */
.st-sec { display: grid; gap: 10px; }
.st-sec-item { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.st-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.st-sec-head b { overflow-wrap: anywhere; }
.st-sec-acts { display: inline-flex; gap: 6px; flex: none; }
.st-sec-btn { padding: 4px 10px; font-size: 0.78rem; }
.st-sec-del { color: var(--danger); }
.st-sec-note { margin: 0; font-size: 0.8rem; color: var(--ink-2); }
.st-sec-value { display: block; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: 0.8rem; overflow-wrap: anywhere; user-select: all; }
.st-sec-value[hidden] { display: none; }
.st-sec-access { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-sec-label { font-size: 0.76rem; color: var(--ink-3); }
.st-sec-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.78rem; }
.st-sec-x { border: 0; background: none; color: var(--ink-3); font-size: 1rem; line-height: 1; padding: 0 4px; cursor: pointer; }
.st-sec-grant { max-width: 100%; font: inherit; font-size: 0.8rem; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
/* a group bot's turn that failed: a quiet line, with its (i) */
.g-fail { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 6px 0; font-size: 0.8rem; color: var(--danger); }
.g-fail .act { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink-3); }
.g-fail .act svg { width: 16px; height: 16px; }

/* Spawn subagents: how many at once (Settings › Constructs › General › Tools) */
.st-copies { display: grid; gap: 4px; padding: 2px 0 4px 34px; }
.st-copies-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; color: var(--ink-2); }
.st-copies-n { min-width: 2ch; text-align: end; color: var(--ink); font-variant-numeric: tabular-nums; }
.st-copies input[type=range] { width: 100%; accent-color: var(--accent); }

/* the subagents toggle: top right of the box, in a construct's chat that may spawn them */
.composer form { position: relative; }
.composer form.has-split textarea { padding-inline-end: calc(var(--toggles, 1) * 34px + 2px); }
/* the picture toolset toggles (js/compose.js): left of the subagents one, each its own slot */
.c-split.c-ptool { inset-inline-end: calc(10px + var(--slot, 1) * 34px); }
.c-split { position: absolute; top: 8px; inset-inline-end: 10px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.c-split svg { width: 17px; height: 17px; }
.c-split.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.c-split[hidden] { display: none; }
.c-split { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
/* held: how many copies at once (js/compose.js splitPop) */
.split-pop { position: fixed; z-index: 96; width: min(280px, calc(100vw - 16px)); padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); color: var(--ink); display: grid; gap: 10px; }
.split-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.9rem; color: var(--ink-2); }
.split-n { font-size: 1.15rem; color: var(--accent); }
.split-row { display: flex; align-items: center; gap: 8px; }
.split-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.split-step { flex: none; width: 34px; height: 34px; font-size: 1.2rem; line-height: 1; }
.split-ok { justify-self: end; min-width: 84px; }
/* the member's own API tools (js/settings.js) */
.info-pop.st-custom-pop { z-index: 97; }
/* pictures on their way from the Jerbett image app (js/tiles.js): a grid of tiles, a moving sheen while each renders,
   the picture popping in when done */
.img-tiles { --tile-aspect: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
/* (an answer's pictures together: each call's tiles flow into one two-column grid) */
.img-tiles-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.img-tiles-row > .img-tiles { display: contents; }
.img-tile { position: relative; aspect-ratio: var(--tile-aspect); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); padding: 0; display: block; width: 100%; }
.img-tile img, .img-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* a video's still (js/stills.js): black until it comes */
.vid-still { display: block; width: 100%; height: 100%; background: #000 center / cover no-repeat; }
/* a video's tile: a small play mark top left */
/* a video's id on its server (fc-…), green on its first tile: a tap copies it */
.img-tile .job-id { position: absolute; top: 6px; left: 6px; right: auto; z-index: 3; justify-self: start; max-width: calc(100% - 34px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 8px; border: 0; border-radius: 999px; background: rgb(0 0 0 / 55%); color: #4cc38a; font: 600 0.7rem ui-monospace, SFMono-Regular, Menlo, monospace; text-align: left; cursor: copy; backdrop-filter: blur(4px); }
.img-tile.fail .job-id { position: absolute; }
.img-tile .vid-dur { position: absolute; bottom: 8px; left: 8px; z-index: 2; padding: 1px 7px; border-radius: 999px; background: rgb(40 40 40 / 72%); color: #f2f2f2; font-size: 0.66rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.5; pointer-events: none; backdrop-filter: blur(4px); }
.img-tile .vid-dur[hidden] { display: none; }
.img-tile .vid-mark { position: absolute; top: 7px; right: 7px; left: auto; bottom: auto; z-index: 2; width: 20px; height: 20px; padding: 3px; border-radius: 6px; background: rgb(0 0 0 / 45%); color: #eee; pointer-events: none; }
.img-tile .vid-mark svg { width: 100%; height: 100%; display: block; }
/* a picture open for the construct (js/shown.js eyesOn): the eye in its top-left corner, green; kept open, ringed */
.img-tile .tile-eye { position: absolute; top: 7px; left: 7px; z-index: 2; width: 22px; height: 22px; padding: 3px; border-radius: 7px; background: rgb(0 0 0 / 50%); color: #4cc38a; pointer-events: none; }
.img-tile .tile-eye svg { width: 100%; height: 100%; display: block; }
.img-tile .tile-eye[data-st="pin"] { background: rgb(14 40 28 / 82%); box-shadow: inset 0 0 0 1.5px #4cc38a; }
.vid-view video { width: 100%; height: 100%; min-height: 0; object-fit: contain; border-radius: 12px; background: #000; }
/* a video full size: its own small controls (js/tiles.js playerFor), never the phone's big ones */
.vid-view .pl-box { width: 100%; height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; }
.pl-stage { position: relative; min-height: 0; display: grid; overflow: hidden; touch-action: none; }
/* (pinched and moved: js/zoom.js; its edges pinned to the stage's, so a zoomed video never sizes the stage) */
.pl-layer { position: absolute; inset: 0; transform-origin: 0 0; }
.pl-layer video { display: block; }
.pl-flash { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; padding: 8px; margin: -18px 0 0 -18px; border-radius: 50%; background: rgb(0 0 0 / 50%); color: #fff; opacity: 0; transition: opacity 0.12s; pointer-events: none; }
.pl-flash.on { opacity: 1; }
.pl-flash svg { width: 100%; height: 100%; display: block; }
.pl-bar { display: flex; align-items: center; gap: 10px; padding: 0 4px; color: #eee; }
.pl-btn { position: relative; flex: none; width: 18px; height: 18px; padding: 3px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 12%); color: #fff; cursor: pointer; }
.pl-btn svg { width: 100%; height: 100%; display: block; }
.pl-btn::before, .cmp-play::before, .cmp-sound::before { content: ''; position: absolute; inset: -10px; } /* (small circles, a finger-sized tap) */
.pl-seek { flex: 1; min-width: 0; accent-color: var(--accent); }
.pl-time { flex: none; min-width: 2.6em; color: #bbb; font-variant-numeric: tabular-nums; }
.vid-view { touch-action: auto; background: #000; } /* (solid: nothing behind shows through its bar) */
.img-tile.gone { display: none; }
/* (a sheen that runs on without a seam: the gradient repeats, ends matching, and moves exactly one of its widths a loop, at
   an even speed; Faris 2026-10-28, "it moves, then suddenly skips and jumps back") */
.img-tile.wait { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-2) 25%, color-mix(in srgb, var(--accent) 22%, var(--surface-2)) 50%, var(--surface-2) 75%, var(--surface-2) 100%) 0 0 / 200% 100% repeat-x; animation: tile-sheen 2.4s linear infinite; }
.img-tile.wait::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%), radial-gradient(circle at 75% 70%, color-mix(in srgb, var(--ink) 8%, transparent), transparent 50%); animation: tile-drift 6s ease-in-out infinite alternate; }
.img-tile span { position: absolute; left: 10px; bottom: 8px; z-index: 1; font-size: 0.78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.img-tile.fail { display: grid; place-items: center; }
.img-tile.fail span { position: static; color: var(--ink-3); }
.img-tile.fail { align-content: center; gap: 4px; padding: 8px; }
.img-tile .tile-why { max-width: 100%; font-size: 0.68rem; line-height: 1.3; color: var(--ink-3); text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; cursor: pointer; }
.img-tile .tile-why.open { -webkit-line-clamp: unset; overflow-y: auto; max-height: 100%; }
.img-tile.fail { align-content: center; gap: 10px; }
.img-tile .tile-retry { justify-self: center; position: relative; z-index: 2; }
.img-tile.pop { animation: tile-pop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.25); }
.tile-ask { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; gap: 10px; padding: 10px; text-align: center; background: rgb(0 0 0 / 62%); color: #fff; backdrop-filter: blur(6px); }
.tile-ask p { margin: 0; font-size: 0.9rem; font-weight: 600; }
.tile-ask div { display: flex; gap: 8px; justify-content: center; }
.tile-ask .btn.ghost { color: #fff; border-color: rgb(255 255 255 / 55%); }
.tile-ask .btn { white-space: nowrap; flex: none; min-width: 64px; padding: 6px 14px; }
/* a construct's ask to see its picture, its tiles not on the screen (js/tiles.js strip): above the box */
.look-strip { display: grid; gap: 6px; margin: 0 12px 8px; }
.look-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--accent); }
.look-card .look-pic { flex: none; padding: 0; border: 0; background: none; }
.look-card .look-pic img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; display: block; }
.look-card p { flex: 1; margin: 0; font-size: 0.88rem; font-weight: 600; }
.look-card div { display: flex; gap: 6px; }
.look-card .btn { min-width: 56px; padding: 6px 12px; }
/* thumbs on a picture (js/tiles.js): small, bottom right; the one given filled in */
.tile-thumbs { position: absolute; right: 6px; bottom: 6px; z-index: 1; display: flex; gap: 4px; }
.tile-thumb { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgb(0 0 0 / 45%); color: #fff; backdrop-filter: blur(4px); cursor: pointer; }
.tile-thumb svg { width: 15px; height: 15px; }
.tile-thumb.down svg { transform: rotate(180deg); }
.tile-thumb.up.on { background: #2f8f5b; }
.tile-thumb.down.on { background: #b2452f; }
.img-tile.noted .tile-thumb.on { box-shadow: 0 0 0 2px rgb(255 255 255 / 85%); }
/* the rating's words, over the picture full size (js/tiles.js): low on the left, see-through, the picture's own buttons
   out of the way meanwhile */
.rate-panel { position: absolute; left: 12px; bottom: calc(12px + var(--inset-bottom, 0px)); z-index: 2; width: min(270px, calc(100% - 24px)); box-sizing: border-box; display: grid; gap: 6px; padding: 10px; border-radius: 14px; background: rgb(20 18 16 / 78%); border: 1px solid rgb(255 255 255 / 14%); backdrop-filter: blur(8px); color: #fff; }
.rate-panel b { font-size: 0.85rem; }
.rate-panel textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.9rem; color: #fff; background: rgb(255 255 255 / 8%); border: 1px solid rgb(255 255 255 / 18%); border-radius: 10px; padding: 6px 8px; resize: none; }
.rate-panel textarea::placeholder { color: rgb(255 255 255 / 55%); }
.rate-panel .btn.ghost { color: #fff; border-color: rgb(255 255 255 / 40%); }
.pic-view.rating .pic-acts, .pic-view.rating .pic-set { visibility: hidden; }
.pic-rate { display: flex; gap: 8px; }
/* a picture's Info (js/markdown.js infoRows): low on the left like the rating's words, each line copied on a tap */
.pic-info { top: 60px; right: 12px; left: auto; bottom: auto; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 140px); overflow-y: auto; gap: 4px; }
.pic-info .rate-head { display: flex; align-items: center; gap: 6px; }
.pic-info .rate-head b { flex: 1; }
.pic-info .info-line { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 0.82rem; line-height: 1.4; color: rgb(255 255 255 / 85%); }
.pic-info .info-line .info-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pic-info .info-line.sub { padding-left: 10px; font-size: 0.78rem; }
.pic-info .info-line b, .pic-info .info-group { color: #e3b46a; font-weight: 600; }
.pic-info .info-group { margin: 4px 0 0; font-size: 0.82rem; }
.pic-info .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.info-copy { flex: none; width: 24px; height: 24px; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: rgb(255 255 255 / 60%); cursor: pointer; }
.info-copy svg { width: 100%; height: 100%; display: block; }
.info-copy:hover { color: #fff; background: rgb(255 255 255 / 10%); }
.info-copy.done { color: #4cc38a; }
.pic-view .pic-info-btn { position: absolute; top: 12px; right: 60px; z-index: 2; color: #fff; background: rgb(255 255 255 / 12%); }
.pic-view .pic-info-btn svg { width: 20px; height: 20px; }
.pic-rate .tile-thumb[hidden] { display: none; }
.pic-rate .tile-thumb.vf svg { width: 17px; height: 17px; }
.vf-said { color: #f0b49a; }
/* a video's length and quality, under the words (js/tiles.js knobsBox); Same seed on the pencil's box (js/videos.js) */
.vf-knobs { display: grid; gap: 6px; margin: 8px 0 2px; }
.vf-knob { display: grid; grid-template-columns: 4.2em 26px 1fr 26px; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--ink-2); }
.vf-step { width: 26px; height: 26px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; line-height: 1; cursor: pointer; }
.vf-step:active { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.vf-seed { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 2px; font-size: 0.85rem; color: var(--ink); }
.vf-seed input { width: 18px; height: 18px; accent-color: var(--accent); }
/* an edit's card in the Videos panel (js/videos.js): what kind it is, small, above its tag */
.vid-kind { margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
/* a construct's Videos (js/videos.js): an ask a card, its picture small beside their words, how it stands, its tiles */
.vids-list { display: grid; gap: 14px; padding-top: 14px; }
/* Videos or Images, one at a time (Faris 2026-10-29) */
.vids-tabs { margin: 0 0 10px; }
.vids-list .vids-none-video, .vids-list .vids-none-edit { display: none; }
.vids-list[data-show='video']:not(:has(.vid-ask[data-kind='video'])) .vids-none-video, .vids-list[data-show='edit']:not(:has(.vid-ask[data-kind='edit'])) .vids-none-edit { display: block; }
.vids-list[data-show='video'] .vid-ask[data-kind='edit'], .vids-list[data-show='edit'] .vid-ask[data-kind='video'], .vids-list[data-show='edit'] .vid-loose { display: none; }
.vid-ask { position: relative; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
/* (a card off the screen is not laid out or painted until it comes near: 84 at once froze the panel on a phone) */
.vid-ask { content-visibility: auto; contain-intrinsic-size: auto 420px; }
/* (not one with experiments: its pills sit on its top border, outside it, and would be clipped) */
.vid-ask.has-vars { content-visibility: visible; }
/* how long its video took, top right (js/videos.js timesOf): cold start blue, the render pink */
/* a card's experiments (the vial): small pills on its top border, Base first */
.vid-ask.has-vars { margin-top: 10px; }
.vid-vars { position: absolute; top: -10px; left: 12px; right: 12px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; z-index: 1; }
.vid-vars::-webkit-scrollbar { display: none; }
.vid-var { flex: none; padding: 1px 8px; border-radius: 999px; font: inherit; font-size: 0.64rem; font-weight: 700; line-height: 1.5; letter-spacing: 0.02em; cursor: pointer; color: var(--tpl, var(--accent)); background: var(--surface); border: 1px solid color-mix(in srgb, var(--tpl, var(--accent)) 55%, transparent); }
.vid-var.on { color: var(--ink); background: color-mix(in srgb, var(--tpl, var(--accent)) 32%, var(--surface)); border-color: var(--tpl, var(--accent)); }
.vid-var.busy { animation: vid-var-pulse 1.4s ease-in-out infinite; }
.vid-var.fail { text-decoration: line-through; opacity: 0.6; }
@keyframes vid-var-pulse { 50% { opacity: 0.45; } }
/* the vial's sheet: a pill per test template, toggled */
.vf-xp-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.vf-xp { padding: 3px 10px; border-radius: 999px; font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; color: var(--tpl, var(--ink-2)); background: transparent; border: 1px solid color-mix(in srgb, var(--tpl, var(--ink)) 45%, transparent); }
.vf-xp.on { color: var(--ink); background: color-mix(in srgb, var(--tpl, var(--accent)) 30%, transparent); border-color: var(--tpl, var(--accent)); }
.vid-ask > .vid-kind { padding-right: 7em; display: flex; align-items: center; gap: 6px; }
.vid-mode { flex: none; padding: 0 7px; border-radius: 999px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em; text-transform: none; line-height: 1.55; color: var(--ink-2); border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); }
.vid-mode.smart { color: #6fd0ff; border-color: color-mix(in srgb, #6fd0ff 55%, transparent); background: color-mix(in srgb, #6fd0ff 12%, transparent); }
.vid-knob-pills { display: inline-flex; gap: 4px; flex: none; }
.vid-knob-pills:empty { display: none; }
.vid-kp { padding: 0 6px; border-radius: 999px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; line-height: 1.55; border: 1px solid color-mix(in srgb, var(--kp) 55%, transparent); background: color-mix(in srgb, var(--kp) 16%, transparent); color: var(--kp); }
.vid-kp.len { --kp: var(--accent); }
.vid-kp.q { --kp: var(--time-render); }
.vid-kp.st { --kp: #d86a88; }
.vid-kind-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vid-ask > .vid-kind .vid-tpl-tag { flex: none; }
.vid-ask:has(.vid-corner .vid-time) > .vid-tag { padding-right: 4em; }
.vid-ask:has(.vid-corner .vid-time):has(.vid-from) > .vid-tag { padding-right: 6.5em; }
.vid-corner .vid-time { max-width: none; }
/* a card whose first row is its head (icons, date, trash): the trash keeps clear of the number and times in the corner
   (they sat on top of each other) */
.vid-ask:has(> .vid-corner):not(:has(> .vid-kind, > .vid-tag:not([hidden]))) > .vid-head { padding-right: 3.4em; }
.vid-ask:has(> .vid-corner .vid-time):not(:has(> .vid-kind, > .vid-tag:not([hidden]))) > .vid-head { padding-right: 7.5em; }
.vid-corner { position: absolute; top: 9px; right: 12px; display: grid; justify-items: end; gap: 2px; white-space: nowrap; max-width: 58%; }
.vid-time { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 10px; max-width: 70%; font-size: 0.72rem; font-variant-numeric: tabular-nums; cursor: pointer; }
.vid-time.was { opacity: 0.55; }
.vid-time .cold { color: var(--time-cold); }
.vid-time .render { color: var(--time-render); }
.vid-time .more { flex-basis: 100%; text-align: right; color: var(--ink-2); }
/* Portrait or Landscape, under the sliders (js/tiles.js knobsBox) */
/* a video tool's templates: after Standard/Test (js/tiles.js templateMenu), and in Retry and the pencil (js/videos.js) */
.vf-tpls .vf-tpl-list { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.vf-tpls .vf-tpl-list .btn { justify-content: flex-start; text-align: left; }
/* a template: its short name bold, then its label, small; tinted its colour (its server's) */
.vf-tpl-list .vf-tpl { display: block; min-height: 0; padding: 6px 10px; border-radius: 10px; font-size: 0.74rem; font-weight: 400; line-height: 1.3; color: var(--ink); background: color-mix(in srgb, var(--tpl, var(--line)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tpl, var(--line)) 45%, transparent); }
.vf-tpl-list .vf-tpl b { font-weight: 700; color: var(--tpl, var(--ink)); }
.vf-tpl-list .vf-tpl.lit { background: color-mix(in srgb, var(--tpl, var(--accent)) 34%, transparent); border-color: var(--tpl, var(--accent)); }
.vf-tpl-list .vf-tpl.lit b { color: var(--ink); }
/* a card made with a template: its colour on its edge and its kind */
.vid-ask.vid-tpl { border-color: color-mix(in srgb, var(--tpl) 65%, var(--line)); box-shadow: inset 3px 0 0 var(--tpl); }
.vid-tpl-tag { display: inline-block; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; padding: 0 7px; border-radius: 999px; font-weight: 700; letter-spacing: 0.03em; text-transform: none; color: var(--tpl, var(--ink-2)); background: color-mix(in srgb, var(--tpl, var(--ink)) 18%, transparent); border: 1px solid color-mix(in srgb, var(--tpl, var(--ink)) 55%, transparent); }
/* a video, before its first frame: black (never the player's grey picture) */
.vid-tile video, .vid-view video { background: #000; }
/* how far his prompt moved from the one before: words in, words out */
.vid-plus { color: var(--fresh); font-variant-numeric: tabular-nums; }
/* its short number and what it was made from (js/videos.js): small, bottom left under its video */
.vid-id { font-size: 0.72rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.vid-from { padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.vid-from.gone { color: var(--ink-3); text-decoration: line-through; }
.vid-ask.vid-flash { animation: vid-flash 1.4s ease-out; }
@keyframes vid-flash { 0%, 30% { box-shadow: 0 0 0 2px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.vid-minus { color: #e05a5a; font-variant-numeric: tabular-nums; }
.vf-tpl-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; font-size: 0.78rem; color: var(--ink-2); }
.vf-tpl-wrap { position: relative; min-width: 0; max-width: 72%; }
.vf-tpl-btn { display: flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 8px 3px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--tpl) 60%, transparent); background: color-mix(in srgb, var(--tpl) 16%, transparent); color: var(--ink); font: inherit; font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.vf-tpl-btn b, .vf-tpl-opt b { color: var(--tpl); font-weight: 700; }
.vf-tpl-caret { margin-left: 2px; color: var(--ink-3); }
.vf-tpl-menu { position: absolute; z-index: 5; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); display: grid; gap: 3px; width: max-content; max-width: min(78vw, 300px); padding: 5px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.vf-tpl-menu[hidden] { display: none; }
.vf-tpl-opt { display: block; padding: 4px 9px; border-radius: 8px; border: 0; border-left: 3px solid var(--tpl, var(--line)); background: color-mix(in srgb, var(--tpl, var(--line)) 10%, transparent); color: var(--ink); font: inherit; font-size: 0.72rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.vf-tpl-opt.on { background: color-mix(in srgb, var(--tpl, var(--accent)) 30%, transparent); }
.vf-tool { margin-top: 10px; }
/* Retry and the pencil (js/videos.js redoPanel): Same seed and Same prompt side by side; Close left, and on the right
   one column as wide as Regenerate: the template (Test), Standard | Test, Regenerate */
.vf-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.rd-actions { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: 10px; }
.rd-col { display: grid; gap: 6px; width: 180px; }
.rd-col > div:empty { display: none; }
.rd-col > .btn { width: 100%; }
.rd-col .vf-tool { margin: 0; gap: 6px; }
.rd-col .vf-tool button { padding: 5px 0; font-size: 0.78rem; }
.vf-tool button[data-kind='std'][aria-pressed='true'] { border-color: #5b8def; background: color-mix(in srgb, #5b8def 18%, transparent); color: var(--ink); }
.vf-tool button[data-kind='test'][aria-pressed='true'] { border-color: var(--warm); background: color-mix(in srgb, var(--warm) 20%, transparent); color: var(--ink); }
.rd-col .vf-tpl-wrap { max-width: none; }
.rd-col .vf-tpl-btn { width: 100%; justify-content: center; padding: 5px 10px; font-size: 0.8rem; }
.rd-col .vf-tpl-menu { left: auto; right: 0; transform: none; }
.vf-shape { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 2px; }
.vf-shape button { padding: 7px 0; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); background: transparent; color: var(--ink-2); font: inherit; font-size: 0.82rem; cursor: pointer; }
.vf-shape button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); color: var(--ink); }
.vid-head { display: flex; gap: 10px; align-items: flex-start; }
.vid-pic { flex: none; padding: 0; border: 0; background: none; border-radius: 10px; cursor: zoom-in; }
.vid-head img { width: 52px; height: 52px; flex: none; object-fit: cover; border-radius: 10px; }
.vid-head small { color: var(--ink-3); font-size: 0.75rem; }
.vid-words { margin: 0; font-size: 0.92rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vid-words.small { font-size: 0.82rem; color: var(--ink-2); }
.vid-state { margin: 0; font-size: 0.82rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vid-state.busy { display: block; }
.vid-state[hidden] { display: none; }
.vid-state.busy::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); vertical-align: middle; animation: tile-sheen 1.2s ease-in-out infinite alternate; }
.vid-state.fail { color: #e0866e; }
.vid-grids { display: grid; gap: 8px; }
.vid-head-text { flex: 1; min-width: 0; }
.vid-words-row { display: flex; align-items: flex-start; gap: 6px; }
.vid-words-row .vid-words { flex: 1; min-width: 0; }
.vid-copy { flex: none; width: 24px; height: 24px; padding: 4px; color: var(--ink-3); }
.vid-copy svg { width: 100%; height: 100%; }
.vid-copy.done { color: var(--accent); }
/* his tag on a card (tag_card): on top, in green */
.vid-tag { margin: 0 0 2px; font-size: 0.85rem; font-weight: 700; color: #4cc38a; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vid-tag[hidden] { display: none; }
/* what he is doing on a video: a tap shows his thinking */
.vid-state.has-think { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.vid-think-pop .mind-think { max-height: 60vh; overflow-y: auto; white-space: pre-wrap; }
/* Media: pictures, videos or both, above the folders */
/* the Gallery's top (js/media.js): Image | Video, two tabs (Faris 2026-10-29: "tabs, not just toggles"), and its folders;
   it stays on top while the pictures scroll under it (before, the folders slid behind the pictures) */
.media-bar { position: sticky; top: 0; z-index: 6; display: grid; gap: 8px; padding: 12px 0 10px; background: var(--bg); }
.media-bar .lora-tabs { position: static; padding: 0; }
.media-kind-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.media-kind-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.media-kind-tab.on { background: var(--accent); color: var(--accent-ink); }
.media-kind-tab b { font-size: 0.72rem; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, currentColor 18%, transparent); }
.media-side { display: contents; }
.vid-trash { flex: none; width: 24px; height: 24px; padding: 4px; color: var(--ink-3); }
.vid-trash svg { width: 100%; height: 100%; }
.vid-trash:hover, .vid-trash:active { color: #e0866e; }
/* a video and, to its right, the LoRAs it went out with: small, theirs in the accent */
.vid-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.vid-row .img-tiles { grid-template-columns: 1fr; }
.vid-loras { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 0.72rem; color: var(--ink-2); }
.vid-loras li { display: flex; justify-content: space-between; gap: 6px; padding: 3px 7px; border-radius: 7px; background: var(--surface-2); }
.vid-loras li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vid-loras li b { font-weight: 600; font-variant-numeric: tabular-nums; }
.vid-loras li.mine { color: var(--accent); }
.vid-loras.none { color: var(--ink-3); }
.vid-job { display: grid; gap: 8px; }
.vid-prompt { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.vid-prompt > small { color: var(--ink-3); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.vid-prompt .vid-words { -webkit-line-clamp: 6; }
.vid-prompt .vid-words.open { -webkit-line-clamp: unset; display: block; }
.vid-pending .img-tile { --tile-aspect: 9 / 16; }
.vid-grids:empty { display: none; }
.icon-btn.c-videos { position: relative; overflow: visible; }
/* being made: its ring yellow and turning (js/videos.js paintBadges) */
.icon-btn.c-videos.working::before { content: ''; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--busy) 35%, transparent); border-top-color: var(--busy); border-right-color: var(--busy); animation: vb-spin 1.1s linear infinite; pointer-events: none; }
@keyframes vb-spin { to { transform: rotate(360deg); } }
/* how many on their way (yellow, top right) and done since they last looked (green, top left) */
.c-videos .vb { position: absolute; top: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; pointer-events: none; }
.c-videos .vb[hidden] { display: none; }
/* how many are being made: yellow, inside the ring, right under the icon (Faris 2026-10-29) */
.c-videos .vb-go { top: auto; bottom: 3px; left: 50%; right: auto; transform: translateX(-50%); min-width: 0; height: auto; padding: 0; border-radius: 0; background: none; color: var(--busy); font-size: 9px; line-height: 1; }
.icon-btn.c-videos.working svg { transform: translateY(-3px) scale(0.86); transition: transform 0.2s; }
.c-videos .vb-done { left: -3px; background: var(--fresh); color: #05170c; }
.vf-said:empty { display: none; }
/* their message asking a video from a picture: the picture small above their words */
.vf-chip { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 0.8rem; color: var(--ink-2); }
.vf-chip img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.pic-rate .tile-thumb.score svg, .rate-flame-btn svg, .rate-flame svg { fill: currentColor; }
.pic-rate .tile-thumb.score.on { background: #c98a2e; }
.rate-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rate-flame-btn { width: 30px; height: 30px; padding: 5px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 12%); color: #e3b46a; cursor: pointer; }
.rate-flame-btn.on { background: #c98a2e; color: #fff; }
.rate-flame-btn svg { width: 100%; height: 100%; }
.rate-words { display: grid; gap: 6px; }
.rate-words[hidden], .rate-scores[hidden] { display: none; }
.rate-scores { display: grid; gap: 4px; max-height: 46vh; overflow-y: auto; }
.rate-score { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.85rem; }
.rate-score > div { display: flex; gap: 2px; flex: none; }
.rate-flame { width: 24px; height: 26px; padding: 2px; border: 0; background: none; color: rgb(255 255 255 / 28%); cursor: pointer; }
.rate-flame svg { width: 100%; height: 100%; }
.rate-flame.lit { color: #e3b46a; }
.pic-rate[hidden] { display: none; }
.pic-rate .tile-thumb { width: 40px; height: 40px; background: rgb(255 255 255 / 12%); backdrop-filter: none; }
.pic-rate .tile-thumb svg { width: 19px; height: 19px; }
.rate-actions { display: flex; justify-content: flex-end; gap: 8px; }
@keyframes tile-sheen { from { background-position: 0 0; } to { background-position: -200% 0; } }
@keyframes tile-drift { from { transform: translate(-6%, -4%) scale(1); } to { transform: translate(6%, 5%) scale(1.15); } }
@keyframes tile-pop { from { transform: scale(0.82); opacity: 0; } to { transform: none; opacity: 1; } }
.st-custom { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.st-custom-head { display: flex; align-items: center; gap: 6px; }
.st-custom-set summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-custom-set summary small { color: var(--ink-3); }
.st-custom-call { display: grid; min-width: 0; }
.st-custom-call small { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-custom-sheet textarea { width: 100%; box-sizing: border-box; font: 0.85rem/1.4 ui-monospace, monospace; }
.st-custom-sheet .st-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.st-custom-check { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.st-custom-check code { font-size: 0.78rem; color: var(--ink-2); overflow-wrap: anywhere; }
.st-custom-check small { color: var(--ink-3); }

/* a construct's copies at work (js/subcards.js): thin cards, three to a row, above its answer */
.sub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 2px 0 10px; }
.sub-card { min-width: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 2px; }
.sub-card.running { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.sub-card.done { border-color: #2fbf71; background: color-mix(in srgb, #2fbf71 8%, var(--surface)); }
.sub-card.stopped, .sub-card.lost { opacity: 0.6; }
.sub-card.failed { border-color: var(--danger); }
.sub-head { display: flex; align-items: center; gap: 4px; min-width: 0; }
.sub-head b { flex: 1; min-width: 0; font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-stop { flex: none; font: inherit; font-size: 0.66rem; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); background: none; color: var(--danger); cursor: pointer; }
.sub-meta { font-size: 0.66rem; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-card.done .sub-meta { color: #2fbf71; }
.sub-card.running .sub-meta::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-inline-end: 5px; border-radius: 50%; background: var(--accent); vertical-align: 1px; animation: sub-beat 1.2s ease-in-out infinite; }
@keyframes sub-beat { 50% { opacity: 0.25; } }
.sub-card.tappable { cursor: pointer; }
.sub-result-body { font-size: 0.86rem; line-height: 1.5; overflow-wrap: anywhere; }
.sub-result-body .sub-task { margin: 0 0 10px; font-size: 0.78rem; color: var(--ink-3); }
.sub-label { margin: 10px 0 4px; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.sub-think { max-height: 38vh; overflow: auto; margin: 0; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 6%, transparent);
  font: 0.76rem/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.c-pill.locked > svg:last-child { display: none; } /* a construct's chat: nothing to pick */
.mind-think { max-height: 60vh; }

/* a paste that adds to a set they have (js/settings.js customSheet) */
.st-custom-merge { border: 1px solid rgb(76 195 138 / 45%); background: rgb(76 195 138 / 8%); border-radius: 10px; padding: 8px 10px; display: grid; gap: 4px; }
.st-custom-merge .st-note { margin: 0; }

/* a video it asked for, in its words (js/markdown.js): a line, the panel has the rest */
.vid-request { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0; padding: 7px 12px; border: 1px solid var(--line, rgb(0 0 0 / 12%)); border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-size: 0.85rem; cursor: pointer; }
.vid-request svg { width: 16px; height: 16px; }

/* a set of its cards in one answer (js/tiles.js setBoxes): a thin border, its name in the line */
.tile-group { margin: 10px -8px; padding: 4px 7px 8px; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 12px; min-width: 0; }
.tile-group > legend { display: flex; align-items: center; gap: 4px; padding: 0 6px; margin-left: 4px; }
.tile-group .tg-name { border: 0; background: none; padding: 2px 2px; font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tile-group .tg-name:hover { color: var(--ink); text-decoration: underline; }
.tile-group .tg-redo { display: grid; place-items: center; width: 22px; height: 22px; padding: 3px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); cursor: pointer; }
.tile-group .tg-redo svg { width: 100%; height: 100%; }
.tile-group .tg-redo:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.tile-group.busy .tg-redo svg { animation: dial 1.1s linear infinite; }
.tile-group .tg-state { font-size: 0.72rem; color: var(--ink-3); }
/* (laid out as a row of cards outside a box: the same two columns, each card its own shape: Faris 2026-10-28, "the
   images became smaller… everything is square") */
.tile-group .tg-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.tile-group .tg-body > .img-tiles { display: contents; }
.tile-group .tg-note { display: grid; gap: 6px; margin: 2px 0 8px; }
.tile-group .tg-note textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.9rem; line-height: 1.4; min-height: 4.5em; resize: none; overflow-y: auto; }
.tile-group .tg-note .tg-clear { margin-right: auto; }
.tile-group .tg-said:empty { display: none; }
/* (its place in the set in the corner, the thumbs moved over for it) */
.tile-group .tile-thumbs { right: 24px; }
.img-tile .tg-n { position: absolute; right: 5px; bottom: 8px; z-index: 2; font-size: 0.62rem; line-height: 1; padding: 2px 4px; border-radius: 4px; color: #fff; background: rgb(0 0 0 / 45%); pointer-events: none; }

/* a picture opened for him (js/shown.js): the eye on, and the line over their box */
.pic-rate .tile-thumb.eye.on { color: #4cc38a; background: rgb(76 195 138 / 22%); }
.pic-rate .tile-thumb.eye.pin { color: #4cc38a; background: rgb(76 195 138 / 32%); box-shadow: inset 0 0 0 1.5px #4cc38a; } /* kept open (js/shown.js) */
.shown-strip { display: flex; align-items: center; gap: 8px; padding: 4px 44px 6px 6px; font-size: 0.8rem; color: #2f9e6e; }
.shown-strip[hidden] { display: none; }
.shown-strip > svg { width: 16px; height: 16px; flex: none; }
.shown-strip > span { flex: 1; }
.shown-strip .shown-x { width: 24px; height: 24px; font-size: 0.75rem; }

/* what a card on its way is made with (js/tiles.js waitDetails): big enough to read, scrolls */
.wait-pop .wd-card { width: min(520px, 100%); max-height: 82vh; overflow-y: auto; }
.wd-body { display: grid; gap: 12px; }
.wd-sec h4 { margin: 0 0 6px; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.wd-sec.mine h4 { color: #2f9e6e; }
.wd-loras, .wd-set, .wd-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.88rem; }
.wd-loras li, .wd-set li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; border-radius: 8px; background: var(--surface-2); }
.wd-loras li span, .wd-set li span { overflow-wrap: anywhere; }
.wd-sec.mine .wd-loras li { background: rgb(76 195 138 / 14%); color: #1f7a53; }
.wd-loras li.gone { opacity: 0.6; text-decoration: line-through; }
.wd-rules li { padding: 4px 8px; border-left: 3px solid #e3b46a; background: var(--surface-2); border-radius: 4px; }
.wd-words { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 0.9rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.wd-sec.after .wd-words { border: 1px solid rgb(76 195 138 / 45%); }
/* a prompt in the H3 guide's sections (js/tiles.js promptView): each its own line and colour; the words their rules
   put in lit up; dim (on at first) greys the rest so those stand out */
.wd-pv { white-space: normal; }
.pv { display: grid; gap: 5px; }
.pv-head { margin-top: 4px; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.pv-sec { display: block; padding-left: 8px; border-left: 3px solid var(--pv-c, var(--line)); color: var(--pv-t, var(--ink)); }
span.pv-sec { display: inline; padding: 0; border: 0; }
.pv-def { --pv-c: #3aa59a; --pv-t: #4fb8ad; }
.pv-shot { --pv-c: var(--accent); --pv-t: var(--accent); font-weight: 600; font-size: 0.82rem; }
.pv-est { --pv-c: #4d8fd6; --pv-t: #6ea6e6; }
.pv-act { --pv-c: color-mix(in srgb, var(--ink) 30%, transparent); --pv-ic: var(--ink-2); }
.pv-say { --pv-c: #d6609b; --pv-t: #e07aae; }
.pv-say .pv-who { font-weight: 600; }
.pv-say .pv-how { font-style: italic; }
.pv-text { --pv-c: #c9a227; --pv-t: #d4b03c; }
.pv-trans { --pv-c: #9a6bd1; --pv-t: #ad85dc; }
.pv-snd { --pv-c: #5aa469; --pv-t: #6fb87d; }
.pv-mus { --pv-c: #9a6bd1; --pv-t: #ad85dc; }
.pv-align, .pv-note { --pv-c: var(--line); --pv-t: var(--ink-2); }
.pv-mark { background: transparent; color: inherit; }
/* its references in red: <Subject 1>, <Picture 2>… */
.pv-ref { color: var(--pv-ref); }
/* a tiny icon of what each section is, sitting on its line in the space left of it (the text keeps its width) */
div.pv-sec { position: relative; }
.pv-say { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-9 8.3 9 9 0 0 1-3.8-.8L3 20.5l1.5-4.6A8.1 8.1 0 0 1 3 11.5 8.4 8.4 0 0 1 12 3.2a8.4 8.4 0 0 1 9 8.3z'/%3E%3C/svg%3E"); }
.pv-snd { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13'/%3E%3C/svg%3E"); }
.pv-mus { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l11-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='17' cy='16' r='3'/%3E%3C/svg%3E"); }
.pv-def { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.pv-est { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h4l2-3h6l2 3h4v13H3z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E"); }
.pv-act { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3h9a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h4'/%3E%3C/svg%3E"); }
.pv-shot { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='9' width='18' height='12' rx='1'/%3E%3Cpath d='m3 9 2-5 16 0-2 5M8 4l-2 5M13 4l-2 5M18 4l-2 5'/%3E%3C/svg%3E"); }
.pv-text { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6V4h14v2M12 4v16M9 20h6'/%3E%3C/svg%3E"); }
.pv-trans { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13l-3-3M20 16H7l3 3'/%3E%3C/svg%3E"); }
.pv-align { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.pv-note { --pv-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v12l-4 4H4z'/%3E%3Cpath d='M16 20v-4h4'/%3E%3C/svg%3E"); }
div.pv-sec::before { content: ''; position: absolute; left: -9px; top: 1px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface-2); }
div.pv-sec::after { content: ''; position: absolute; left: -7px; top: 3px; width: 11px; height: 11px; background: var(--pv-ic, var(--pv-c, var(--line))); -webkit-mask: var(--pv-i) center / contain no-repeat; mask: var(--pv-i) center / contain no-repeat; }
.pv-mark.rep { color: var(--pv-rep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pv-mark.trig { color: var(--pv-trig); font-weight: 600; }
/* in his prompt: the words their rules took out (in the prompt after, what they put in) */
.pv-mark.was { color: var(--pv-rep); text-decoration: underline dotted; text-underline-offset: 3px; }
.dim > .pv, .dim > .pv .pv-head { color: color-mix(in srgb, var(--ink) 38%, var(--surface-2)); }
.dim > .pv .pv-sec { color: color-mix(in srgb, var(--pv-t, var(--ink)) 40%, var(--surface-2)); }
.dim > .pv .pv-ref { color: color-mix(in srgb, var(--pv-ref) 45%, var(--surface-2)); }
.dim > .pv div.pv-sec::after { background: color-mix(in srgb, var(--pv-ic, var(--pv-c, var(--line))) 50%, var(--surface-2)); }
.dim > .pv .pv-sec { border-left-color: color-mix(in srgb, var(--pv-c, var(--line)) 45%, transparent); }
.dim > .pv .pv-mark.rep { color: var(--pv-rep); }
.dim > .pv .pv-mark.trig { color: var(--pv-trig); }
.vid-words.pv-host { display: block; max-height: 5.2em; overflow: hidden; }
.vid-words.pv-host.open { max-height: none; }
.vid-acts { display: flex; gap: 4px; }
.wd-sec h4 { display: flex; align-items: center; gap: 8px; }
.wd-copy { margin-left: auto; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: inherit; font-size: 0.7rem; text-transform: none; letter-spacing: 0; cursor: pointer; }
.wd-dim { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 0.8rem; color: var(--ink-2); cursor: pointer; }
.wd-dim input { width: 16px; height: 16px; accent-color: var(--accent); }
.wd-neg { margin: 6px 0 0; font-size: 0.82rem; color: var(--ink-2); overflow-wrap: anywhere; }
.img-tile.wait { cursor: pointer; }

/* a card being made again in its set (js/tiles.js rework): its picture stays, a thin bar runs along its top */
.img-tile.reworking::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 3; background: linear-gradient(90deg, transparent, var(--accent), transparent) 0 0 / 50% 100% repeat-x; animation: tile-rework 1.1s linear infinite; }
.img-tile.reworking img { filter: saturate(0.8); transition: filter 0.3s; }
@keyframes tile-rework { from { background-position: 0 0; } to { background-position: 100% 0; } }

/* their words on a set (js/tiles.js groupBox): a panel at the top, over the chat; the chat's box hidden meanwhile */
.tg-sheet { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-start; justify-content: center; padding: calc(12px + var(--inset-top, 0px)) 12px 12px; background: rgb(0 0 0 / 50%); }
.tg-sheet-card { width: min(560px, 100%); box-sizing: border-box; display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tg-sheet-head { display: grid; gap: 2px; }
.tg-sheet-head b { font-size: 1rem; }
.tg-sheet-head small { color: var(--ink-3); font-size: 0.78rem; }
.tg-sheet textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.95rem; line-height: 1.45; min-height: 5.5em; resize: none; overflow-y: auto; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
.tg-sheet .tg-said:empty { display: none; }
.tg-sheet .tg-clear { margin-right: auto; }
body.tg-editing #composer, body.tg-editing #composer ~ .hint, body.tg-editing #look-strip { display: none !important; }

/* a set's versions (js/tiles.js loadVersions): tabs in its border after a stretch of line; an earlier one's pictures
   over the cards */
.tile-group .tg-vers { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.tile-group .tg-vers::before { content: ''; width: 18px; margin-right: 6px; border-top: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.tile-group .tg-vers:empty { display: none; }
.tile-group .tg-ver { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); background: var(--surface); color: var(--ink-3); font: inherit; font-size: 0.72rem; font-weight: 600; cursor: pointer; }
.tile-group .tg-ver.on { color: var(--surface); background: var(--ink-2); border-color: var(--ink-2); }
.tile-group[data-viewing] .tg-body > .img-tiles { display: none; }
.tile-group .tg-past { display: contents; }
.tile-group .tg-past-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* a set made again, its line in the chat (js/markdown.js) */
.redo-note { margin: 0; display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); font-size: 0.8rem; color: var(--ink-3); }
.redo-note b { color: var(--ink-2); font-weight: 600; }

/* an ⓘ under a card's word when it ended badly (js/tiles.js endDetails) */
.img-tile .tile-info { display: grid; place-items: center; width: 26px; height: 26px; margin: 2px auto 0; padding: 4px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; }
.img-tile .tile-info svg { width: 100%; height: 100%; }
.img-tile .tile-info:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }

/* a card made again with new words (js/videos.js redoPanel) */
.vid-first { display: block; color: var(--ink-3); font-style: italic; overflow-wrap: anywhere; }

/* which video tool makes it (js/tiles.js videoMenu) */
.vf-menu { width: min(240px, calc(100% - 24px)); }
.vf-menu .btn { width: 100%; }

/* a sheet's title with its ⓘ (js/videos.js redoPanel) */
.tg-sheet .tg-title { display: flex; align-items: center; gap: 6px; }
.tg-sheet .tg-title .st-info { width: 22px; height: 22px; padding: 2px; border: 0; background: none; color: var(--ink-3); cursor: pointer; }
.tg-sheet .tg-first { margin: 0; font-size: 0.8rem; color: var(--ink-3); max-height: 30vh; overflow-y: auto; overflow-wrap: anywhere; }

/* a smart change (js/smart-edit.js): the picture with its marks over it, the tools on top, the marks listed under */
.se-view { position: fixed; inset: 0; z-index: 96; display: flex; flex-direction: column; gap: 8px; padding: calc(10px + var(--inset-top, 0px)) 12px calc(10px + var(--inset-bottom, 0px)); background: var(--bg, #111); color: var(--ink); overflow-y: auto; }
.se-head { display: flex; align-items: center; gap: 10px; }
.se-head b { flex: 1; font-size: 1rem; }
.se-tools { display: flex; gap: 4px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
.se-tool { border: 0; background: none; color: var(--ink-2); width: 36px; height: 32px; padding: 6px 8px; border-radius: 999px; cursor: pointer; display: grid; place-items: center; }
.se-tool svg { width: 20px; height: 20px; display: block; }
.se-gear { width: 34px; height: 34px; padding: 7px; }
.se-gear svg { width: 100%; height: 100%; }
.se-set { display: grid; gap: 4px; padding: 8px 4px 2px; }
.se-set .vf-knob { grid-template-columns: 4.2em 1fr; }
/* identity settings: a lock, its name, its slider; locked = the AI decides (dimmed), open = theirs */
.id-set { display: grid; gap: 2px; margin-top: 6px; }
.id-head { font-size: 0.78rem; color: var(--ink-2); letter-spacing: 0.04em; text-transform: uppercase; margin: 4px 0 2px; }
.vf-knob.id-row { grid-template-columns: 28px 8.8em 1fr; }
.set-name > span { white-space: nowrap; }
/* (every slider starts where the Identity ones do, past their lock and name: one straight line down the panel) */
.se-set .vf-knob.se-set-row { grid-template-columns: calc(34px + 8.8em) 1fr; }
/* a setting's name with its ⓘ, and its tip as a line under its row */
.set-name { display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.set-i { flex: none; width: 18px; height: 18px; padding: 1px; border: 0; background: none; color: var(--ink-3); cursor: pointer; }
.set-i svg { width: 100%; height: 100%; display: block; }
.set-tip { white-space: pre-line; margin: -2px 0 4px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); font-size: 0.78rem; line-height: 1.4; color: var(--ink-2); }
.id-lock { width: 28px; height: 28px; padding: 5px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; }
.id-lock svg { width: 100%; height: 100%; display: block; }
.id-row:not(.mine) .bs { opacity: 0.38; pointer-events: none; }
.id-row:not(.mine) > .set-name { color: var(--ink-3); }
.id-row.mine .id-lock { color: var(--accent); }
.vf-head { display: flex; align-items: center; gap: 8px; }
.vf-head > b { flex: 1; }
.se-tool.on { background: var(--ink-2); color: var(--surface); }
.se-say { margin: 0; font-size: 0.8rem; color: var(--ink-3); }
.se-say:empty { display: none; }
/* (its parts keep their size: the page scrolls instead of the picture sliding over the words) */
.se-view > * { flex-shrink: 0; }
.se-tip { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 0.82rem; color: var(--ink-2); line-height: 1.4; }
.se-help { flex: none; }
.se-stage { display: flex; justify-content: center; }
.se-frame { position: relative; display: inline-block; max-width: 100%; overflow: hidden; border-radius: 10px; touch-action: none; } /* (pinch and move: js/zoom.js) */
.se-frame.drawing { touch-action: none; } /* (Select: a finger draws around things, never scrolls) */
.se-frame .im-busy-text { white-space: normal; text-align: center; } /* (its numbers shown whole, never cut by …) */
.se-frame.busy .se-img { filter: saturate(0.7) brightness(0.9); transition: filter 0.3s; }
.se-img { display: block; max-width: 100%; max-height: min(70vh, calc(100dvh - 300px)); user-select: none; -webkit-user-drag: none; }
.se-layer { position: relative; transform-origin: 0 0; }
.se-mask { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.se-pins { position: absolute; inset: 0; pointer-events: none; }
.se-pin { position: absolute; transform: translate(-50%, -50%) scale(calc(1 / var(--z, 1))); pointer-events: auto; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; border: 2px solid #fff; background: var(--accent); color: #111; font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; box-shadow: 0 1px 4px rgb(0 0 0 / 50%); }
.se-pin.area { background: rgb(255 120 90); color: #fff; } /* (the areas' one colour: js/smart-edit.js DONE) */
.se-selbar { display: flex; justify-content: flex-end; gap: 6px; }
.se-selbar[hidden] { display: none; }
/* Paint's bar (the brush's three sizes, Rub out) on the left, the selection's (Clear, Erase, Generate here) on the right */
.se-bars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.se-bars:not(:has(> :not([hidden]))) { display: none; }
.se-bars .se-selbar { margin-left: auto; }
.se-paintbar { display: flex; align-items: center; gap: 4px; }
.se-paintbar[hidden] { display: none; }
.se-size { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.se-size i { display: block; border-radius: 999px; background: var(--ink-2); }
.se-size-s i { width: 6px; height: 6px; }
.se-size-m i { width: 11px; height: 11px; }
.se-size-l i { width: 17px; height: 17px; }
.se-size.on { border-color: var(--accent); }
.se-size.on i { background: var(--accent); }
.se-rub { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 0.8rem; cursor: pointer; }
.se-rub svg { width: 17px; height: 17px; }
.se-rub.on { border-color: var(--accent); color: var(--accent); }
.se-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: mark; }
.se-list li { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: 0.85rem; cursor: pointer; counter-increment: mark; }
.se-list li::before { content: counter(mark) "."; color: var(--ink-3); font-weight: 600; }
.se-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.se-words { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.se-rm { width: 24px; height: 24px; font-size: 0.75rem; }
.se-foot { display: grid; gap: 6px; }
.se-steps { display: flex; justify-content: center; gap: 10px; }
.se-step { width: 34px; height: 34px; padding: 7px; }
.se-step svg { width: 100%; height: 100%; }
.se-step:disabled { opacity: 0.35; }
.se-foot textarea, .se-ask textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.9rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); resize: none; }
.se-sent:empty { display: none; }
/* Send with AI+ beside it (js/smart-edit.js): a tick box in the app's gold */
.se-go { display: flex; align-items: center; gap: 10px; }
.se-go .btn { flex: 1; }
.se-plus { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: 0.85rem; cursor: pointer; user-select: none; }
.se-plus input { position: absolute; opacity: 0; width: 0; height: 0; }
.se-plus-mark { width: 16px; height: 16px; border: 1.5px solid var(--ink-3); border-radius: 4px; display: grid; place-items: center; }
.se-plus-mark::after { content: ''; width: 8px; height: 4px; border: solid #1a1206; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); opacity: 0; }
.se-plus:has(input:checked) { border-color: var(--accent); color: var(--ink); }
.se-plus:has(input:checked) .se-plus-mark { background: var(--accent); border-color: var(--accent); }
.se-plus:has(input:checked) .se-plus-mark::after { opacity: 1; }
.se-plus:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.se-sent { color: #f0b49a; font-size: 0.8rem; }
.se-ask { position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--inset-bottom, 0px)); z-index: 97; display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* a video on its way: Stop (js/tiles.js) */
.img-tile .tile-stop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; padding: 4px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 0.75rem; cursor: pointer; }
.vid-stop { margin: 2px 0 6px; }
/* a stopped or failed ask: its card's Retry (new words, js/videos.js) stands for the tiles' own */
.vid-ask:has(> .vid-again) .tile-retry { display: none; }

/* ---------- Compare videos (js/compare.js) ---------- */
.cmp-btn svg { width: 18px; height: 18px; }
.cmp-pick { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: var(--bg); padding: calc(10px + var(--inset-top, 0px)) 12px calc(76px + var(--inset-bottom, 0px)); }
.cmp-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 6px; }
.cmp-head b { font-size: 1.05rem; }
.cmp-note { margin: 0 2px 8px; }
.cmp-list { overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.cmp-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cmp-card[hidden] { display: none; }
.cmp-card.on { border-color: var(--busy); box-shadow: 0 0 0 1px var(--busy); }
.cmp-thumb { position: relative; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: #000; }
.cmp-thumb .vid-still { width: 100%; height: 100%; }
.cmp-check { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; display: none; place-items: center; background: var(--busy); color: #1d1606; font-weight: 800; font-size: 0.75rem; }
.cmp-card.on .cmp-check { display: grid; }
.cmp-text { display: grid; gap: 4px; align-content: start; min-width: 0; }
.cmp-kind { color: var(--ink-3); font-size: 0.72rem; }
.cmp-words { margin: 0; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-prompt { margin: 0; font-size: 0.74rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmp-loras { margin: 0; font-size: 0.68rem; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-go { position: fixed; right: 16px; bottom: calc(18px + var(--inset-bottom, 0px)); z-index: 71; padding: 12px 20px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.cmp-view { position: fixed; inset: 0; z-index: 70; background: #000; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: calc(44px + var(--inset-top, 0px)) 8px calc(8px + var(--inset-bottom, 0px)); }
.cmp-back { position: absolute; top: calc(6px + var(--inset-top, 0px)); right: 8px; z-index: 2; color: #fff; }
.cmp-grid { --cols: 2; --rows: 1; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); gap: 6px; min-height: 0; }
.cmp-cell { position: relative; min-height: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #000; display: grid; place-items: center; }
/* (pinned to the cell's edges: height 100% of a grid cell came out as the video's own height on a laptop, cropped:
   Faris 2026-10-29, "compare in laptop shows video zoomed in") */
.cmp-cell video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.cmp-cell.loading::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgb(255 255 255 / 20%); border-top-color: var(--accent); animation: vb-spin 0.9s linear infinite; }
.cmp-cell.lit { border-color: var(--busy); }
.cmp-tpl { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); font-size: 0.68rem; max-width: 46%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; background: color-mix(in srgb, var(--tpl, #888) 35%, rgb(0 0 0 / 60%)); }
.cmp-stats { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 6px; padding: 1px 7px; border-radius: 999px; background: rgb(0 0 0 / 55%); font-size: 0.6rem; font-weight: 600; line-height: 1.6; font-variant-numeric: tabular-nums; color: #ccc; pointer-events: none; }
.cmp-stats .cmp-render { color: var(--time-render); }
.cmp-stats .cmp-steps { color: #d86a88; }
.cmp-num { position: absolute; top: 5px; left: 6px; padding: 1px 7px; border-radius: 999px; background: rgb(0 0 0 / 55%); color: #ddd; font-size: 0.68rem; pointer-events: none; }
.cmp-out { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 60%); color: #fff; font-size: 0.8rem; line-height: 1; cursor: pointer; }
.cmp-bar { display: grid; gap: 6px; padding: 10px 6px 4px; color: #eee; }
.cmp-bar .bs-knob { border-color: #000; }
.cmp-row { display: flex; align-items: center; gap: 10px; }
.cmp-play, .cmp-sound { position: relative; flex: none; width: 18px; height: 18px; padding: 3px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 12%); color: #fff; cursor: pointer; }
.cmp-play svg, .cmp-sound svg { width: 100%; height: 100%; display: block; }
.cmp-seek, .cmp-speed { flex: 1; min-width: 0; accent-color: var(--accent); }
.cmp-time { flex: none; min-width: 2.6em; font-variant-numeric: tabular-nums; color: #bbb; }
.cmp-lbl { flex: none; color: #999; font-size: 0.72rem; }
.cmp-speed-v { flex: none; min-width: 3.6em; padding: 2px 6px; border: 0; border-radius: 8px; background: none; color: #ddd; font: inherit; font-size: 0.78rem; font-variant-numeric: tabular-nums; cursor: pointer; }

/* a card's details: its seed, model and megapixels on top, small chips (js/tiles.js waitDetails) */
.wd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.wd-chip { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; max-width: 100%; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.78rem; }
.wd-chip small { color: var(--ink-3); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; }
.wd-chip b { font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-chip.seed { cursor: copy; }
.wd-chip.seed.done { border-color: var(--fresh); }
.wd-chip.model b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.74rem; }

/* ---------- the app's big slider (js/slider.js): ticks at its stops, its value in its knob ---------- */
.bs { position: relative; flex: 1; min-width: 0; height: 38px; touch-action: none; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; --bs-c: var(--accent); --bs-y: 26px; }
.bs-rail { position: absolute; inset: 0 10px; }
/* the Steps slider's burgundy (Faris 2026-10-29) */
.bs.bs-pink { --bs-c: var(--time-render); }
.bs.bs-burgundy { --bs-c: #8e2443; --bs-label: #e48aa3; }
.bs-val { position: absolute; top: 2px; transform: translateX(-50%); font-size: 0.7rem; font-weight: 700; line-height: 1; white-space: nowrap; color: var(--bs-label, var(--bs-c)); font-variant-numeric: tabular-nums; pointer-events: none; }
.bs-track { position: absolute; left: 0; right: 0; top: var(--bs-y); height: 3px; margin-top: -1.5px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 16%, transparent); }
.bs-fill { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--bs-c); }
.bs-ticks { position: absolute; left: 0; right: 0; top: var(--bs-y); height: 0; pointer-events: none; }
.bs-tick { position: absolute; top: 4px; width: 1.5px; height: 5px; margin-left: -0.75px; border-radius: 1px; background: color-mix(in srgb, var(--ink) 38%, transparent); }
.bs-tick.end { height: 7px; background: color-mix(in srgb, var(--ink) 55%, transparent); }
.bs-tick.mid { top: -8px; height: 16px; width: 2px; margin-left: -1px; background: color-mix(in srgb, var(--ink) 70%, transparent); }
.bs-knob { position: absolute; top: var(--bs-y); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--bs-c); border: 2px solid var(--surface, #1b1916); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bs-c) 70%, transparent), 0 2px 6px rgb(0 0 0 / 30%); transition: transform 0.15s ease, box-shadow 0.15s ease; pointer-events: none; }
.bs.held .bs-knob, .bs:focus-visible .bs-knob { transform: scale(1.12); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bs-c) 70%, transparent), 0 0 0 6px color-mix(in srgb, var(--bs-c) 16%, transparent), 0 2px 6px rgb(0 0 0 / 30%); }

/* An ⓘ's words with a mouse (js/tips.js): beside it, never over it, never taking the pointer */
.hover-tip { position: fixed; z-index: 400; max-width: min(340px, calc(100vw - 16px)); padding: 8px 11px; border-radius: 10px; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 0.8rem; line-height: 1.45; white-space: pre-line; pointer-events: none; }

/* The Smart change on a laptop (js/smart-edit.js): the picture fills the height on the left, a 360 px column on the
   right holds the bars, the marks, the words, AI+ and Send, and the settings; on a phone the column is no box at all */
.se-side { display: contents; }
@media (min-width: 1000px) {
  .se-view { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto minmax(0, 1fr); gap: 12px 22px; padding: 14px 22px; overflow: hidden; }
  .se-head { grid-column: 1 / -1; }
  .se-stage { grid-column: 1; grid-row: 2; min-height: 0; align-items: center; }
  .se-img { max-height: calc(100dvh - 92px); }
  .se-side { display: flex; flex-direction: column; gap: 8px; grid-column: 2; grid-row: 2; min-height: 0; overflow-y: auto; padding-right: 2px; }
  .se-side > * { flex-shrink: 0; }
  .se-side .se-foot textarea { max-height: 38vh; }
  .se-side .se-set { padding: 4px 0 6px; border-bottom: 1px solid var(--line); }
  .se-ask { left: auto; right: 22px; width: 360px; }
  /* a mark's words beside its pin (js/smart-edit.js pinBeside), a small pointer at the pin */
  .se-ask.at-pin { right: auto; bottom: auto; width: 320px; box-shadow: 0 14px 40px rgb(0 0 0 / 28%); }
  .se-ask.at-pin::before { content: ''; position: absolute; top: var(--caret-y, 24px); width: 12px; height: 12px; background: var(--surface); border: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); }
  .se-ask.at-pin[data-side='right']::before { left: -7px; border-top: 0; border-right: 0; }
  .se-ask.at-pin[data-side='left']::before { right: -7px; border-bottom: 0; border-left: 0; }
  .se-ask.at-pin textarea { min-height: 5.5em; }
  /* Send its own size at the column's end, not stretched across it */
  .se-side .se-go { justify-content: space-between; }
  .se-side .se-go .btn { flex: none; padding-inline: 26px; }
}

/* The chat's picture cards on a laptop (Faris 2026-10-29: "Even the cards look too big… on laptop"): four to a row,
   not two, so a set of six is one look, not a screen each */
@media (min-width: 1000px) {
  .thread .img-tiles, .thread .img-tiles-row, .thread .tile-group .tg-body { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* The construct's Gallery, Videos & edits, LoRAs and Prompt on a laptop (Faris 2026-10-29: "the gallery in chat mode…
   made with phone only in mind… everything is way too big and zoomed"): a centred column, not the screen edge to edge;
   the Gallery two cards to a row, Videos & edits phone-wide cards several across; LoRAs and Prompt (forms)
   narrower. The phone keeps its own. */
@media (min-width: 1000px) {
  .media-sheet { --sheet-w: 1400px; }
  .media-sheet.lora-sheet, .media-sheet.replace-sheet { --sheet-w: 760px; }
  .media-head { padding-left: max(12px, calc((100% - var(--sheet-w)) / 2)); padding-right: max(76px, calc((100% - var(--sheet-w)) / 2)); }
  .media-sheet > .media-kinds { width: min(calc(100% - 32px), var(--sheet-w)); box-sizing: border-box; margin-inline: auto; }
  .media-body { padding-inline: max(16px, calc((100% - var(--sheet-w)) / 2)); }
  /* the Gallery (Faris 2026-10-29: "prompt text and info on image right"): two cards to a row, each its picture on the
     left, sized by its shape (portrait narrow, landscape wide), its words and details beside it */
  .media-kind-tabs { width: 320px; }
  .media-bar .media-folders { margin-inline: 0; padding-inline: 0; }
  .media-body:has(> .media-ask) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; align-content: start; align-items: start; }
  .media-body:has(> .media-ask) > :not(.media-ask) { grid-column: 1 / -1; }
  .media-body:has(> .media-ask) > .im-day { margin: 10px 0 -4px; }
  .media-ask { --pic-w: 230px; display: grid; grid-template-columns: var(--pic-w) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 16px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
  .media-ask[data-shape='square'] { --pic-w: 270px; }
  .media-ask[data-shape='wide'] { --pic-w: 360px; }
  .media-sheet .media-ask .img-tiles { grid-column: 1; grid-row: 1 / span 2; grid-template-columns: 1fr; margin: 0; }
  .media-ask > .vid-tag { grid-column: 2; grid-row: 1; margin: 0 0 4px; }
  .media-side { grid-column: 2; grid-row: 2; display: grid; gap: 10px; align-content: start; min-width: 0; }
  .media-ask:not(:has(> .vid-tag)) .media-side { grid-row: 1 / span 2; }
  .media-side .media-words { -webkit-line-clamp: 7; color: var(--ink); font-size: 0.9rem; }
  .media-side .media-more { margin-top: 0; padding: 0; background: none; border-radius: 0; font-size: 0.8rem; gap: 3px; }
  /* Videos & edits: cards as narrow as on a phone, several across (Faris 2026-10-29: "too wide for each card. can be
     much narrower"); inside each, the phone's own layout */
  .vids-list { grid-template-columns: repeat(auto-fill, minmax(340px, 400px)); align-items: start; }
  .vids-list > :not(.vid-ask) { grid-column: 1 / -1; }
  .vid-row[data-shape='wide'] { grid-template-columns: minmax(0, 1fr); } /* a landscape video: the card's width, its LoRAs under it */
}

/* A picture's panels in its full view on a laptop (a video from it, a change, its scores: js/tiles.js .rate-panel): a
   360 px column on the right, the picture in the space left of it, never under it; the phone keeps its corner box */
@media (min-width: 1000px) {
  .pic-view.rating { padding-right: 408px; }
  .pic-view .rate-panel { left: auto; right: 24px; bottom: auto; top: 50%; transform: translateY(-50%); width: 360px; max-height: calc(100dvh - 120px); overflow-y: auto; padding: 14px; }
  .pic-view .rate-panel textarea { min-height: 7.5em; }
}

/* A picture change's engine (js/edit-engine.js): a pill each, its dot and ring in its own colour when picked */
.ee-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ee-row[hidden] { display: none; }
.ee-pill { --ee: var(--accent); display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 0.8rem; cursor: pointer; }
.ee-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ee); opacity: 0.45; }
.ee-pill.on { border-color: var(--ee); color: var(--ink); background: color-mix(in srgb, var(--ee) 16%, var(--surface-2)); }
.ee-pill.on i { opacity: 1; }
/* a setting the engine picked has no use for (Qwen Edit: Likeness, Scene hold, Detail look, Edit strength, Change) */
.engine-off { opacity: 0.32; pointer-events: none; }

/* The LoRAs' Identity tab (js/media.js identityTab): the engine, then the identity settings, a column of their own */
.id-tab { display: grid; gap: 14px; padding: 14px 16px 24px; max-width: 560px; width: 100%; box-sizing: border-box; margin: 0 auto; }

/* Reply (js/shown.js): the one their next message is about, small over their box */
.reply-strip { display: flex; align-items: center; gap: 8px; padding: 4px 44px 6px 6px; font-size: 0.8rem; color: var(--accent); }
.reply-strip[hidden] { display: none; }
.reply-strip > svg { width: 16px; height: 16px; flex: none; }
.reply-strip > span:not(.reply-thumb) { flex: 1; min-width: 0; color: var(--ink-2); }
.reply-thumb { flex: none; width: 30px; height: 30px; border-radius: 6px; background: #000 center / cover no-repeat; border: 1px solid var(--line); }
.reply-strip .shown-x { width: 24px; height: 24px; font-size: 0.75rem; }

/* a video full screen (js/tiles.js playerFor): black around it, its bar at the bottom */
.pl-box:fullscreen { width: 100vw; height: 100vh; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; padding: 0 0 12px; background: #000; }
.pl-box:fullscreen .pl-stage video { width: 100%; height: 100%; object-fit: contain; }
.pl-box:fullscreen .pl-bar { padding: 0 16px; }

/* what it looked at (js/markdown.js [[looked:…]]): a quiet line with each picture small; a tap shows it full size */
.looked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 10px; }
.looked-t { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--ink-3); }
.looked-t svg { width: 15px; height: 15px; color: #4cc38a; }
.looked-pic { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #000; cursor: pointer; }
.looked-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* a gallery card's Reply (js/tiles.js): its top right, small and quiet until hovered */
.img-tile .tile-reply { position: absolute; top: 7px; right: 7px; z-index: 2; width: 26px; height: 26px; padding: 5px; border: 0; border-radius: 7px; background: rgb(0 0 0 / 50%); color: #eee; cursor: pointer; }
.img-tile .tile-reply svg { width: 100%; height: 100%; display: block; }
.img-tile .tile-reply:hover { background: var(--accent); color: var(--accent-ink); }
.media-sheet.picking .tile-reply { display: none; }

/* their message's Reply (js/app.js bubble): the picture or video small above their words */
.reply-chip { color: var(--ink-3); }
.reply-chip .reply-pic { padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; }
.reply-chip .reply-still { width: 40px; height: 40px; border-radius: 8px; background: #000 center / cover no-repeat; flex: none; }

/* Who must be on the app (js/update.js gate): over everything, cannot be closed, one button to Google Play */
.app-gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.app-gate-card { display: grid; justify-items: center; gap: 14px; max-width: 360px; text-align: center; }
.app-gate-icon { width: 76px; height: 76px; border-radius: 20px; }
.app-gate-card h2 { margin: 0; font-size: 1.35rem; }
.app-gate-card p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.app-gate-go { margin-top: 6px; padding: 12px 22px; border-radius: 999px; text-decoration: none; }

/* The developer's own view of a Home call (js/voice-dev.js; Settings › Voice ticks, his account only). Placed out of
   the ring's flow (.voice is absolute): times under it, memory pills above it. */
.vd-times { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 160px; display: grid; gap: 0; pointer-events: none; }
.vd-slot { position: relative; height: 16px; }
.vd-tidy { color: #c9a0ff; }
.home[data-sky='light'] .vd-tidy { color: #7a4fc4; }
.vd-time { position: absolute; inset: 0; display: flex; justify-content: center; align-items: baseline; gap: 4px; font: 500 0.74rem/16px var(--sans, system-ui); opacity: 0; transform: translateY(3px); transition: opacity 0.18s ease, transform 0.18s ease; white-space: nowrap; }
.vd-time b { font-weight: 700; font-size: 0.84rem; }
/* with Times on, the wake-ups and places under the ring make room for them */
.home.vd-times-on .wakes { top: calc(58% + 124px); }
.vd-time.in { opacity: 1; transform: none; }
.vd-time.out { opacity: 0; transition: opacity 1.2s ease; }
.vd-time.out.fast { transition: opacity 0.2s ease; }
.vd-heard { color: #5fd38a; }
.vd-thought { color: #f0b85a; }
.vd-voice { color: #7ab8ff; }
.home[data-sky='light'] .vd-heard { color: #1f8a4c; }
.home[data-sky='light'] .vd-thought { color: #a86a10; }
.home[data-sky='light'] .vd-voice { color: #2a6bc4; }
.vd-mems { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: max-content; max-width: 86vw; }
.vd-mem { font: 600 0.8rem/1 var(--sans, system-ui); padding: 7px 12px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-line); color: var(--sky-ink); backdrop-filter: blur(10px); cursor: pointer; opacity: 0; transform: translateY(4px); transition: opacity 0.25s ease, transform 0.25s ease; white-space: nowrap; }
.vd-mem.in { opacity: 1; transform: none; }
.vd-mem.out { opacity: 0; transition: opacity 1.2s ease; }
.vd-mark { color: var(--sky-acc); }
.vd-mem-forget .vd-mark { color: #e57373; }
.vd-card .vd-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3, var(--muted)); margin: 10px 0 4px; }
.vd-card .vd-where { font-size: 0.8rem; color: var(--ink-2, var(--muted)); margin-bottom: 4px; }
.vd-card .vd-text, .vd-card .vd-call { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.85rem/1.45 var(--sans, system-ui); margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.vd-card .vd-call { font-family: ui-monospace, monospace; font-size: 0.78rem; margin-top: 4px; }
.vd-card .vd-what, .vd-card .vd-said { font-size: 0.85rem; color: var(--ink-2, var(--muted)); margin: 4px 0; }
.vd-card.tall { width: min(560px, 100%); height: 88vh; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.vd-card.tall .vd-seen { flex: 1; min-height: 0; overflow: auto; display: grid; gap: 8px; align-content: start; padding-bottom: 8px; }
.vd-msg .vd-label { margin-top: 0; }
.vd-user .vd-text { border-color: color-mix(in srgb, #5fd38a 45%, var(--line)); }
.vd-assistant .vd-text, .vd-answer .vd-text { border-color: color-mix(in srgb, #f0b85a 45%, var(--line)); }
.vd-tool .vd-text { font-family: ui-monospace, monospace; font-size: 0.78rem; }
.vd-msg { position: relative; }
.vd-msg .vd-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vd-fold { font: 600 0.72rem/1 var(--sans); text-transform: none; letter-spacing: 0; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.vd-msg.folded .vd-text { max-height: 4.4em; overflow: hidden; mask-image: linear-gradient(#000 40%, transparent); }
.vd-fold-foot { display: block; margin: -12px auto 0; position: relative; width: 40px; height: 24px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 0.85rem; line-height: 1; cursor: pointer; }
.vd-msg.folded .vd-fold-foot { display: none; }
.vd-memory .vd-text, .vd-memcall { border-color: #b48cff !important; background: color-mix(in srgb, #b48cff 12%, var(--bg)) !important; }
.vd-memory > .vd-label { color: #b48cff; }
.vd-memcall { font-weight: 600; }
.st-voice-dev { display: grid; gap: 4px; }
.st-voice-dev .st-check { display: flex; flex-direction: row; align-items: center; gap: 12px; cursor: pointer; }
.st-voice .st-voice-dev .st-check b { display: inline; }
.st-voice .st-voice-dev .st-dev { display: inline-block; }
.st-voice-dev .st-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }

.vd-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 2px; }
.vd-pills .vd-mem { background: color-mix(in srgb, #b48cff 14%, var(--surface)); border-color: #b48cff; color: var(--ink); backdrop-filter: none; }
.vd-pop + .vd-pop { z-index: 91; }

/* What she read: the memory agent's button by the title, and the popup's border glowing green while it works */
.vd-card h3 { display: flex; align-items: center; gap: 8px; padding-right: 44px; }
.vd-agent-btn { width: 32px; height: 32px; flex: none; }
.vd-agent-btn svg { width: 17px; height: 17px; }
.vd-agent-btn:disabled { opacity: 0.5; }
.vd-agent-said { font-size: 0.85rem; margin: 0 0 6px; color: #39d07a; }
.vd-card.vd-working { border-color: #39d07a; animation: vd-glow 1.3s ease-in-out infinite; }
@keyframes vd-glow { 0%, 100% { box-shadow: 0 0 0 1px #39d07a, 0 0 6px rgb(57 208 122 / 25%); } 50% { box-shadow: 0 0 0 3px #39d07a, 0 0 22px rgb(57 208 122 / 55%); } }
@media (prefers-reduced-motion: reduce) { .vd-card.vd-working { animation: none; box-shadow: 0 0 0 2px #39d07a; } }

.vd-cut { display: inline-block; margin: 0 2px; padding: 1px 7px; border-radius: 99px; border: 1px solid color-mix(in srgb, #e57373 65%, transparent); background: color-mix(in srgb, #e57373 16%, transparent); color: #ef9a9a; font: 600 0.75rem/1.5 var(--sans); cursor: pointer; vertical-align: baseline; }
.vd-more { display: inline-block; margin: 0 2px; padding: 0 7px; border-radius: 99px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); background: none; color: inherit; opacity: 0.75; font: 700 0.75rem/1.4 var(--sans); cursor: pointer; vertical-align: baseline; }
.vd-more.open { opacity: 1; }
.vd-unsaid { opacity: 0.55; font-style: italic; }

/* the memory agent at work in What she read: the messages it reads glow green; one it took a note from stays marked */
.vd-msg.vd-reading .vd-text { border-color: #39d07a !important; animation: vd-glow 1.3s ease-in-out infinite; }
.vd-msg.vd-found .vd-text { border-color: #39d07a !important; box-shadow: 0 0 0 1px #39d07a; }
.vd-pills .vd-mem.vd-fresh { border-color: #39d07a; box-shadow: 0 0 10px rgb(57 208 122 / 45%); }
.vd-agent-btn.vd-clear { width: auto; padding: 0 12px; border-radius: 99px; font: 600 0.8rem/1 var(--sans); color: #39d07a; border-color: #39d07a; }

/* What she read: her instructions marked as system (red); pick, shrink to a gist, keep or go back; memory pills */
.vd-msg.vd-system .vd-text { border: 1.5px solid #e5484d !important; background: color-mix(in srgb, #e5484d 7%, var(--bg)) !important; }
.vd-msg.vd-system > .vd-label { color: #ef6b6f; }
.vd-head-left, .vd-head-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vd-head-right { margin-left: auto; }
.vd-msg .vd-label .icon-btn { width: 28px; height: 28px; flex: none; text-transform: none; font-size: 0.9rem; }
.vd-msg .vd-label .icon-btn svg { width: 16px; height: 16px; }
.vd-pick .vd-tick { opacity: 0; }
.vd-msg.picked .vd-pick { color: #39d07a; border-color: #39d07a; }
.vd-msg.picked .vd-pick .vd-tick { opacity: 1; }
.vd-msg.picked .vd-text { box-shadow: 0 0 0 1px #39d07a; }
.vd-keep { color: #39d07a; }
.vd-back { color: #f0b85a; }
.vd-gist .vd-text { border-style: dashed !important; border-color: #39d07a !important; }
.vd-gist > .vd-label { color: #39d07a; }
@property --vd-turn { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.vd-msg.vd-gisting .vd-text { border: 2px solid transparent !important; background: linear-gradient(var(--bg), var(--bg)) padding-box, conic-gradient(from var(--vd-turn), #39d07a, transparent 30%, #39d07a 50%, transparent 80%, #39d07a) border-box !important; animation: vd-turn 1.4s linear infinite; }
@keyframes vd-turn { to { --vd-turn: 360deg; } }
@media (prefers-reduced-motion: reduce) { .vd-msg.vd-gisting .vd-text { animation: none; border-color: #39d07a !important; } }
.vd-mp { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 99px; border: 1px solid #39d07a; background: color-mix(in srgb, #39d07a 14%, var(--surface)); color: var(--ink); font: 500 0.75rem/1.2 var(--sans); cursor: pointer; }
.vd-mp b { font-weight: 700; color: #39d07a; }
.vd-mp.vd-fresh { box-shadow: 0 0 10px rgb(57 208 122 / 45%); }
.vd-mem-row { display: block; width: 100%; text-align: left; padding: 10px 12px; margin: 6px 0 0; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 0.85rem/1.35 var(--sans); cursor: pointer; }
.vd-mem-row small { color: var(--ink-2, var(--muted)); }

/* his answer sizes on Home (js/voice-dev.js sizesPanel): two small sliders under the top bar, left */
.vd-sizes { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 60px); left: 12px; width: min(258px, 66vw); z-index: 6; display: grid; gap: 2px; padding: 4px 10px 2px 8px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); }
.vd-size-row { display: flex; align-items: center; gap: 6px; }
.vd-size-name { flex: none; width: 46px; display: grid; gap: 3px; font: 600 0.68rem/1 var(--sans); color: var(--sky-ink, var(--ink)); }
.vd-size-now { font: 600 0.6rem/1 var(--sans); color: var(--accent); white-space: nowrap; }
.vd-size-now:empty { display: none; }
.vd-sizes .bs { height: 34px; --bs-y: 22px; }
/* What she read: how long each message is; a gist's before → after */
.vd-count { font: 500 0.68rem/1 var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink-3, var(--muted)); white-space: nowrap; }
.vd-shrunk { width: 100%; text-align: left; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 4px; padding: 5px 9px; border-radius: 8px; background: color-mix(in srgb, #39d07a 12%, var(--bg)); border: 1px solid color-mix(in srgb, #39d07a 45%, transparent); font: 500 0.75rem/1.3 var(--sans); color: var(--ink-2, var(--muted)); }
.vd-was { text-decoration: line-through; opacity: 0.75; }
.vd-now { color: var(--ink); }
.vd-cut-by { margin-left: auto; color: #39d07a; font-weight: 700; }
.vd-cut-by.grew { color: #ef6b6f; }
.vd-pick.vd-off { visibility: hidden; pointer-events: none; }
.vd-msg[data-key] .vd-name, .vd-answer .vd-name { min-width: 2.6em; }
.vd-gist-tag { font: 700 0.66rem/1 var(--sans); color: #39d07a; padding: 3px 7px; border: 1px solid #39d07a; border-radius: 99px; white-space: nowrap; }

.vd-size-step { flex: none; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border-radius: 99px; border: 1px solid var(--glass-line); background: none; color: var(--sky-ink, var(--ink)); font: 600 0.9rem/1 var(--sans); cursor: pointer; }
.vd-size-step:active { background: var(--glass); }

.vd-shrunk::after { content: '▾'; margin-left: 6px; color: #39d07a; }
.vd-shrunk.open::after { content: '▴'; }
.vd-card .vd-text.vd-before { margin: 0 0 6px; opacity: 0.6; border-style: dashed !important; border-color: var(--line) !important; text-decoration: line-through; text-decoration-color: color-mix(in srgb, #ef6b6f 55%, transparent); }

/* the DEV tag on his Home pieces: at a corner of the box or button */
.vd-dev-corner { position: absolute; top: -6px; right: -6px; margin: 0; background: var(--bg, #111); }
.vd-seen-btn { position: relative; }

/* mute, left of the ring during a call (js/voice.js toggleMute): small and round; muted: red, slashed, the ring dims */
.voice-mute { position: absolute; top: 37px; right: calc(100% + 16px); transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1.5px solid var(--glass-line, rgb(255 255 255 / 30%)); background: var(--glass, transparent); color: var(--sky-ink, var(--ink)); backdrop-filter: blur(8px); cursor: pointer; transition: opacity 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.voice-mute svg { width: 18px; height: 18px; }
.voice-mute .slash { opacity: 0; }
.voice[data-state="off"] .voice-mute { opacity: 0; pointer-events: none; }
.voice[data-muted] .voice-mute { border-color: #ef6b6f; color: #ef6b6f; background: color-mix(in srgb, #ef6b6f 16%, transparent); }
.voice[data-muted] .voice-mute .slash { opacity: 1; }
.voice[data-muted] .voice-btn { opacity: 0.55; }

/* Live Transcribe (his, DEV): his last words as heard live, just above the ring; the memory pills sit above it */
.vd-livewords { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); max-width: 80vw; width: max-content; padding: 5px 12px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); color: var(--sky-ink, var(--ink)); font: 500 0.82rem/1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; opacity: 0; transition: opacity 0.25s ease; }
.vd-livewords.in { opacity: 1; }
.vd-livewords.out { opacity: 0; transition: opacity 1.4s ease; }
.vd-livewords.vd-live-state { font-size: 0.72rem; color: var(--accent); }
.voice.vd-live-on .vd-mems { bottom: calc(100% + 50px); }

/* What she read never scrolls sideways: a long head wraps its buttons under it, the list clips */
.vd-card.tall .vd-seen { overflow-x: hidden; }
.vd-msg .vd-label { flex-wrap: wrap; row-gap: 4px; }
.vd-head-left { flex-wrap: wrap; }

/* his own voice, cloned (Settings › Voice, DEV: js/voice-clone.js) */
.vc { display: grid; gap: 8px; }
.vc-read { margin: 0; padding: 10px 12px; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--surface); font: 0.95rem/1.5 var(--serif, var(--sans)); }
.vc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vc-try { display: grid; gap: 8px; }
.vc-text { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 0.95rem var(--sans); }
.vc-lang { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 0.9rem var(--sans); }
.vc-said { font-style: italic; }
