/* Orea Studio: chuchubi's shell (static/index.html there), same tokens, same
   floating rail + main, so chat.galvangroup.co and orea.galvangroup.co read as
   one product. Tokens were read off the rendered site, not eyeballed.

   Design v2 (2026-10-22, Quintin's pick "current"): the Precept portal system
   in today's colours. Performance (same day, measured, CPU x4, editor scroll):
   no backdrop blur anywhere (it re-blurred the scrolling text every frame), the
   grain drawn into the ground instead of a blended overlay: 23 -> 60 fps at
   70 segments, 22 -> 51 at 435. content-visibility on the speaker blocks was
   tried and measured WORSE for scrolling (43 vs 51 fps at 435): each block is
   laid out as it enters the viewport, every frame. Do not add it back. Same slate navy and lime; glass panels over a textured
   ground, General Sans + Instrument Serif + JetBrains Mono, larger radii, and
   motion that carries meaning. Reference: project-docs
   standards/staging/gi-studios-themes.html?theme=current. */
:root {
  --bg: #0f172a; --panel: #1e293b; --panel-2: #334155;
  --line: rgba(255,255,255,.12); --ink: #f8fafc;
  --muted: #aab3c2; --faint: #8792a6;   /* faint: 5.7:1 on navy, 5.1 rail, 4.7 panel (WCAG AA for small text) */
  --edge: rgba(255,255,255,.09); --spec: rgba(255,255,255,.11); --glass: rgba(255,255,255,.028);
  --inputbg: rgba(255,255,255,.035); --chip: rgba(255,255,255,.05); --hover: rgba(255,255,255,.05);
  --accent-soft: color-mix(in srgb, #c1fe00 8%, transparent); --accent-ink: #cbff4d;
  --accent-glow: color-mix(in srgb, #c1fe00 40%, transparent); --on-accent: #101403;
  --ease: cubic-bezier(.22,.61,.36,1); --spring: cubic-bezier(.34,1.56,.64,1);
  --accent: #c1fe00; --accent-dim: #577200;
  --grid-dot: rgba(255,255,255,.05);
  --hero-glow: color-mix(in srgb, #c1fe00 22%, transparent);
  --good: #7dd3a0; --warn: #f0a868; --bad: #f08a8a;
  --r-sm: 7px; --r-md: 11px; --r-lg: 18px;
  --font: 'General Sans', 'Albert Sans', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
  --rail: 268px;
  /* one hue per speaker, in order of talk time; hue alone never carries
     meaning, the label is always printed too */
  --spk0: #c1fe00; --spk1: #7dd3fc; --spk2: #f0a868; --spk3: #f9a8d4;
  --spk4: #a5b4fc; --spk5: #86efac; --spk6: #fcd34d; --spk7: #fda4af;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--ink); background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(55% 45% at 12% -4%, color-mix(in srgb, #c1fe00 9%, transparent), transparent 62%),
    radial-gradient(42% 38% at 92% 6%, color-mix(in srgb, #3b6fd8 16%, transparent), transparent 70%),
    radial-gradient(60% 55% at 70% 110%, color-mix(in srgb, #2fae8a 9%, transparent), transparent 65%),
    radial-gradient(120% 90% at 12% -5%, #1a2540 0%, #0f172a 58%);
  background-size: 150px 150px, auto, auto, auto, auto;
  background-attachment: fixed;
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: grid; grid-template-columns: var(--rail) 1fr; gap: 12px; padding: 12px;
}
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
a { color: var(--accent); }
[hidden] { display: none !important; }

/* ---------- rail ---------- */
.rail {
  position: relative; border: 1px solid var(--edge); border-radius: 20px;
  background: linear-gradient(to bottom, rgba(255,255,255,.05), rgba(255,255,255,.012) 22%, transparent 55%),
              color-mix(in srgb, var(--panel) 80%, transparent); 
  box-shadow: inset 0 1px 0 var(--spec), 0 30px 80px -40px rgba(0,0,0,.8);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.rail__top { padding: 18px 16px 12px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; }
.brand__logo { height: 26px; width: auto; display: block; }
.brand__sub { font-family: var(--serif); font-size: 21px; letter-spacing: 0; text-transform: none; color: var(--ink); margin-top: 10px; line-height: 1.1; }
/* The product switcher (2026-09-15): two tiles under the logo, this app and
   the chat, one account, one click. Same shape as the sign-in chooser. */
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 12px; padding: 4px;
  background: var(--inputbg); border: 1px solid var(--edge); border-radius: 13px; box-shadow: inset 0 1px 0 var(--spec); }
.switch a, .switch span {
  display: block; padding: 8px 8px; border-radius: 9px; border: 0; color: var(--muted); text-decoration: none;
  font-size: 13px; font-weight: 600; line-height: 1.25; text-align: center; transition: color .2s var(--ease), background .2s var(--ease);
}
.switch span { color: var(--on-accent); background: var(--accent); box-shadow: 0 8px 22px -10px var(--accent-glow); }
.switch a:hover, .switch a:focus-visible { color: var(--ink); background: var(--hover); outline: none; }
.switch small { display: block; font: 500 9px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: inherit; opacity: .7; }
.rail__new {
  margin-top: 12px; width: 100%; padding: 10px 12px; cursor: pointer; text-decoration: none; color: var(--ink);
  background: var(--chip); border: 1px solid var(--edge); border-radius: var(--r-md); box-shadow: inset 0 1px 0 var(--spec);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.rail__new:hover { border-color: var(--accent); transform: translateY(-1px); }
.kbd { font-family: var(--mono); font-size: 10.5px; color: var(--faint); border: 1px solid var(--edge); border-radius: 6px; padding: 3px 6px; }
.rail__scroll { overflow-y: auto; flex: 1; padding: 10px 10px 16px; min-height: 0; }
.rail__label { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 16px 6px 9px; }
.rec { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; cursor: pointer; text-decoration: none;
  background: transparent; border: 0; border-radius: var(--r-md); padding: 9px 10px; margin-bottom: 2px;
  font-size: 13.5px; color: var(--muted); transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease); }
.rec:hover { background: var(--hover); color: var(--ink); transform: translateX(2px); }
.rec[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.rec[aria-current="true"]::before { content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%); width: 3px; height: 20px;
  border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px 1px var(--accent); }
.rec__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec__meta { font-family: var(--mono); font-size: 11px; color: var(--faint); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--faint); }
.dot--done { background: var(--good); } .dot--failed { background: var(--bad); }
.dot--busy { background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: dot-pulse 2.2s infinite; }
@keyframes dot-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.rail__foot { border-top: 1px solid var(--edge); padding: 12px 14px; font-size: 12px; color: var(--faint);
  display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.quota { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }
.meter { height: 4px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); width: 0; border-radius: 4px; box-shadow: 0 0 10px var(--accent-glow); transition: width .5s var(--ease); }
.rail__foot-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.rail__foot-acts a, .rail__foot-acts button { color: var(--muted); text-decoration: none; padding: 6px 11px; cursor: pointer;
  border: 1px solid var(--edge); border-radius: 999px; line-height: 1.2; background: var(--chip); font-size: 12px; transition: .2s var(--ease); }
.rail__foot-acts a:hover, .rail__foot-acts button:hover { color: var(--accent-ink); border-color: var(--accent); }
.badge { display: inline-block; margin-left: 5px; min-width: 15px; padding: 0 4px; font-size: 10px; line-height: 15px;
  text-align: center; font-weight: 600; color: var(--on-accent); background: var(--accent); border-radius: 999px; }

/* ---------- main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; isolation: isolate;
  border: 1px solid var(--edge); border-radius: 20px; overflow: hidden;
  background: color-mix(in srgb, var(--bg) 35%, transparent); box-shadow: inset 0 1px 0 var(--spec), 0 40px 100px -50px rgba(0,0,0,.9); }
.main::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 50% -10%, color-mix(in srgb, #c1fe00 10%, transparent), transparent 62%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, rgba(0,0,0,.35) 100%);
          mask-image: linear-gradient(to bottom, #000 55%, rgba(0,0,0,.35) 100%);
}
.scroll { position: relative; z-index: 1; overflow-y: auto; flex: 1; min-height: 0; padding: 32px 30px 64px; }
.inner { max-width: 820px; margin: 0 auto; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.8vw, 2.9rem); line-height: 1.06; margin: 0 0 .5rem; letter-spacing: 0; }
.lead { color: var(--muted); margin: 0 0 1.4rem; max-width: 56ch; }
.card { background: rgba(26,37,58,.72); border: 1px solid var(--edge); border-radius: 18px; 
  padding: 22px 22px 20px; margin: 0 0 18px; box-shadow: inset 0 1px 0 var(--spec);
  animation: rise .5s var(--ease) both; }
.card:nth-of-type(2) { animation-delay: .08s; } .card:nth-of-type(3) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card h2 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-family: var(--mono); font-weight: 500; margin: 0 0 14px; }
/* a <label> is inline by default: as an inline box its padding did not push
   the layout and the dashed border drew over the card heading (fixed 2026-09-12) */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1.5px dashed color-mix(in srgb, #c1fe00 32%, transparent);
  border-radius: 16px; padding: 28px 16px 24px; text-align: center; color: var(--muted); cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, #c1fe00 4%, transparent), color-mix(in srgb, #c1fe00 1%, transparent));
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease); }
.drop:hover, .drop.is-over { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--ink); }
.drop.is-over { background: color-mix(in srgb, #c1fe00 8%, transparent); }
.drop b { color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 21px; }
.drop__icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 15px; color: var(--accent);
  background: var(--accent-soft); line-height: 1; margin-bottom: 4px; transition: transform .4s var(--spring); }
.drop:hover .drop__icon { transform: translateY(-3px); }
.drop__text { font-size: 15px; }
.drop__sub { font-size: 12px; color: var(--faint); }
.drop input { display: none; }
.field small { display: block; font-size: 11.5px; color: var(--faint); margin-top: 5px; line-height: 1.4; }
.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; margin-top: 16px; align-items: start; }
.field--wide { grid-column: 1 / -1; }          /* the title gets a full row: it is the one thing people type */
@media (max-width: 1100px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field input, .field select { width: 100%; padding: 10px 12px; background: var(--inputbg); border: 1px solid var(--edge); border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 var(--spec); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); font-size: 14.5px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field select option { background: var(--panel); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn { cursor: pointer; padding: 10px 16px; background: var(--chip); color: var(--ink); border: 1px solid var(--edge); border-radius: var(--r-md); text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; box-shadow: inset 0 1px 0 var(--spec);
  transition: transform .25s var(--ease), border-color .2s var(--ease), box-shadow .25s var(--ease); }
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; box-shadow: 0 10px 26px -10px var(--accent-glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px var(--accent-glow); }
.btn--danger:hover { border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: .4; cursor: default; transform: none; box-shadow: none; }
.btn--sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.fine { font-size: 12px; color: var(--faint); margin: 10px 0 0; }
.err { color: var(--bad); font-size: 13px; margin: 10px 0 0; }
.prog { margin-top: 12px; }
.prog .meter { height: 6px; border-radius: 6px; }
.prog small { display: block; font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 6px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th, .list td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--edge); vertical-align: middle; }
.list tbody tr { transition: background .2s var(--ease); }
.list tbody tr:hover { background: var(--hover); }
.list td:first-child { border-radius: 10px 0 0 10px; } .list td:last-child { border-radius: 0 10px 10px 0; }
.list th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-family: var(--mono); font-weight: 500; }
.list tr:last-child td { border-bottom: 0; }
/* the recording's title only: the row's Open is an a.btn and must look like its Delete button */
.list a:not(.btn) { color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 400; font-size: 17px; }
.list a:not(.btn):hover { color: var(--accent); }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.empty { color: var(--faint); padding: 18px 0; }

/* ---------- editor ---------- */
.player { position: sticky; top: 0; z-index: 3; padding: 16px 28px 14px; border-bottom: 1px solid var(--edge);
  background: color-mix(in srgb, var(--bg) 94%, transparent); 
  box-shadow: 0 12px 30px -24px rgba(0,0,0,.9); }
.player audio { width: 100%; display: block; }
.player__title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.player__title h1 { font-size: 1.65rem; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk { margin: 0 0 22px; padding-left: 12px; border-left: 3px solid var(--spk); }
.blk__who { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--spk); font-family: var(--mono); margin: 0 0 6px; }
.blk__who input { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: transparent; border: 0;
  border-bottom: 1px dashed transparent; padding: 0; min-width: 8ch; }
.blk__who input:hover, .blk__who input:focus { border-bottom-color: var(--spk); outline: none; }
.seg { display: grid; grid-template-columns: 5.2rem 1fr auto; gap: 8px; align-items: start; padding: 6px 8px; border-radius: 12px;
  transition: background .3s var(--ease), box-shadow .3s var(--ease); }
.seg:hover { background: rgba(255,255,255,.03); }
.seg.is-now { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.seg time { font-family: var(--mono); font-size: 11px; color: var(--faint); cursor: pointer; padding-top: 5px; }
.seg time:hover { color: var(--accent); }
.seg__text { min-width: 0; padding: 2px 6px; border-radius: 8px; white-space: pre-wrap; font-size: 15.5px; line-height: 1.75; }
.seg__text:focus { outline: 1px solid var(--accent); background: rgba(255,255,255,.035); box-shadow: 0 0 0 4px var(--accent-soft); }
.seg__tr { color: var(--muted); font-style: italic; }
.seg__tr:empty::before { content: "translation…"; color: var(--faint); }
.seg__acts { opacity: 0; display: flex; gap: 4px; }
.seg:hover .seg__acts, .seg:focus-within .seg__acts { opacity: 1; }
.seg__acts { transition: opacity .2s var(--ease); }
.seg__acts button { background: var(--chip); border: 1px solid var(--edge); border-radius: 999px; color: var(--faint); cursor: pointer; font-size: 11px; padding: 3px 9px; }
.seg__acts button:hover { color: var(--accent-ink); border-color: var(--accent); }
.w { }
.w--low { text-decoration: underline wavy var(--warn); text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  background: linear-gradient(transparent 64%, color-mix(in srgb, var(--warn) 13%, transparent) 64%); border-radius: 3px; }
.w--vlow { text-decoration-color: var(--bad); }
.w--oov { border-bottom: 1px dotted var(--faint); }
.seg--dropped .seg__text { color: var(--faint); text-decoration: line-through; }
.alts { position: absolute; z-index: 5; background: color-mix(in srgb, var(--panel) 98%, transparent); border: 1px solid var(--edge); border-radius: 14px; 
  padding: 7px; box-shadow: 0 24px 50px -18px rgba(0,0,0,.85), inset 0 1px 0 var(--spec); max-width: min(520px, 90vw); display: grid; gap: 2px;
  animation: pop-in .22s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.alts button { text-align: left; background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--ink); cursor: pointer; padding: 8px 10px; font-size: 14px; }
.alts button:hover { background: var(--hover); border-color: var(--edge); }
.alts small { font-family: var(--mono); color: var(--faint); font-size: 11px; margin-left: 8px; }
.alts__head { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--warn); padding: 5px 10px 8px; border-bottom: 1px solid var(--edge); margin-bottom: 4px; }
.w[data-s] { cursor: pointer; border-radius: 2px; transition: background .08s; }
.w[data-s]:hover { background: rgba(193,254,0,.16); box-shadow: 0 0 0 2px rgba(193,254,0,.16); }
.w.is-now { background: rgba(193,254,0,.22); }
.w[data-wi] { cursor: pointer; }
.w[data-wi]:hover { background: rgba(240,168,104,.18); border-radius: 2px; }
/* the how-to: pinned beside the transcript on a wide screen, a collapsible strip above it otherwise */
.scroll { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; column-gap: 28px; }
.help { grid-column: 1; grid-row: 1; margin: 0 0 20px; font-size: 12.5px; color: var(--muted); padding: 14px 16px 14px;
  border: 1px solid var(--edge); border-radius: 16px; box-shadow: inset 0 1px 0 var(--spec); 
  background: linear-gradient(160deg, rgba(193,254,0,.05), rgba(240,168,104,.03) 55%, rgba(96,165,250,.05)), rgba(26,37,58,.72); }
.inner { grid-column: 1; grid-row: 2; width: 100%; }
.help summary { cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); list-style: none; }
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: "▾"; margin-left: 8px; }
.help:not([open]) summary::after { content: "▸"; }
.help__grp { display: grid; gap: 8px; margin-top: 14px; padding-left: 10px; border-left: 3px solid var(--grp); align-content: start; }
.help__grp b { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--grp); }
.help__grp--marks { --grp: var(--warn); }
.help__grp--play { --grp: var(--accent); }
.help__grp--fix { --grp: #60a5fa; }
.help__grp > span { display: grid; gap: 3px; justify-items: start; }
.help__grp small { color: var(--faint); font-size: 11px; }
.help kbd { justify-self: start; font-family: var(--mono); font-size: 11px; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r-sm); padding: 1px 7px; white-space: nowrap; }
@media (min-width: 1280px) {
  .scroll { grid-template-columns: minmax(0, 1fr) 270px; }
  .inner { grid-column: 1; grid-row: 1; }
  .help { grid-column: 2; grid-row: 1; position: sticky; top: 0; margin: 0; }
  .help summary { pointer-events: none; }
  .help summary::after { content: none; }
}
@media (max-width: 1279px) {
  .help__body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .help__grp { margin-top: 10px; }
}
@media (max-width: 720px) { .help__body { grid-template-columns: 1fr; } }
.notice { background: rgba(26,37,58,.72); border: 1px solid var(--edge); border-left: 3px solid var(--warn);
  border-radius: 14px; padding: 12px 14px; margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.notice--bad { border-left-color: var(--bad); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9; background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 11px 16px; font-size: 13.5px; box-shadow: 0 22px 50px -20px rgba(0,0,0,.9);  animation: toast-in .3s var(--ease); max-width: calc(100vw - 32px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translateX(-50%); } }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  body { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .rail { border-radius: 0; border-left: 0; border-right: 0; max-height: 42vh; }
  .rail__scroll { max-height: 22vh; }
  .main { border-radius: 0; border: 0; }
  .scroll { padding: 18px 14px 60px; }
  .seg { grid-template-columns: 4.2rem 1fr; }
  .seg__acts { grid-column: 2; opacity: 1; }
}

/* ---------- the player (labs page language: bars, accent, a pulsing button) ---------- */
.plr { display: flex; align-items: flex-start; gap: 14px; }
.plr__btn { margin-top: 1px; }               /* centred on the 48 px wave, not on wave + controls */
.plr__btn { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 10px 24px -8px var(--accent-glow); transition: transform .3s var(--spring); }
.plr__btn:hover { transform: scale(1.06); }
.plr__btn svg { fill: currentColor; }
.plr__pause { display: none; } .plr.is-playing .plr__pause { display: block; } .plr.is-playing .plr__play { display: none; }
.plr.is-playing .plr__btn { animation: plr-pulse 1.6s ease-out infinite; }
@keyframes plr-pulse { 0% { box-shadow: 0 0 0 0 rgba(193,254,0,.35); } 70% { box-shadow: 0 0 0 14px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.plr__mid { flex: 1; min-width: 0; }
.plr__wave { position: relative; display: flex; align-items: center; gap: 2px; height: 48px; padding: 0 3px; cursor: pointer;
  border: 1px solid var(--edge); border-radius: 12px; background: rgba(0,0,0,.2); box-shadow: inset 0 1px 0 var(--spec); overflow: hidden; touch-action: none; }
.plr__wave:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.plr__wave i { display: block; flex: 1 1 0; min-width: 0; height: 100%; transform: scaleY(.08); transform-origin: center; background: var(--accent); opacity: .28; border-radius: 1px; }
.plr__wave i.is-played { opacity: 1; }
.plr__wave:hover i:not(.is-played) { opacity: .4; }
.plr__head { position: absolute; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 10px rgba(255,255,255,.55); pointer-events: none; }
.plr__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.plr__time { font-family: var(--mono); font-size: 12px; color: var(--faint); } .plr__time b { color: var(--ink); font-weight: 500; }
.plr__ctl { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.plr__ctl button { font: inherit; font-size: 11.5px; font-family: var(--mono); color: var(--muted); background: var(--chip); border: 1px solid var(--edge); border-radius: 999px; padding: 4px 9px; cursor: pointer; transition: .2s var(--ease); }
.plr__ctl button:hover { color: var(--accent-ink); border-color: var(--accent); }
.plr__ctl button.is-on { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.plr__speed { display: inline-flex; gap: 3px; margin-left: 6px; }
@media (prefers-reduced-motion: reduce) { .plr.is-playing .plr__btn { animation: none; } }
.plr__jump { position: fixed; right: 24px; bottom: 24px; z-index: 8; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 12px 28px -8px var(--accent-glow); }
.plr__jump:hover { filter: brightness(1.06); }
@media (max-width: 900px) { .plr__jump { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); } }

/* ---------- phone: the rail is a drawer behind a bar, like chat ---------- */
.mobilebar { display: none; } .navscrim { display: none; }
@media (max-width: 900px) {
  body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 0; padding: 0; height: 100dvh; }
  .mobilebar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--panel) 96%, transparent);
    border-bottom: 1px solid var(--edge); position: sticky; top: 0; z-index: 30; }
  .mobilebar__btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 11px; background: transparent; border: 1px solid var(--line);
    border-radius: var(--r-md); color: var(--ink); cursor: pointer; font-size: 13px; }
  .mobilebar__btn--accent { border-color: var(--accent-dim); color: var(--accent); margin-left: auto; text-decoration: none; }
  .mobilebar__logo { height: 20px; width: auto; }
  .mobilebar__burger { position: relative; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
  .mobilebar__burger::before, .mobilebar__burger::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
  .mobilebar__burger::before { top: -5px; } .mobilebar__burger::after { top: 5px; }
  .rail { position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(var(--rail), 84vw); max-height: none; border-radius: 0;
    transform: translateX(-100%); transition: transform .22s ease; padding-top: env(safe-area-inset-top); }
  body.nav-open .rail { transform: none; }
  .rail__scroll { max-height: none; }
  .navscrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / 55%); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  body.nav-open .navscrim { opacity: 1; pointer-events: auto; }
  .main { border: 0; border-radius: 0; min-height: 0; }
  .scroll { padding: 16px 14px 60px; }
  .player { padding: 10px 14px; }
  .plr { gap: 10px; } .plr__wave { height: 40px; } .plr__btn { width: 42px; height: 42px; }
  .plr__ctl button { padding: 3px 7px; font-size: 11px; } .plr__speed { margin-left: 2px; }
  /* player.js always draws 240 bars; at 2px gaps that is 478px of gap alone, wider
     than a phone's wave (~290px), so every bar shrank to nothing: the live phone
     view showed an empty box (found 2026-10-22). No gap here; the bars share the width. */
  .plr__wave { gap: 0; }
  .seg { grid-template-columns: 3.6rem 1fr; } .seg__acts { grid-column: 2; opacity: 1; }
  h1 { font-size: 1.6rem; }
}

/* ---------- motion stays meaningful, and optional ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
