/* Copyright (c) 2026 FR&D. All rights reserved. */

/* /interactive: the promo video as a page. An app shell, not a document, so this stands
   apart from styles.css: one viewport, a stage in the middle, a bar above and below. The
   tokens are the video's own palettes (video/src/theme.ts) rather than the landing page's, so
   the ground around the frame is the frame's ground and the letterbox disappears. The page
   has a theme toggle, so both sides are spelled out and data-theme outranks the OS. */

:root {
  --bg: #f5f2eb;
  --bg2: #ebe6dc;
  --ink: #1d1b1a;
  --muted: #6f6861;
  --faint: #979087;
  --line: rgba(29, 27, 26, 0.14);
  --accent: #5c3d82;
  --on-accent: #ffffff;
  --accent-soft: #e7dfed;
  --serif: "Newsreader", "Iowan Old Style", Baskerville, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b;
    --bg2: #111014;
    --ink: #f3eee6;
    --muted: #b7b0a6;
    --faint: #7c756e;
    --line: rgba(243, 238, 230, 0.12);
    --accent: #c4a7e7;
    --on-accent: #21182b;
    --accent-soft: #2a2133;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b;
  --bg2: #111014;
  --ink: #f3eee6;
  --muted: #b7b0a6;
  --faint: #7c756e;
  --line: rgba(243, 238, 230, 0.12);
  --accent: #c4a7e7;
  --on-accent: #21182b;
  --accent-soft: #2a2133;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}
#app { height: 100%; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Frame */
.page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  /* minmax(0, …) and min-width: 0 keep a wide row (the scaled frame, a long
     control bar) from growing the track past the viewport at phone width. */
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  height: 100dvh;
}
.page > * { min-width: 0; }
.bar {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--bg2);
}
.bar-top { border-bottom: 1px solid var(--line); }
.bar-bottom { border-top: 1px solid var(--line); }
.group { display: flex; align-items: center; gap: 6px; }
.bar-top .group { margin-left: auto; }

.wordmark {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1;
  text-decoration: none;
}
.wordmark-mark { color: var(--accent); }
.strap { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.strap-detail { color: var(--faint); }

/* ---- Buttons. Quiet pills; a pressed toggle and the primary action take the accent. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--bg); border-color: var(--muted); }
.btn[aria-pressed="true"], .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn[aria-pressed="true"]:hover, .btn-primary:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.08); }
.btn-icon { font-size: 12px; line-height: 1; opacity: .85; }
.btn-primary .btn-icon { font-size: 11px; }
.btn-icon-only { padding: 6px 12px; font-size: 16px; font-weight: 500; }
.btn-detail { max-width: 15ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-count { color: var(--faint); font-size: 11px; }
.btn:disabled { opacity: .5; cursor: default; }
.zoom-level { min-width: 64px; justify-content: center; font-weight: 500; }
.transport .btn-primary { min-width: 96px; justify-content: center; }

/* ---- Stage. The Player fits inside; the view is what pans and zooms. */
.stage {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  touch-action: none;
  cursor: default;
}
.stage.is-playing { cursor: pointer; }
.stage.is-zoomed { cursor: grab; }
.stage.is-zoomed:active { cursor: grabbing; }
.stage-view {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
  user-select: text;
  -webkit-user-select: text;
}
.stage-view.ease { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }

.hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  width: max-content;
  max-width: calc(100% - 32px); /* wraps on a phone instead of running out of the stage */
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg2) 88%, transparent);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
  animation: hint-in .6s ease .8s both;
}
.hint kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
@keyframes hint-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Transport row */
.scrub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 220px;
  min-width: 160px;
}
.scrub input[type="range"] {
  flex: 1;
  min-width: 0;
  height: 28px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.clock { color: var(--muted); font-size: 12px; white-space: nowrap; }

.chapters {
  display: flex;
  gap: 2px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.chapters::-webkit-scrollbar { display: none; }
/* When the row scrolls (a phone), the side with more fades out over its last 28 px, so a
   cut-off label reads as "more this way"; the fade goes when that side is fully in view. */
.chapters[data-overflow="right"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.chapters[data-overflow="left"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
.chapters[data-overflow="left right"] {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.chapters button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
}
.chapters button:hover { color: var(--ink); }
.chapters button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.chapter-n { color: var(--faint); font-size: 11px; }
.chapters button[aria-current="true"] .chapter-n { color: var(--accent); }

.status {
  flex: 1 1 100%;
  margin: 0;
  color: var(--faint);
  font-size: 12px;
  min-height: 1.4em;
}

@media (min-width: 1100px) {
  .status { flex-basis: auto; margin-left: auto; text-align: right; max-width: 34ch; }
}
@media (max-width: 720px) {
  .strap-detail { display: none; }
  .bar { padding: 8px 12px; }
  .btn { min-height: 34px; padding: 6px 11px; }
  .btn-detail, .btn-count { display: none; }
  .transport .btn-primary { min-width: 0; }
  .zoom { display: none; }
}

/* ---- Hotspots. While the picture is paused every element the scenes marked with data-info
   (video/src/info.ts) is alive: pointer cursor; on hover and keyboard focus it lifts and swells
   with a springy ease and glows; pressed it squashes, released it pops; the cursor object
   (data-current, set by video/src/interactive/panel.tsx) breathes; found objects carry a
   small mark; an idle frame's unfound objects take one staggered breath (data-attract). The
   motion uses the individual `translate` / `scale` properties so the frame's own inline
   `transform` (Rise, Block, the Camera) is never touched. Nothing here reaches the renders:
   the MP4s never load this file, and nothing matches while `.stage.is-playing`. Outline
   widths are in frame pixels, drawn through the Player's scale. The scenes' full-frame SVGs
   (relay lines, the map's edges) would otherwise sit over the copy beneath them and swallow
   its clicks: they pass the pointer through except on their own marked nodes. */
.stage svg { pointer-events: none; }
.stage svg [data-info] { pointer-events: visiblePainted; }
.stage:not(.is-playing) [data-info] {
  cursor: pointer;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  transition:
    translate .2s var(--spring),
    scale .2s var(--spring),
    box-shadow .2s ease,
    outline-color .2s ease,
    filter .2s ease;
}
.stage:not(.is-playing) svg [data-info] {
  transform-box: fill-box;
  transform-origin: center;
}
.stage:not(.is-playing) [data-info]:hover,
.stage:not(.is-playing) [data-info]:focus-visible {
  translate: 0 -6px;
  scale: 1.04;
  outline: 4px solid var(--accent);
  outline-offset: 6px;
  box-shadow:
    0 0 0 12px color-mix(in srgb, var(--accent) 22%, transparent),
    0 24px 40px -10px color-mix(in srgb, var(--ink) 45%, transparent);
}
.stage:not(.is-playing) [data-info]:active {
  translate: 0 -1px;
  scale: .96;
  transition-duration: .08s;
}
/* The cursor: a stronger persistent glow and a gentle continuous breath. */
.stage:not(.is-playing) [data-info][data-current] {
  outline: 5px solid var(--accent);
  outline-offset: 6px;
  box-shadow:
    0 0 0 14px color-mix(in srgb, var(--accent) 30%, transparent),
    0 0 40px color-mix(in srgb, var(--accent) 60%, transparent);
}
.stage:not(.is-playing) [data-info][data-current]:not(:active) { animation: info-breathe 2.4s ease-in-out infinite; }
@keyframes info-breathe {
  0%, 100% { scale: 1.02; }
  50% { scale: 1.06; }
}
/* Outline and box-shadow do not paint on an SVG <g>: a drop-shadow does, and a stroke on the node. */
.stage:not(.is-playing) svg [data-info]:hover,
.stage:not(.is-playing) svg [data-info]:focus-visible {
  outline: none;
  box-shadow: none;
  translate: 0 0;
  scale: 1.12;
  filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 14px var(--accent));
}
.stage:not(.is-playing) svg [data-info]:active { scale: 1.02; }
.stage:not(.is-playing) svg [data-info][data-current] {
  outline: none;
  box-shadow: none;
  filter: drop-shadow(0 0 8px var(--accent)) drop-shadow(0 0 22px var(--accent));
}
.stage:not(.is-playing) svg [data-info][data-current]:not(:active) { animation: info-breathe-svg 2.4s ease-in-out infinite; }
@keyframes info-breathe-svg {
  0%, 100% { scale: 1.06; }
  50% { scale: 1.14; }
}
.stage:not(.is-playing) svg [data-info][data-current] circle {
  stroke: var(--accent);
  stroke-width: 4;
}
/* The edges joined to the hovered or current node (map edges, relay lines, delivery spokes). */
.stage:not(.is-playing) svg line[data-edge] { transition: stroke-width .2s ease, stroke-opacity .2s ease, filter .2s ease; }
.stage:not(.is-playing) svg line[data-lit] {
  stroke: var(--accent);
  stroke-opacity: 1;
  stroke-width: 5;
  filter: drop-shadow(0 0 5px var(--accent));
}
/* While an object is open (the stage carries data-open), hovering another object is a glow,
   not a second ring or lift: one highlighted object at a time while thumbing. */
.stage[data-open]:not(.is-playing) [data-info]:hover:not([data-current]):not(:focus-visible) {
  translate: none;
  scale: none;
  outline: none;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 16%, transparent);
}
.stage[data-open]:not(.is-playing) svg [data-info]:hover:not([data-current]):not(:focus-visible) {
  box-shadow: none;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 70%, transparent));
}
/* Dense rows (a transcript line, a legend, an Items row: under 34 frame px, marked data-dense by
   the hook) take a 2 px ring inside their gap and a 2 px lift, so a highlighted row never reaches
   into the row above or below. */
.stage:not(.is-playing) [data-info][data-dense]:hover,
.stage:not(.is-playing) [data-info][data-dense]:focus-visible {
  translate: 0 -2px;
  scale: 1.015;
  outline-width: 2px;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.stage:not(.is-playing) [data-info][data-dense]:active { translate: 0 0; scale: .99; }
.stage:not(.is-playing) [data-info][data-dense][data-current] {
  outline-width: 3px;
  outline-offset: 1px;
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--accent) 26%, transparent),
    0 0 18px color-mix(in srgb, var(--accent) 50%, transparent);
}
.stage:not(.is-playing) [data-info][data-dense][data-current]:not(:active) { animation-name: info-breathe-dense; }
@keyframes info-breathe-dense {
  0%, 100% { scale: 1.005; }
  50% { scale: 1.02; }
}
/* Found: a small accent mark at the corner (a label tint on an SVG node). */
.stage:not(.is-playing) [data-info][data-found] { position: relative; }
.stage:not(.is-playing) [data-info][data-found]::after {
  content: "";
  position: absolute;
  top: -7px;
  right: -7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
  pointer-events: none;
}
.stage:not(.is-playing) [data-info][data-dense][data-found]::after {
  top: 50%;
  right: auto;
  left: -13px;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  box-shadow: none;
}
.stage:not(.is-playing) svg [data-info][data-found] text { fill: var(--accent); }
.stage:not(.is-playing) svg [data-info][data-found] > circle:last-of-type { stroke: var(--accent); stroke-dasharray: 5 4; }
/* The attract pass: one breath per unfound object, staggered by the hook. */
.stage:not(.is-playing) [data-info][data-attract] { animation: info-attract .4s ease-in-out; }
@keyframes info-attract {
  0%, 100% { scale: 1; }
  50% { scale: 1.07; }
}

/* ---- Info panel. Laid over the stage, out of the shell's grid (panel.tsx sizes the root from
   the stage's own offset and height): a side panel on the right or left, a sheet at the
   bottom of the stage on a phone, with the transport below it still reachable. The root lets
   the pointer through to the stage; only the panel itself is solid. */
.page { position: relative; }
.info-root {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  pointer-events: none;
  z-index: 3;
}
.info-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(400px, 44%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  pointer-events: auto;
  background: color-mix(in srgb, var(--bg2) 96%, transparent);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  overflow: hidden;
  outline: none;
}
.info-panel.is-left { right: auto; left: 12px; }
.info-panel[hidden] { display: none; }
.info-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 12px 18px;
  border-bottom: 1px solid var(--line);
}
.info-head-text { flex: 1 1 auto; min-width: 0; }
.info-kicker {
  margin: 0 0 4px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.info-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.info-close { flex: 0 0 auto; font-size: 20px; line-height: 1; }
.info-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 18px 18px;
  font-size: 14px;
  line-height: 1.55;
  touch-action: pan-y;
}
.info-body p { margin: 0 0 10px; }
.info-where { color: var(--muted); font-size: 13px; }
.info-where a { color: var(--accent); font-weight: 600; }
.info-offscreen {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}
/* The list is its own scroll region under the copy, so stepping keeps the copy at its top
   and the current member in view at once. */
.info-list {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 46%;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 14px 12px;
  border-top: 1px solid var(--line);
  touch-action: pan-y;
}
.info-list-nav {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0 8px;
  background: var(--bg2);
}
.info-list-pos { color: var(--muted); font-size: 12px; }
.info-members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-member {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.info-member:hover { background: var(--bg); color: var(--ink); }
.info-member[aria-current="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}
.info-member-n { flex: 0 0 auto; color: var(--faint); font-size: 11px; }
.info-member[aria-current="true"] .info-member-n { color: var(--accent); }

/* ---- The pop-up bubble: beside the object in the frame, in the shell's DOM over the stage so
   it is never scaled; panel.tsx sets left/top, --tail-x/--tail-y and data-side. It springs in
   on open (display from none restarts the animation), hops with a position transition and
   a small pulse of its inner box (two identical keyframes alternate so the pulse restarts). */
.info-bubble {
  position: absolute;
  left: 0;
  top: 0;
  width: min(320px, 46%);
  pointer-events: auto;
  z-index: 4;
  --tail-x: 24px;
  --tail-y: 24px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  transform-origin: left center;
}
/* Hidden by visibility, not display, so it can be measured and placed before it shows; the
   spring-in starts when the hook sets data-in, after the origin is known. */
.info-bubble[data-hidden] { visibility: hidden; pointer-events: none; }
.info-bubble[data-in] { animation: bubble-in .36s var(--spring) both; }
.info-bubble[hidden] { display: none; }
.info-bubble[data-hop] { transition: left .32s var(--spring), top .32s var(--spring); }
.info-bubble[data-side="left"] { transform-origin: right center; }
.info-bubble[data-side="below"] { transform-origin: center top; }
.info-bubble[data-side="above"] { transform-origin: center bottom; }
.info-bubble[data-side="none"] { transform-origin: center; }
@keyframes bubble-in {
  0% { opacity: 0; scale: .6; }
  60% { opacity: 1; scale: 1.06; }
  100% { opacity: 1; scale: 1; }
}
.info-bubble-inner {
  position: relative;
  padding: 12px 14px 12px 16px;
  background: var(--bg2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}
.info-bubble-inner[data-hop-n="0"] { animation: bubble-hop-a .3s var(--spring); }
.info-bubble-inner[data-hop-n="1"] { animation: bubble-hop-b .3s var(--spring); }
@keyframes bubble-hop-a { 0% { scale: 1; } 40% { scale: 1.05; } 100% { scale: 1; } }
@keyframes bubble-hop-b { 0% { scale: 1; } 40% { scale: 1.05; } 100% { scale: 1; } }
/* The tail: a rotated square on the edge facing the object, at the object's centre. */
.info-bubble::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  rotate: -45deg;
  z-index: 1;
}
.info-bubble[data-side="right"]::before { left: -8px; top: calc(var(--tail-y) - 8px); }
.info-bubble[data-side="left"]::before { right: -8px; top: calc(var(--tail-y) - 8px); rotate: 135deg; }
.info-bubble[data-side="below"]::before { top: -8px; left: calc(var(--tail-x) - 8px); rotate: 45deg; }
.info-bubble[data-side="above"]::before { bottom: -8px; left: calc(var(--tail-x) - 8px); rotate: 225deg; }
.info-bubble[data-side="none"]::before { display: none; }
/* The tail stem: when the bubble had to sit past a neighbour, a thin line runs from the tail
   base to the object (panel.tsx sets --stem; 0 when the bubble is right beside it). */
.info-bubble::after {
  content: "";
  position: absolute;
  background: var(--accent);
  opacity: .7;
  pointer-events: none;
  border-radius: 1px;
}
.info-bubble[data-side="right"]::after { width: var(--stem, 0px); height: 2px; right: 100%; top: calc(var(--tail-y) - 1px); margin-right: 7px; }
.info-bubble[data-side="left"]::after { width: var(--stem, 0px); height: 2px; left: 100%; top: calc(var(--tail-y) - 1px); margin-left: 7px; }
.info-bubble[data-side="below"]::after { height: var(--stem, 0px); width: 2px; bottom: 100%; left: calc(var(--tail-x) - 1px); margin-bottom: 7px; }
.info-bubble[data-side="above"]::after { height: var(--stem, 0px); width: 2px; top: 100%; left: calc(var(--tail-x) - 1px); margin-top: 7px; }
.info-bubble[data-side="none"]::after { display: none; }
.info-bubble-head { display: flex; align-items: flex-start; gap: 8px; }
.info-bubble-head .info-kicker { flex: 1 1 auto; margin: 3px 0 0; }
.info-bubble-close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin: -4px -6px 0 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.info-bubble-close:hover { background: var(--bg); color: var(--ink); }
.info-bubble-title {
  margin: 4px 0 6px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.info-fact {
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
}
.info-body .info-fact { margin-bottom: 14px; font-size: 14px; }
.info-bubble .info-offscreen { margin-bottom: 10px; }
.info-bubble-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.info-bubble-nav { display: inline-flex; align-items: center; gap: 4px; }
.info-bubble-row .btn-icon-only { min-height: 30px; padding: 4px 10px; font-size: 14px; }
.info-more { min-height: 30px; padding: 4px 12px; }
.info-found { margin-left: auto; color: var(--faint); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.info-kicker .info-found { margin-left: 0; font-size: inherit; letter-spacing: inherit; }

/* The peek state of the sheet: header, fact and prev/next only (about 140 px), so the object
   being thumbed stays in view above it; More opens the full sheet. */
.info-peek { padding: 10px 18px 12px; touch-action: pan-y; }
.info-peek .info-fact { margin-bottom: 8px; }
.info-panel.is-peek .info-head { padding-bottom: 8px; }
.info-panel.is-peek .info-title { font-size: 17px; }

@media (max-width: 720px) {
  .info-panel, .info-panel.is-left {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 66%;
    border-radius: 14px 14px 0 0;
    border-bottom: 0;
  }
  .info-panel.is-peek { max-height: 46%; }
  .info-panel.is-peek.is-top {
    top: 0;
    bottom: auto;
    border-radius: 0 0 14px 14px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-view.ease { transition: none; }
  .hint { animation: none; }
  .btn { transition: none; }
  /* Highlight only: no lift, no breath, no pop, no hop. Declared with !important so no
     breath rule (data-current, dense, svg, :not(:active)) can outrank the preference. */
  .stage [data-info] {
    translate: none !important;
    scale: none !important;
    transition: none !important;
    animation: none !important;
  }
  .info-bubble, .info-bubble[data-hop], .info-bubble[data-in], .info-bubble-inner { animation: none !important; transition: none !important; }
}

/* ---- Music & resume (part B) */
/* The music's own clock beside the picture's; it keeps moving while the picture is paused, so
   it reads a step darker and heavier than the picture clock, its note in the accent. */
.clock-music { color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap; }
.clock-music .note { color: var(--accent); }
/* The transport keeps one footprint in every state, so a resume wait never re-flows the
   footer or the stage: the Play button is sized once for its longest label ("On the 3 · 1.4 s"
   with the beat tick), the seconds sit in a fixed-width slot, and the status line reserves two
   lines. */
.transport .btn-primary { width: 168px; min-width: 168px; white-space: nowrap; overflow: hidden; }
.transport .btn-primary .resume-count { display: inline-block; min-width: 5.5ch; font-weight: 500; font-size: 12px; opacity: .85; text-align: left; }
.status { min-height: 2.8em; }
.beat-tick {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--on-accent);
  opacity: .4;
  animation: beat-tick .32s ease-out both;
}
@keyframes beat-tick { from { transform: scale(1.9); opacity: 1; } to { transform: scale(1); opacity: .4; } }
/* The page starts muted; the pill says the first click anywhere unmutes it. */
.unmute-pill {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg2) 88%, transparent);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  pointer-events: none;
  animation: unmute-pulse 2.4s ease-in-out .8s infinite;
}
@keyframes unmute-pulse { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .beat-tick { animation: none; }
  .unmute-pill { animation: none; opacity: .92; }
}
/* ---- end part B */
/* ---- Volume. A thin slider beside Mute: quiet until hovered or focused, the accent for the
   thumb, the page's line for the track. Zero is Mute; phones use their hardware volume. */
.vol {
  display: inline-flex;
  align-items: center;
  width: 84px;
  height: 36px;
  padding: 0 4px;
  opacity: .7;
  transition: opacity .15s ease;
}
.vol:hover, .vol:focus-within { opacity: 1; }
.vol input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.vol input[type="range"]:focus-visible { outline: none; }
.vol input[type="range"]::-webkit-slider-runnable-track { height: 2px; border-radius: 1px; background: var(--line); }
.vol input[type="range"]::-moz-range-track { height: 2px; border-radius: 1px; background: var(--line); }
.vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg2);
  transition: transform .12s ease;
}
.vol input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg2); }
.vol input[type="range"]:hover::-webkit-slider-thumb, .vol input[type="range"]:focus-visible::-webkit-slider-thumb { transform: scale(1.25); }
.vol input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--accent); }
.vol input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--accent); }
@media (max-width: 720px) { .vol { display: none; } }
@media (prefers-reduced-motion: reduce) { .vol, .vol input[type="range"]::-webkit-slider-thumb { transition: none; } }

