/* Truffle's styles. The design tokens (colours, glass, motion curves) come from tokens.css, loaded just before this
   file; the markup and icons are in index.html. See packages/design-system/ for the rules these follow. */
:root{
  --dot-on:rgba(255,255,255,.24); --grad:#fff;
  color-scheme:dark; box-sizing:border-box;
  padding-top:max(12px,env(safe-area-inset-top,0px)); padding-bottom:max(12px,env(safe-area-inset-bottom,0px));
  padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px);
}
html{height:100%;scroll-padding-top:max(12px,env(safe-area-inset-top,0px));background:var(--edge-top-background)}
*,*::before,*::after{box-sizing:inherit}
body{
  margin:0;height:100%;height:calc(100dvh - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px)));color:var(--text);background:var(--edge-bottom-background);
  font-family:var(--font-sans);
  -webkit-font-smoothing:antialiased;display:flex;flex-direction:column;align-items:center;
  overflow:hidden;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;
}
/* Direct body children: main and the sheets transform, these viewport strips never do. */
.edge-top,.edge-bottom{position:fixed;left:0;right:0;z-index:13;pointer-events:none}
.edge-top{top:0;height:max(12px,env(safe-area-inset-top,0px))}
.edge-bottom{bottom:0;height:max(12px,env(safe-area-inset-bottom,0px))}
.edge-top::after,.edge-bottom::after{content:"";position:absolute;inset:0;pointer-events:none}
.edge-top::after{background:var(--edge-top-background)}
.edge-bottom::after{background:var(--edge-bottom-background)}
button,input{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.swap{display:grid}
.wheel.narration-unknown #fillG,.wheel.narration-unknown #buf,.wheel.narration-unknown #knob,.wheel.narration-unknown #lightG,.wheel.narration-unknown #ghost{visibility:hidden}
.time-tick{pointer-events:none}
.swap>span{grid-area:1/1;min-width:0}

/* ---------- header ---------- */
header{position:relative;z-index:6;width:100%;max-width:560px;display:grid;grid-template-columns:88px 1fr 88px;align-items:center;gap:6px;padding:6px 10px 0;height:58px;flex:none}
/* Phones: the header's notice (a cast being made, or another cast playing) floats over the top of the page instead of
   pushing it down, so the pill and wheel below never move when it comes or goes (the user asked for everything to
   stay put, 17 October 2026). The page keeps 8px for it; the content's top inset (applySize) clears the notice. */
@media (max-width:959px){
  header{align-items:start;margin-bottom:-50px;pointer-events:none}
  header .mid>*{pointer-events:auto}
}
.icon-btn{position:relative;width:44px;height:44px;border-radius:50%;border:0;background:none;cursor:pointer;display:grid;place-items:center;color:var(--text-2);transition:opacity .3s,background .15s,transform .15s}
.icon-btn:active{background:rgba(255,255,255,.08);transform:scale(.94)}
.icon-btn.off{opacity:0;pointer-events:none}
.badge{position:absolute;top:9px;right:8px;width:9px;height:9px;border-radius:50%;background:var(--grad);box-shadow:0 0 0 2px #000;transform:scale(0);transition:transform .3s var(--ease-pop)}
.badge.on{transform:scale(1)}
.spin{position:absolute;inset:4px;pointer-events:none;opacity:0;transition:opacity .3s}
.spin.on{opacity:1}
/* Small progress marks are white in dark (ink in light): colour belongs to the click wheel. */
#lg stop{stop-color:#fff}
.spin circle{fill:none;stroke:url(#lg);stroke-width:2;stroke-linecap:round;stroke-dasharray:22 200;transform-origin:center;animation:rot 1.1s linear infinite}
.spin:not(.on) circle{animation-play-state:paused}
@keyframes rot{to{transform:rotate(360deg)}}
.mid{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;align-items:center;height:44px;min-width:0}
.mid>*{grid-area:1/1;transition:opacity .3s,filter .3s,transform .4s var(--ease-settle)}
.mid>.hide{opacity:0;filter:blur(6px);transform:scale(.96);pointer-events:none}
.topic{max-width:100%;text-align:center;font-size:15px;font-weight:600;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.now{position:relative;isolation:isolate;max-width:100%;display:flex;align-items:center;gap:8px;height:40px;padding:0 4px 0 6px;border-radius:var(--radius-pill);cursor:pointer;
  /* The capsule's glass without its rim lines: the edge is only a faint top-lit glow. */
  background:var(--glass-control);backdrop-filter:blur(16px) saturate(1.6);-webkit-backdrop-filter:blur(16px) saturate(1.6);border:0;
  box-shadow:inset 0 1px 6px rgba(255,255,255,.07),inset 0 0 0 .5px rgba(255,255,255,.05),0 10px 26px rgba(0,0,0,.35)}
.now::after{content:"";position:absolute;inset:0;z-index:2;border-radius:inherit;filter:blur(8px);pointer-events:none;
  background:linear-gradient(45deg,rgba(255,255,255,.06) 0%,transparent 25%,transparent 75%,rgba(255,255,255,.06) 100%)}
.now:active{transform:scale(.97)}
.now svg.mini{flex:none}
.now .t{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
/* A title too long for its space glides across under soft faded edges, rests, and glides back (chrome.js, fitTitle). */
.mq{display:inline-block}
.topic.run,.now .t.run{text-overflow:clip;-webkit-mask-image:linear-gradient(90deg,transparent,#000 14px,#000 calc(100% - 14px),transparent);mask-image:linear-gradient(90deg,transparent,#000 14px,#000 calc(100% - 14px),transparent)}
.run>.mq{padding:0 14px;animation:mq var(--mq-time,8s) ease-in-out infinite}
@keyframes mq{0%,18%{transform:translateX(0)}50%,62%{transform:translateX(var(--mq-shift,0))}94%,100%{transform:translateX(0)}}
@media (prefers-reduced-motion:reduce){.run>.mq{animation:none;padding:0}.topic.run,.now .t.run{text-overflow:ellipsis;-webkit-mask-image:none;mask-image:none}}
.now .pp{flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--ground)}
/* A cast still being made: the ring fills as it records; nothing to play yet. */
.now.gen{padding-right:14px}
.now.gen .pp{display:none}

.hr{display:flex;justify-content:flex-end}
.hl{display:flex}

/* ---------- main ---------- */
/* Safe centring: when the content is taller than the space it overflows downward, never up under the header. */
main{flex:1;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;justify-content:safe center;gap:clamp(18px,3.4vh,32px);gap:clamp(18px,3.4svh,32px);min-height:0;
  /* The aura behind the wheel bleeds past the screen edge; clip it so phones do not widen the page and zoom out. */
  overflow-x:clip}
.info{text-align:center;padding:0 28px;width:100%;max-width:460px}
.label{font-size:14px;font-weight:500;color:var(--muted);margin:0 0 8px;font-variant-numeric:tabular-nums;height:1.3em;white-space:nowrap}
.title{font-size:calc(clamp(24px,6.8vw,30px) * var(--tk,1));font-weight:700;letter-spacing:-.025em;margin:0;line-height:1.15;height:calc(var(--tl,2.3) * 1em);align-content:center}
main.expanded .info{text-align:left}
.title>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-wrap:balance}
/* ---------- the player's pill (capsule.js; docs/truffle-unified-wheel.md "Rack + odometer") ----------
   One read-only piece of the dock's glass above the wheel: the source's logo, the cast's name and the minutes left on
   number drums. Home with a cast and the full player share it; the making screen keeps its progress wording. */
.cap{display:none}
/* Phones: the player sits from the top (its transcript opens downwards). Home has no wheel (it is for finding something
   new; docs/wikicasts-structure-build-plan.md) and stays centred, as main is everywhere else. */
@media (max-width:959px){
  main.player{justify-content:flex-start;padding-top:var(--content-top,clamp(50px,5.5svh,52px));margin-top:var(--content-pull,0px)}
}
main.player .label,main.player .title,main.player .ncap{display:none}
main.player .info{text-align:center}
main.player .cap{position:relative;display:inline-flex;align-items:center;justify-content:center;vertical-align:top;height:56px;box-sizing:border-box;
  max-width:min(var(--cap-max,300px),100%);padding:0 18px;border-radius:var(--radius-pill);text-align:left;
  background:var(--glass-control);backdrop-filter:blur(16px) saturate(1.6);-webkit-backdrop-filter:blur(16px) saturate(1.6);border:1px solid var(--hairline);
  box-shadow:inset 2px -2px 1px -1px rgba(255,255,255,.34),inset -2px 2px 1px -1px rgba(255,255,255,.34),
    inset 6px -6px 1px -6px rgba(255,255,255,.2),inset -6px 6px 1px -6px rgba(255,255,255,.2),
    inset 0 0 2px rgba(255,255,255,.22),0 10px 28px rgba(0,0,0,.6);
  transition:height .4s var(--ease-settle)}
:root[data-theme="light"] main.player .cap{border:0;background:var(--glass-fill);box-shadow:var(--glass);backdrop-filter:var(--glass-blur);-webkit-backdrop-filter:var(--glass-blur)}
/* Folded beside the 60 px play button, it is as tall as the button. */
main.player.expanded .cap{height:60px}/* Optically even: the eye measures to the digits, about 4 px inside their dark slot; digits→logo and logo→name both
   read as 14 px. */
.cmark{flex:none;width:22px;height:22px;margin-right:14px;border-radius:50%;display:grid;place-items:center;overflow:hidden;
  font:600 13px/1 Georgia,"Times New Roman",serif;background:#fff;color:#000}
.cmark.txt{border-radius:7px;font:700 12px/1 var(--font-sans);background:var(--hairline);color:var(--text-2)}
.cmark.img{border-radius:7px;background:none}
.cmark img{width:100%;height:100%;object-fit:contain;padding:2px;background:var(--publisher-logo-paper)}
:root[data-theme="light"] .cmark.w{box-shadow:0 0 0 1px rgba(22,24,34,.18)}
/* The name: letters placed one by one (a long one bends round a glass rod at its right end). */
.cname{position:relative;flex:0 1 auto;min-width:0;height:20px;white-space:nowrap}
.cname span{position:absolute;left:0;top:0;white-space:pre;font-size:15px;font-weight:600;letter-spacing:-.01em;line-height:20px;color:var(--text);will-change:transform,opacity}
/* The odometer: a narrow window sunk into the glass (darkest under its top edge, a hairline lip of light below), two
   drums 11 px wide with their faces lit across the middle, and "min". The drums come first; their gap to what follows
   is padding, so the name's room is measured with them (capsule.js). */
.odo{display:inline-flex;align-items:center;gap:5px;flex:none;padding-right:14px}
.ow{position:relative;display:inline-flex;gap:1.5px;height:24px;padding:0 2.5px;border-radius:6px;overflow:hidden;background:var(--odometer-slot);
  box-shadow:inset 0 1.5px 2px rgba(0,0,0,.95),inset 0 -.5px 0 rgba(255,255,255,.05),0 .5px 0 rgba(255,255,255,.13),0 -.5px 0 rgba(0,0,0,.5)}
.ow::after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;
  background:linear-gradient(rgba(0,0,0,.9),rgba(0,0,0,0) 34%,rgba(0,0,0,0) 66%,rgba(0,0,0,.9))}
.od{position:relative;flex:none;width:11px;height:24px;overflow:hidden;border-radius:1.5px;
  background:linear-gradient(#0a0a0c,#1c1c20 30%,#25252a 50%,#1c1c20 70%,#0a0a0c)}
.od i{position:absolute;left:0;right:0;top:50%;height:18px;margin-top:-9px;line-height:18px;text-align:center;font-style:normal;
  font-size:15px;font-weight:650;color:var(--odometer-digit);font-variant-numeric:tabular-nums;opacity:0;will-change:transform,opacity;text-shadow:0 .5px 0 rgba(0,0,0,.7)}
.ou,.odone{font-size:13px;font-weight:600;letter-spacing:.01em;color:var(--muted)}
.odone{display:none}
.odo.done .ow,.odo.done .ou{display:none}
.odo.done .odone{display:inline}
:root[data-theme="light"] .ow{box-shadow:inset 0 1.5px 2px rgba(40,34,24,.42),inset 0 -.5px 0 rgba(255,255,255,.4),0 .5px 0 rgba(255,255,255,.95),0 -.5px 0 rgba(40,34,24,.12)}
:root[data-theme="light"] .ow::after{background:linear-gradient(rgba(70,60,44,.42),rgba(70,60,44,0) 34%,rgba(70,60,44,0) 66%,rgba(70,60,44,.42))}
:root[data-theme="light"] .od{background:linear-gradient(#d9d5cd,#f2f0eb 30%,#fbfaf7 50%,#f2f0eb 70%,#d9d5cd)}
:root[data-theme="light"] .od i{text-shadow:none}
/* The rack: the wheel is the round gear, the pill a straight one. Fine teeth along its lower edge, facing the wheel,
   slide as far as the knob travels round the ring (capsule.js), faded at both ends. */
.rack{position:absolute;left:22px;right:22px;bottom:5px;height:4px;pointer-events:none;
  background:linear-gradient(90deg,currentColor 0 1.6px,transparent 1.6px) 0 0/6px 100% repeat-x;color:var(--text);opacity:.26;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 30%,#000 70%,transparent);mask-image:linear-gradient(90deg,transparent,#000 30%,#000 70%,transparent)}
:root[data-theme="light"] .rack{opacity:.3}
@media (prefers-reduced-motion:reduce){main.player .cap{transition:none}}
/* Sized from the visible height (svh ignores hidden toolbars less than vh does) and the space the other blocks leave. */
.stage{position:relative;width:min(74vw,330px,38vh);width:min(74vw,330px,38svh,max(200px,calc(100svh - 470px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))));aspect-ratio:1;flex:none}
.glow{position:absolute;width:52%;aspect-ratio:1;border-radius:50%;pointer-events:none;filter:blur(26px);transform:translate(-50%,-50%)}
svg.wheel{position:relative;width:100%;height:100%;display:block;touch-action:none;overflow:visible;outline:none}
.player svg.wheel{cursor:grab}
.player svg.wheel.dragging{cursor:grabbing}
.focus-ring{opacity:0;transition:opacity .15s}
svg.wheel:focus-visible .focus-ring{opacity:1}
.dot{transform-box:fill-box;transform-origin:center}
.ripple{position:absolute;inset:0;border-radius:50%;border:2px solid var(--accent);pointer-events:none;opacity:0}
/* The play glow: a soft blue light behind the play button that bursts toward you when part 1 is ready,
   then breathes until play is tapped. Opacity and scale only, so it composites. */
.beckon{position:absolute;left:30.5%;top:30.5%;width:39%;aspect-ratio:1;border-radius:50%;pointer-events:none;opacity:0;
  background:radial-gradient(circle,rgba(186,140,255,.95) 0 44%,rgba(150,95,255,.55) 55%,rgba(150,95,255,.18) 63%,rgba(150,95,255,0) 71%);transition:opacity .4s}
.beckon.on{animation:beckon 2.4s ease-in-out infinite}
@keyframes beckon{0%,100%{opacity:.5;transform:scale(1.15)}50%{opacity:1;transform:scale(1.6)}}
@media(prefers-reduced-motion:reduce){.beckon.on{animation:none;opacity:.6;transform:scale(1.3)}}
.center{
  position:absolute;left:50%;top:50%;width:39%;aspect-ratio:1;transform:translate(-50%,-50%);
  border-radius:50%;border:0;cursor:pointer;padding:0;
  /* Spun chrome, like a turned metal cap: fine circular brushing over a sheen that sweeps round the disc,
     darker toward the rim, with a polished bevel lit from above. All static, drawn once. */
  background:
    repeating-radial-gradient(circle at 50% 50%,rgba(255,255,255,.035) 0 .6px,rgba(0,0,0,.05) .6px 1.4px),
    radial-gradient(circle at 50% 50%,transparent 48%,rgba(0,0,0,.45) 100%),
    conic-gradient(from -40deg,#1e1e21,#5b5b61 9%,#26262a 20%,#18181b 32%,#4a4a50 45%,#222226 56%,#16161a 70%,#55555b 83%,#1e1e21);
  box-shadow:inset 0 1.5px 0 rgba(255,255,255,.35),inset 0 -1.5px 0 rgba(0,0,0,.6),inset 0 0 0 3px rgba(0,0,0,.35),inset 0 0 0 4px rgba(255,255,255,.07),0 14px 34px rgba(0,0,0,.6);
}
/* neon blue edge, 3 px, with a soft glow inside and outside */
.center::before{
  content:"";position:absolute;inset:0;border-radius:50%;pointer-events:none;
  box-shadow:var(--shadow-neon);
  display:grid;place-items:center;transition:transform .14s var(--ease-pop);
}
.center:active{transform:translate(-50%,-50%) scale(.93)}
.center .swap{place-items:center}
.center .swap>span{display:grid;place-items:center}
.center svg{display:block;filter:drop-shadow(0 1.5px 0 rgba(0,0,0,.55)) drop-shadow(0 -.6px 0 rgba(255,255,255,.3))}
.pct{font-size:22px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.pct b{font-weight:600}
.pct small{font-size:13px;color:var(--muted);font-weight:500;margin-left:1px}

/* ---------- bottom panels ---------- */
.bottom{position:relative;width:100%;max-width:560px;height:var(--bh,176px);flex:none;margin-bottom:12px}
.panel{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;gap:14px;
  transition:opacity .4s ease,filter .4s ease,transform .5s var(--ease-settle)}
.panel:not(.on){opacity:0;filter:blur(8px);transform:translateY(12px);pointer-events:none}
/* The generation panel reserves the card, notice and hint's actual height. */
.bottom:has(#pGen.on){height:auto;min-height:var(--bh,176px)}
#pGen.on{position:relative;inset:auto}
.generation-note{width:calc(100% - 40px);max-width:420px;margin:0;font-size:13px;line-height:1.35;font-weight:500;color:var(--muted);text-align:center;text-wrap:pretty}
@media(max-width:959px){.generation-note{font-size:11px}}
.pad{padding:0 20px;width:100%}

/* Ideas under the wheel: two small rows of the same drifting glass pills as the first-visit home. */
.strip{width:100%;display:flex;flex-direction:column}
.field{position:relative;height:58px;border-radius:var(--radius-pill);display:flex;align-items:center;padding:0 6px 0 22px;
  background:linear-gradient(var(--track-top),var(--track-bot));box-shadow:inset 0 0 0 1px var(--rim),0 0 0 1px #000}
.field input{flex:1;min-width:0;border:0;background:none;outline:none;font-size:17px;color:var(--text);caret-color:var(--accent);-webkit-user-select:text;user-select:text}
.field input::placeholder{color:var(--muted)}
.field input::-webkit-search-cancel-button{display:none}
.go{width:46px;height:46px;border-radius:50%;border:0;cursor:pointer;display:grid;place-items:center;flex:none;
  background:#48484b;color:var(--icon-dim);transition:background .25s,color .25s,transform .14s var(--ease-pop),box-shadow .25s}
.go.ready{background:#fff;color:var(--ground);box-shadow:0 2px 10px rgba(0,0,0,.35)}
.go:active{transform:scale(.9)}
/* Facts while you wait: one glass card at a time, like the idea pills, with the article's picture under a lens. */
.facts{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr);width:calc(100% - 40px);max-width:420px;margin-top:4px}
/* A stack: while more facts are coming, the edge of the next card shows under the current one. */
.facts::after{content:"";position:absolute;left:7%;right:7%;bottom:-7px;height:7px;border-radius:0 0 16px 16px;pointer-events:none;opacity:0;
  background:linear-gradient(var(--glass-content),var(--glass-content)),var(--ground);box-shadow:inset 0 -1px 0 rgba(255,255,255,.07),0 6px 14px rgba(0,0,0,.4);transition:opacity .4s}
.facts.more::after{opacity:1}
.factcard{grid-area:1/1;min-width:0;position:relative;isolation:isolate;display:flex;align-items:flex-start;gap:14px;padding:14px 18px 15px 14px;border-radius:var(--radius-card);text-align:left;
  background:radial-gradient(120px 90px at 34px 34px,rgb(var(--tint,60 60 64) / .28),transparent 70%),linear-gradient(var(--glass-content),var(--glass-content)),var(--ground);
  box-shadow:var(--shadow-card);transition:background .6s;z-index:1}
/* Solid: content glass laid on the ground colour, so a card hides the one behind it (same look on black). */
.factcard::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(40% 80% at 30% -20%,rgba(255,255,255,.14),transparent 70%)}
.factcard .lens{position:relative;flex:none;width:40px;height:40px;font-size:40px;margin-top:2px;
  box-shadow:var(--shadow-lens)}
.fx{min-width:0;flex:1;text-align:left}
/* The picture's credit under the fact: same voice as the eyebrow. Opens the picture's Wikimedia page. */
.fc{display:block;margin-top:6px;font-size:12px;line-height:1.3;font-weight:500;color:var(--muted);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;transition:opacity .3s}
.fc.on{opacity:1}
@media(hover:hover){.fc:hover{color:var(--text-2)}}
.lens{-webkit-touch-callout:none}
.fe{margin:0 0 4px;font-size:12px;font-weight:600;letter-spacing:.02em;color:var(--muted)}
.ft{margin:0;font-size:15px;line-height:1.38;font-weight:500;letter-spacing:-.01em;color:var(--text);text-wrap:pretty;
  display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.factcard .bar{display:block;height:11px;margin:7px 0 0;border-radius:6px;width:100%;
  background:linear-gradient(90deg,rgba(255,255,255,.06) 0%,rgba(255,255,255,.16) 50%,rgba(255,255,255,.06) 100%) 0 0/200% 100%;animation:shim 1.6s linear infinite}
.factcard .bar.short{width:62%}
@media(prefers-reduced-motion:reduce){.factcard .bar{animation:none}}
/* The tapped idea's picture, flying to where the wheel will be. */
.lens.flyer{position:fixed;z-index:4;margin:0;transform-origin:0 0;will-change:transform,opacity}
/* The end of a cast: saved, and what next. */
/* "In your casts": a small chip in the capsule's glass, with the Library icon; it opens Library. */
.kept{position:relative;isolation:isolate;display:flex;align-items:center;gap:7px;height:34px;padding:0 14px 0 11px;margin-top:4px;border:0;border-radius:var(--radius-pill);cursor:pointer;
  font-size:14px;font-weight:600;letter-spacing:-.01em;color:var(--text-2);
  background:var(--glass-control);box-shadow:var(--shadow-chip);transition:color var(--time-quick),transform .15s}
.kept::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(45deg,rgba(255,255,255,.07) 0%,transparent 25%,transparent 75%,rgba(255,255,255,.07) 100%)}
.kept[hidden]{display:none}
.kept svg{color:var(--muted)}
@media(hover:hover){.kept:hover{color:var(--text)}}
.kept:active{transform:scale(.96)}
#pEnd .new-h{margin-top:4px}
#pEnd .strip{margin-top:-6px}
.hintline{font-size:13px;color:var(--muted);text-align:center;margin:0;padding:0 24px}
.caption{font-size:16px;line-height:1.5;color:var(--text-2);text-align:center;margin:0;width:100%;padding:0 24px;transition:opacity var(--time-quick)}
.caption>span{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-wrap:pretty}
.caption.dim{opacity:.3}
.capwrap{display:grid;width:100%}
.capwrap>*{grid-area:1/1;transition:opacity .35s,filter .35s}
.capwrap>.hide{opacity:0;filter:blur(6px);pointer-events:none}
/* live transcript */
.tscript{height:var(--bh,120px);overflow:hidden;padding:0 24px;transition:opacity .35s,filter .35s}
.tscript.scrolled{-webkit-mask-image:linear-gradient(transparent,#000 30%,#000 72%,transparent);mask-image:linear-gradient(transparent,#000 30%,#000 72%,transparent)}
.tscript:not(.scrolled){-webkit-mask-image:linear-gradient(#000 72%,transparent);mask-image:linear-gradient(#000 72%,transparent)}
.tscript.dim{opacity:.3}
.tin{position:relative;font-size:19px;line-height:28px;font-weight:600;letter-spacing:-.012em;text-align:center;text-wrap:pretty;
  transition:transform .55s var(--ease-out)}
/* Spoken words fill left to right in their speaker's neon; unspoken words wait as a faint tint of it. */
.tin .w{--c:#f5f5f7;display:inline-block;color:transparent;-webkit-background-clip:text;background-clip:text;
  background-image:linear-gradient(90deg,var(--c) 50%,color-mix(in srgb,var(--c) 18%,rgb(255 255 255 / .1)) 50%);
  background-size:200% 100%;background-position:100% 0;transition:background-position var(--sweep,.34s) linear,filter .5s ease}
.tin .w.v0{--c:#ffffff}
.tin .w.v1{--c:#f2ff4d}
/* Speaker names (docs/truffle-ambience-control.md): each change of speaker starts a new line under the name, in the
   speaker's colour; a part's first turn has no space above. Casts with one speaker have none. */
.tin .who{display:block;margin:18px 0 2px;font-size:12px;line-height:18px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--speaker-a);opacity:.75}
.tin .who.v1{color:var(--speaker-b)}
.tin .tp>.who:first-child{margin-top:0}
.tin .w.s{background-position:0 0;filter:drop-shadow(0 0 6px color-mix(in srgb,var(--c) 60%,transparent))}
/* The word being spoken sits in a lens: the same lit glass puck as the speed track, gliding from word to word. */
.tin .tp{position:relative;z-index:1}
.wlens{position:absolute;left:0;top:0;z-index:0;border-radius:var(--radius-pill);background:var(--glass-lit);box-shadow:var(--shadow-puck);pointer-events:none;opacity:0;
  /* Moved every frame by transcript.js (eased there, together with the bent letters over it), so no transition on position. */
  transition:opacity .32s}
.wlens.on{opacity:1}
@media (prefers-reduced-motion:reduce){.wlens{transition:opacity .32s}}
/* Words bend under the lens (transcript.js, bendFrame): a bent copy of the letters it covers, clipped to the lens, over a hole
   in the real text. Spoken letters take the speaker's colour, the rest its faint tint; a red and blue fringe at the rim. */
.wbend{position:absolute;left:0;top:0;z-index:2;pointer-events:none;overflow:hidden;border-radius:var(--radius-pill);opacity:0;transition:opacity .2s}
.wbend.on{opacity:1}
.wbend .bw{position:absolute;left:0;top:0;white-space:nowrap;--u:color-mix(in srgb,var(--c) 18%,rgb(255 255 255 / .1))}
.wbend .l{display:inline-block;color:var(--u);transform-origin:50% 60%;transition:color .12s linear;
  text-shadow:calc(var(--fx,0px) * -1) 0 rgb(255 50 110 / var(--fa,0)),var(--fx,0px) 0 rgb(40 150 255 / var(--fa,0))}
.wbend .l.s{color:var(--c);text-shadow:0 0 6px color-mix(in srgb,var(--c) 60%,transparent),calc(var(--fx,0px) * -1) 0 rgb(255 50 110 / var(--fa,0)),var(--fx,0px) 0 rgb(40 150 255 / var(--fa,0))}
.tin .tp.holed{--r:calc(var(--hh) / 2);
  /* Everything, minus a pill where the lens is: two round ends and the straight part between them. */
  -webkit-mask-image:linear-gradient(#000 0 0),radial-gradient(closest-side,#000 97%,transparent),radial-gradient(closest-side,#000 97%,transparent),linear-gradient(#000 0 0);
  mask-image:linear-gradient(#000 0 0),radial-gradient(closest-side,#000 97%,transparent),radial-gradient(closest-side,#000 97%,transparent),linear-gradient(#000 0 0);
  -webkit-mask-size:100% 100%,var(--hh) var(--hh),var(--hh) var(--hh),calc(var(--hw) - var(--hh)) var(--hh);mask-size:100% 100%,var(--hh) var(--hh),var(--hh) var(--hh),calc(var(--hw) - var(--hh)) var(--hh);
  -webkit-mask-position:0 0,var(--hx) var(--hy),calc(var(--hx) + var(--hw) - var(--hh)) var(--hy),calc(var(--hx) + var(--r)) var(--hy);
  mask-position:0 0,var(--hx) var(--hy),calc(var(--hx) + var(--hw) - var(--hh)) var(--hy),calc(var(--hx) + var(--r)) var(--hy);
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-composite:source-out,source-over,source-over;mask-composite:subtract,add,add}
.tin .tp+.tp{margin-top:26px}
/* home: slow aura behind the ring */
.aura{position:absolute;inset:-26%;pointer-events:none;opacity:0;transition:opacity 1.4s ease}
.home .aura{opacity:.42}
.aura::before,.aura::after{content:"";position:absolute;inset:6%;filter:blur(40px)}
.aura::before{border-radius:44% 56% 52% 48%/55% 42% 58% 45%;
  background:conic-gradient(from 20deg,rgba(47,109,240,0),rgba(47,109,240,.7) 18%,rgba(122,92,246,0) 42%,rgba(122,92,246,.65) 63%,rgba(60,120,255,0) 86%);
  animation:rot 46s linear infinite,breathe 11s ease-in-out infinite alternate}
.aura::after{border-radius:58% 42% 47% 53%/45% 60% 40% 55%;
  background:radial-gradient(38% 34% at 28% 68%,rgba(122,92,246,.6),transparent 70%),radial-gradient(34% 38% at 72% 30%,rgba(47,109,240,.55),transparent 70%);
  animation:rot 67s linear infinite reverse,breathe 14s ease-in-out -5s infinite alternate}
@keyframes breathe{from{scale:.88;opacity:.7}to{scale:1.05;opacity:1}}
main:not(.home) .aura::before,main:not(.home) .aura::after{animation-play-state:paused}

/* ---------- open transcript ---------- */
main.player .stage,main.player .bottom,main.player .title,main.player .tin,main.player .tscript{transition:margin .5s var(--ease-out),width .5s var(--ease-out),height .5s var(--ease-out),font-size .5s var(--ease-out),line-height .5s var(--ease-out),opacity .35s,filter .35s}
main.live .stage,main.live .bottom,main.live .title,main.live .tscript,main.live .cap{transition:none!important}
main.live .tin{transition:transform .5s var(--ease-out)!important}
.tscript{touch-action:none;cursor:ns-resize}
/* Open, the text scrolls: no easing under the finger (it eases back when following resumes). */
main.expanded .tscript{cursor:grab}
.tscript.free .tin{transition:none}
.handle{position:absolute;left:50%;top:-6px;z-index:2;transform:translateX(-50%);width:64px;height:30px;border:0;border-radius:var(--radius-pill);cursor:pointer;
  display:grid;place-items:center;background:rgba(255,255,255,.06);color:var(--text-2);touch-action:none;transition:background .15s,opacity .3s}
.handle:hover{background:rgba(255,255,255,.1)}
.handle:active{background:var(--glass-lit)}
.handle svg{transition:transform .45s var(--ease-pop)}
.expanded .handle svg{transform:rotate(180deg)}
#pPlay{padding-top:34px}
@media (max-width:959px){main.player #pPlay .tscript{height:calc(var(--bh,176px) - 34px)}}
main.expanded .tin{text-align:left}
main.expanded .wheel{pointer-events:none}

/* ---------- frosted glass ---------- */
/* A light tint, heavy blur, a top-lit edge and fine grain, so it reads as frosted rather than just dark. */
.find-in,.toast{isolation:isolate;background:var(--frost);backdrop-filter:blur(30px) saturate(1.8) brightness(1.08);-webkit-backdrop-filter:blur(30px) saturate(1.8) brightness(1.08);
  box-shadow:var(--shadow-frost)}
.find-in::after,.toast::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;opacity:.08;mix-blend-mode:overlay;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}

/* ---------- toast ---------- */
.toast{position:fixed;top:calc(64px + env(safe-area-inset-top,0px));left:50%;z-index:12;display:flex;align-items:center;gap:10px;
  max-width:min(460px,calc(100vw - 32px));min-height:44px;padding:7px 7px 7px 10px;border-radius:var(--radius-card);border:0;cursor:pointer;
  color:var(--text);font-size:14px;font-weight:500;line-height:1.3;text-align:left;
  transform:translate(-50%,-8px) scale(.96);opacity:0;filter:blur(6px);pointer-events:none;
  transition:transform .45s var(--ease-pop),opacity .3s,filter .3s}
.toast.on{transform:translate(-50%,0);opacity:1;filter:none;pointer-events:auto}
/* Up to three lines, never off-screen. */
.toast #toastT{flex:1;min-width:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.toast .ti{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center}
.toast .ti.none{display:none}
.toast .ti.work{background:rgba(255,255,255,.08)}
.toast .ti.work svg{animation:rot 1s linear infinite}
.toast .ti.ok{background:var(--grad)}
.toast .ti.ok path{stroke:var(--ground)}
.toast .ti.bad{background:rgba(255,159,64,.18);color:var(--warn)}
@media (max-width:959px){
  /* Phones: full width inside the 16px gutter, just above the capsule. Up top while either search field, or a Keep
     sheet (which covers that spot), is showing. */
  .toast{width:calc(100vw - 32px);top:auto;bottom:calc(84px + env(safe-area-inset-bottom,0px));font-size:15px;transform:translate(-50%,16px) scale(.96)}
  body.finding .toast,body.lib-open:has(.sheet.searchable:not(.set)) .toast,body:has(.keep.on) .toast{top:calc(12px + env(safe-area-inset-top,0px));bottom:auto;transform:translate(-50%,-10px) scale(.96)}
  .toast.on,body.finding .toast.on,body.lib-open:has(.sheet.searchable:not(.set)) .toast.on,body:has(.keep.on) .toast.on{transform:translate(-50%,0)}
}
.toast .open{flex:none;padding:6px 12px;border-radius:var(--radius-pill);background:#fff;color:var(--ground);font-weight:600;font-size:13px}

/* ---------- library sheet ---------- */
/* Progressive blur overlay: stacked layers, each a fixed blur under a gradient mask.
   The container stays filter-free (no blur, filter or opacity) so each layer can blur the page behind it.
   Phones: heaviest at the bottom. Desktop overrides the direction below. */
.scrim{position:fixed;inset:0;z-index:8;pointer-events:none;--dir:to top;--d0:.86;--d1:.62;--d2:.38}
.scrim.on{pointer-events:auto}
.scrim .pb{position:absolute;inset:0;opacity:0;transition:opacity .35s;
  backdrop-filter:blur(var(--b));-webkit-backdrop-filter:blur(var(--b));
  -webkit-mask-image:linear-gradient(var(--dir),#000 var(--s),transparent var(--e));mask-image:linear-gradient(var(--dir),#000 var(--s),transparent var(--e))}
.scrim.on .pb{opacity:1}
.scrim .pb:nth-child(-n+2){display:none}
.scrim .pb:nth-child(3){--b:4px;--s:55%;--e:92%}
.scrim .pb:nth-child(4){--b:8px;--s:45%;--e:80%}
.scrim .pb:nth-child(5){--b:16px;--s:35%;--e:68%}
.scrim .pb:nth-child(6){--b:32px;--s:25%;--e:56%}
.scrim .pb.shade{backdrop-filter:none;-webkit-backdrop-filter:none;-webkit-mask-image:none;mask-image:none;
  background:linear-gradient(var(--dir),color-mix(in srgb,var(--page-background) calc(var(--d0)*100%),transparent),color-mix(in srgb,var(--page-background) calc(var(--d1)*100%),transparent) 42%,color-mix(in srgb,var(--page-background) calc(var(--d2)*100%),transparent) 100%)}
/* No sheet box: the heading and rows sit straight on the blur. */
.sheet{position:fixed;left:50%;bottom:0;z-index:9;width:calc(100% - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));max-width:520px;height:min(calc(100svh - 124px),720px);overflow:hidden;
  transform:translate(-50%,16px);opacity:0;visibility:hidden;
  transition:transform .45s var(--ease-settle),opacity .3s,visibility 0s .45s}
.sheet.on{transform:translate(-50%,0);opacity:1;visibility:visible;transition-delay:0s}
.sheet .item{background:transparent}
/* The cast open in the player is a faint piece of glass in the panel, with no edge lines. */
.sheet .item.cur{background:var(--glass-3)}
/* Headings stay for screen readers; the lit capsule button says which pane is open. */
.sheet .sh{position:absolute;width:1px;height:1px;margin:0;min-height:0;overflow:hidden;clip-path:inset(50%)}
/* Your casts (docs/truffle-library-directions.md): one panel with the Settings panel's surface and edges, above the
   capsule on phones and beside it on desktop. It starts at the top: a small label, the headings and rows, and the
   search at its foot. lib.style.height (library.js) holds the height the whole library gives it, so filtering never
   makes it jump; max-height lets it give way to a smaller window or the keyboard. */
.pane.l{padding:12px 12px var(--lb,calc(84px + env(safe-area-inset-bottom,0px)))}
.sheet.searchable .pane.l{--lb:max(calc(84px + env(safe-area-inset-bottom,0px)),calc(var(--kb,0px) + 10px))}
.lib{position:relative;isolation:isolate;flex:0 1 auto;min-height:0;max-height:100%;margin-top:auto;display:flex;flex-direction:column;padding:6px;border-radius:26px;
  background:var(--frost);backdrop-filter:blur(30px) saturate(1.8) brightness(1.08);-webkit-backdrop-filter:blur(30px) saturate(1.8) brightness(1.08);box-shadow:var(--shadow-frost)}
.lhead{flex:none;margin:0;padding:6px 10px 2px;font-size:12px;font-weight:600;color:var(--muted)}
.lsec{margin:0;padding:14px 10px 4px;font-size:12px;font-weight:600;color:var(--muted)}
.lsec:first-child,.list>[hidden]+.lsec:not([hidden]){padding-top:6px}
.lsec[hidden]{display:none}
/* Phones: Your casts is a place, a page of its own (docs/wikicasts-structure-build-plan.md): full screen on the ground,
   the page title, the rows, and the search at the bottom above the bar, as on New cast, with the pills just above it
   while it has focus (the keyboard lifts both, --lb). The same rows, lenses, rings and field as the panel; only the
   frosted slab and the Home behind it go. Large screens keep the panel over a dimmed, blurred Home, like Settings. */
@media (max-width:959px){
  .sheet:not(.set),.sheet.on:not(.set){left:0;top:0;bottom:0;width:100%;max-width:none;height:auto;transform:none;background:var(--ground);
    transition:opacity .28s var(--ease-out),visibility 0s .28s}
  .sheet.on:not(.set){transition:opacity .28s var(--ease-out),visibility 0s 0s}
  body.lib-open:has(.sheet:not(.set)) .scrim{display:none}
  body.lib-open:has(.sheet:not(.set)) header{visibility:hidden}
  .sheet:not(.set) .pane.l{padding:calc(14px + env(safe-area-inset-top,0px)) 12px calc(var(--lb,calc(84px + env(safe-area-inset-bottom,0px))) + 4px)}
  .sheet:not(.set) .lib{flex:1;margin:0;padding:0;max-height:none;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
  .sheet:not(.set) .lhead{order:0;padding:10px 8px 14px;font-size:30px;font-weight:700;letter-spacing:-.6px;color:var(--text)}
  .sheet:not(.set) .library-status{order:1}
  .sheet:not(.set) .list{order:2;flex:1;min-height:0;margin-top:4px;-webkit-mask-image:linear-gradient(transparent,#000 12px,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(transparent,#000 12px,#000 calc(100% - 24px),transparent)}
  .sheet:not(.set) .lpills{order:3;padding:8px 2px 0}
  .sheet:not(.set) .lfind{order:4;margin:10px 2px 0}
}
/* Both panes share one spot. Switching is depth: the pane you leave sinks back,
   the one you pick comes forward a beat later. */
.panes{position:absolute;inset:0}
.pane{position:absolute;inset:0;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom,0px);
  transition:opacity .38s var(--ease-settle),transform .5s var(--ease-settle),filter .4s;transition-delay:.08s}
.pane.s{overflow-y:auto;overscroll-behavior:contain}
.sheet:not(.set) .pane.s,.sheet.set .pane.l{opacity:0;transform:scale(.9);filter:blur(8px);pointer-events:none;visibility:hidden;
  transition:opacity .38s var(--ease-settle),transform .5s var(--ease-settle),filter .4s,visibility 0s .5s}
/* Opening straight onto a pane: the other one is already gone, no sinking on the way in. */
.sheet.jump .pane{transition:none!important}
@media(prefers-reduced-motion:reduce){
  .pane,.sheet:not(.set) .pane.s,.sheet.set .pane.l{transform:none;filter:none;transition:opacity .25s,visibility 0s .25s}
}
.sh{position:relative;display:flex;align-items:center;justify-content:space-between;margin:6px 10px 6px 20px;flex:none;min-height:44px}
.grab{display:none}
.sheet h2{font-size:22px;font-weight:700;letter-spacing:-.02em;margin:0;text-shadow:0 1px 12px rgba(0,0,0,.5)}
.list{overflow-y:auto;padding:0 8px;flex:1;min-height:0;-webkit-user-select:none;scrollbar-width:none}
.list::-webkit-scrollbar{display:none}
.sw-row{position:relative;overflow:hidden;transition:height .3s var(--ease-settle),opacity .25s}
.del{position:absolute;top:0;right:0;bottom:0;width:0;overflow:hidden;white-space:nowrap;transition:width .35s var(--ease-settle),opacity .15s;display:flex;justify-content:flex-end;align-items:center;padding-right:22px;border:0;cursor:pointer;
  background:var(--danger);color:#fff;font-size:15px;font-weight:600;opacity:0}
.sw-row.reveal .del{opacity:1}
.sw-row.dragging .del{transition:opacity .15s}
.sw-row.reveal .item{border-radius:0}
.item{position:relative;display:flex;align-items:center;gap:14px;width:100%;padding:10px 12px;border:0;border-radius:16px;cursor:pointer;text-align:left;
  background:var(--surface);touch-action:pan-y;transition:transform .35s var(--ease-settle),background .15s}
.item.drag{transition:background .15s}
.sheet .item:active{background:rgba(255,255,255,.04)}
.item .txt{flex:1;min-width:0}
/* Art: the article's picture in colour under a round lens (drawn once on a canvas; see art.js and lenses.js), with a soft
   shadow under the glass. No picture: the initial under plain glass. */
.art{position:relative;flex:none;width:48px;height:48px}
.lens{position:absolute;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle at 32% 26%,rgba(255,255,255,.14),transparent 55%),radial-gradient(circle,#2a2a2e,#18181b 72%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),inset 0 -2px 6px rgba(0,0,0,.5),0 8px 20px rgba(0,0,0,.5)}
.art .lens{inset:0;box-shadow:inset 0 1px 0 rgba(255,255,255,.22),inset 0 -2px 6px rgba(0,0,0,.5),0 4px 10px rgba(0,0,0,.45)}
.lens img{position:absolute;inset:0;width:100%;height:100%;opacity:0;transform:scale(.94);transition:opacity .5s ease,transform .6s var(--ease-out)}
.lens.has img{opacity:1;transform:none}
.lens.has{background:none}
.lens b{position:absolute;inset:0;display:grid;place-items:center;font-size:.46em;font-weight:700;color:rgba(255,255,255,.4);opacity:0;transition:opacity .4s}
.lens.ready:not(.has) b{opacity:1}
.art .lens{font-size:48px}
@keyframes shim{to{background-position:-200% 0}}
.item .nm{font-size:16px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .mt{font-size:13px;color:var(--muted);margin-top:2px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .mt{display:flex;align-items:center;gap:5px}
.item .ml{min-width:0;overflow:hidden;text-overflow:ellipsis}
/* The format beside the length: two speech bubbles for a conversation, quote marks for a narration. */
.lfmt{flex:none;display:grid;width:13px;height:13px;color:var(--muted)}
.lfmt svg{width:100%;height:100%}
/* The picture under the lens with the part heard round it, and the source's mark (Wikipedia's W or the publisher's
   icon) on its lower right in a rounded square, cut out of the panel by a ring of ground. */
.lw{position:relative;flex:none;width:56px;height:56px;margin:-4px 0 -4px -4px}
.lw .art{position:absolute;inset:6px;width:44px;height:44px}
.lw .art .lens{font-size:44px}
.lw .lens b{display:none}
.lw .lens.ready:not(.has){background:radial-gradient(circle at 32% 28%,var(--pa),transparent 62%),radial-gradient(circle at 72% 76%,var(--pb),transparent 60%),var(--pc)}
.lring{position:absolute;inset:0;width:56px;height:56px;transform:rotate(-90deg);pointer-events:none}
.lring circle{fill:none;stroke-width:2.5}
.lring .t{stroke:var(--hairline)}
.lring .f{stroke:var(--text);stroke-linecap:round;transition:stroke-dasharray .4s var(--ease-out)}
.lsrc{position:absolute;right:-1px;bottom:-1px;z-index:2;width:20px;height:20px;display:grid;place-items:center;overflow:hidden;border-radius:6px;box-shadow:0 0 0 2px var(--ground)}
.lsrc[hidden]{display:none}
.lsrc.w{background:#fff;color:#000;font:600 12px/1 Georgia,"Times New Roman",serif}
.lsrc.img{background:var(--publisher-logo-paper)}
.lsrc img{width:100%;height:100%;object-fit:contain;padding:2px}
:root[data-theme="light"] .lsrc.w{box-shadow:0 0 0 2px var(--ground),0 0 0 2.5px rgba(22,24,34,.18)}
/* The cast playing now: its playing bars over its dimmed picture. */
.lw .eq{position:absolute;left:50%;top:50%;z-index:1;transform:translate(-50%,-50%)}
.lw.playing .lens{filter:brightness(.5) saturate(.8)}
.sw-row.done .nm{color:var(--text-2)}
.sw-row.done .art{opacity:.6}
.eq{display:flex;gap:2px;align-items:flex-end;height:14px}
.eq i{width:3px;border-radius:1px;background:var(--grad);animation:eq .9s ease-in-out infinite}
.eq i:nth-child(2){animation-delay:-.3s}.eq i:nth-child(3){animation-delay:-.6s}
.eq.paused i{animation-play-state:paused}
@keyframes eq{0%,100%{height:4px}50%{height:14px}}
.empty{color:var(--muted);font-size:15px;text-align:center;padding:28px 20px 34px;margin:0}
/* Search your casts: a field at the foot of the Library pane, in the same glass as the field in +.
   16 px text, so phones do not zoom in when it is focused. */
/* One search field everywhere (docs/wikicasts-structure-build-plan.md): Home's (.ask), New cast's (sources.css) and
   this one: the flat hairline fill, a 15 px magnifier, 52 px tall, 16 px text, in both themes. */
.lfind{position:relative;z-index:2;flex:none;display:flex;align-items:center;gap:10px;height:52px;margin:6px 0 0;padding:0 6px 0 18px;
  border-radius:var(--radius-pill);background:var(--hairline);box-shadow:inset 0 0 0 .5px rgba(255,255,255,.08);color:var(--muted)}
.lfind[hidden]{display:none}
/* The rows scroll inside the panel, under the label and above the search. */
.lib .list{flex:1 1 auto;padding:0;-webkit-mask-image:linear-gradient(transparent,#000 10px,#000 calc(100% - 10px),transparent);mask-image:linear-gradient(transparent,#000 10px,#000 calc(100% - 10px),transparent)}
/* While the field has focus: flat pills for topics, publishers and formats, one row that scrolls sideways. Made like
   the field they sit with (a hairline fill, no shadow, text-2). A chosen one moves into the field as a token. */
.lpills{flex:none;display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:6px 2px 0;
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent)}
.lpills::-webkit-scrollbar{display:none}
.lpills[hidden]{display:none}
.lpill{flex:none;height:32px;padding:0 13px;border:0;border-radius:var(--radius-pill);background:var(--hairline);font:500 14px/32px var(--font-sans);color:var(--text-2);white-space:nowrap;cursor:pointer;transition:transform .14s var(--ease-pop),background .2s}
.lpill:active{transform:scale(.96);background:var(--rim)}
@media(hover:hover){.lpill:hover{color:var(--text)}}
.ltoken{flex:none;display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 4px 0 12px;margin-left:-6px;border-radius:var(--radius-pill);background:var(--glass-lit);font-size:14px;font-weight:600;color:var(--text);white-space:nowrap}
.ltoken[hidden]{display:none}
.ltoken button{width:22px;height:22px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:var(--rim);color:var(--text-2);cursor:pointer}
.lfind svg{flex:none}
.lfind input{flex:1;min-width:0;height:100%;border:0;padding:0;background:none;outline:none;font:inherit;font-size:16px;color:var(--text);caret-color:var(--accent);-webkit-user-select:text;user-select:text}
.lfind input::placeholder{color:var(--muted)}
.lfind input::-webkit-search-cancel-button{display:none}
.lfind:focus-within{box-shadow:inset 0 0 0 .5px rgba(255,255,255,.08),0 0 0 1.5px var(--rim)}
.lx{flex:none;width:36px;height:36px;padding:0;border:0;border-radius:50%;cursor:pointer;display:grid;place-items:center;color:var(--text-2);background:none}
.lx[hidden]{display:none}
.lx svg{width:22px;height:22px;padding:5.5px;border-radius:50%;background:var(--rim)}
.lx:active{transform:scale(.92)}
/* While searching, names step back a shade and the matching letters stay bright, as in +. */
.sheet.searching .nm{color:var(--text-2)}
.sheet .nm b{font-weight:inherit;color:var(--text)}
/* Nothing matches: say so, and offer to make it. */
.empty .lmake,.load-status .lmake,.cast-retry{display:block;margin:14px auto 0;padding:11px 18px;border:0;border-radius:var(--radius-pill);cursor:pointer;font:inherit;font-size:15px;font-weight:600;
  color:var(--text);background:var(--glass-3);box-shadow:inset 0 0 0 .5px rgba(255,255,255,.1);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.empty .lmake:active,.load-status .lmake:active{transform:scale(.97)}
.load-status{flex:none;color:var(--muted);font-size:15px;text-align:center;padding:20px;line-height:1.4}
.load-status p{margin:0}
.load-status[hidden],.load-status .lmake[hidden]{display:none}
.load-status .lmake{min-height:44px}
.load-status .lmake:focus-visible{outline:2px solid var(--text);outline-offset:3px}
.cast-retry{min-height:44px}
.cast-retry[hidden]{display:none}
.cast-retry:disabled{opacity:.5;cursor:wait}
.cast-retry:active:not(:disabled){transform:scale(.96)}
.cast-retry:focus-visible{outline:2px solid var(--text);outline-offset:3px}
body.lib-open .cast-retry,body.finding .cast-retry{visibility:hidden;pointer-events:none}
.library-status{padding:12px 20px}
/* An empty library's note sits where rows land, below the list's faded top edge (phones: just above the capsule). */
.list:has(>.empty){display:flex;flex-direction:column;justify-content:flex-end}
@media (min-width:960px){.list:has(>.empty){justify-content:center}}
.note{font-size:13px;color:var(--muted);margin:8px 32px 18px;line-height:1.4}
/* Settings: one frosted panel, five equal rows (docs/truffle-settings-panel.md). Labels left, controls right,
   hairlines between rows. Theme is a capsule of icon stops with the lit puck; the switches are glass switches; Hosts
   opens its own panel in the same spot (docs/truffle-hosts.md). */
.sets{position:relative;isolation:isolate;flex:none;margin:auto 12px 10px;padding:4px 6px;border-radius:26px;
  background:var(--frost);backdrop-filter:blur(30px) saturate(1.8) brightness(1.08);-webkit-backdrop-filter:blur(30px) saturate(1.8) brightness(1.08);box-shadow:var(--shadow-frost)}
/* The same inset on both sides: a row's label and its value, switch or chevron sit equally far from the panel's edges. */
.srow{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;height:56px;padding:0 14px}
.srow+.srow::before{content:"";position:absolute;left:14px;right:14px;top:0;height:1px;background:var(--hairline)}
.slabel{font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--text)}
.srow:has(.tog) .slabel{cursor:pointer}
.seg{position:relative;display:flex;padding:3px;border-radius:var(--radius-pill);background:var(--slot);box-shadow:inset 0 1px 3px rgba(0,0,0,.35);touch-action:none}
.seg button{position:relative;z-index:1;width:52px;height:30px;padding:0;border:0;border-radius:var(--radius-pill);display:grid;place-items:center;cursor:pointer;background:none;color:var(--text-2);
  transition:color var(--time-quick)}
.seg button[aria-checked="true"]{color:var(--text)}
/* One piece of glass slides between the stops (settings.js, capsule, places it). Pressed or dragged, it swells into clear glass. */
.seg .spuck{position:absolute;left:3px;top:3px;width:52px;height:30px;border-radius:var(--radius-pill);pointer-events:none;background:var(--glass-lit);box-shadow:var(--shadow-puck);
  translate:0 0;scale:1;transition:translate .5s cubic-bezier(.25,1.3,.45,1),scale .3s cubic-bezier(.25,1.35,.45,1),background .2s ease,box-shadow .2s ease}
.seg.drag .spuck{transition:scale .3s cubic-bezier(.25,1.35,.45,1),background .2s ease,box-shadow .2s ease}
.seg.press .spuck{scale:1.14 1.22;background:rgba(255,255,255,.08);backdrop-filter:blur(1.5px) saturate(1.8) brightness(1.2);-webkit-backdrop-filter:blur(1.5px) saturate(1.8) brightness(1.2);
  box-shadow:inset 0 0 0 .6px rgba(255,255,255,.7),inset 1.2px 1.2px 1px -.4px rgba(255,255,255,.9),inset -1px -1.2px 1px -.4px rgba(255,255,255,.5),inset 0 0 6px rgba(255,255,255,.2),0 4px 12px rgba(0,0,0,.25)}
@media (prefers-reduced-motion:reduce){.seg .spuck{transition:background .2s,box-shadow .2s}}
/* The glass switch, after Apple's: a pill track and a pill knob. Pressed, the knob swells into clear glass you can see
   the track through; released, it springs across. On is the system green, the knob always white. */
.tog{position:relative;flex:none;width:64px;height:28px;padding:0;border:0;border-radius:var(--radius-pill);cursor:pointer;background:rgba(120,120,128,.32);transition:background .3s ease}
.tog[aria-checked="true"]{background:#30d158}
.tog i{position:absolute;left:2px;top:2px;width:38px;height:24px;border-radius:var(--radius-pill);background:#fff;translate:0 0;scale:1;
  box-shadow:0 0 0 .5px rgba(0,0,0,.04),0 2px 4px rgba(0,0,0,.18),0 4px 10px rgba(0,0,0,.12);
  transition:translate .5s cubic-bezier(.25,1.45,.45,1),scale .32s cubic-bezier(.25,1.35,.45,1),background .22s ease,box-shadow .22s ease}
.tog[aria-checked="true"] i{translate:22px 0}
.tog.press i{scale:1.38 1.32;background:rgba(255,255,255,.14);backdrop-filter:blur(1.5px) saturate(1.8) brightness(1.15);-webkit-backdrop-filter:blur(1.5px) saturate(1.8) brightness(1.15);
  box-shadow:inset 0 0 0 .6px rgba(255,255,255,.75),inset 1.2px 1.2px 1px -.4px rgba(255,255,255,.95),inset -1px -1.2px 1px -.4px rgba(255,255,255,.55),inset 0 0 6px rgba(255,255,255,.25),0 4px 12px rgba(0,0,0,.22)}
.tog.press[aria-checked="false"] i{translate:6px 0}
.tog.press[aria-checked="true"] i{translate:16px 0}
.tog:focus-visible,.seg button:focus-visible{outline:2px solid var(--text);outline-offset:3px}
@media (prefers-reduced-motion:reduce){.tog i{transition:background .2s,box-shadow .2s}}
/* Settings and Hosts are two panels in one spot. Opening Hosts is depth, as between Library and Settings:
   Settings sinks back and Hosts comes forward a beat later. */
.sstack{display:grid;flex:none;margin:auto 12px 10px}
/* Keep every cast (keep.js, docs/truffle-sign-in.md): the Settings panel's frost, in the Settings panel's spot (12px in
   from the screen edges, just above the capsule on phones; beside it on desktop), up to 400px tall, over the scrim with
   Home receding. Like Library and Settings it sits under the capsule's layer, so the capsule stays in view. Lenses move in .kfly by script (transform and opacity only); the
   headline's three slots are faint glass sockets they land in. The buttons are control glass and rise with the
   lenses; their marks are plain (a deliberate bend of Apple's and Google's button rules). */
.keep{position:fixed;left:calc(12px + env(safe-area-inset-left,0px));right:calc(12px + env(safe-area-inset-right,0px));bottom:calc(102px + env(safe-area-inset-bottom,0px));z-index:9;max-width:496px;margin:0 auto;
  height:min(400px,calc(100dvh - 114px - env(safe-area-inset-bottom,0px) - env(safe-area-inset-top,0px)));box-sizing:border-box;isolation:isolate;overflow:hidden;outline:none;
  display:flex;flex-direction:column;gap:10px;padding:8px 20px 20px;border-radius:26px;
  background:var(--frost);backdrop-filter:blur(30px) saturate(1.8) brightness(1.08);-webkit-backdrop-filter:blur(30px) saturate(1.8) brightness(1.08);box-shadow:var(--shadow-frost);
  transform:translateY(16px);opacity:0;visibility:hidden;transition:transform .45s var(--ease-settle),opacity .3s,visibility 0s .45s}
.keep.on{transform:none;opacity:1;visibility:visible;transition-delay:0s}
.kfly{position:absolute;inset:0;pointer-events:none;contain:layout style}
.kfly .lens{left:0;top:0;width:54px;height:54px;font-size:54px;opacity:0;transform-origin:50% 50%;will-change:transform,opacity;box-shadow:var(--shadow-lens)}
.kh{position:relative;z-index:50;margin:auto 2px;font-size:30px;line-height:1.24;font-weight:600;letter-spacing:-.02em;text-align:center;text-wrap:balance;color:var(--text);
  transition:opacity .8s var(--ease-out)}
.kh.wait{opacity:0}
.kh .t{white-space:nowrap}
.kh .slot{position:relative;display:inline-block;width:1.1em;height:1.1em;margin:0 .12em 0 .02em;vertical-align:-.26em;border-radius:50%;
  background:var(--glass-control);box-shadow:inset 0 1px 3px rgba(0,0,0,.45),inset 0 -1px 0 rgba(255,255,255,.08)}
.kh .nm{transition:opacity .5s var(--ease-out)}
.kh .nm.out{opacity:0}
/* White with ink text in dark, the twin of light mode's ink buttons with white text (below). */
.kbtn{position:relative;isolation:isolate;flex:none;height:44px;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:var(--radius-pill);cursor:pointer;
  font:inherit;font-size:15px;font-weight:600;color:#1b1c20;background:#f5f5f7;box-shadow:inset 0 1px 0 #fff,0 6px 18px rgba(0,0,0,.45);
  transition:opacity calc(var(--keep-cta-dur,1s)*.7) var(--ease-out),transform var(--keep-cta-dur,1s) var(--keep-cta-ease,var(--ease-spring)),scale .15s var(--ease-pop)}
.kbtn[hidden]{display:none}
.kbtn+.kbtn{transition-delay:var(--keep-cta-gap,.05s)}
.kbtn::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,.6),transparent 55%)}
.kbtn svg path{fill:currentColor}
.kbtn:active{scale:.97}
.kbtn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.keep.cta-wait .kbtn{opacity:0;transform:translateY(22px);pointer-events:none}
/* Signed in: who, then Sign out, rise with the lenses. Long cast names wrap; only a lens and its name's first word
   stay together. */
.kwho{flex:none;margin:0 0 4px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:14px;color:var(--text-2);
  transition:opacity calc(var(--keep-cta-dur,1s)*.7) var(--ease-out),transform var(--keep-cta-dur,1s) var(--keep-cta-ease,var(--ease-spring))}
.kwho svg{flex:none}
.kwho svg path{fill:currentColor}
.keep.cta-wait .kwho{opacity:0;transform:translateY(22px)}
.kh.mine .t{white-space:normal}
.kh .nw{white-space:nowrap}
/* The card over Settings: the Settings panel itself with one row. It sinks back with Settings when Hosts opens. */
.acard{transform-origin:50% 100%;transition:opacity .38s var(--ease-settle),transform .5s var(--ease-settle),filter .4s}
.acard[hidden]{display:none}
.acard:not([hidden])+.sstack{margin-top:0}
.arow{width:100%;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.arow:focus-visible{outline:2px solid var(--text);outline-offset:-2px;border-radius:16px}
.aend{display:flex;align-items:center;gap:10px;flex:none;color:var(--text-2)}
.atrio{display:flex}
.atrio .lens{position:relative;width:24px;height:24px;font-size:24px;box-shadow:var(--shadow-lens)}
.atrio .lens+.lens{margin-left:-7px}
.pane.s:has(.sstack.hosts) .acard{opacity:0;transform:scale(.94);filter:blur(8px);pointer-events:none}
/* A sheet opened from Settings sends Settings back, as Hosts does; closing it brings Settings forward again. */
.sheet.behind .pane.s{opacity:0;transform:scale(.94);filter:blur(8px)}
/* Behind a sheet, Settings drops under it and takes no taps: tapping outside the sheet reaches the scrim, which closes it. */
.sheet.behind{z-index:8}
.sheet.behind,.sheet.behind *{pointer-events:none!important}
@media (prefers-reduced-motion:reduce){.keep,.kh,.kbtn{transition:opacity .25s}}
.sstack>.sets{grid-area:1/1;align-self:end;margin:0;transform-origin:50% 100%;
  transition:opacity .38s var(--ease-settle),transform .5s var(--ease-settle),filter .4s;transition-delay:.08s}
.sstack:not(.hosts)>.hostsp,.sstack.hosts>.setsp{opacity:0;transform:scale(.94);filter:blur(8px);pointer-events:none;transition-delay:0s}
.sstack.jump>.sets{transition:none}
@media (prefers-reduced-motion:reduce){.sstack>.sets{transform:none!important;filter:none!important;transition:opacity .25s}}
/* The Hosts row: the accents, and the two voices as two marks in their transcript colours. */
.hrow{width:100%;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.hrow:focus-visible{outline:2px solid var(--text);outline-offset:-2px;border-radius:16px}
.hpair{display:flex;align-items:center;gap:10px;min-width:0;font-size:15px;color:var(--text-2)}
.hpair>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hdots{display:flex;gap:3px;flex:none}
.hdots i{width:10px;height:10px;border-radius:50%}
.hdots i:first-child{background:var(--speaker-a)}
.hdots i:last-child{background:var(--speaker-b)}
/* The Hosts panel: a head with Back, then Settings' rows. Each voice is a capsule of accent stops with the lit puck,
   the accent named under its label; picking a stop plays that voice. */
.hhead{display:flex;align-items:center;gap:2px;height:52px;padding:0 6px 0 2px}
.hback{width:36px;height:44px;padding:0;border:0;border-radius:var(--radius-pill);background:none;color:var(--text);display:grid;place-items:center;cursor:pointer}
.hback:focus-visible{outline:2px solid var(--text);outline-offset:-2px}
.hhead+.srow::before{display:none}
.srow.voice{height:64px}
.hlab{display:flex;flex-direction:column;gap:1px;min-width:0}
.hlab small{display:grid;font-size:13px;font-weight:500;line-height:17px;color:var(--text-2)}
.hlab small>span{grid-area:1/1;white-space:nowrap;transition:opacity .38s,filter .38s}
.hlab small>span.out{opacity:0;filter:blur(4px);transition-duration:.2s}
.seg.accent button,.seg.accent .spuck{width:38px}
.seg.accent button{font-size:12.5px;font-weight:650;letter-spacing:.02em}
/* Small phones: the voice's label sits above its stops. */
@media (max-width:360px){.srow.voice{height:auto;flex-direction:column;align-items:stretch;gap:8px;padding:10px 14px}.srow.voice .seg{align-self:flex-end}}
.seg.lead button,.seg.lead .spuck{width:66px}
.seg.lead button{font-size:13.5px;font-weight:600}
/* The one note in Hosts (decided with Peter, 4 October 2026): Nigerian voices are designed, not from the library. */
.hnote{margin:2px 14px 12px;font-size:13px;line-height:18px;color:var(--text-2)}
/* Small, short phones (iPhone SE 1st generation): Hosts tightens so it stays above the capsule. */
@media (max-width:360px) and (max-height:640px){#hostsp .hhead{height:42px}#hostsp .srow.voice{padding:4px 14px 6px;gap:4px}#hostsp .srow:not(.voice){height:48px}#hostsp .hnote{margin:0 14px 8px;font-size:12px;line-height:16px}}
@media (prefers-reduced-motion:reduce){.hlab small>span{transition:none}}
/* A soft light inside the glass follows the pointer. */
.hb::before,.sheet .item::before,.idea::before,.sug::before,.card::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:0;opacity:0;transition:opacity .25s;
  background:radial-gradient(circle at var(--mx,50%) var(--my,50%),rgba(255,255,255,.2),rgba(255,255,255,.05) 36%,transparent 60%)}
.sheet .item::before,.idea::before,.sug::before{background:radial-gradient(circle at var(--mx,50%) var(--my,50%),rgba(255,255,255,.13),rgba(255,255,255,.035) 30%,transparent 55%)}
@media(hover:hover){.card:hover::before,.hb:hover::before,.sheet .item:hover::before,.idea:hover::before,.sug:hover::before,.sug.sel::before{opacity:1}}
.hb>svg:not(.spin),.item>*{position:relative;z-index:1}
/* The page behind the blur recedes while Library or Settings is open. */
header,main{transition:scale .5s var(--ease-settle),opacity .4s ease}
body.lib-open header,body.lib-open main{scale:.955}
/* ...and dims, so its heading and pills never read through the rows sitting on the blur. Opacity is composited:
   the blur keeps its look without costing frames. Phones dim more: their blur is lighter toward the top. */
body.lib-open main{opacity:.22}
@media (min-width:960px){body.lib-open main{opacity:.4}}
body.snap header,body.snap main{transition:none}
/* suggestions */
.sugs{position:relative;max-height:min(360px,44vh);overflow-y:auto;padding:0}
.sugs:not(.on){display:none}

/* ---------- home ---------- */
/* Phones (home.js, docs/truffle-home-full.md): Home scrolls. The hour and its ideas, then the search field (the way
   into New cast: no + on phones), then sections of suggestions. Large screens show none of this. */
.hour,.feed{display:none}
@media (max-width:959px){
  /* The app keeps its page inside the safe areas and paints a solid strip over each, because nothing on it scrolled:
     a scrolling Home was cut off in a straight line at both. So Home runs the full height of the screen, the strips
     step aside, and the page fades out softly under the status bar and at the bottom, as a native scroller does. */
  main.first{position:fixed;inset:0;z-index:0;justify-content:flex-start;gap:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;overscroll-behavior-y:contain;
    padding:calc(max(12px,env(safe-area-inset-top,0px)) + 8px) env(safe-area-inset-right,0px) 0 env(safe-area-inset-left,0px);
    -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 calc(max(12px,env(safe-area-inset-top,0px)) + 14px),#000 calc(100% - max(12px,env(safe-area-inset-bottom,0px)) - 28px),transparent 100%);
    mask-image:linear-gradient(to bottom,transparent 0,#000 calc(max(12px,env(safe-area-inset-top,0px)) + 14px),#000 calc(100% - max(12px,env(safe-area-inset-bottom,0px)) - 28px),transparent 100%)}
  main.first::-webkit-scrollbar{display:none}
  body:has(main.first) .edge-top::after,body:has(main.first) .edge-bottom::after{background:none}
  main.first .info{display:none}
  main.first .ideas{flex:none;max-width:560px;gap:0;padding:4px 0 calc(104px + env(safe-area-inset-bottom,0px))}
  main.first #ask{flex:none;margin:22px 0 0}

  /* The hour. For reach, Home starts lower: a gap above the title brings the ideas and the field nearer the thumb.
     Dark only: the hour's light glows behind the title and ideas (dawn gold, daylight, dusk rose, night indigo),
     the only colour on Home that is not a picture. Light draws nothing behind its ideas, as it has no aura. */
  .hour:not([hidden]){display:block;position:relative;isolation:isolate;width:100%;margin-top:clamp(48px,10vh,110px);margin-top:clamp(48px,10svh,110px)}
  .hour[data-hour="morning"]{--hour-light:var(--hour-morning)}
  .hour[data-hour="afternoon"]{--hour-light:var(--hour-afternoon)}
  .hour[data-hour="evening"]{--hour-light:var(--hour-evening)}
  .hour[data-hour="night"]{--hour-light:var(--hour-night)}
  .hour::before{content:"";position:absolute;z-index:-1;left:50%;top:0;width:140%;max-width:760px;height:280px;translate:-50% 0;pointer-events:none;
    background:radial-gradient(closest-side at 50% 38%,color-mix(in srgb,var(--hour-light,transparent) 30%,transparent),color-mix(in srgb,var(--hour-light,transparent) 9%,transparent) 55%,transparent)}
  .hour-title,.fsec .sgh,.btitle{margin:0;font-size:22px;font-weight:700;letter-spacing:-.02em;line-height:28px;color:var(--text)}
  .hour-title{padding:8px 24px 18px;text-align:center}

  /* The sections. New stories and On this day are the search pane's own group of results (sources.css); here they
     get the page's side margin, a heading as definite as the hour's title, and a larger lens (48, not search's 34:
     beside two lines of text and a third, 34 looked tiny). */
  .feed:not([hidden]){display:flex;flex-direction:column;width:100%;text-align:left;--branch-line:color-mix(in srgb,var(--text) 24%,var(--page-background))}
  .fsec{padding:0 16px}
  .feed .fsec::before{display:none}
  .feed>.fsec:first-child{margin-top:26px}
  .fsec .sgh{padding:6px 8px}
  .fsec .sgh span{color:var(--muted)}
  .fsec .slens{width:48px;height:48px}
  .fsec .slens .lens{font-size:48px}
  .fsec .sug.grow{gap:14px}
  .fmore{display:inline-flex;align-items:center;gap:6px;margin:2px 0 0;padding:10px 8px;border:0;background:none;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer;transition:opacity .15s}
  .fmore:active,.fsec .sug:active{opacity:.6}

  /* Because you heard: a branch. The cast you heard heads it as a lens with the heading beside it. One trunk runs
     down from the centre of that lens, and each follow-up joins it on a rounded elbow that stops short of its own
     lens. Plain lines on the page, never in a card; one solid tone for every drawn line, so lines that meet do not
     look darker where they cross. */
  .branch{margin-top:30px;padding:0 24px}
  .broot{display:flex;align-items:center;gap:13px}
  .broot .lens{position:relative;flex:none;width:44px;height:44px;font-size:44px;box-shadow:var(--shadow-lens)}
  .bwords{display:flex;flex-direction:column;gap:2px;min-width:0}
  .bsub{font-size:15px;font-weight:500;line-height:1.3;color:var(--text-2)}
  .btwigs{display:flex;flex-direction:column;margin:5px 0 0 22px;padding-left:16px}
  .btwig{position:relative;display:flex;align-items:flex-start;gap:12px;padding:11px 0;border:0;background:none;text-align:left;color:var(--text);cursor:pointer;
    transition:opacity .15s;animation:rise .55s var(--ease-settle) both}
  .btwig:nth-child(2){animation-delay:45ms}
  .btwig:nth-child(3){animation-delay:90ms}
  .btwig:active{opacity:.6}
  .btwig .lens{position:relative;flex:none;width:30px;height:30px;font-size:30px;margin-top:1px;box-shadow:var(--shadow-lens)}
  .btwig::before{content:"";position:absolute;left:-16px;top:0;bottom:0;width:1px;background:var(--branch-line)}
  .btwig:last-child::before{display:none}
  .btwig::after{content:"";position:absolute;left:-16px;top:0;width:13px;height:27.5px;border-left:1px solid var(--branch-line);border-bottom:1px solid var(--branch-line);border-bottom-left-radius:11px}
  .bname{font-size:16px;font-weight:600;letter-spacing:-.01em;line-height:1.25}
  .bline{font-size:15px;line-height:1.38;color:var(--text-2);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
}
@media(prefers-reduced-motion:reduce){.btwig{animation:none}}
.new-h{font-size:13px;font-weight:600;color:var(--muted);margin:0;align-self:center;text-align:center;padding:0 24px}
/* While the library is unknown, keep its loading or recovery status in place of Home. */
main.boot .info,main.boot .stage,main.boot .bottom,main.boot .ideas{display:none}
.ideas{display:none;flex-direction:column;gap:16px;width:100%;max-width:760px}
main.first .ideas{display:flex}
main.first .label{display:none}
main.first .stage,main.first .bottom{display:none}
/* Idea pills drift sideways in three rows that fade into black at both edges (see tickLanes in search.js).
   Each is a glass pill with the article's picture inset as a round lens, tinted faintly by its colours.
   No backdrop blur: behind the pills is plain black, so it would cost frames and show nothing. */
.cards{display:flex;flex-direction:column;gap:2px;width:100%}
.lane2{overflow:hidden;padding:4px 0 14px;touch-action:pan-y;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent)}
.track{display:flex;gap:10px;width:max-content;padding:0 5px;will-change:transform}
.card{position:relative;isolation:isolate;overflow:hidden;flex:none;max-width:230px;height:56px;border:0;border-radius:var(--radius-pill);padding:6px 18px 6px 6px;cursor:pointer;color:var(--text);
  display:flex;align-items:center;gap:11px;text-align:left;font-size:15px;font-weight:600;letter-spacing:-.01em;white-space:nowrap;
  background:radial-gradient(90px 56px at 28px 50%,rgb(var(--tint,60 60 64) / .3),transparent 70%),rgba(255,255,255,.05);
  box-shadow:var(--shadow-pill);
  transition:transform .15s,background .6s;animation:rise .55s var(--ease-settle) both;animation-delay:calc(var(--i)*45ms)}
.card:active{transform:scale(.96)}
/* The light on the glass: stays put in the room while the pill slides under it. */
.card .sheen{position:absolute;inset:0;z-index:1;pointer-events:none;border-radius:inherit;will-change:transform,opacity;
  background:radial-gradient(34% 120% at 50% -18%,rgba(255,255,255,.22),transparent 72%),radial-gradient(22% 60% at 50% 115%,rgba(255,255,255,.07),transparent 70%)}
.card .lens{position:relative;z-index:2;flex:none;width:44px;height:44px;font-size:44px;will-change:transform;
  box-shadow:var(--shadow-lens)}
.card .ct{position:relative;z-index:2;min-width:0;overflow:hidden}
.card.sm{height:44px;max-width:200px;border-radius:var(--radius-pill);padding:5px 14px 5px 5px;gap:9px;font-size:14px}
.card.sm .lens{width:34px;height:34px;font-size:34px}
.strip .lane2{padding:3px 0 9px}
.card .ct.long{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 30px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 30px),transparent)}
.ask{width:calc(100% - 40px);max-width:420px;align-self:center}
@keyframes rise{from{opacity:0;transform:translateY(12px) scale(.96);filter:blur(6px)}}
.ask{display:flex;align-items:center;gap:10px;height:52px;border:0;border-radius:var(--radius-pill);padding:0 18px;cursor:text;font-size:16px;color:var(--muted);
  background:var(--hairline);box-shadow:inset 0 0 0 .5px rgba(255,255,255,.08);
  animation:rise .55s var(--ease-settle) .35s both}
@media(prefers-reduced-motion:reduce){.card,.ask{animation:none}}

/* ---------- search ---------- */
/* Search is a capsule panel like Library and Settings: same graduated blur behind it (the scrim),
   the page steps back, and a frosted slab comes forward beside the capsule (above it on phones).
   The layer itself is clear and only catches taps outside the slab. */
.find{position:fixed;inset:0;z-index:9;visibility:hidden;transition:visibility 0s .5s}
.find.on{visibility:visible;transition-delay:0s}
.find-in{position:absolute;left:calc(12px + env(safe-area-inset-left,0px));right:calc(12px + env(safe-area-inset-right,0px));bottom:max(calc(84px + env(safe-area-inset-bottom,0px)),calc(var(--kb,0px) + 12px));
  display:flex;flex-direction:column;gap:6px;padding:8px 10px 10px;border-radius:30px;
  opacity:0;transform-origin:50% 100%;transform:translateY(20px) scale(.94);filter:blur(8px);
  transition:transform .5s var(--ease-settle),opacity .35s,filter .4s}
.find.on .find-in{opacity:1;transform:none;filter:none}
@media (min-width:960px){
  .find-in{left:90px;right:auto;top:var(--mid);bottom:auto;width:400px;transform-origin:0 50%;transform:translate(0,-50%) scale(.92)}
  .find.on .find-in{transform:translate(0,-50%)}
}
@media(prefers-reduced-motion:reduce){.find-in,.find.on .find-in{transform:none;filter:none}@media (min-width:960px){.find-in,.find.on .find-in{transform:translate(0,-50%)}}}
/* + turns into × while search is open. */
#newBtn svg{transition:rotate .35s cubic-bezier(.45,0,.2,1)}
body.finding #newBtn svg{rotate:45deg}
.find-head{display:flex;align-items:center;justify-content:space-between;padding:2px 0 0 10px}
.find-head span{font-size:12px;font-weight:600;color:var(--muted)}
.find-x{flex:none;width:32px;height:32px;padding:0;border:0;border-radius:50%;cursor:pointer;display:grid;place-items:center;color:var(--text-2);
  background:var(--hairline);box-shadow:inset 0 0 0 .5px rgba(255,255,255,.08);transition:background var(--time-quick),transform .12s}
.find-x:hover{background:var(--rim)}
.find-x:active{transform:scale(.92)}
.find .field{height:52px;border-radius:var(--radius-pill);padding:0 4px 0 18px;background:var(--hairline);box-shadow:inset 0 0 0 .5px rgba(255,255,255,.08)}
/* The arrow keeps the same 4px gap on every side, in the glass's own tint until there is text. */
.find .go{width:44px;height:44px;background:rgba(255,255,255,.1);color:var(--muted);box-shadow:none}
.find .go.ready{background:#fff;color:var(--ground)}
.find-ideas{display:flex;flex-direction:column}
.find.typing .find-ideas{display:none}
.article-error[hidden]{display:none}
.article-error{font-size:14px;line-height:1.5;color:var(--text-2);margin:12px 10px 18px}
.go .go-arrow,.go .go-spinner{grid-area:1/1;transition:opacity .3s cubic-bezier(.2,0,0,1),scale .3s cubic-bezier(.2,0,0,1),filter .3s cubic-bezier(.2,0,0,1)}
.go .go-spinner{opacity:0;scale:.25;filter:blur(4px);pointer-events:none}
.go.busy .go-arrow{opacity:0;scale:.25;filter:blur(4px)}
.go.busy .go-spinner{opacity:1;scale:1;filter:blur(0)}
.go-spinner circle{transform-origin:center;animation:rot 1.1s linear infinite;animation-play-state:paused}
.go.busy .go-spinner circle{animation-play-state:running}
.go.busy{cursor:wait}
.find .go:active{transform:scale(.96)}
@media(prefers-reduced-motion:reduce){.go .go-arrow,.go .go-spinner{transition:none}.go.busy .go-spinner circle{animation:none}}
.find.linking .sugs,.find.linking .find-ideas{display:none}
/* Suggestions read like the results: rows with a colour orb, the cast's own colours. */
.idea{display:flex;align-items:center;gap:12px;width:100%;padding:8px 10px;border:0;border-radius:var(--radius-row);background:none;cursor:pointer;text-align:left;font-size:16px;color:var(--text-2)}
.idea .lens{position:relative;flex:none;width:32px;height:32px;font-size:32px}
.idea,.sug{position:relative;isolation:isolate}
.idea>*,.sug>*{position:relative;z-index:1}
.sug{display:flex;align-items:center;gap:12px;width:100%;padding:9px 10px;border:0;background:none;border-radius:var(--radius-row);cursor:pointer;text-align:left}
.sug.sel,.sug:hover,.idea:hover{background:var(--glass-content)}
.sug .w{flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--hairline);font:600 15px Georgia,"Times New Roman",serif;color:var(--text-2)}
.sug .w.have{background:var(--grad);color:var(--ground)}
.sug .tx{min-width:0;flex:1}
.sug .a{font-size:16px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sug .a b{color:var(--text);font-weight:600}
.sug .d{font-size:13px;color:var(--muted);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.go-hint{font-size:12px;color:var(--muted);flex:none}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);opacity:0;pointer-events:none}

/* ---------- glass HUD (phones) ---------- */
.hud{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:10;display:flex;align-items:center;padding:5px;border-radius:var(--radius-pill);
  transform:translateX(-50%);isolation:isolate;
  background:var(--glass-control);backdrop-filter:blur(16px) saturate(1.6);-webkit-backdrop-filter:blur(16px) saturate(1.6);
  border:1px solid var(--hairline);
  box-shadow:inset 2px -2px 1px -1px rgba(255,255,255,.34),inset -2px 2px 1px -1px rgba(255,255,255,.34),
    inset 6px -6px 1px -6px rgba(255,255,255,.2),inset -6px 6px 1px -6px rgba(255,255,255,.2),
    inset 0 0 2px rgba(255,255,255,.22),0 10px 28px rgba(0,0,0,.6);
  transition:opacity .3s,transform .4s var(--ease-settle),filter .3s}
.hud::before{content:"";position:absolute;inset:3px;z-index:-1;border-radius:inherit;border:1px solid var(--hairline);filter:blur(1px);pointer-events:none}
.hud::after{content:"";position:absolute;inset:0;z-index:2;border-radius:inherit;filter:blur(6px);pointer-events:none;
  background:linear-gradient(45deg,rgba(255,255,255,.16) 0%,transparent 16%,transparent 84%,rgba(255,255,255,.16) 100%)}
.hud.away{opacity:0;filter:blur(6px);transform:translate(-50%,18px) scale(.96);pointer-events:none}
.hb{position:relative;flex:none;width:46px;height:46px;margin:0 2px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;display:grid;place-items:center;color:var(--icon);
  overflow:visible;transition:background var(--time-quick),color .2s,box-shadow .2s,transform .15s,width .35s var(--ease-settle),height .35s var(--ease-settle),margin .35s var(--ease-settle),opacity .25s}
.hb>svg:not(.spin){filter:drop-shadow(0 6px 3px rgba(0,0,0,.35))}
.hb:hover{background:rgba(255,255,255,.06)}
.hb:active{transform:scale(.92)}
/* In the player the capsule is the dock: close and speed, in the same glass. The menu's buttons collapse
   out and the dock's collapse in, so the capsule shrinks into the dock and grows back (see hudSync). */
#dockSpeed{font-size:14px;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--text)}
.hb.lit{color:#fff;background:var(--glass-lit);box-shadow:var(--shadow-puck)}
/* A speed other than 1× glows: light on the numbers, no glass disc behind them. */
#dockSpeed.lit{background:none;box-shadow:none;color:#fff;text-shadow:0 0 6px rgba(255,255,255,.75),0 0 14px rgba(255,255,255,.4)}
.dsep{position:relative;z-index:1;flex:none;width:1px;height:22px;margin:0 5px;background:var(--rim);transition:width .35s var(--ease-settle),height .35s var(--ease-settle),margin .35s var(--ease-settle),opacity .25s}
.dsep.off{width:0;margin:0;opacity:0}
/* The speed track: the dock unfolds into five stops inside the same capsule; the lit puck rests on the speed
   and follows a finger dragged along it (see "speed track" in library.js). */
.sstop{width:50px;font-size:14px;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--text-2);touch-action:none}
.hud[data-mode="track"] .sstop[aria-checked="true"]{color:#fff}
/* The ambience track (docs/truffle-ambience-control.md): the same capsule unfolds into Voice, Less, Normal, More.
   The waves: three lines at Normal, two at Less, a slash for Voice only; any choice but Normal glows, like a speed
   other than 1×. Only casts with an ambience layer show it ([hidden] otherwise). */
.astop{width:66px;font-size:14px;font-weight:600;letter-spacing:-.02em;color:var(--text-2);touch-action:none}
.hud[data-mode="track"] .astop[aria-checked="true"]{color:#fff}
#dockAmb[hidden]{display:none}
#dockAmb path{transition:opacity .25s}
#dockAmb .slash{opacity:0}
#dockAmb[data-stop="less"] .w3,#dockAmb[data-stop="voice"] .w2,#dockAmb[data-stop="voice"] .w3{opacity:.25}
#dockAmb[data-stop="voice"] .slash{opacity:1}
#dockAmb.lit{background:none;box-shadow:none;color:#fff;filter:drop-shadow(0 0 4px rgba(255,255,255,.75)) drop-shadow(0 0 10px rgba(255,255,255,.35))}
/* Phones narrower than 366 px: the dock's buttons tighten so the waves still fit inside the 16 px margins. */
@media (max-width:365px){
  .hud.dock .hb:not(.off):not(.sstop):not(.astop){width:40px;height:40px;margin:0 1px}
  .hud.dock .dsep:not(.off){margin:0 3px}
}
.hud[data-mode="track"]{touch-action:none}
.hb.off{width:0;margin:0;opacity:0;pointer-events:none;overflow:hidden}
/* The cast's picture at the far end of the dock: the same lens as an idea pill (bent toward the rim, colour fringe,
   `shadow-lens`), without the inner highlight Library rows add (it read as a second pane of glass). A very faint, still glow in its own colour; the glass stays untinted. */
#dockArt{--dart:34px}
#dockArt .art{width:var(--dart);height:var(--dart)}
#dockArt .art .lens{font-size:var(--dart);box-shadow:var(--shadow-lens)}
#dockArt::before{content:"";position:absolute;inset:calc((100% - var(--dart)) / 2);border-radius:50%;pointer-events:none;opacity:0;transition:opacity .6s;
  box-shadow:0 0 12px 2px rgb(var(--tint,0 0 0) / .3)}
#dockArt[data-glow]::before{opacity:1}
:root[data-theme="light"] #dockArt::before{box-shadow:0 0 12px 2px rgb(var(--tint,0 0 0) / .35)}
/* Previous or Next with nowhere to go. */
.hb:disabled:not(.off){color:var(--icon-dim);opacity:.4;cursor:default}
.hud[data-sel] .hb{color:var(--icon-dim)}
.hud[data-sel="lib"] #libBtn,.hud[data-sel="home"] #homeBtn{color:#fff}
/* The buttons sit in a recessed slot, and one lit puck slides between them. */
.hud .slot{position:absolute;inset:4px;z-index:0;border-radius:inherit;pointer-events:none;background:var(--slot);
  box-shadow:inset 0 2px 5px rgba(0,0,0,.55),inset 0 -1px 0 rgba(255,255,255,.05)}
/* Fixed size, moved by transform only, so the phone can animate it on the GPU. */
.hud .puck{position:absolute;left:0;top:0;z-index:0;border-radius:var(--radius-pill);pointer-events:none;opacity:0;background:var(--glass-lit);will-change:transform;
  box-shadow:var(--shadow-puck);
  transition:opacity .25s}
.hud.lit .puck{opacity:1}
.hud .hb{z-index:1}
.hb .badge{top:10px;right:9px;box-shadow:0 0 0 2px #1b1b1f}
/* Where casts live: after the first finished cast, the Library button lights up (a white ring) until it is opened. */
.hb.call::after{content:"";position:absolute;inset:-2px;border-radius:50%;pointer-events:none;
  box-shadow:0 0 0 2px rgba(255,255,255,.9),0 0 16px rgba(255,255,255,.45);animation:call 1.1s ease-in-out 3 alternate,callrest .5s ease 3.3s forwards}
@keyframes call{from{opacity:1;transform:scale(1)}to{opacity:.25;transform:scale(1.18)}}
@keyframes callrest{from{opacity:.25}to{opacity:.65}}
@media(prefers-reduced-motion:reduce){.hb.call::after{animation:none;opacity:.65}}
main{padding-bottom:calc(66px + env(safe-area-inset-bottom,0px))}
@media (max-width:959px){
  .pane.s{padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
  /* Blurs are the costly part of every page change on a phone: two blur bands instead of four,
     and panes, panels and search change with opacity and scale only. */
  .scrim .pb:nth-child(3),.scrim .pb:nth-child(5){display:none}
  .scrim .pb:nth-child(4){--b:6px;--s:45%;--e:80%}
  .scrim .pb:nth-child(6){--b:20px;--s:25%;--e:60%}
  .pane,.sheet:not(.set) .pane.s,.sheet.set .pane.l,.panel,.find-in{filter:none!important}
}
/* Decorative motion rests while a panel opens, closes or switches, so the move gets the frames. */
body.moving .aura::before,body.moving .aura::after{animation-play-state:paused}
/* Hidden surfaces retain their appearance but do not keep animating behind the current view. */
.sheet:not(.on) .item,.sheet.set .pane.l .item,
.sheet:not(.on) .eq i,.sheet.set .pane.l .eq i,
.panel:not(.on) .factcard .bar,.toast:not(.on) .ti.work svg{animation-play-state:paused}
body.page-hidden *,body.page-hidden *::before,body.page-hidden *::after{animation-play-state:paused!important}
/* ---------- desktop: vertical HUD on the left, floating glass panel beside it ---------- */
@media (min-width:960px){
  /* The page's content is centred in the space under the 58 px top bar, not in the whole window.
     The capsule and the panels beside it share that centre line, so they line up with what they sit next to. */
  :root{--mid:calc(50% + 29px)}
  main{padding-bottom:0}
  .hud{left:20px;top:var(--mid);bottom:auto;flex-direction:column;transform:translateY(-50%)}
  .hud.away{transform:translate(-18px,-50%) scale(.96)}
  .hb{margin:2px 0}
  .hb.off{width:46px;height:0;margin:0}
  .dsep{width:22px;height:1px;margin:5px 0}
  .dsep.off{width:22px;height:0;margin:0}
  /* Desktop: the track runs down the vertical capsule, faster at the top. */
  .sstop{width:46px}
  .sstop[data-v="2"]{order:1}.sstop[data-v="1.5"]{order:2}.sstop[data-v="1.25"]{order:3}.sstop[data-v="1"]{order:4}.sstop[data-v="0.75"]{order:5}
  /* The ambience track runs down the capsule too, more at the top. */
  .astop{width:58px;font-size:12px}
  .astop[data-v="3"]{order:1}.astop[data-v="2"]{order:2}.astop[data-v="1"]{order:3}.astop[data-v="0"]{order:4}
  /* The panel comes forward from slightly small and out of focus, and sinks back the same way. */
  .sheet{left:90px;top:var(--mid);bottom:auto;width:400px;max-width:none;height:min(560px,calc(100vh - 106px));transform:translate(0,-50%) scale(.92);filter:blur(8px);
    transition:transform .5s var(--ease-settle),opacity .35s,filter .4s,visibility 0s .5s}
  .sheet.on{transform:translate(0,-50%) scale(1);filter:none}
  .keep{left:98px;right:auto;top:var(--mid);bottom:auto;width:392px;max-width:none;margin:0;height:min(400px,calc(100vh - 106px));
    transform:translate(0,-50%) scale(.92);transition:transform .5s var(--ease-settle),opacity .35s,visibility 0s .5s}
  .keep.on{transform:translate(0,-50%)}
  @media(prefers-reduced-motion:reduce){.sheet,.sheet.on{transform:translate(0,-50%);filter:none}}
  /* Heaviest on the left behind the rows and clear on the right. */
  .scrim{--dir:to right;--d0:.72;--d1:.45;--d2:.12}
  .scrim .pb:nth-child(-n+2){display:block}
  .scrim .pb:nth-child(1){--b:1px;--s:70%;--e:100%}
  .scrim .pb:nth-child(2){--b:2px;--s:60%;--e:88%}
  .scrim .pb:nth-child(3){--b:4px;--s:50%;--e:76%}
  .scrim .pb:nth-child(4){--b:8px;--s:40%;--e:64%}
  .scrim .pb:nth-child(5){--b:16px;--s:30%;--e:52%}
  .scrim .pb:nth-child(6){--b:32px;--s:20%;--e:42%}
  .sheet .sh{margin-top:14px}
  .sstack{margin:auto 0 auto 8px}
  .acard{margin:auto 0 10px 8px}
  .acard+.sstack{margin:0 0 auto 8px}
  .acard[hidden]+.sstack{margin-top:auto}
  .sstack>.sets{align-self:center}
  /* Beside the capsule, the panel sits in the middle of its space. */
  .pane.l{padding:12px 0 12px 8px}
  .lib{margin:auto 0}
  header{grid-template-columns:44px 1fr 44px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after,main.live .tin{transition:none!important;animation:none!important}
  .lane2{overflow-x:auto}
}
#capShade{display:none}

/* ================= light theme =================
   Settings' Light switch puts data-theme="light" on <html>. The palette and the glass shadows are tokens with a light
   value (tokens.css); this block covers what is not a token. Dark rules above are untouched.
   Every piece of glass uses one recipe (--glass):
   - a crisp specular line on the top-left edge and a softer catch on the bottom-right, where light leaves the glass;
   - a faint darker band just inside the bottom edge (thick glass bending light) and a bright one inside the top;
   - short and wide inner glows, light scattering inside the glass, so it looks full of light rather than painted white;
   - a hairline, a tight contact shadow and a wide soft one.
   Its fill runs from bright top-left to clearer bottom-right, and where content passes behind it, it blurs and
   saturates it. Shadows on paper are soft and faint; there are no glows or colour fields.
   Controls are ink, no glows, no colour: colour belongs to the click wheel alone (its loop, the play button's ring
   and glow). Only colours and light change; layout and motion are the same as dark. */
:root[data-theme="light"]{color-scheme:light;--dot-on:rgba(28,28,36,.2);--ink:#1b1c20;--edge:rgba(28,28,36,.1);
  --glass-fill:linear-gradient(155deg,rgba(255,255,255,.66),rgba(255,255,255,.26) 52%,rgba(255,255,255,.4));
  --glass-in:inset 0 0 0 .5px rgba(255,255,255,.75),inset 1.5px 1.5px 0 -.5px #fff,inset -1px -1.5px 0 -.5px rgba(255,255,255,.8),
    inset 0 -9px 12px -10px rgba(36,36,70,.16),inset 0 9px 14px -10px rgba(255,255,255,.95),
    inset 0 0 12px 1px rgba(255,255,255,.45),inset 0 0 36px 4px rgba(255,255,255,.22);
  --glass-out:0 0 0 .5px rgba(22,24,34,.08),0 1px 2px rgba(30,28,40,.04),0 4px 10px -2px rgba(30,28,40,.04),0 18px 40px -16px rgba(30,30,50,.12);
  --glass:var(--glass-in),var(--glass-out);
  --glass-blur:blur(18px) saturate(2.2) brightness(1.05);
  /* A small bright bead of glass: the one selected thing, raised from the glass it sits on. */
  --bead:inset 0 0 0 .5px rgba(255,255,255,.9),inset 1.5px 1.5px 0 -.5px #fff,inset 0 -6px 9px -7px rgba(36,36,70,.14),
    0 0 0 .5px rgba(22,24,34,.07),0 1px 2px rgba(30,28,40,.05),0 6px 16px -8px rgba(30,30,50,.12);
  --raised:var(--bead)}
:root[data-theme="light"] .icon-btn:active,:root[data-theme="light"] .hb:hover{background:rgba(28,28,36,.05)}
/* The floating controls: the glass recipe, blurring and saturating whatever passes under them. */
:root[data-theme="light"] .now,:root[data-theme="light"] .hud,:root[data-theme="light"] .kept{
  border:0;background:var(--glass-fill);box-shadow:var(--glass);backdrop-filter:var(--glass-blur);-webkit-backdrop-filter:var(--glass-blur)}
:root[data-theme="light"] .hud::before{display:none}
/* A soft specular sweep across the top-left of each floating piece, as if a window were reflected in it. */
:root[data-theme="light"] .hud::after,:root[data-theme="light"] .now::after,:root[data-theme="light"] .kept::after{filter:blur(5px);
  background:radial-gradient(70% 90% at 22% 0%,rgba(255,255,255,.75),transparent 60%),linear-gradient(135deg,transparent 70%,rgba(255,255,255,.5))}
:root[data-theme="light"] .hud .puck{background:linear-gradient(160deg,#fff,rgba(255,255,255,.82));box-shadow:var(--bead)}
/* No recessed slot on paper: its gap from the glass edge read as a second, thick border. */
:root[data-theme="light"] .hud .slot{display:none}
:root[data-theme="light"] .hb>svg:not(.spin){filter:none}
:root[data-theme="light"] .hb.lit,:root[data-theme="light"] .hud[data-mode="track"] .sstop[aria-checked="true"],
:root[data-theme="light"] .hud[data-sel="lib"] #libBtn,:root[data-theme="light"] .hud[data-sel="home"] #homeBtn{color:var(--ink)}
:root[data-theme="light"] #dockSpeed.lit{color:var(--ink);text-shadow:none}
:root[data-theme="light"] .hud[data-mode="track"] .astop[aria-checked="true"]{color:var(--ink)}
:root[data-theme="light"] #dockAmb.lit{color:var(--ink);filter:none}
:root[data-theme="light"] .badge{box-shadow:0 0 0 2px var(--ground)}
:root[data-theme="light"] .hb .badge{box-shadow:0 0 0 2px #f7f5f2}
:root[data-theme="light"] .now .mini circle:first-child{stroke:rgba(28,28,36,.1)}
:root[data-theme="light"] .now .pp{background:rgba(255,255,255,.92);box-shadow:var(--raised)}
/* Idea pills: tinted crystal. The picture's colour lights the glass round the lens from inside and spills onto the
   paper under the pill, the way coloured glass throws coloured light. */
:root[data-theme="light"] .card{background:radial-gradient(110px 60px at 26px 50%,rgb(var(--tint,200 200 190) / .3),transparent 72%),var(--glass-fill);
  box-shadow:var(--glass-in),0 0 0 .5px rgba(22,24,34,.08),0 1px 2px rgba(30,28,40,.04),0 10px 22px -12px rgb(var(--tint,120 120 140) / .3),0 12px 26px -16px rgba(30,30,50,.1)}
:root[data-theme="light"] .card .sheen{opacity:.8}
/* Room under each row for the pills' light to fall, without moving the rows. */
:root[data-theme="light"] .lane2{padding-bottom:26px;margin-bottom:-12px}
:root[data-theme="light"] .strip .lane2{padding-bottom:24px;margin-bottom:-15px}
:root[data-theme="light"] .lens{background:radial-gradient(circle at 32% 26%,rgba(255,255,255,.7),transparent 55%),radial-gradient(circle,#e7e4df,#d6d3cd 72%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),inset 0 -2px 4px rgba(20,20,40,.18),0 0 0 .5px rgba(22,24,34,.08),0 3px 8px -3px rgba(30,30,50,.16)}
:root[data-theme="light"] .art .lens{box-shadow:var(--shadow-lens)}
:root[data-theme="light"] .lens b{color:rgba(28,28,36,.38)}
/* Fields are quiet: a pale fill, the grey hairline, a faint top line. */
:root[data-theme="light"] .ask,:root[data-theme="light"] .lfind,:root[data-theme="light"] .find .field{background:var(--hairline);box-shadow:none}
:root[data-theme="light"] .go,:root[data-theme="light"] .find .go,:root[data-theme="light"] .find-x,:root[data-theme="light"] .sug .w,:root[data-theme="light"] .handle,:root[data-theme="light"] .toast .ti.work{background:rgba(28,28,36,.05);box-shadow:none}
:root[data-theme="light"] .find-x:hover,:root[data-theme="light"] .handle:hover{background:rgba(28,28,36,.08)}
/* The primary action (go, once there is text; a toast's action) is brighter glass with blue ink. */
:root[data-theme="light"] .go.ready,:root[data-theme="light"] .find .go.ready,:root[data-theme="light"] .toast .open{background:rgba(255,255,255,.92);color:var(--ink);box-shadow:var(--raised)}
:root[data-theme="light"] .sug.sel,:root[data-theme="light"] .sug:hover,:root[data-theme="light"] .idea:hover,:root[data-theme="light"] .sheet .item:active{background:rgba(28,28,36,.04)}
/* Frosted panels: grain barely there on paper. */
:root[data-theme="light"] .find-in::after,:root[data-theme="light"] .toast::after{opacity:.05}
:root[data-theme="light"] .find-in,:root[data-theme="light"] .toast{background:linear-gradient(155deg,rgba(255,255,255,.8),rgba(252,250,247,.56));box-shadow:var(--glass)}
/* Fact cards: the same crystal as the pills, solid enough for reading. */
:root[data-theme="light"] .factcard{background:radial-gradient(130px 90px at 34px 34px,rgb(var(--tint,200 200 190) / .28),transparent 72%),linear-gradient(155deg,rgba(255,255,255,.8),rgba(255,255,255,.55));
  box-shadow:var(--glass-in),0 0 0 .5px rgba(22,24,34,.08),0 1px 2px rgba(30,28,40,.04),0 14px 30px -16px rgb(var(--tint,120 120 140) / .28),0 20px 40px -20px rgba(30,30,50,.1)}
:root[data-theme="light"] .factcard::after{background:radial-gradient(50% 80% at 24% -10%,rgba(255,255,255,.8),transparent 70%)}
:root[data-theme="light"] .toast .ti.bad{background:rgba(168,84,0,.12)}
/* Settings buttons: on is blue ink on brighter glass, off is faint. */
/* A large panel needs a lighter shadow than small glass: a hairline, a faint contact shade and a wide, very soft fall-off. */
:root[data-theme="light"] .sets,:root[data-theme="light"] .lib{background:linear-gradient(155deg,rgba(255,255,255,.8),rgba(252,250,247,.56));
  box-shadow:var(--glass-in),0 0 0 .5px rgba(22,24,34,.06),0 1px 2px rgba(30,28,40,.03),0 14px 36px -20px rgba(30,30,50,.08)}
:root[data-theme="light"] .keep{background:linear-gradient(155deg,rgba(255,255,255,.8),rgba(252,250,247,.56));
  box-shadow:var(--glass-in),0 0 0 .5px rgba(22,24,34,.06),0 1px 2px rgba(30,28,40,.03),0 14px 36px -20px rgba(30,30,50,.08)}
/* The Keep sheet's buttons are solid ink with white text and marks: white glass on the white sheet has nothing to
   stand on, and ink is light mode's colour for controls (as Apple's own light sign-in button is black). */
:root[data-theme="light"] .kbtn{color:#fff;background:var(--ink);backdrop-filter:none;-webkit-backdrop-filter:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 1px 2px rgba(30,28,40,.12),0 8px 20px -10px rgba(30,28,40,.4)}
:root[data-theme="light"] .kbtn::after{background:linear-gradient(180deg,rgba(255,255,255,.1),transparent 55%)}
:root[data-theme="light"] .kh .slot{background:rgba(28,28,36,.06);box-shadow:inset 0 1px 2px rgba(28,28,36,.12)}
:root[data-theme="light"] .seg{background:rgba(28,28,36,.06);box-shadow:inset 0 1px 2px rgba(28,28,36,.1)}
:root[data-theme="light"] .seg .spuck{background:linear-gradient(160deg,#fff,rgba(255,255,255,.82));box-shadow:var(--bead)}
:root[data-theme="light"] .seg.press .spuck{background:rgba(255,255,255,.1);backdrop-filter:blur(1px) saturate(1.4);-webkit-backdrop-filter:blur(1px) saturate(1.4);box-shadow:inset 0 0 0 .6px rgba(255,255,255,.9),inset 1.2px 1.2px 1px -.4px #fff,inset -1px -1.2px 1px -.4px rgba(255,255,255,.7),0 0 0 .5px rgba(22,24,34,.08),0 6px 14px -4px rgba(30,30,50,.2)}
:root[data-theme="light"] .tog{background:rgba(120,120,128,.18)}
:root[data-theme="light"] .tog[aria-checked="true"]{background:#34c759}
/* Library and Settings sit on a cream blur. The current row is a soft piece of glass. */
:root[data-theme="light"] .scrim{--d0:.9;--d1:.7;--d2:.35}
:root[data-theme="light"] .sheet h2,:root[data-theme="light"] .more .sh h2{text-shadow:none}
:root[data-theme="light"] .sheet .item.cur{background:var(--glass-fill);box-shadow:var(--glass-in),0 0 0 .5px rgba(22,24,34,.07),0 1px 2px rgba(30,28,40,.04),0 8px 20px -12px rgba(30,30,50,.1)}
:root[data-theme="light"] .sheet .item.cur::after{display:none}
/* Facts: the shimmer is a faint shade. */
:root[data-theme="light"] .factcard .bar{background-image:linear-gradient(90deg,rgba(28,28,36,.05) 0%,rgba(28,28,36,.11) 50%,rgba(28,28,36,.05) 100%)}
:root[data-theme="light"] .facts::after{box-shadow:inset 0 0 0 1px var(--edge),0 6px 14px -6px rgba(45,38,26,.18)}
/* Transcript: ink and violet for the two voices, no glow; unspoken words a faint tint. */
:root[data-theme="light"] .tin .w{--c:var(--speaker-a);background-image:linear-gradient(90deg,var(--c) 50%,color-mix(in srgb,var(--c) 24%,rgb(0 0 0 / .04)) 50%)}
:root[data-theme="light"] .tin .w.v0{--c:var(--speaker-a)}
:root[data-theme="light"] .tin .w.v1{--c:var(--speaker-b)}
:root[data-theme="light"] .tin .w.s{filter:none}
:root[data-theme="light"] .wbend .bw{--u:color-mix(in srgb,var(--c) 24%,rgb(0 0 0 / .04))}
:root[data-theme="light"] .wbend .l.s{text-shadow:calc(var(--fx,0px) * -1) 0 rgb(255 50 110 / var(--fa,0)),var(--fx,0px) 0 rgb(40 150 255 / var(--fa,0))}
/* The word lens on paper: a clear bead of glass, bright top-left edge, a catch bottom-right, a soft shadow under it. */
:root[data-theme="light"] .wlens{background:linear-gradient(160deg,rgba(255,255,255,.95),rgba(255,255,255,.6));
  box-shadow:inset 0 0 0 .5px rgba(255,255,255,.9),inset 1.5px 1.5px 0 -.5px #fff,inset -1px -1.5px 0 -.5px rgba(255,255,255,.8),inset 0 -5px 8px -6px rgba(36,36,70,.16),
    0 0 0 .5px rgba(22,24,34,.07),0 1px 2px rgba(30,28,40,.05),0 6px 16px -8px rgba(30,30,50,.12)}
/* The wheel is a glass disc on paper: a pale fill, the same highlight and hairline as every other piece of glass (no
   dark outline), a soft shadow under it that folds away with the ring (transcript.js sets --ring-o), dots etched in. */
/* No glows or colour fields on paper: the glow and the Home gradient are dark mode's. */
:root[data-theme="light"] .glow,:root[data-theme="light"] .aura,:root[data-theme="light"] .hour::before{display:none}
/* The wheel's shadow, anchored right under it: a soft contact shade at the rim and a faint wide fall-off below. */
:root[data-theme="light"] .stage::before{content:"";position:absolute;inset:1% 1% -2%;border-radius:50%;pointer-events:none;
  background:radial-gradient(closest-side,rgba(30,30,50,.09),rgba(30,30,50,.05) 82%,rgba(30,30,50,.02) 94%,transparent);opacity:var(--ring-o,1);
  filter:blur(6px);
  /* Only under the ring: the hole round the play button stays clear paper. */
  -webkit-mask-image:radial-gradient(closest-side,transparent 48%,#000 56%);mask-image:radial-gradient(closest-side,transparent 48%,#000 56%)}
/* The ring's body: bright toward the top, clearer toward the bottom, so the light under it shows through. */
:root[data-theme="light"] #glassBody stop:first-child{stop-color:#fff;stop-opacity:.6}
:root[data-theme="light"] #glassBody stop:last-child{stop-color:#fff;stop-opacity:.3}
:root[data-theme="light"] #ringG circle[stroke="#000"]{stroke:rgba(22,24,34,.16)}
:root[data-theme="light"] #glassEdge stop:nth-child(1){stop-opacity:1}
:root[data-theme="light"] #glassEdge stop:nth-child(2){stop-opacity:.45}
:root[data-theme="light"] #glassEdge stop:nth-child(3){stop-opacity:.15}
:root[data-theme="light"] #glassEdge stop:nth-child(4){stop-opacity:.45}
:root[data-theme="light"] #glassEdge stop:nth-child(5){stop-opacity:.95}
:root[data-theme="light"] #ringG circle[r="189.1"],:root[data-theme="light"] #ringG circle[r="90.9"]{stroke-width:2.4}
/* Thick glass at each rim: a faint darker band just inside the bright edge, where the glass bends the light away. */
:root[data-theme="light"] #ringG circle[r="186.4"],:root[data-theme="light"] #ringG circle[r="93.6"]{stroke:#26284a;stroke-width:5;stroke-opacity:.05}
:root[data-theme="light"] #glassSheen stop:first-child,:root[data-theme="light"] #glassSheen stop:last-child{stop-opacity:.55}
:root[data-theme="light"] #etch stop{stop-color:var(--ink)}
:root[data-theme="light"] #etch stop:first-child{stop-opacity:.07}
:root[data-theme="light"] #etch stop:last-child{stop-opacity:.14}
:root[data-theme="light"] #etchPend stop{stop-color:var(--ink);stop-opacity:.05}
:root[data-theme="light"] #etchLip stop:first-child{stop-color:var(--ink);stop-opacity:.25}
:root[data-theme="light"] #etchLip stop:last-child{stop-color:#fff;stop-opacity:.9}
:root[data-theme="light"] #buf{stroke:var(--ink);stroke-opacity:.06}
:root[data-theme="light"] #ghost{fill:var(--ink)}
:root[data-theme="light"] #capShade{display:inline}
/* The play button is brushed aluminium, the light twin of the dark chrome: silver, engraved ink icons, and a 3 px blue
   ring (shadow-neon's light value) in place of the glow, which washes out on paper. */
:root[data-theme="light"] .center{background:
    repeating-radial-gradient(circle at 50% 50%,rgba(255,255,255,.18) 0 .6px,rgba(0,0,0,.025) .6px 1.4px),
    radial-gradient(circle at 50% 50%,transparent 55%,rgba(45,38,26,.14) 100%),
    conic-gradient(from -40deg,#d9d8d5,#fbfaf8 9%,#dcdbd8 20%,#cfcecb 32%,#f4f3f1 45%,#d7d6d3 56%,#cac9c6 70%,#f7f6f4 83%,#d9d8d5);
  box-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 rgba(45,38,26,.18),inset 0 0 0 .5px rgba(45,38,26,.12),0 1px 2px rgba(45,38,26,.08),0 6px 14px -8px rgba(45,38,26,.14)}
:root[data-theme="light"] .center svg [fill="#f4f4f6"]{fill:var(--ink)}
:root[data-theme="light"] .center svg [stroke="#f4f4f6"]{stroke:var(--ink)}
:root[data-theme="light"] .center svg{filter:drop-shadow(0 1px 0 rgba(255,255,255,.9))}
:root[data-theme="light"] .beckon{background:radial-gradient(circle,rgba(160,108,250,.5) 0 44%,rgba(160,108,250,.25) 55%,rgba(160,108,250,.08) 63%,rgba(160,108,250,0) 71%)}
/* Colour stays on the click wheel: every other accent (badges, progress rings, the ready tick, the playing bars, the
   Library call, focus) is ink. */
:root[data-theme="light"] :focus-visible{outline-color:var(--ink)}
:root[data-theme="light"] .field input{caret-color:var(--ink)}
:root[data-theme="light"] #lg stop{stop-color:var(--ink)}
:root[data-theme="light"] .badge,:root[data-theme="light"] .eq i{background:var(--ink)}
:root[data-theme="light"] .toast .ti.ok{background:var(--ink)}
:root[data-theme="light"] .toast .ti.ok path{stroke:#fff}
:root[data-theme="light"] .sug .w.have{background:rgba(255,255,255,.92);color:var(--ink);box-shadow:var(--raised)}
:root[data-theme="light"] .hb.call::after{box-shadow:0 0 0 2px rgba(27,28,32,.55),0 0 14px rgba(27,28,32,.18)}

/* ===== The first visit (first-visit.js, docs/first-visit.md) =====
   A welcome, then the guide over the real app: the screen dims (the scrim) except the lit control, cut in its own
   shape with no outline; the host's name in their colour and their line sit straight on the dim, lit word by word;
   buttons sit at the bottom by the thumb; Skip is plain words in the top-right corner throughout. No card, no blur. */
.fvw{position:fixed;inset:0;z-index:2000;display:flex;flex-direction:column;justify-content:flex-end;padding:0 22px calc(28px + env(safe-area-inset-bottom,0px));
  background:var(--ground);opacity:0;pointer-events:none;transition:opacity .45s ease}
.fvw.on{opacity:1;pointer-events:auto}
@media (min-width:960px){.fvw{justify-content:center;padding-bottom:0}}
.fvwin{width:100%;max-width:420px;margin:0 auto;text-align:center;transform:translateY(16px);transition:transform .6s var(--ease-settle)}
.fvw.on .fvwin{transform:none}
.fvw h1{margin:0;font:700 clamp(32px,9vw,38px)/1.08 var(--font-sans);letter-spacing:-.03em;color:var(--text)}
.fvw p{margin:14px auto 28px;max-width:330px;font:500 17px/1.45 var(--font-sans);color:var(--text-2);text-wrap:balance}
.fvgo{width:100%;max-width:420px;height:56px;border:0;border-radius:var(--radius-pill);background:var(--text);color:var(--ground);font:600 17px/1 var(--font-sans);letter-spacing:-.01em;cursor:pointer;transition:transform .15s}
.fvgo:active{transform:scale(.97)}
.fv{position:fixed;inset:0;z-index:2000;pointer-events:none;opacity:0;transition:opacity .38s ease}
.fv.on{opacity:1}
/* The lit control: a clean cut in the dim. It glides only when its control changes shape. */
.fvhole{position:fixed;left:0;top:0;width:0;height:0;pointer-events:none;box-shadow:0 0 0 3000px var(--scrim);
  transition:left .42s var(--ease-settle),top .42s var(--ease-settle),width .42s var(--ease-settle),height .42s var(--ease-settle),border-radius .42s var(--ease-settle)}
.fv.snap .fvhole,.fv.snap .fvcopy{transition:none!important}
.fvcopy{position:fixed;left:0;top:0;width:min(330px,calc(100vw - 48px));text-align:center;pointer-events:none;transition:transform .42s var(--ease-settle)}
.fvcopy::before{content:"";position:absolute;inset:-34px -40px;z-index:-1;border-radius:50%;background:radial-gradient(closest-side,var(--scrim),transparent)}
.fvwho{margin:0 0 6px;font:700 12px/18px var(--font-sans);letter-spacing:.07em;text-transform:uppercase;color:var(--text)}
.fvt{margin:0;font:700 25px/1.18 var(--font-sans);letter-spacing:-.025em;color:var(--text);text-wrap:balance}
.fvwho[hidden],.fvt[hidden]{display:none}
.fvwd{display:inline-block;opacity:.3;transition:opacity .22s ease}
.fvwd.on{opacity:1}
.fvact{position:fixed;left:18px;right:18px;bottom:calc(16px + env(safe-area-inset-bottom,0px));display:none;flex-direction:column;align-items:center;gap:4px;pointer-events:auto}
.fvact.on{display:flex}
.fvact.wide{right:auto;bottom:auto;min-width:280px}
.fvskip{position:fixed;right:10px;top:calc(env(safe-area-inset-top,0px) + 8px);z-index:2001;height:40px;padding:0 14px;border:0;background:none;color:var(--text-2);font:600 15px/1 var(--font-sans);cursor:pointer;
  opacity:0;pointer-events:none;transition:opacity .3s}
.fvskip.on{opacity:1;pointer-events:auto}
/* A tap, shown on the control: a ring rippling out. A turn, shown on the ring when the app's own knob isn't showing. */
.fvrip{position:fixed;left:0;top:0;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;pointer-events:none;opacity:0;border:2.5px solid var(--text)}
.fvrip.on{animation:fvrip 1.5s cubic-bezier(.2,.7,.3,1) infinite}
@keyframes fvrip{0%{transform:scale(.45);opacity:1}70%{opacity:.25}100%{transform:scale(1.7);opacity:0}}
.fvghost{position:fixed;left:0;top:0;border-radius:50%;pointer-events:none;opacity:0;background:var(--text)}
/* The hosts beat: Hosts on its own over the player, low by the thumb, accents only (who explains waits for Settings). */
.fv-hosts .pane.s .acard,.fv-hosts .sstack>.setsp{display:none!important}
.fv-hosts .sstack{margin-top:auto!important}
.fv-hosts #hostsp .hhead,.fv-hosts #hostsp .srow:has(#leadSeg){display:none}
@media (prefers-reduced-motion:reduce){.fvrip.on{animation:none;opacity:.8}.fvwd{transition:none}}

/* ---------- the structure (docs/wikicasts-structure-build-plan.md): places, the Player as a layer, tasks as sheets ---------- */
/* Phones: the bottom bar is the capsule (Home, Your casts) at the left and the collapsed Player filling the rest
   (mini-player.js). With nothing to continue, or during the welcome, the capsule sits alone in the middle. */
@media (max-width:959px){
  body.has-mini:not(:has(#fvskip.on)) .hud[data-mode="menu"]{left:calc(16px + env(safe-area-inset-left,0px));transform:none}
  body.has-mini:not(:has(#fvskip.on)) .hud[data-mode="menu"].away{transform:translateY(18px) scale(.96)}
}
/* The collapsed Player: the Player folded with its text open, in one pill as tall as the bar. The drums and the name
   (truffle.css .odo, .cname, placed by capsule.js) open the Player; the spun-chrome button (.center) sits inside the
   glass at the right end and plays and pauses. Fine teeth (.rack) run along its lower edge, clear of the button. */
.mini{position:fixed;z-index:10;left:min(calc(16px + env(safe-area-inset-left,0px) + var(--hud-w,112px) + 8px),calc(100% - 160px));right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));
  display:flex;align-items:center;height:58px;box-sizing:border-box;padding:0 5px 0 16px;border-radius:var(--radius-pill);color:var(--text);isolation:isolate;
  background:var(--glass-control);backdrop-filter:blur(16px) saturate(1.6);-webkit-backdrop-filter:blur(16px) saturate(1.6);border:1px solid var(--hairline);
  box-shadow:inset 2px -2px 1px -1px rgba(255,255,255,.34),inset -2px 2px 1px -1px rgba(255,255,255,.34),
    inset 6px -6px 1px -6px rgba(255,255,255,.2),inset -6px 6px 1px -6px rgba(255,255,255,.2),
    inset 0 0 2px rgba(255,255,255,.22),0 10px 28px rgba(0,0,0,.6);
  transition:opacity .3s,transform .4s var(--ease-settle),filter .3s}
/* It steps aside with the capsule while you type (the keyboard covers the bottom), and under New cast and sign-in. */
.mini:not(.on),body:has(#hud.away) .mini,body.finding .mini,body:has(.keep.on) .mini{opacity:0;filter:blur(6px);transform:translateY(18px) scale(.94);pointer-events:none}
.mopen{flex:1;min-width:0;height:100%;display:flex;align-items:center;padding:0 12px 0 0;border:0;background:none;color:inherit;font:inherit;cursor:pointer;text-align:left}
.mini .odo{padding-right:12px}
.mini .cname{flex:none}
.mini.tight .ou{display:none}
.mini .rack{left:20px;right:60px}
.mini .mbtn{position:relative;left:auto;top:auto;transform:none;flex:none;width:46px;height:46px;display:grid;place-items:center;
  box-shadow:inset 0 1.5px 0 rgba(255,255,255,.35),inset 0 -1.5px 0 rgba(0,0,0,.6),inset 0 0 0 3px rgba(0,0,0,.35),inset 0 0 0 4px rgba(255,255,255,.07),0 4px 12px rgba(0,0,0,.5)}
/* The 3 px neon edge, scaled to the smaller button. */
.mini .mbtn::before{box-shadow:inset 0 0 0 2.5px #ac76ff,inset 0 0 0 3.5px rgba(0,0,0,.35),inset 0 0 10px rgba(172,118,255,.35),0 0 0 .5px rgba(205,175,255,.5),0 0 10px rgba(150,95,255,.5)}
.mini .mbtn:active{transform:scale(.93)}
#miniFace{display:grid;place-items:center}
#miniFace svg{width:19px;height:auto}
/* Light: the aluminium button's own soft shadow and its ring scaled to this size, not dark mode's deep drop shadow. */
:root[data-theme="light"] .mini{border:0;background:var(--glass-fill);box-shadow:var(--glass);backdrop-filter:var(--glass-blur);-webkit-backdrop-filter:var(--glass-blur)}
:root[data-theme="light"] .mini .mbtn{box-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 rgba(45,38,26,.18),inset 0 0 0 .5px rgba(45,38,26,.12),0 1px 2px rgba(45,38,26,.08)}
:root[data-theme="light"] .mini .mbtn::before{box-shadow:inset 0 0 0 2.2px #a06cfa,inset 0 0 0 2.7px rgba(255,255,255,.6),0 0 0 .5px rgba(110,60,200,.25)}

/* Settings' gear (sources.css gives it the + button's glass): Home only, top right. While Settings is open it stays
   above the dimming, so tapping it again closes Settings. */
body:not(:has(#main.home)) .gear,body.finding .gear,body.lib-open:has(.sheet:not(.set)) .gear,body:has(#fvskip.on) .gear{opacity:0;filter:blur(6px);transform:scale(.9);pointer-events:none}
body:has(.sheet.set.on) .gear{z-index:12}
/* More (share.js, docs/wikicasts-sharing.md): three dots in the same glass circle in the same place, on an open cast instead of Home.
   It goes while search, Your casts, Settings or the first visit's guide is up. */
body:not(:has(#main.home)) .gear.share{opacity:1;filter:none;transform:none;pointer-events:auto}
body:not(:has(#main.home)) .gear.share:active{transform:scale(.92)}
.gear.share svg{filter:none}
/* Phones: Down leaves the dock (library.js moves the button out of the capsule) for More's glass circle at the top
   left, so the two balance above the title. It hides whenever the dock would (.off); the dock's first divider goes. */
@media (max-width:959px){
  #dockSep{display:none}
  #dockClose.down{position:fixed;z-index:10;top:calc(12px + env(safe-area-inset-top,0px));left:calc(16px + env(safe-area-inset-left,0px));width:46px;height:46px;margin:0;padding:0;
    border-radius:50%;display:grid;place-items:center;color:var(--icon);isolation:isolate;cursor:pointer;
    background:var(--glass-control);backdrop-filter:blur(16px) saturate(1.6);-webkit-backdrop-filter:blur(16px) saturate(1.6);border:1px solid var(--hairline);
    box-shadow:inset 2px -2px 1px -1px rgba(255,255,255,.34),inset -2px 2px 1px -1px rgba(255,255,255,.34),inset 0 0 2px rgba(255,255,255,.22),0 10px 28px rgba(0,0,0,.6);
    transition:opacity .3s,transform .4s var(--ease-settle),filter .3s}
  #dockClose.down svg{width:22px;height:22px}
  #dockClose.down:active{transform:scale(.92)}
  #dockClose.down.off{width:46px;opacity:0;filter:blur(6px);transform:scale(.9);pointer-events:none}
  :root[data-theme="light"] #dockClose.down{border:0;color:var(--ink);background:var(--glass-fill);box-shadow:var(--glass);backdrop-filter:var(--glass-blur);-webkit-backdrop-filter:var(--glass-blur)}
}
/* The cast menu: Settings' frosted card at the foot of the screen, under the cast's name. Rows as in Settings: the
   label on the left, its icon on the right, hairlines between. It rises as the look does, over the same blur. */
.more{position:fixed;z-index:61;left:env(safe-area-inset-left,0px);right:env(safe-area-inset-right,0px);bottom:calc(2px + env(safe-area-inset-bottom,0px));max-width:520px;margin:0 auto;outline:none;visibility:hidden;
  transform:translateY(calc(100% + 24px));transition:transform .45s var(--ease-settle),visibility 0s .45s}
.more.on{transform:none;visibility:visible;transition-delay:0s}
.more .sets{margin:0 12px 10px}
/* The cast's own card above the rows (as the sign-in card sits above Settings): its lens, name and what it is. */
.more .mhead{display:flex;align-items:center;gap:14px;padding:14px 20px}
.mhead .lk-lens .lens{width:44px;height:44px;font-size:44px;background:radial-gradient(circle at 35% 30%,var(--pa,var(--text-2)),var(--pc,var(--ground)))}
.mhead .lk-lens .lens b{display:none}
.mhead .fx{min-width:0;flex:1}
.mhead h2{font-size:17px;font-weight:700;letter-spacing:-.02em;line-height:1.2;margin:0;color:var(--text);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.mmeta{display:flex;align-items:center;gap:5px;margin:2px 0 0;font-size:13.5px;color:var(--text-2);font-variant-numeric:tabular-nums}
.mmeta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mmeta .mlock{flex:none}
.mrow .hpair{color:var(--icon)}
/* Link copied, in Share's own row: the label changes and a tick on a white disc takes the icon's place. */
.mrow .mtick{display:none;width:22px;height:22px;border-radius:50%;background:var(--text);color:var(--ground);place-items:center}
.mrow.copied #moreShareI{display:none}
.mrow.copied .mtick{display:grid;animation:mtick .3s var(--ease-pop,ease-out) both}
.mrow.copied .slabel{animation:mtick-t .3s ease both}
@keyframes mtick{from{transform:scale(.4);opacity:0}}
@keyframes mtick-t{from{opacity:0}}
/* The menu takes Settings' depth: the page behind dims further than under the look. */
body.menu-open main{opacity:.22}
.more-scrim{background:linear-gradient(to top,color-mix(in srgb,var(--page-background) 86%,transparent),color-mix(in srgb,var(--page-background) 62%,transparent) 45%,color-mix(in srgb,var(--page-background) 38%,transparent))}
.mrow.danger .slabel,.mrow.danger .hpair{color:var(--danger)}
.mrow[hidden]{display:none}
.mrow[hidden]+.mrow::before{display:none}
/* Three dots beside every cast in Your casts open the same menu; they step aside while the row is swiped. */
.sw-row .item{padding-right:50px}
.rmore{position:absolute;right:2px;top:50%;translate:0 -50%;z-index:1;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--text-2);display:grid;place-items:center;cursor:pointer;transition:opacity .15s}
.rmore:active{background:var(--glass-3)}
.sw-row.reveal .rmore,.sw-row.dragging .rmore{opacity:0;pointer-events:none}
body:has(#main.home) .gear.share,body.finding:not(:has(#main.home)) .gear.share,body.lib-open:not(:has(#main.home)) .gear.share,body:has(#fvskip.on):not(:has(#main.home)) .gear.share,body:has(#main.boot) .gear.share{opacity:0;filter:blur(6px);transform:scale(.9);pointer-events:none}

/* Phones: Settings is a sheet that rises over the bottom bar too (the capsule and the collapsed Player sit dimmed under
   it); the sign-in sheet opens above it, also over the bar. Tapping above either closes it, as before. */
@media (max-width:959px){
  body:has(.sheet.set.on) .scrim,body:has(.keep.on) .scrim{z-index:11}
  .sheet.set:not(.behind){z-index:12}
  .sheet.set .pane.s{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
  .keep{z-index:13;bottom:calc(12px + env(safe-area-inset-bottom,0px))}
}

/* The look (look.js): the fact card's parts (lens, eyebrow, text) straight on Settings' frosted pane, then Narration
   and Conversation side by side. Like every panel, the page behind steps back (Settings' scale and dimming) under a
   blur in the page's own colour, and stands still (the lanes stop in search.js, the glow here); over New cast, its
   panel steps back too. Phones: a shade like Settings', darkest behind the card and clearing toward the top, but
   lighter, since the card is short and more of the page shows. */
.look-scrim{position:fixed;inset:0;z-index:60;opacity:0;pointer-events:none;transition:opacity .35s var(--ease-out);
  background:linear-gradient(to top,color-mix(in srgb,var(--page-background) 72%,transparent),color-mix(in srgb,var(--page-background) 40%,transparent) 45%,color-mix(in srgb,var(--page-background) 12%,transparent));
  backdrop-filter:blur(6px) saturate(1.3);-webkit-backdrop-filter:blur(6px) saturate(1.3)}
.look-scrim.on{opacity:1;pointer-events:auto}
body.looking header,body.looking main{scale:.955}
body.looking main{opacity:.4}
body.looking .aura::before,body.looking .aura::after{animation-play-state:paused}
.find-in{transition:transform .5s var(--ease-settle),opacity .35s,filter .4s,scale .5s var(--ease-settle)}
body.looking .find.on .find-in{scale:.955;opacity:.4}
.look{position:fixed;z-index:61;left:calc(12px + env(safe-area-inset-left,0px));right:calc(12px + env(safe-area-inset-right,0px));bottom:calc(12px + env(safe-area-inset-bottom,0px));max-width:440px;margin:0 auto;
  border-radius:30px;color:var(--text);outline:none;visibility:hidden;
  background:var(--frost);backdrop-filter:blur(30px) saturate(1.8) brightness(1.08);-webkit-backdrop-filter:blur(30px) saturate(1.8) brightness(1.08);box-shadow:var(--shadow-frost);
  transform:translateY(calc(100% + 24px));transition:transform .45s var(--ease-settle),visibility 0s .45s}
.look.on{transform:none;visibility:visible;transition-delay:0s}
.lk-card{padding:22px 20px 4px}
.lk-row{display:flex;align-items:center;gap:16px}
.lk-lens{flex:none;display:grid;place-items:center}
.lk-lens .lens{position:relative;width:52px;height:52px;font-size:52px;box-shadow:var(--shadow-lens)}
.lk-lens :is(.lk-logo,.slk-logo){display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:var(--hairline)}
.lk-lens :is(.lk-logo,.slk-logo) .sico{width:30px;height:30px;border-radius:9px}
.lk-lens :is(.lk-logo,.slk-logo) .sico.w{font-size:17px;border-radius:50%}
.lk-title{margin:0;font-size:19px;font-weight:700;letter-spacing:-.02em;line-height:1.2;color:var(--text)}
/* The whole summary (docs/look-full-summary.md), starting at the lens's left edge. Never shorter than three lines, so a
   short one arrives without moving the card; a longer one grows it (look.js). Eight lines is only a guard: the service
   sends about five at most. With no summary the card is the lens, eyebrow and title. */
.lk-sum{margin-top:16px;line-height:1.45;min-height:calc(3 * 1.45em);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:8;overflow:hidden;color:var(--text-2)}
.lk-sum[hidden]{display:none}
/* While the summary is written: three shimmering lines (the fact card's skeleton), as tall as the summary will be. */
.lk-sum.writing{display:grid;grid-template-rows:repeat(3,1.45em);align-items:center}
.lk-sum .bar{display:block;height:11px;margin:0;border-radius:6px;width:100%;
  background:linear-gradient(90deg,rgba(255,255,255,.06) 0%,rgba(255,255,255,.16) 50%,rgba(255,255,255,.06) 100%) 0 0/200% 100%;animation:shim 1.6s linear infinite}
.lk-sum .bar.short{width:62%}
:root[data-theme="light"] .lk-sum .bar{background-image:linear-gradient(90deg,rgba(28,28,36,.05) 0%,rgba(28,28,36,.11) 50%,rgba(28,28,36,.05) 100%)}
@media(prefers-reduced-motion:reduce){.lk-sum .bar{animation:none}}
/* The sign-in sheet's buttons: Conversation, the lead, is the filled one on the right; Narration the quieter glass. */
.lk-acts{display:flex;gap:10px;padding:22px 18px 18px}
.look .kbtn{flex:1;min-width:0;padding:0 8px;white-space:nowrap}
.look .kbtn[data-narr="true"],:root[data-theme="light"] .look .kbtn[data-narr="true"]{color:var(--text);background:var(--glass-control);
  backdrop-filter:blur(16px) saturate(1.6);-webkit-backdrop-filter:blur(16px) saturate(1.6);box-shadow:var(--shadow-capsule)}
.look .kbtn[data-narr="true"]::after,:root[data-theme="light"] .look .kbtn[data-narr="true"]::after{background:linear-gradient(45deg,rgba(255,255,255,.08) 0%,transparent 25%,transparent 75%,rgba(255,255,255,.08) 100%)}
@media (prefers-reduced-motion:reduce){.look,.mini,.gear{transition:opacity .25s,visibility 0s}}

/* Large screens (decision 8): the same structure, shown as panels and dialogs. The rail keeps + and the two places;
   Your casts and New cast stay panels beside it over a dimmed, blurred Home. The collapsed Player sits above Home's
   heading, where the wheel was, and hugs its name; the gear sits top right, and Settings and sign-in drop from it as a
   panel there; the look is a dialog in the middle. */
@media (min-width:960px){
  .mini{left:50%;right:auto;bottom:auto;width:auto;max-width:360px;translate:-50% 0;padding-left:18px}
  .mopen{flex:0 1 auto;padding-right:14px}
  body.has-mini main.home .info{padding-top:88px;transition:padding-top .4s var(--ease-settle)}
  .sheet.set{left:auto;right:16px;top:76px;transform:translateY(-8px) scale(.96);transform-origin:top right}
  .sheet.set.on{transform:none}
  .sheet.set .acard{margin:0 8px 10px 0}
  .sheet.set .sstack,.sheet.set .acard[hidden]+.sstack{margin:0 8px auto 0}
  .sheet.set .sstack>.sets{align-self:start}
  .sheet.set .sh{margin-top:0}
  .keep{left:auto;right:24px;top:84px;transform:translateY(-8px) scale(.96);transform-origin:top right;z-index:13}
  .keep.on{transform:none}
  body:has(.keep.on) .scrim{z-index:11}
  /* The dimming is heaviest where the panel is: on the right for Settings and sign-in. */
  body:has(.sheet.set.on) .scrim,body:has(.keep.on) .scrim{--dir:to left}
  .look{top:50%;bottom:auto;left:50%;right:auto;width:440px;margin:0;translate:-50% -50%;transform:scale(.96);opacity:0;transition:transform .35s var(--ease-settle),opacity .25s,visibility 0s .35s}
  .look.on{transform:none;opacity:1}
  .look-scrim{background:color-mix(in srgb,var(--page-background) 55%,transparent);backdrop-filter:blur(12px) saturate(1.3);-webkit-backdrop-filter:blur(12px) saturate(1.3)}
}
