/* Gistory suite site — base styles.
   This file describes the final, readable state of every scene (no JS, reduced motion).
   Motion layers add their starting states under html.js in later stylesheets/scripts. */

:root {
  /* Palette, taken from the traveler character */
  --ivory: #F4EBDD;
  --ivory-hi: #FAF5EC;
  --khaki: #B9AE98;
  --khaki-soft: #DDD3C1;
  --espresso: #3B2A20;
  --ink: #14110F;

  /* Time-of-day accents */
  --dawn: #E7A487;
  --dusk: #D9913F;
  --night: #8FA6D6;
  --night-deep: #1C2638;
  --rec: #F2683C;

  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, "SF Pro Text", system-ui, sans-serif;
  --zh: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1240px;
  --scene-pad: clamp(96px, 16vh, 200px);
  --radius-card: 22px;

  /* Scene theme defaults (light) */
  --bg: var(--ivory);
  --fg: var(--ink);
  --muted: #6A5A4C;
  --accent: var(--espresso);
  --hairline: rgba(59, 42, 32, 0.16);
  --chip-bg: rgba(255, 255, 255, 0.72);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
figure { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  color: var(--ivory);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 500 1.25rem/1 var(--serif);
  letter-spacing: -0.01em;
}
.brand img { border-radius: 10px; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.site-nav a {
  font-size: 0.9375rem;
  text-decoration: none;
  opacity: 0.82;
}
.site-nav a:hover { opacity: 1; }
.site-nav .nav-cta {
  opacity: 1;
  padding: 8px 16px;
  border: 1px solid rgba(244, 235, 221, 0.4);
  border-radius: 999px;
}
.site-nav .nav-cta:hover { background: rgba(244, 235, 221, 0.1); }

/* ---------- Story + route line ---------- */

.story { position: relative; }

#route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
#route-path {
  fill: none;
  stroke: var(--khaki);
  stroke-width: 1.25;
  stroke-linecap: round;
  opacity: 0.75;
}

/* ---------- Scenes ---------- */

.scene {
  background: var(--bg);
  color: var(--fg);
  padding: var(--scene-pad) var(--gutter);
}
.scene--night {
  --bg: var(--ink);
  --fg: var(--ivory);
  --muted: rgba(244, 235, 221, 0.66);
  --accent: var(--night);
  --hairline: rgba(244, 235, 221, 0.16);
  --chip-bg: rgba(244, 235, 221, 0.08);
  background:
    radial-gradient(90% 70% at 78% 30%, rgba(52, 72, 112, 0.55), transparent 70%),
    var(--ink);
}
.scene--dawn {
  --bg: #F6E6D8;
  --accent: #B8603F;
  background: linear-gradient(180deg, #F3DCCB 0%, var(--ivory) 70%);
}
.scene--day { --bg: var(--ivory-hi); --accent: var(--espresso); }
.scene--dusk {
  --bg: var(--espresso);
  --fg: var(--ivory);
  --muted: rgba(244, 235, 221, 0.68);
  --accent: var(--dusk);
  --hairline: rgba(244, 235, 221, 0.18);
  --chip-bg: rgba(20, 17, 15, 0.45);
  background:
    radial-gradient(80% 60% at 20% 20%, rgba(217, 145, 63, 0.28), transparent 70%),
    var(--espresso);
}
.scene--morning {
  --bg: var(--ivory);
  --accent: #B8603F;
  background: linear-gradient(180deg, #F7EDE0 0%, #F0E3D2 100%);
}
.scene--khaki { --bg: var(--khaki-soft); --muted: #5C4D40; }
.scene--ivory { --bg: var(--ivory); }

#hero {
  position: relative;
  overflow: clip;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--scene-pad) * 0.8);
}

.scene-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(48px, 8vw, 128px);
  row-gap: 56px;
}
.scene--flip .scene-copy { order: 2; }
.scene-inner--stack { grid-template-columns: minmax(0, 1fr); }

.scene-copy { max-width: 34rem; }
.scene-copy > p { color: var(--muted); margin: 0 0 1em; }
.scene-copy > p.lede { color: var(--fg); font-size: 1.1875rem; opacity: 0.86; }

/* Type */

.display {
  margin: 0 0 32px;
  font: 400 clamp(2.6rem, 4.9vw, 4.5rem)/1.02 var(--serif);
  letter-spacing: -0.025em;
  color: var(--fg);
}
.display .line { display: block; }
@media (min-width: 1024px) {
  /* One .line per visual line, so motion can reveal them line by line. */
  .display .line { white-space: nowrap; }
  #hero .scene-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
  #hero .scene-copy { max-width: 40rem; }
  #hero .display { font-size: clamp(2.6rem, 4.4vw, 4rem); }
}
.display em { font-style: italic; color: var(--accent); }

.eyebrow,
.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 0 0 28px;
  font: 500 0.75rem/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow span { opacity: 0.6; }
.kicker .num {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.kicker .num::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin: 0 0 0.3em 12px;
  vertical-align: middle;
  background: currentColor;
}
.app-tag {
  padding: 3px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.scene-copy > .aside { font-size: 0.9375rem; }
.facts {
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.text-cta {
  display: inline-flex;
  gap: 8px;
  margin-top: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
}
.text-cta span { transition: transform 0.2s ease; }
.text-cta:hover span { transform: translateX(3px); }

/* Hero app index */

.app-index {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}
.app-index a {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
}
.app-index .num {
  grid-row: span 2;
  font-size: 0.75rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}
.app-index .app-name { font: 400 1.125rem/1.3 var(--serif); }
.app-index .app-does { font-size: 0.875rem; color: var(--muted); }
.app-index a:hover .app-name { color: var(--accent); }

/* Status chips */

.chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 0.8125rem;
  color: var(--fg);
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(20, 17, 15, 0.08);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status--rec { color: var(--rec); }
.status--live { color: var(--dusk); }

/* ---------- Device frames ---------- */

.scene-stage { position: relative; }

.device { position: relative; }
.device .screen {
  position: relative;
  overflow: hidden;
  background: #000;
}
.device .screen img { width: 100%; }

.device.iphone {
  width: var(--phone-w, 300px);
  padding: calc(var(--phone-w, 300px) * 0.035);
  border-radius: calc(var(--phone-w, 300px) * 0.17);
  background: linear-gradient(145deg, #3a332e, #15110f 40%, #2a2420);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 2px 2px rgba(20, 17, 15, 0.1),
    0 30px 60px -20px rgba(20, 17, 15, 0.45),
    0 60px 120px -40px rgba(20, 17, 15, 0.35);
}
.device.iphone .screen {
  border-radius: calc(var(--phone-w, 300px) * 0.135);
  aspect-ratio: 1320 / 2868;
}
.device.iphone .screen::after {
  /* Dynamic Island */
  content: "";
  position: absolute;
  top: 1.6%;
  left: 50%;
  width: 31%;
  height: 3.1%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}
.device.iphone .screen img { height: 100%; object-fit: cover; object-position: top; }

.device.watch {
  width: var(--watch-w, 170px);
  padding: calc(var(--watch-w, 170px) * 0.07);
  border-radius: calc(var(--watch-w, 170px) * 0.27);
  background: linear-gradient(150deg, #3b3633, #121010 55%, #262220);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 24px 50px -16px rgba(20, 17, 15, 0.55);
}
.device.watch::before {
  /* Digital Crown */
  content: "";
  position: absolute;
  right: -5%;
  top: 24%;
  width: 6%;
  height: 17%;
  border-radius: 3px;
  background: linear-gradient(90deg, #2a2522, #57504a);
}
.device.watch .screen {
  border-radius: calc(var(--watch-w, 170px) * 0.2);
  aspect-ratio: 422 / 514;
}

.device.mac {
  width: 100%;
  max-width: 720px;
  padding-bottom: 3.2%;
}
.device.mac .screen {
  aspect-ratio: 16 / 10;
  border: clamp(6px, 1.1vw, 14px) solid #16120f;
  border-radius: clamp(10px, 1.6vw, 20px) clamp(10px, 1.6vw, 20px) 4px 4px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 40px 80px -30px rgba(20, 17, 15, 0.6);
}
.device.mac::after {
  /* Base */
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: 0;
  height: 3.6%;
  border-radius: 2px 2px 14px 14px;
  background: linear-gradient(180deg, #cfc6ba 0%, #a79e92 60%, #7d766d 100%);
  box-shadow: 0 18px 30px -12px rgba(20, 17, 15, 0.5);
}

/* ---------- Stages ---------- */

.stage-hero,
.stage-private {
  display: grid;
  place-items: center;
}
.glow {
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(185, 174, 152, 0.55), transparent);
  filter: blur(10px);
}
.scene--night .glow { background: radial-gradient(closest-side, rgba(143, 166, 214, 0.35), transparent); }
.traveler {
  position: relative;
  width: min(100%, 520px);
  /* The artwork is cut at the chest; let it dissolve into the ground. */
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 97%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 97%);
}
.chip--ticket { top: 10%; right: 0; }

.stage-arrival {
  --phone-w: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stage-arrival .chip { position: relative; left: auto; bottom: auto; margin-top: 26px; }
.phone-wrap { position: relative; }

/* Back Tap: two rings leave the phone's edge. Only seen while motion plays. */
.tap-ring {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--phone-w, 300px) * 0.17);
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 22px rgba(231, 164, 135, 0.5);
  opacity: 0;
  pointer-events: none;
}

/* The scene waits, unseen, for its first frame (cleared by arrival.js, or after 2.5 s). */
html.arrival-pending .stage-arrival > * { opacity: 0; }

/* ---------- 01 · Arrival screen: a Japanese route search app, and Sublay's preview of it ----------
   Both are drawn in iOS points: --pt is one point of a 440 pt-wide iPhone at this phone's size. */

.device .screen.arrival-screen {
  --pt: calc(var(--phone-w, 300px) * 0.93 / 440);
  --ra-accent: #1666C5;
  --ra-ink: #16181B;
  --ra-muted: #6B7079;
  --ra-line: #E3E5E9;
  --jy: #9ACD32;
  background: #1C1F26;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.device .screen.arrival-screen::after { z-index: 6; } /* Dynamic Island above every layer */
/* Not a scroll container: focusing the preview's button while it waits below the screen
   must not scroll the screen's content. */
.device .screen.arrival-screen { overflow: clip; }
/* Before the preview has risen, the pointer goes through it (it stays in the
   accessibility tree, its button reachable by keyboard). */
.sb-preview.is-down { pointer-events: none; }
.arrival-screen p { margin: 0; }
.arrival-screen .ic { display: block; flex: none; fill: currentColor; }

/* iOS status bar */
.ios-sb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(54 * var(--pt));
  padding: calc(3 * var(--pt)) calc(34 * var(--pt)) 0 calc(56 * var(--pt));
  color: #000;
}
.ios-time {
  font: 600 calc(17 * var(--pt)) / 1 -apple-system, "SF Pro Text", system-ui, sans-serif;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.ios-icons { display: flex; align-items: center; gap: calc(6 * var(--pt)); }
.ios-icons .ic-signal { width: calc(18 * var(--pt)); height: calc(12 * var(--pt)); }
.ios-icons .ic-wifi { width: calc(16.5 * var(--pt)); height: calc(12 * var(--pt)); }
.ios-icons .ic-battery { width: calc(27 * var(--pt)); height: calc(13 * var(--pt)); }

/* The route app (our own design, in the manner of Japan's route search apps) */
.ra {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #F1F2F4;
  color: var(--ra-ink);
  font: 400 calc(14 * var(--pt)) / 1.3 -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "palt" 1;
}
.ra > .ios-sb { flex: none; background: #fff; }
.ra-nav {
  flex: none;
  display: grid;
  grid-template-columns: calc(84 * var(--pt)) minmax(0, 1fr) calc(84 * var(--pt));
  align-items: center;
  height: calc(44 * var(--pt));
  background: #fff;
}
.ra-nav-l { padding-left: calc(12 * var(--pt)); color: var(--ra-accent); }
.ra-nav-l .ic { width: calc(24 * var(--pt)); height: calc(24 * var(--pt)); }
.ra-title { font-size: calc(17 * var(--pt)); font-weight: 600; text-align: center; }
.ra-nav-r {
  display: flex;
  justify-content: flex-end;
  gap: calc(18 * var(--pt));
  padding-right: calc(16 * var(--pt));
  color: var(--ra-accent);
}
.ra-nav-r .ic { width: calc(22 * var(--pt)); height: calc(22 * var(--pt)); }

.ra-search {
  flex: none;
  padding: calc(6 * var(--pt)) calc(16 * var(--pt)) calc(12 * var(--pt));
  background: #fff;
  border-bottom: calc(0.5 * var(--pt)) solid #D6D9DE;
}
.ra-od {
  position: relative;
  padding: 0 calc(56 * var(--pt)) 0 calc(12 * var(--pt));
  border: calc(1 * var(--pt)) solid var(--ra-line);
  border-radius: calc(12 * var(--pt));
  background: #F8F9FA;
}
.ra-od-row {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--pt));
  height: calc(42 * var(--pt));
}
.ra-od-row + .ra-od-row { border-top: calc(0.5 * var(--pt)) solid var(--ra-line); }
.ra-od-k {
  display: grid;
  place-items: center;
  width: calc(38 * var(--pt));
  height: calc(20 * var(--pt));
  border-radius: calc(5 * var(--pt));
  background: var(--ra-accent);
  color: #fff;
  font-size: calc(11 * var(--pt));
  font-weight: 700;
}
.ra-od-k--to { background: #D8402B; }
.ra-od-st { min-width: 0; font-size: calc(19 * var(--pt)); font-weight: 700; letter-spacing: 0.01em; }
.ra-swap {
  position: absolute;
  top: 50%;
  right: calc(10 * var(--pt));
  display: grid;
  place-items: center;
  width: calc(34 * var(--pt));
  height: calc(34 * var(--pt));
  margin-top: calc(-17 * var(--pt));
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 calc(1 * var(--pt)) var(--ra-line);
  color: var(--ra-accent);
}
.ra-swap .ic { width: calc(19 * var(--pt)); height: calc(19 * var(--pt)); }
.ra-when {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: calc(10 * var(--pt));
  font-size: calc(14 * var(--pt));
}
.ra-when-l, .ra-when-r { display: flex; align-items: center; gap: calc(5 * var(--pt)); min-width: 0; }
.ra-when-l { font-weight: 600; }
.ra-when-r { color: var(--ra-accent); font-size: calc(13 * var(--pt)); font-weight: 600; }
.ra-when .ic { width: calc(16 * var(--pt)); height: calc(16 * var(--pt)); color: var(--ra-muted); }
.ra-when-r .ic { color: var(--ra-accent); }
.ra-when .ic-chev { width: calc(12 * var(--pt)); height: calc(12 * var(--pt)); }
.ra-segs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: calc(10 * var(--pt));
  padding: calc(2 * var(--pt));
  border-radius: calc(9 * var(--pt));
  background: #EBEDF0;
}
.ra-segs > span {
  display: grid;
  place-items: center;
  height: calc(28 * var(--pt));
  min-width: 0;
  color: #4A4E55;
  font-size: calc(13 * var(--pt));
  font-weight: 600;
}
.ra-segs > .is-on {
  border-radius: calc(7 * var(--pt));
  background: #fff;
  color: var(--ra-ink);
  box-shadow: 0 calc(1 * var(--pt)) calc(3 * var(--pt)) rgba(0, 0, 0, 0.12), 0 0 0 calc(0.5 * var(--pt)) rgba(0, 0, 0, 0.04);
}

.ra-list { flex: 1; min-height: 0; padding: 0 calc(12 * var(--pt)); }
.ra-head {
  display: flex;
  justify-content: space-between;
  padding: calc(9 * var(--pt)) calc(4 * var(--pt)) calc(6 * var(--pt));
  color: var(--ra-muted);
  font-size: calc(12 * var(--pt));
}
.ra-card {
  margin-bottom: calc(8 * var(--pt));
  padding: calc(10 * var(--pt)) calc(14 * var(--pt)) calc(11 * var(--pt));
  border-radius: calc(14 * var(--pt));
  background: #fff;
  box-shadow: 0 0 0 calc(0.5 * var(--pt)) rgba(0, 0, 0, 0.07), 0 calc(1 * var(--pt)) calc(2 * var(--pt)) rgba(0, 0, 0, 0.04);
}
.ra-card.is-sel { box-shadow: 0 0 0 calc(1.5 * var(--pt)) var(--ra-accent), 0 calc(2 * var(--pt)) calc(8 * var(--pt)) rgba(22, 102, 197, 0.12); }
.ra-top { display: flex; align-items: center; gap: calc(8 * var(--pt)); min-height: calc(18 * var(--pt)); }
.ra-no { color: var(--ra-muted); font-size: calc(12 * var(--pt)); font-weight: 700; }
.ra-badges { display: flex; gap: calc(3 * var(--pt)); }
.bd {
  display: grid;
  place-items: center;
  width: calc(44 * var(--pt));
  height: calc(17 * var(--pt));
  padding: 0 calc(3 * var(--pt));
  border-radius: calc(4 * var(--pt));
  color: #fff;
  font-size: calc(11 * var(--pt));
  font-weight: 700;
}
.bd .tx { width: 100%; }
/* The three English badges share one size, set so the longest ("Cheap") fits unshrunk. */
.bd .tx-en { font-size: 0.94em; }
.bd-fast { background: #E5482F; }
.bd-easy { background: #1E9A57; }
.bd-cheap { background: #1F6FD6; }
.ra-times {
  display: flex;
  align-items: baseline;
  margin-top: calc(3 * var(--pt));
}
.ra-times b {
  font: 700 calc(27 * var(--pt)) / 1.15 -apple-system, "SF Pro Display", system-ui, sans-serif;
  letter-spacing: -0.015em;
}
.ra-times .ra-u { margin-left: calc(2 * var(--pt)); font-size: calc(13 * var(--pt)); font-weight: 600; color: #3A3D42; }
.ra-arr { margin: 0 calc(8 * var(--pt)) 0 calc(6 * var(--pt)); color: #A3A8B0; font-size: calc(17 * var(--pt)); }
.ra-sum {
  display: grid;
  grid-template-columns: calc(78 * var(--pt)) calc(86 * var(--pt)) minmax(0, 1fr);
  margin-top: calc(6 * var(--pt));
}
.ra-kv { display: flex; flex-direction: column; min-width: 0; padding-left: calc(10 * var(--pt)); border-left: calc(0.5 * var(--pt)) solid var(--ra-line); }
.ra-kv:first-child { padding-left: 0; border-left: 0; }
.ra-k { display: flex; align-items: center; gap: calc(3 * var(--pt)); color: var(--ra-muted); font-size: calc(11 * var(--pt)); line-height: calc(15 * var(--pt)); }
.ra-v { font-size: calc(15 * var(--pt)); font-weight: 700; line-height: calc(20 * var(--pt)); }
.ra-ic {
  padding: 0 calc(2.5 * var(--pt));
  border: calc(1 * var(--pt)) solid #A3A8B0;
  border-radius: calc(3 * var(--pt));
  font-size: calc(8 * var(--pt));
  font-weight: 700;
  line-height: calc(11 * var(--pt));
}

/* Route detail: times, the line in its colour, station numbers */
.ra-tl {
  list-style: none;
  margin: calc(9 * var(--pt)) 0 0;
  padding: calc(10 * var(--pt)) 0 0;
  border-top: calc(0.5 * var(--pt)) solid var(--ra-line);
}
.ra-row {
  display: grid;
  grid-template-columns: calc(34 * var(--pt)) calc(28 * var(--pt)) minmax(0, 1fr);
  column-gap: calc(8 * var(--pt));
}
.ra-tm { text-align: right; font-size: calc(13 * var(--pt)); font-weight: 700; line-height: calc(26 * var(--pt)); }
.ra-node { position: relative; display: flex; justify-content: center; }
.ra-row:not(.ra-st) .ra-node::before,
.ra-st .ra-node::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: calc(5 * var(--pt));
  margin-left: calc(-2.5 * var(--pt));
  background: var(--jy);
}
.ra-st--from .ra-node::before { top: calc(13 * var(--pt)); }
.ra-st--to .ra-node::before { bottom: auto; height: calc(13 * var(--pt)); }
.sn {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: calc(26 * var(--pt));
  height: calc(26 * var(--pt));
  border: calc(2.6 * var(--pt)) solid var(--jy);
  border-radius: calc(5 * var(--pt));
  background: #fff;
  color: #111;
  font: 800 calc(10.5 * var(--pt)) / 1 -apple-system, "SF Pro Text", system-ui, sans-serif;
  letter-spacing: -0.02em;
}
.sn i { font-style: normal; font-size: calc(7 * var(--pt)); font-weight: 700; margin-bottom: calc(0.5 * var(--pt)); }
.ra-st .ra-body { display: flex; flex-direction: column; min-width: 0; padding-bottom: calc(4 * var(--pt)); }
.ra-st-line { display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--pt)); height: calc(26 * var(--pt)); }
.ra-st-name { min-width: 0; font-size: calc(17 * var(--pt)); font-weight: 700; }
.ra-trk {
  flex: none;
  padding: 0 calc(6 * var(--pt));
  border-radius: calc(4 * var(--pt));
  background: #F0F2F5;
  color: #34373C;
  font-size: calc(11.5 * var(--pt));
  font-weight: 600;
  line-height: calc(19 * var(--pt));
}
.ra-hint { display: flex; align-items: center; gap: calc(3 * var(--pt)); min-width: 0; color: var(--ra-muted); font-size: calc(11 * var(--pt)); }
.ra-hint .ic { width: calc(12 * var(--pt)); height: calc(12 * var(--pt)); }
.ra-ride .ra-body { padding: calc(5 * var(--pt)) 0 calc(3 * var(--pt)); min-width: 0; }
.ra-line { display: flex; align-items: center; gap: calc(6 * var(--pt)); font-size: calc(14 * var(--pt)); font-weight: 700; }
.lb {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(22 * var(--pt));
  height: calc(18 * var(--pt));
  border: calc(2.2 * var(--pt)) solid var(--jy);
  border-radius: calc(4 * var(--pt));
  background: #fff;
  color: #111;
  font: 800 calc(9 * var(--pt)) / 1 -apple-system, "SF Pro Text", system-ui, sans-serif;
}
.lb-jk { border-color: #00B2E5; }
.ra-dir { display: grid; margin: calc(1 * var(--pt)) 0 0 calc(28 * var(--pt)); color: var(--ra-muted); font-size: calc(11.5 * var(--pt)); }
.ra-min { color: var(--ra-muted); font-size: calc(11 * var(--pt)); font-weight: 600; }
.ra-tags { display: flex; gap: calc(6 * var(--pt)); padding: calc(2 * var(--pt)) 0 calc(5 * var(--pt)); min-width: 0; }
.ra-tag {
  display: flex;
  align-items: center;
  gap: calc(2 * var(--pt));
  min-width: 0;
  padding: 0 calc(7 * var(--pt));
  border-radius: calc(5 * var(--pt));
  background: #F0F2F5;
  color: #3A3D42;
  font-size: calc(11 * var(--pt));
  font-weight: 600;
  line-height: calc(21 * var(--pt));
}
.ra-tag--car { background: #EEF6DF; color: #3F6A0E; }
.ra-tag .ic { width: calc(10 * var(--pt)); height: calc(10 * var(--pt)); }
.ra-stop .ra-tm { color: #8A9099; font-size: calc(11 * var(--pt)); font-weight: 500; line-height: calc(20 * var(--pt)); }
.ra-dot {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: calc(9 * var(--pt));
  height: calc(9 * var(--pt));
  margin: calc(-4.5 * var(--pt)) 0 0 calc(-4.5 * var(--pt));
  border: calc(2 * var(--pt)) solid #6E9A1E;
  border-radius: 50%;
  background: #fff;
}
.ra-stop .ra-body { display: flex; align-items: center; gap: calc(6 * var(--pt)); min-width: 0; color: #3A3D42; font-size: calc(12.5 * var(--pt)); }
.ra-stop-name { width: calc(88 * var(--pt)); }
.ra-code { color: #8A9099; font-size: calc(9.5 * var(--pt)); font-style: normal; font-weight: 600; }
.ra-acts {
  display: flex;
  justify-content: space-around;
  margin-top: calc(6 * var(--pt));
  padding-top: calc(8 * var(--pt));
  border-top: calc(0.5 * var(--pt)) solid var(--ra-line);
  color: var(--ra-accent);
  font-size: calc(12 * var(--pt));
  font-weight: 600;
}
.ra-acts > span { display: flex; align-items: center; gap: calc(4 * var(--pt)); }
.ra-acts .ic { width: calc(16 * var(--pt)); height: calc(16 * var(--pt)); }

.ra-delay {
  display: flex;
  align-items: center;
  gap: calc(4 * var(--pt));
  margin-left: auto;
  min-width: 0;
  padding: 0 calc(7 * var(--pt));
  border-radius: calc(6 * var(--pt));
  background: #FDECEA;
  color: #C42B1C;
  font-size: calc(11 * var(--pt));
  font-weight: 700;
  line-height: calc(20 * var(--pt));
}
.ra-delay .ic { width: calc(13 * var(--pt)); height: calc(13 * var(--pt)); }
.ra-delay-v { font-weight: 500; }
.ra-lines { display: flex; align-items: center; gap: calc(5 * var(--pt)); margin-top: calc(6 * var(--pt)); font-size: calc(12.5 * var(--pt)); font-weight: 600; }
.lc { display: flex; align-items: center; gap: calc(5 * var(--pt)); min-width: 0; }
.ld {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(19 * var(--pt));
  height: calc(19 * var(--pt));
  border: calc(3 * var(--pt)) solid;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font: 800 calc(9 * var(--pt)) / 1 -apple-system, "SF Pro Text", system-ui, sans-serif;
  font-style: normal;
}
.ld-m { border-color: #F62E36; }
.ld-h { border-color: #B5B5AC; }
.ra-lines .ic-more { width: calc(12 * var(--pt)); height: calc(12 * var(--pt)); color: #A3A8B0; }

.ra-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: calc(83 * var(--pt));
  padding-top: calc(7 * var(--pt));
  background: #F9F9FA;
  border-top: calc(0.5 * var(--pt)) solid #D3D6DB;
  color: #8A9099;
  font-size: calc(10 * var(--pt));
  font-weight: 600;
}
.ra-tabs > span { display: flex; flex-direction: column; align-items: center; gap: calc(3 * var(--pt)); min-width: 0; }
.ra-tabs .ic { width: calc(25 * var(--pt)); height: calc(25 * var(--pt)); }
.ra-tabs > .is-on { color: var(--ra-accent); }
.ra-tabs::after {
  /* Home indicator */
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(8 * var(--pt));
  width: calc(140 * var(--pt));
  height: calc(5 * var(--pt));
  margin-left: calc(-70 * var(--pt));
  border-radius: calc(3 * var(--pt));
  background: #111;
}

/* Sublay's preview: the translated screenshot (its own status bar on top), two pills */
.sb-preview {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  background: #fff;
}
.sb-shot {
  position: absolute;
  inset: 0;
  background: #fff;
}
/* The system's soft edge under the floating pills, so the screenshot's tab bar does not
   show through between them. */
.sb-preview::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: calc(150 * var(--pt));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.86) 45%, #fff 75%);
  pointer-events: none;
}
/* The home indicator stays above everything. */
.sb-preview::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(8 * var(--pt));
  z-index: 2;
  width: calc(140 * var(--pt));
  height: calc(5 * var(--pt));
  margin-left: calc(-70 * var(--pt));
  border-radius: calc(3 * var(--pt));
  background: #111;
}
.sb-pills {
  position: absolute;
  left: calc(14 * var(--pt));
  right: calc(14 * var(--pt));
  bottom: calc(41 * var(--pt));
  z-index: 2;
  display: flex;
  gap: calc(9 * var(--pt));
}
.sb-pill {
  display: grid;
  place-items: center;
  height: calc(50 * var(--pt));
  margin: 0;
  padding: 0 calc(14 * var(--pt));
  border: 0;
  border-radius: 999px;
  font: 600 calc(16.5 * var(--pt)) / 1 -apple-system, "SF Pro Text", system-ui, sans-serif;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.sb-toggle,
.sb-pill--static {
  position: relative;
  flex: 1;
  min-width: 0;
  background: rgba(98, 99, 101, 0.9);
  box-shadow: inset 0 0 0 calc(0.6 * var(--pt)) rgba(255, 255, 255, 0.22), 0 calc(4 * var(--pt)) calc(14 * var(--pt)) rgba(0, 0, 0, 0.16);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.sb-toggle { cursor: pointer; }
.sb-toggle[hidden] { display: none; }
.sb-toggle:not([hidden]) ~ .sb-pill--static { display: none; }
.sb-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sb-lbl { grid-area: 1 / 1; }
.sb-lbl--en { opacity: 0; }
.sb-press {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
}
.sb-explain {
  display: flex;
  gap: calc(8 * var(--pt));
  padding: 0 calc(20 * var(--pt)) 0 calc(18 * var(--pt));
  background: #fff;
  color: #111;
  box-shadow: 0 calc(3 * var(--pt)) calc(14 * var(--pt)) rgba(0, 0, 0, 0.14), 0 0 0 calc(0.5 * var(--pt)) rgba(0, 0, 0, 0.05);
}
.sb-explain .ic { width: calc(19 * var(--pt)); height: calc(19 * var(--pt)); }

/* The screenshot flash */
.shot-flash {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

/* Translatable text. Each line holds its English and its Japanese in one grid cell, so
   it keeps the same box in either language (as Sublay keeps the layout). */
.tx { display: inline-grid; grid-template-columns: minmax(0, auto); max-width: 100%; min-width: 0; white-space: nowrap; }
.tx-en, .tx-ja { grid-area: 1 / 1; min-width: 0; }
.ra-title .tx, .ra-segs .tx, .ra-tabs .tx, .bd .tx, .ra-od-k .tx { justify-items: center; }
.tx-ja { visibility: hidden; }
[data-lang="ja"] .tx-ja { visibility: visible; }
[data-lang="ja"] .tx-en { visibility: hidden; }
/* While the scroll plays, both layers are present and arrival.js fades between them
   (and hides the one not shown from assistive tech). */
.sb-preview.is-live .tx-en,
.sb-preview.is-live .tx-ja { visibility: visible; }
.sb-preview.is-live .tx-ja { opacity: 0; }

/* Hero night sky: a few fixed stars, drawn once. */
.stars {
  position: absolute;
  inset: -10% 0 0;
  pointer-events: none;
  opacity: 0.7;
  background-image:
    radial-gradient(1.2px 1.2px at 8% 22%, #F4EBDD 60%, transparent),
    radial-gradient(1px 1px at 17% 64%, #F4EBDD 60%, transparent),
    radial-gradient(1.5px 1.5px at 27% 12%, #F4EBDD 60%, transparent),
    radial-gradient(1px 1px at 38% 41%, #C9D4EC 60%, transparent),
    radial-gradient(1px 1px at 46% 8%, #F4EBDD 60%, transparent),
    radial-gradient(1.3px 1.3px at 58% 30%, #F4EBDD 60%, transparent),
    radial-gradient(1px 1px at 66% 14%, #C9D4EC 60%, transparent),
    radial-gradient(1.6px 1.6px at 74% 52%, #F4EBDD 60%, transparent),
    radial-gradient(1px 1px at 83% 9%, #F4EBDD 60%, transparent),
    radial-gradient(1.2px 1.2px at 91% 37%, #C9D4EC 60%, transparent),
    radial-gradient(1px 1px at 96% 71%, #F4EBDD 60%, transparent),
    radial-gradient(1px 1px at 52% 78%, #F4EBDD 60%, transparent),
    radial-gradient(1.2px 1.2px at 12% 88%, #C9D4EC 60%, transparent);
}
/* The hero's picture waits for its entrance (cleared by hero.js, or after 2.5 s if hero.js has not loaded by then). */
html.hero-pending .stage-hero > * { opacity: 0; }

/* ---------- 02 · Meeting: the phone on the table, the watch on the wrist ---------- */

#meeting { overflow-x: clip; }
.stage-meeting {
  --phone-w: 330px;
  --watch-w: 176px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: 0;
}
.stage-meeting .device.iphone { z-index: 1; }
.stage-meeting .device.watch {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: calc(60px + 14%);
}
.stage-meeting { padding-bottom: 60px; }
.stage-meeting .chip { z-index: 3; right: 0; bottom: 0; }
.watch-note {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* The route's khaki line, turned into a voice, runs into the phone's waveform. */
.voice {
  position: absolute;
  z-index: 2;
  left: 0;
  /* An svg is a replaced element: it needs a width, left + right do not stretch it. */
  width: calc(100% - var(--phone-w, 300px) * 0.925);
  top: calc(var(--phone-w, 300px) * 0.466 - var(--voice-h, 72px) / 2);
  height: var(--voice-h, 72px);
  overflow: visible;
  pointer-events: none;
}
.voice-path {
  fill: none;
  stroke: url(#voice-ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The traveler's close-up (his logo pose, tapping the watch); only while motion plays. */
.closeup { display: none; }
html.motion .closeup {
  display: block;
  position: absolute;
  z-index: 4;
  inset: -10% -3%;
  padding-top: 10%;
  pointer-events: none;
  /* The push-in stays inside the stage, its edges dissolving into the ground. */
  overflow: clip;
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent),
    linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent),
    linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent);
  mask-composite: intersect;
}
.closeup img {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 74%, transparent 98%);
}

/* The watch tap: a ring leaves the screen's edge. */
.w-tap {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 calc(3 * var(--wu)) rgba(255, 159, 10, 0.9);
  opacity: 0;
  pointer-events: none;
}

/* ---------- Live recording screen (HTML recreation of Gistory's live translation) ----------
   Measured on the 1320 px-wide App Store screenshot; --u is one of its pixels here. */

.device .screen.live-screen {
  --u: calc(var(--phone-w, 300px) * 0.93 / 1320);
  background: #F4F4F1;
  color: #141414;
  font: 400 calc(40 * var(--u)) / 1.3 var(--sans);
  text-align: left;
}
.live-screen p { margin: 0; }
.l-status {
  position: absolute;
  top: calc(66 * var(--u));
  left: calc(180 * var(--u));
  right: calc(98 * var(--u));
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 600 calc(56 * var(--u)) / 1 var(--sans);
  letter-spacing: 0.01em;
}
.l-icons { display: inline-flex; align-items: flex-end; gap: calc(18 * var(--u)); }
.l-signal {
  width: calc(64 * var(--u));
  height: calc(40 * var(--u));
  background: linear-gradient(90deg, #111 0 22%, transparent 22% 26%, #111 26% 48%, transparent 48% 52%, #111 52% 74%, transparent 74% 78%, #111 78%);
  clip-path: polygon(0 70%, 22% 70%, 22% 50%, 48% 50%, 48% 25%, 74% 25%, 74% 0, 100% 0, 100% 100%, 0 100%);
  border-radius: calc(4 * var(--u));
}
.l-wifi {
  width: calc(58 * var(--u));
  height: calc(42 * var(--u));
  background: radial-gradient(circle at 50% 100%, #111 0 18%, transparent 18% 34%, #111 34% 52%, transparent 52% 66%, #111 66% 84%, transparent 84%);
  clip-path: polygon(0 18%, 50% 100%, 100% 18%, 50% 0);
}
.l-battery {
  position: relative;
  width: calc(86 * var(--u));
  height: calc(42 * var(--u));
  border: calc(4 * var(--u)) solid rgba(17, 17, 17, 0.35);
  border-radius: calc(12 * var(--u));
  background: linear-gradient(#34C759, #34C759) calc(4 * var(--u)) 50% / calc(100% - 8 * var(--u)) calc(100% - 8 * var(--u)) no-repeat;
}
.l-head {
  position: absolute;
  top: calc(228 * var(--u));
  left: calc(61 * var(--u));
  right: calc(61 * var(--u));
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.l-label {
  font: 600 calc(31 * var(--u)) / 1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6E6E6E;
}
.l-hide { font-size: calc(42 * var(--u)); line-height: 1; }
.l-row {
  position: absolute;
  top: calc(360 * var(--u));
  left: calc(61 * var(--u));
  right: calc(61 * var(--u));
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.l-timer {
  font: 300 calc(98 * var(--u)) / 1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.l-langs {
  padding: calc(18 * var(--u)) calc(34 * var(--u));
  border: calc(3 * var(--u)) solid #E2E2DE;
  border-radius: 999px;
  background: #fff;
  font: 600 calc(36 * var(--u)) / 1.2 var(--sans);
  letter-spacing: 0.02em;
}
.l-langs [lang="zh-Hans"] { font-family: var(--zh); }
.l-source {
  position: absolute;
  top: calc(495 * var(--u));
  left: calc(61 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  font-size: calc(36 * var(--u));
  line-height: 1.2;
  color: #4D4D4D;
}
.l-source::before {
  content: "";
  width: calc(17 * var(--u));
  height: calc(17 * var(--u));
  border-radius: 50%;
  background: #F2402E;
}
.l-bars {
  position: absolute;
  top: calc(573 * var(--u));
  left: calc(61 * var(--u));
  right: calc(60 * var(--u));
  height: calc(72 * var(--u));
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.l-bars i {
  width: calc(12 * var(--u));
  height: calc(72 * var(--u) * var(--h, 1));
  border-radius: 999px;
  background: #3346F0;
}
.l-bars i:nth-child(1) { opacity: 0.12; }
.l-bars i:nth-child(2) { opacity: 0.2; }
.l-bars i:nth-child(3) { opacity: 0.3; }
.l-bars i:nth-child(4) { opacity: 0.42; }
.l-bars i:nth-child(5) { opacity: 0.55; }
.l-bars i:nth-child(6) { opacity: 0.68; }
.l-bars i:nth-child(7) { opacity: 0.8; }
.l-bars i:nth-child(8) { opacity: 0.9; }

.live {
  position: absolute;
  top: calc(690 * var(--u));
  left: calc(61 * var(--u));
  right: calc(61 * var(--u));
  margin: 0;
  padding: 0;
  list-style: none;
}
.pair {
  display: grid;
  grid-template-columns: calc(155 * var(--u)) minmax(0, 1fr);
  padding: calc(32 * var(--u)) 0 calc(30 * var(--u));
  border-bottom: calc(2.5 * var(--u)) solid #DCDCD8;
}
.pair:first-child { padding-top: 0; }
.l-time {
  grid-row: span 2;
  padding-top: calc(10 * var(--u));
  font: 400 calc(31 * var(--u)) / 1.2 ui-monospace, "SF Mono", Menlo, monospace;
  color: #9C9C9C;
}
.pair p[lang="zh-Hans"] {
  font: 400 calc(46 * var(--u)) / calc(80 * var(--u)) var(--zh);
  letter-spacing: 0.02em;
  color: #3A3A3A;
}
.pair p[lang="en"] {
  margin-top: calc(-2 * var(--u));
  font: 400 calc(44 * var(--u)) / 1.35 var(--serif);
  color: #6A6A6A;
}
.pair:first-child p[lang="zh-Hans"] { color: #BDBDBD; }
.pair:first-child .l-time { color: #C6C6C6; }
.pair:last-child .l-time { color: #111; font-weight: 700; }
.pair:last-child p[lang="zh-Hans"] { color: #111; }
.pair:last-child p[lang="en"] { color: #2A2A2A; }
.l-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(260 * var(--u));
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(84 * var(--u));
}
.l-mark, .l-count {
  display: grid;
  place-items: center;
  width: calc(152 * var(--u));
  height: calc(152 * var(--u));
  border-radius: 50%;
  border: calc(3 * var(--u)) solid #E4E4E0;
  background: #fff;
  font-size: calc(36 * var(--u));
  color: #3A3A3A;
}
.l-count { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.l-stop {
  display: grid;
  place-items: center;
  width: calc(234 * var(--u));
  height: calc(234 * var(--u));
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #3A3A3A, #0B0B0B 70%);
  box-shadow: 0 calc(30 * var(--u)) calc(60 * var(--u)) rgba(0, 0, 0, 0.18);
}
.l-stop i {
  width: calc(72 * var(--u));
  height: calc(72 * var(--u));
  border-radius: calc(16 * var(--u));
  background: #FF3B30;
}
.live-screen::before {
  /* Home indicator */
  content: "";
  position: absolute;
  bottom: calc(26 * var(--u));
  left: 50%;
  width: calc(470 * var(--u));
  height: calc(12 * var(--u));
  transform: translateX(-50%);
  border-radius: 999px;
  background: #222;
}

/* ---------- Watch recording screen (HTML recreation of Gistory for Apple Watch) ----------
   Measured on the 422 px-wide watch screenshots; --wu is one of their pixels here.
   data-state: idle (Tap to Start) | recording (Tap to Mark) | marked (scrolled to the
   mark count and the hold-to-stop pill) | stopped (held to stop: the Tap to Start layout
   again, keeping the recorded time, as the app does). */

.device .screen.w-screen {
  --wu: calc(var(--watch-w, 170px) * 0.86 / 422);
  background: #000;
  color: #fff;
  font: 600 calc(30 * var(--wu)) / 1.2 var(--sans);
  text-align: center;
}
.w-screen p { margin: 0; }
.w-clock {
  position: absolute;
  z-index: 1;
  top: calc(40 * var(--wu));
  right: calc(34 * var(--wu));
  font: 500 calc(32 * var(--wu)) / 1 var(--sans);
  font-variant-numeric: tabular-nums;
}
.w-scroll {
  position: absolute;
  inset: calc(92 * var(--wu)) 0 0;
  overflow: hidden;
}
.w-body {
  position: relative;
  top: calc(-92 * var(--wu));
  height: calc(700 * var(--wu));
}
.w-screen[data-state="marked"] .w-body { transform: translateY(calc(-128 * var(--wu))); }
html.motion .w-body { transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
.w-body > * { position: absolute; left: 0; right: 0; }
.w-title {
  top: calc(113 * var(--wu));
  left: calc(13 * var(--wu));
  right: calc(13 * var(--wu));
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: calc(30 * var(--wu));
  text-align: left;
}
.w-dot {
  width: calc(11 * var(--wu));
  height: calc(11 * var(--wu));
  border-radius: 50%;
  background: #FF9F0A;
}
.w-glyph {
  top: calc(196 * var(--wu));
  height: calc(84 * var(--wu));
  display: grid;
  place-items: center;
  color: #FF9F0A;
}
.w-glyph > * { grid-area: 1 / 1; }
.w-mic-fill { width: calc(52 * var(--wu)); height: calc(80 * var(--wu)); }
.w-wave {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--wu));
  height: calc(80 * var(--wu));
}
.w-wave i {
  width: calc(4.5 * var(--wu));
  border-radius: 999px;
  background: #FF9F0A;
}
.w-wave i:nth-child(1) { height: calc(16 * var(--wu)); }
.w-wave i:nth-child(2) { height: calc(46 * var(--wu)); }
.w-wave i:nth-child(3) { height: calc(76 * var(--wu)); }
.w-wave i:nth-child(4) { height: calc(40 * var(--wu)); background: #C77714; }
.w-wave i:nth-child(5) { height: calc(58 * var(--wu)); background: #8A5214; }
.w-wave i:nth-child(6) { height: calc(26 * var(--wu)); background: #5C3912; }
.w-action { top: calc(298 * var(--wu)); font-size: calc(30 * var(--wu)); }
.w-timer {
  top: calc(380 * var(--wu));
  font: 400 calc(40 * var(--wu)) / 1.1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.01em;
}
.w-src {
  top: calc(450 * var(--wu));
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(10 * var(--wu));
  font: 400 calc(27 * var(--wu)) / 1.2 var(--sans);
  color: #8E8E93;
}
.w-mic { width: calc(17 * var(--wu)); height: calc(28 * var(--wu)); }
.w-mic rect { fill: currentColor; }
.w-marks {
  top: calc(512 * var(--wu));
  font: 400 calc(28 * var(--wu)) / 1.2 var(--sans);
  color: #8E8E93;
}
.w-stop {
  top: calc(566 * var(--wu));
  left: calc(10 * var(--wu));
  right: calc(10 * var(--wu));
  padding: calc(18 * var(--wu)) 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font: 400 calc(28 * var(--wu)) / 1.2 var(--sans);
}
/* State: idle and stopped show the microphone and "Tap to Start"; recording and marked
   show the waveform and "Tap to Mark". */
.w-when-idle, .w-t0 { display: none; }
.w-screen[data-state="idle"] .w-t0 { display: inline; }
.w-screen[data-state="idle"] .w-t1 { display: none; }
.w-screen:is([data-state="idle"], [data-state="stopped"]) .w-when-idle { display: inline; }
.w-screen:is([data-state="idle"], [data-state="stopped"]) :is(.w-when-rec, .w-wave, .w-marks, .w-stop) { display: none; }
.w-screen:is([data-state="recording"], [data-state="marked"]) .w-mic-fill { display: none; }
.w-screen:is([data-state="idle"], [data-state="stopped"]) .w-dot { background: #8E8E93; }
.w-screen[data-state="recording"] .w-marks { visibility: hidden; }

/* The scene waits, unseen, for its first frame (cleared by meeting.js, or after 2.5 s). */
html.meeting-pending .stage-meeting > * { opacity: 0; }


/* ---------- 05 · Flight home: a rail of Gistory for iPhone screens ----------
   Final state (no JS, reduced motion): a row of phones the reader scrolls sideways.
   With motion, the reader's vertical scroll moves the row (flight.js). */

.flight-inner { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.stage-flight { --phone-w: 272px; --rail-gap: 40px; min-width: 0; }
.rail-view {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 235, 221, 0.3) transparent;
  /* Room for the phones' shadows inside the scroller. */
  padding: 12px 0 56px;
  margin-bottom: -40px;
}
.rail-view:focus-visible { outline: 2px solid var(--night); outline-offset: 6px; border-radius: 12px; }
.rail {
  position: relative;
  display: flex;
  gap: var(--rail-gap);
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail-card { flex: none; width: var(--phone-w); scroll-snap-align: start; }
.rail-card .device.iphone { margin: 0; }
.rail-cap {
  margin: 20px 0 0;
  max-width: 100%;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Motion: the row is moved by the scroll, clipped at the screen's right edge and
   fading out into the gap beside the copy. */
html.motion .rail-view {
  overflow-x: clip;
  overflow-y: visible;
  scroll-snap-type: none;
  margin-left: -120px;
  padding-left: 120px;
  margin-right: calc((min(100vw - 2 * var(--gutter), var(--max)) - 100vw) / 2);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.35) 60px, #000 120px);
  mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.35) 60px, #000 120px);
}
html.motion .rail { will-change: transform; }
html.flight-pending .stage-flight > * { opacity: 0; }

/* Gistory's own screens, recreated in its light "Ink" theme, in iOS points
   (--pt: one point of a 440 pt-wide iPhone at this phone's size). */
.device .screen.gi-screen {
  --pt: calc(var(--phone-w, 300px) * 0.93 / 440);
  --paper: #F5F5F2;
  --sheet: #FFFFFF;
  --i1: #0B0B0C;
  --i2: #4B4C52;
  --i3: #6F7074;
  --hair: #E3E3DF;
  --raised: #EDEDEA;
  --sp0: #2440FF;
  --sp1: #D3451A;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --quote: "New York", ui-serif, "Iowan Old Style", Georgia, serif;
  background: var(--paper);
  color: var(--i1);
  font: 400 calc(14 * var(--pt)) / 1.3 -apple-system, "SF Pro Text", system-ui, sans-serif;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.gi-screen p { margin: 0; }
.gi-screen .ic { display: block; flex: none; fill: currentColor; }
.gi-screen::after { z-index: 6; }
.gi-screen::before {
  /* Home indicator */
  content: "";
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: calc(8 * var(--pt));
  width: calc(150 * var(--pt));
  height: calc(5 * var(--pt));
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--i1);
}
/* The status bar as it is in the App Store screenshots beside these screens. */
.gi-screen .ios-sb { height: calc(64 * var(--pt)); padding: calc(4 * var(--pt)) calc(40 * var(--pt)) 0 calc(60 * var(--pt)); }
.gi-screen .ios-time { font-size: calc(18.5 * var(--pt)); }
.gi-screen .ios-icons { gap: calc(7 * var(--pt)); }
.gi-screen .ios-icons .ic-signal { width: calc(21 * var(--pt)); height: calc(14 * var(--pt)); }
.gi-screen .ios-icons .ic-wifi { width: calc(19 * var(--pt)); height: calc(14 * var(--pt)); }
.gi-screen .ios-icons .ic-battery { width: calc(31 * var(--pt)); height: calc(15 * var(--pt)); }
.gi-screen .sp-0 { color: var(--sp0); }
.gi-screen .sp-1 { color: var(--sp1); }

/* Search */
.gs-bar {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--pt));
  padding: calc(8 * var(--pt)) calc(12 * var(--pt)) calc(14 * var(--pt)) calc(16 * var(--pt));
}
.gs-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: calc(8 * var(--pt));
  height: calc(46 * var(--pt));
  padding: 0 calc(14 * var(--pt));
  border-radius: 999px;
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--hair), 0 calc(4 * var(--pt)) calc(12 * var(--pt)) rgba(0, 0, 0, 0.04);
  font-size: calc(17 * var(--pt));
  white-space: nowrap;
}
.gs-glass { width: calc(19 * var(--pt)); height: calc(19 * var(--pt)); color: var(--i2); }
.gs-ph { display: none; color: var(--i3); }
.gs-caret {
  width: calc(2 * var(--pt));
  height: calc(22 * var(--pt));
  margin-left: calc(-7 * var(--pt));
  border-radius: 1px;
  background: var(--i1);
}
.gs-cancel { padding: 0 calc(4 * var(--pt)); font-size: calc(17 * var(--pt)); color: var(--i1); }
.gs-results { padding: 0 calc(20 * var(--pt)); }
.gs-sect {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--pt));
  padding: calc(4 * var(--pt)) 0 calc(2 * var(--pt));
  font-size: calc(10 * var(--pt));
  font-weight: 700;
  letter-spacing: calc(1.5 * var(--pt));
  text-transform: uppercase;
  color: var(--i3);
}
.gs-sect::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.gs-sect:not(:first-child) { padding-top: calc(22 * var(--pt)); }
.gs-hit {
  display: flex;
  align-items: flex-start;
  gap: calc(10 * var(--pt));
  padding: calc(14 * var(--pt)) 0;
  box-shadow: inset 0 -1px 0 var(--hair);
}
.gs-when { flex: none; width: calc(42 * var(--pt)); padding-top: calc(1 * var(--pt)); }
.gs-when b { display: block; font: 700 calc(12 * var(--pt)) / 1.2 var(--mono); }
.gs-when span { display: block; margin-top: calc(5 * var(--pt)); font-size: calc(10 * var(--pt)); font-weight: 500; color: var(--i3); }
.gs-body { flex: 1; min-width: 0; }
.gs-meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: calc(9.5 * var(--pt));
  font-weight: 700;
  letter-spacing: calc(1.4 * var(--pt));
  text-transform: uppercase;
  color: var(--i3);
}
.gs-line {
  margin-top: calc(6 * var(--pt)) !important;
  font: 400 calc(16 * var(--pt)) / 1.42 var(--quote);
  color: var(--i2);
}
.gs-m { background: rgba(11, 11, 12, 0.09); color: var(--i1); border-radius: 2px; padding: 0 1px; }
.gs-check {
  flex: none;
  width: calc(22 * var(--pt));
  height: calc(22 * var(--pt));
  margin-top: calc(1 * var(--pt));
  border-radius: 50%;
  box-shadow: inset 0 0 0 calc(1.6 * var(--pt)) #9B9CA2;
}
.gs-fu { gap: calc(12 * var(--pt)); }
.gs-task { font-size: calc(15 * var(--pt)); font-weight: 600; line-height: 1.3; }
.gs-quote {
  margin-top: calc(6 * var(--pt)) !important;
  padding-left: calc(10 * var(--pt));
  box-shadow: inset calc(3 * var(--pt)) 0 0 var(--sp0);
  font: 400 calc(14 * var(--pt)) / 1.4 var(--quote);
  color: var(--i2);
}
.gs-sub { margin-top: calc(6 * var(--pt)) !important; font-size: calc(11.5 * var(--pt)); color: var(--i3); }

/* The system keyboard, as it stays up while searching. */
.kb {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: calc(12 * var(--pt)) calc(4 * var(--pt)) calc(30 * var(--pt));
  border-radius: calc(34 * var(--pt)) calc(34 * var(--pt)) 0 0;
  background: #DCDDE2;
  font-size: calc(24 * var(--pt));
  color: #000;
}
.kb-row { display: flex; justify-content: center; gap: calc(6.5 * var(--pt)); margin-top: calc(12 * var(--pt)) !important; }
.kb-row:first-child { margin-top: 0 !important; }
.kb-row span {
  display: grid;
  place-items: center;
  width: calc(37.5 * var(--pt));
  height: calc(46 * var(--pt));
  border-radius: calc(9 * var(--pt));
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}
.kb-row .kb-wide { width: calc(52 * var(--pt)); }
.kb-row .kb-space { flex: 1; max-width: calc(198 * var(--pt)); }
.kb-row .kb-go { width: calc(96 * var(--pt)); background: #0A84FF; color: #fff; }
.kb-row .kb-fn { font-size: calc(17 * var(--pt)); }
.kb-row .ic { width: calc(22 * var(--pt)); height: calc(22 * var(--pt)); }
.kb-sys { display: flex; justify-content: space-between; padding: calc(16 * var(--pt)) calc(28 * var(--pt)) 0 !important; }
.kb-sys .ic { width: calc(28 * var(--pt)); height: calc(28 * var(--pt)); }

/* Notes: Meeting minutes for a recording, with the floating player */
.gn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(46 * var(--pt));
  padding: 0 calc(24 * var(--pt)) 0 calc(28 * var(--pt));
}
.gn-top > .ic { width: calc(24 * var(--pt)); height: calc(24 * var(--pt)); }
.gn-tools { display: flex; gap: calc(30 * var(--pt)); }
.gn-tools .ic { width: calc(23 * var(--pt)); height: calc(23 * var(--pt)); }
.gn-title {
  padding: calc(18 * var(--pt)) calc(20 * var(--pt)) 0;
  font-size: calc(29 * var(--pt));
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.gn-meta {
  padding: calc(8 * var(--pt)) calc(20 * var(--pt)) 0;
  font: 400 calc(12 * var(--pt)) / 1.3 var(--mono);
  color: var(--i3);
}
.gn-wave {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(54 * var(--pt));
  margin: calc(14 * var(--pt)) calc(20 * var(--pt)) 0 !important;
}
.gn-wave i {
  width: calc(3.4 * var(--pt));
  height: calc(var(--h) * 100%);
  border-radius: 999px;
  background: #D5D5D1;
}
.gn-wave .w-c0 { background: var(--sp0); }
.gn-wave .w-c1 { background: var(--sp1); }
.gn-legend {
  display: flex;
  gap: calc(16 * var(--pt));
  padding: calc(10 * var(--pt)) calc(20 * var(--pt)) 0;
  font-size: calc(12.5 * var(--pt));
}
.gn-legend span { display: inline-flex; align-items: center; gap: calc(6 * var(--pt)); }
.gn-legend span::before { content: ""; width: calc(7 * var(--pt)); height: calc(7 * var(--pt)); border-radius: 50%; background: currentColor; }
.gn-legend span { color: var(--i1); }
.gn-legend .sp-0::before { background: var(--sp0); }
.gn-legend .sp-1::before { background: var(--sp1); }
.gn-lead {
  padding: calc(18 * var(--pt)) calc(20 * var(--pt)) calc(4 * var(--pt));
  font-size: calc(18.5 * var(--pt));
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.32;
}
.gn-label {
  padding: calc(16 * var(--pt)) calc(20 * var(--pt)) calc(1 * var(--pt));
  font-size: calc(9.5 * var(--pt));
  font-weight: 700;
  letter-spacing: calc(1.4 * var(--pt));
  text-transform: uppercase;
  color: var(--i3);
}
.gn-row {
  display: flex;
  align-items: baseline;
  gap: calc(10 * var(--pt));
  margin: 0 calc(20 * var(--pt)) !important;
  padding: calc(10 * var(--pt)) 0;
  box-shadow: inset 0 -1px 0 var(--hair);
  font-size: calc(14 * var(--pt));
  line-height: 1.35;
}
.gn-row u {
  position: relative;
  flex: none;
  margin-left: auto;
  text-decoration: none;
  padding-bottom: calc(1.5 * var(--pt));
  box-shadow: inset 0 -1px 0 var(--i3);
  font: 500 calc(11 * var(--pt)) / 1.2 var(--mono);
  color: var(--i2);
}
.gn-fu { align-items: center; }
.gn-ghosts { display: flex; gap: calc(18 * var(--pt)); padding: calc(18 * var(--pt)) calc(20 * var(--pt)) 0; }
.gn-ghosts span { display: inline-flex; align-items: center; gap: calc(7 * var(--pt)); font-size: calc(15 * var(--pt)); font-weight: 600; }
.gn-ghosts .ic { width: calc(18 * var(--pt)); height: calc(18 * var(--pt)); }
.gn-foot { padding: calc(10 * var(--pt)) calc(20 * var(--pt)) 0; font-size: calc(11.5 * var(--pt)); line-height: 1.4; color: var(--i3); }
.gn-fu p { flex: 1; min-width: 0; }
.gn-fu p span { display: block; margin-top: calc(2 * var(--pt)); font-size: calc(11 * var(--pt)); color: var(--i3); }
.gn-tap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(46 * var(--pt));
  height: calc(46 * var(--pt));
  margin: calc(-23 * var(--pt)) 0 0 calc(-23 * var(--pt));
  border-radius: 50%;
  background: rgba(11, 11, 12, 0.12);
  opacity: 0;
}
.gn-player {
  position: absolute;
  z-index: 5;
  left: calc(14 * var(--pt));
  right: calc(14 * var(--pt));
  bottom: calc(32 * var(--pt));
  padding: calc(10 * var(--pt));
  border-radius: calc(36 * var(--pt));
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 calc(10 * var(--pt)) calc(30 * var(--pt)) rgba(0, 0, 0, 0.12);
}
.gn-caption {
  display: flex;
  align-items: baseline;
  gap: calc(8 * var(--pt));
  padding: calc(6 * var(--pt)) calc(10 * var(--pt)) calc(12 * var(--pt));
}
.gn-caption b {
  flex: none;
  font-size: calc(10 * var(--pt));
  letter-spacing: calc(0.6 * var(--pt));
  text-transform: uppercase;
}
.gn-caption span { font: 400 calc(14.5 * var(--pt)) / 1.35 "Songti SC", "STSong", var(--quote); color: var(--i1); }
.gn-bar { display: flex; align-items: center; gap: calc(12 * var(--pt)); }
.gn-play {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(54 * var(--pt));
  height: calc(54 * var(--pt));
  border-radius: 50%;
  background: var(--i1);
  color: #fff;
}
.gn-play .ic { grid-area: 1 / 1; width: calc(24 * var(--pt)); height: calc(24 * var(--pt)); }
.gn-i-play { display: none !important; }
.gn-time { font: 400 calc(15 * var(--pt)) / 1 var(--mono); color: var(--i2); white-space: nowrap; }
.gn-pos { color: var(--i1); }
.gn-seg {
  display: flex;
  margin-left: auto;
  padding: calc(3 * var(--pt));
  border-radius: 999px;
  background: var(--raised);
  font-size: calc(15 * var(--pt));
}
.gn-seg > * { padding: calc(10 * var(--pt)) calc(14 * var(--pt)); border-radius: 999px; color: var(--i3); }
.gn-seg b { background: var(--i1); color: #fff; font-weight: 600; }

/* States set by flight.js while motion plays (the markup above is the end state). */
.gs[data-state="idle"] .gs-ph { display: inline; }
.gs[data-state="idle"] .gs-caret { order: 1; margin: 0 calc(-6 * var(--pt)) 0 0; }
.gs[data-state="idle"] .gs-ph { order: 2; }
.gs[data-state="idle"] .gs-query { order: 3; }
/* Faded, not hidden: a screen reader still finds the results before the word is typed. */
.gs:is([data-state="idle"], [data-state="typing"]) .gs-results { opacity: 0; pointer-events: none; }
.gn[data-cue="off"] .gn-caption { display: none; }
.gn[data-cue="off"] .gn-i-play { display: block !important; }
.gn[data-cue="off"] .gn-i-pause { display: none; }

/* ---------- 06 · Back home: the route gathers the four apps' devices ---------- */

.stage-private { --s: 1; min-height: 340px; }
.gather-line {
  position: absolute;
  left: -4%;
  width: 108%;
  top: calc(50% - 60px);
  height: 120px;
  overflow: visible;
}
.gather-line path {
  fill: none;
  stroke: var(--espresso);
  stroke-opacity: 0.45;
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.gather {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gather-device { display: flex; flex-direction: column; align-items: center; }
.gd-art { display: grid; place-items: center; height: calc(132px * var(--s)); }
.gd-name { margin-top: calc(14px * var(--s)); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--espresso); }
.gd-art img { display: block; }
.gd-phone,
.gd-watch,
.gd-mac-screen {
  position: relative;
  display: grid;
  place-items: center;
  border: calc(3px * var(--s)) solid var(--espresso);
  background: var(--ivory-hi);
}
.gd-phone { width: calc(62px * var(--s)); height: calc(128px * var(--s)); border-radius: calc(16px * var(--s)); }
.gd-phone::before {
  content: "";
  position: absolute;
  top: calc(6px * var(--s));
  width: calc(18px * var(--s));
  height: calc(5px * var(--s));
  border-radius: 99px;
  background: var(--espresso);
}
.gd-phone img { width: calc(34px * var(--s)); border-radius: calc(8px * var(--s)); }
.gd-watch { width: calc(56px * var(--s)); height: calc(66px * var(--s)); border-radius: calc(17px * var(--s)); }
.gd-watch::before,
.gd-watch::after {
  content: "";
  position: absolute;
  left: 50%;
  width: calc(36px * var(--s));
  height: calc(26px * var(--s));
  transform: translateX(-50%);
  background: var(--khaki);
  border: calc(3px * var(--s)) solid var(--espresso);
  z-index: -1;
}
.gd-watch::before { bottom: 100%; margin-bottom: calc(-6px * var(--s)); border-radius: calc(8px * var(--s)) calc(8px * var(--s)) 0 0; }
.gd-watch::after { top: 100%; margin-top: calc(-6px * var(--s)); border-radius: 0 0 calc(8px * var(--s)) calc(8px * var(--s)); }
.gd-watch img { width: calc(36px * var(--s)); border-radius: 50%; }
.gd-mac { display: flex; flex-direction: column; align-items: center; }
.gd-mac-screen { width: calc(140px * var(--s)); height: calc(90px * var(--s)); border-radius: calc(9px * var(--s)) calc(9px * var(--s)) calc(3px * var(--s)) calc(3px * var(--s)); }
.gd-mac::after {
  content: "";
  width: calc(168px * var(--s));
  height: calc(8px * var(--s));
  margin-top: calc(-1px * var(--s));
  border-radius: 0 0 calc(8px * var(--s)) calc(8px * var(--s));
  background: var(--espresso);
}
.gd-mac img { width: calc(36px * var(--s)); border-radius: calc(8px * var(--s)); }
.gd-app { width: calc(68px * var(--s)); border-radius: calc(16px * var(--s)); box-shadow: 0 8px 18px rgba(59, 42, 32, 0.22); }

/* Promises */

.promises {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}
.promises li {
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
}
.promises strong {
  display: block;
  font: 400 1.375rem/1.3 var(--serif);
  color: var(--fg);
  margin-bottom: 2px;
}

/* ---------- Download ---------- */

#download .scene-copy { max-width: none; }
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.app-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  border-radius: var(--radius-card);
  background: var(--ivory-hi);
  border: 1px solid var(--hairline);
}
.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  box-shadow: 0 6px 16px rgba(59, 42, 32, 0.14);
  margin-bottom: 24px;
}
.app-card h3 {
  margin: 0 0 6px;
  font: 400 1.75rem/1.15 var(--serif);
  letter-spacing: -0.015em;
}
.app-card h3 span { display: block; font-size: 0.7em; color: var(--muted); }
.app-line { margin: 0 0 24px; color: var(--muted); }
.app-meta {
  margin: 0 0 28px;
  font-size: 0.875rem;
  border-top: 1px solid var(--hairline);
}
.app-meta div {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.app-meta dt { color: var(--muted); }
.app-meta dd { margin: 0; }
.nowrap { white-space: nowrap; }
/* Apple's badge artwork, unaltered, at least 40 px tall, with clear space around it. */
.store-badge {
  margin-top: auto;
  align-self: flex-start;
  padding: 11px 0 0;
  border-radius: 8px;
}
.store-badge img { width: auto; height: 44px; }
.store-badge:focus-visible { outline: 2px solid var(--espresso); outline-offset: 4px; }

/* The deck (html.motion): download.js deals the cards from a small stack into their
   slots, then their lines rise out of masks like the headlines'. */
html.download-pending .download-grid > * { opacity: 0; }
html.motion .app-card { position: relative; }
/* Each mask is the height of its own text (a row's dt is not stretched to its dd). */
html.motion .app-card .card-line { overflow: hidden; align-self: start; }
html.motion .app-card .card-line-inner { display: block; }
/* The rules between the facts draw in, left to right, as their row comes up (--rule is
   set per row from the timeline; without it they are simply there). */
html.motion .app-meta { border-top-color: transparent; }
html.motion .app-meta div { position: relative; border-bottom-color: transparent; }
html.motion .app-meta div::after,
html.motion .app-meta div:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--hairline);
  transform: scaleX(var(--rule, 1));
  transform-origin: 0 50%;
}
html.motion .app-meta div::after { bottom: -1px; }
html.motion .app-meta div:first-child::before { top: -1px; }
/* The lift's shadow, under the card (only its outside shows): its opacity is animated,
   never the shadow itself. */
.card-lift {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  box-shadow:
    0 2px 4px rgba(59, 42, 32, 0.06),
    0 14px 28px -10px rgba(59, 42, 32, 0.22),
    0 36px 64px -24px rgba(59, 42, 32, 0.32);
}
@media (min-width: 961px) {
  /* Gistory for iPhone lies on top of the deck. */
  html.motion .app-card:nth-child(2) { z-index: 2; }
}
@media (max-width: 960px) {
  /* The first card is on top; the others lie under it in order. */
  html.motion .app-card:nth-child(1) { z-index: 3; }
  html.motion .app-card:nth-child(2) { z-index: 2; }
}
/* ---------- Footer ----------
   The night again, a little after the hero: the languages every app speaks, the way
   around the site, and the traveler checking his watch above a giant wordmark. */

.site-footer {
  --fg: var(--ivory);
  --muted: rgba(244, 235, 221, 0.56);
  --hairline: rgba(244, 235, 221, 0.14);
  --wide: min(calc(100vw - 2 * var(--gutter)), var(--max));
  --fig-w: clamp(360px, 38vw, 580px); /* the traveler's width (and height: the art is square) */
  --wm-size: calc(var(--wide) / 2.92); /* "Gistory" set this size spans the content width */
  --wm-h: calc(var(--wm-size) * 0.78); /* the wordmark down to just above its baseline */
  /* The watch face sits 23.1% of the art's height above its foot; it rests just above the
     lowercase letters (their tops are 0.41em above the edge), the hands on the word. */
  --fig-lift: calc(var(--wm-size) * 0.41 + 22px - var(--fig-w) * 0.231);
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: clamp(128px, 18vh, 200px);
  background:
    radial-gradient(60% 50% at 74% 78%, rgba(52, 72, 112, 0.5), transparent 72%),
    radial-gradient(50% 30% at 18% 42%, rgba(28, 38, 56, 0.7), transparent 70%),
    var(--ink);
  color: var(--ivory);
}
.site-footer .footer-stars { inset: 0; opacity: 0.55; z-index: -1; }

.footer-inner {
  width: min(calc(100% - 2 * var(--gutter)), var(--max));
  margin-inline: auto;
}
.footer-kicker {
  margin: 0 0 18px;
  font: 500 0.75rem/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The drift's pause button (shown by footer.js only when the band moves), at the
   heading's right, out of the flow so the heading keeps its place. */
.footer-langs-head { position: relative; }
.lang-pause {
  position: absolute;
  top: -6px;
  right: 0;
  padding: 5px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 0.75rem/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.lang-pause[hidden] { display: none; }
.lang-pause:hover { color: var(--ivory); border-color: var(--muted); }
.lang-pause:focus-visible { color: var(--ivory); outline: 2px solid var(--ivory); outline-offset: 2px; }

/* Languages, each in its own name and script. Two rows; with motion they drift. */
.lang-band {
  position: relative;
  overflow: clip;
  margin: 6px 0 clamp(44px, 7vh, 72px);
  font: 400 clamp(1.9rem, 3.8vw, 3.5rem)/1.22 var(--serif);
  letter-spacing: -0.015em;
}
.lang-track { display: flex; }
.lang-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.04em 0.5em;
  width: min(calc(100% - 2 * var(--gutter)), var(--max));
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.lang-band li {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  white-space: nowrap;
}
.lang-band li[dir="rtl"] { flex-direction: row-reverse; }
/* A small khaki dot after each name; the last one waits for the loop. */
.lang-band li::after {
  content: "";
  width: 0.12em;
  height: 0.12em;
  border-radius: 50%;
  background: var(--khaki);
  opacity: 0.7;
}
.lang-band li:last-child::after { display: none; }
.lang-track + .lang-track { margin-top: 0.04em; }
.lang-track + .lang-track .lang-list { color: var(--khaki); font-style: italic; }
.lang-band [lang="zh-Hans"] { font-family: "Songti SC", "STSong", var(--zh); }
.lang-band [lang="zh-Hant"] { font-family: "Songti TC", "Songti SC", "PingFang TC", var(--zh); }
.lang-band [lang="ja"] { font-family: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Hiragino Sans", serif; }
.lang-band [lang="ko"] { font-family: "AppleMyungjo", "Apple SD Gothic Neo", serif; }
.lang-band [lang="ar"] { font-family: "Geeza Pro", "Baghdad", "Damascus", sans-serif; font-style: normal; }
.lang-band [lang="th"] { font-family: "Thonburi", "Sukhumvit Set", sans-serif; font-style: normal; }
.lang-band [lang="hi"] { font-family: "Kohinoor Devanagari", "Devanagari Sangam MN", "ITF Devanagari", sans-serif; font-style: normal; }
.lang-band [lang="zh-Hans"], .lang-band [lang="zh-Hant"], .lang-band [lang="ja"], .lang-band [lang="ko"] { font-style: normal; font-size: 0.86em; }

/* Which app speaks what, precisely. */
.lang-apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(32px, 4vw, 64px);
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.lang-apps dt { margin: 0 0 12px; font: 400 1.375rem/1.2 var(--serif); }
.lang-apps dd { margin: 0; }
.lang-role {
  display: block;
  font: 500 0.6875rem/1.4 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.inline-list,
.lang-note {
  margin: 4px 0 14px;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(244, 235, 221, 0.84);
}
.inline-list li { display: inline; }
.inline-list li:not(:last-child)::after { content: ", "; }

/* The way around, then the traveler and the wordmark. */
.footer-lower {
  position: relative;
  z-index: 2;
  /* Room for the traveler beside the columns, down to where the wordmark starts. */
  min-height: calc(var(--fig-w) * 0.66);
  padding-top: clamp(56px, 9vh, 96px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 24px clamp(40px, 5vw, 80px);
}
.footer-cols ul { margin: 0; padding: 0; list-style: none; }
.footer-cols li + li { margin-top: 8px; }
.footer-cols a {
  font-size: 0.9375rem;
  text-decoration: none;
  color: rgba(244, 235, 221, 0.84);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.35s ease, color 0.2s;
}
.footer-cols a:hover,
.footer-cols a:focus-visible { color: var(--ivory); background-size: 100% 1px; }
.footer-bar {
  margin: auto 0 0;
  padding: 40px 0 28px;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Clips the traveler (and his glow, and the parallax) at the footer's edges. */
.footer-figure {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: clip;
  pointer-events: none;
}
.footer-traveler {
  position: absolute;
  right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--wide) * 0.02));
  bottom: var(--fig-lift);
  width: var(--fig-w);
  /* The art is cut at the chest; it dissolves behind the wordmark. */
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent 99%);
  mask-image: linear-gradient(180deg, #000 82%, transparent 99%);
}
.fig-frame { position: relative; aspect-ratio: 1; }
.fig-art { position: relative; width: 100%; }
.fig-glow {
  position: absolute;
  inset: 10% 4% -10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(143, 166, 214, 0.32), rgba(143, 166, 214, 0.08) 60%, transparent);
}
/* The face of the watch (measured on the art): where the route line ends. */
.route-end {
  position: absolute;
  left: 59.8%;
  top: 76.9%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  pointer-events: none;
}

.footer-wordmark-wrap {
  position: relative;
  z-index: 2;
  height: var(--wm-h);
  overflow: clip;
}
.site-footer .footer-wordmark {
  margin: 0;
  font: 400 var(--wm-size)/1 var(--serif);
  letter-spacing: -0.045em;
  text-align: center;
  color: #EDE2CF;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .site-footer {
    --fig-w: min(74vw, 320px);
    min-height: 0;
    background:
      radial-gradient(130% 30% at 70% 88%, rgba(52, 72, 112, 0.5), transparent 72%),
      var(--ink);
    padding-top: 112px;
  }
  .lang-band,
  html.motion .lang-band { font-size: clamp(1.7rem, 8.5vw, 2.4rem); }
  .lang-apps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer-lower { min-height: 0; padding-bottom: calc(28px + var(--fig-w) * 0.74); }
  .footer-cols { grid-template-columns: repeat(2, auto); }
  .footer-bar { padding: 32px 0 0; }
  .footer-traveler { right: 0; }
}

/* With motion, each row of names becomes a loop that drifts (two copies end to end). */
html.motion .lang-band {
  font-size: clamp(2.1rem, 5.4vw, 5rem);
  line-height: 1.18;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
html.motion .lang-track { width: max-content; will-change: transform; }
html.motion .lang-list {
  flex-wrap: nowrap;
  width: auto;
  margin: 0;
  padding-inline-end: 0.5em;
}
html.motion .lang-band li:last-child::after { display: block; }

/* ---------- Motion (html.motion: JS on, reduced motion off) ----------
   Everything above is the final state. These rules only exist while motion runs. */

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Headlines wait, unseen, for the first frame of their reveal. */
html.motion-pending .display .line { opacity: 0; }

/* Line masks. The mask and the line are both padded below so descenders are not cut,
   and the hidden line sits fully under the mask's edge. */
html.motion .display .line {
  overflow: hidden;
  padding: 0 0.08em 0.14em;
  margin: 0 -0.08em -0.14em;
}
html.motion .display .line-inner {
  display: block;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

/* Route pen tip */
#route-tip { pointer-events: none; }
#route-tip circle { fill: var(--khaki); }
#route-tip .halo { opacity: 0.22; }

/* Time-of-day light: a wash from the top of the screen, crossfaded per scene. */
.sky {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.sky-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(70% 55% at 82% -8%, color-mix(in srgb, var(--glow) 26%, transparent), transparent 72%);
}

/* Curtains: the new ground rises with a curved edge at each dark/light change. */
html.motion .story > .scene,
html.motion .site-footer { position: relative; }
.curtain {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  width: 100%;
  height: min(14vh, calc(var(--scene-pad) * 0.8));
  transform-origin: 50% 100%;
  pointer-events: none;
  overflow: visible;
}
.curtain path { fill: var(--curtain, var(--bg)); }
.scene--dawn { --curtain: #F3DCCB; }
.scene--morning { --curtain: #F7EDE0; }
.scene--dusk { --curtain: var(--espresso); }
.scene--night { --curtain: var(--ink); }
.scene--khaki { --curtain: var(--khaki-soft); }
.site-footer { --curtain: var(--ink); }

/* ---------- Narrow screens ---------- */

@media (max-width: 960px) {
  .download-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}

@media (max-width: 767px) {
  :root { --gutter: 20px; --scene-pad: 88px; }

  .site-header { padding-top: 16px; padding-bottom: 16px; }
  .site-nav a:not(.nav-cta) { display: none; }
  #hero { padding-top: 120px; }
  .eyebrow span { display: none; }

  /* The route runs down the left gutter on phones */
  #route { left: 2px; width: 16px; }
  #route-tip .halo { r: 6px; }
  #route-tip circle:not(.halo) { r: 2.5px; }

  .scene-inner { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .scene--flip .scene-copy { order: 0; }

  .display { font-size: clamp(2.3rem, 10.5vw, 3rem); }

  .stage-hero .traveler { width: min(86%, 380px); }

  .device.iphone { --phone-w: 230px; }
  .stage-arrival,
  .stage-arrival .device.iphone { --phone-w: min(272px, 72vw); }
  .stage-arrival .chip { margin-top: 18px; }

  /* The watch keeps clear of the phone (it starts at 100% - 230px of a 335px stage). */
  .stage-meeting { --phone-w: 230px; --watch-w: 94px; --voice-h: 46px; padding-bottom: 88px; }
  .stage-meeting .device.watch { bottom: calc(88px + 8%); }
  .stage-meeting .watch-note { white-space: normal; width: 9.5em; font-size: 0.75rem; line-height: 1.35; }

  .flight-inner { grid-template-columns: minmax(0, 1fr); }
  .stage-flight { --phone-w: 232px; --rail-gap: 22px; }
  .rail-view { margin: 0 calc(-1 * var(--gutter)) -40px; padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding-left: var(--gutter); }
  html.motion .rail-view {
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding-left: var(--gutter);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter));
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter));
  }

  .stage-private { --s: 0.56; min-height: 200px; }
  .gd-name { font-size: 0.75rem; }



  .copyright { margin-left: 0; width: 100%; }
}

/* ---------- Gistory for Mac: the hotel call (03) and the class (04) ----------
   The Mac's screen is laid out in its own points: a 1100 × 688 desktop where calc(1 * var(--u)) is one
   point (--u). Text is real CSS text at that size, so it stays crisp. On phones the screen
   shows a close-up of the same desktop (.cam), large enough to read. */

#hotel .scene-inner,
#class .scene-inner { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
#hotel .scene-copy { order: 0; }
@media (min-width: 1024px) {
  #hotel .scene-copy { justify-self: end; }
}

.stage-mac {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stage-mac .device.mac {
  width: min(100%, 1000px, (100vh - 220px) * 1.5);
  width: min(100%, 1000px, (100svh - 220px) * 1.5);
  max-width: none;
}
.stage-mac .device.mac .screen {
  aspect-ratio: auto;
  background: #000;
}
.stage-mac .chip { position: relative; left: auto; right: auto; bottom: auto; margin-top: 26px; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.cam { position: relative; }
.desk {
  position: relative;
  width: 100%;
  aspect-ratio: 1100 / 688;
  container-type: inline-size;
  --u: calc(100cqw / 1100);
  overflow: hidden;
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", "Hiragino Sans", sans-serif;
  color: #fff;
  letter-spacing: 0;
  line-height: 1.25;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.desk p { margin: 0; }
.desk svg { width: 1em; height: 1em; flex: none; }
.desk--dusk {
  background:
    radial-gradient(60% 50% at 82% 92%, rgba(255, 170, 90, 0.55), transparent 70%),
    radial-gradient(70% 60% at 10% 0%, rgba(92, 64, 140, 0.7), transparent 70%),
    linear-gradient(172deg, #241b35 0%, #4a2c46 38%, #9a4f45 72%, #e0925a 100%);
}
.desk--morning {
  background:
    radial-gradient(55% 45% at 85% 8%, rgba(255, 236, 200, 0.9), transparent 70%),
    radial-gradient(60% 55% at 0% 100%, rgba(240, 190, 150, 0.7), transparent 70%),
    linear-gradient(180deg, #a9c6e2 0%, #d5dbe0 52%, #efd8c0 100%);
}

/* Menu bar */
.m-menubar {
  position: absolute;
  inset: 0 0 auto;
  height: calc(24 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(19 * var(--u));
  padding: 0 calc(14 * var(--u)) 0 calc(22 * var(--u));
  font-size: calc(13 * var(--u));
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 calc(6 * var(--u)) rgba(0, 0, 0, 0.25);
}
.desk--morning .m-menubar { color: rgba(0, 0, 0, 0.85); text-shadow: none; background: rgba(255, 255, 255, 0.22); }
.m-menubar .mb-app { font-weight: 700; }
.mb-right { margin-left: auto; display: flex; align-items: center; gap: calc(14 * var(--u)); }
.mb-right svg { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.mb-right .mb-batt { width: calc(25 * var(--u)); height: calc(20 * var(--u)); }
.mb-right .mb-gistory { margin-right: calc(-12 * var(--u)); }
.mb-rec { width: calc(5 * var(--u)); height: calc(5 * var(--u)); border-radius: 50%; background: #ff5f57; margin: calc(-9 * var(--u)) 0 0 0; }

/* Window chrome */
.lights { display: flex; gap: calc(8 * var(--u)); }
.lights i { width: calc(12 * var(--u)); height: calc(12 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 calc(0.5 * var(--u)) rgba(0, 0, 0, 0.25); }
.lights--color i:nth-child(1) { background: #ff5f57; }
.lights--color i:nth-child(2) { background: #febc2e; }
.lights--color i:nth-child(3) { background: #28c840; }

/* The video call: a generic call app, no real product's chrome */
.call-win {
  position: absolute;
  left: calc(30 * var(--u));
  top: calc(38 * var(--u));
  width: calc(1040 * var(--u));
  height: calc(620 * var(--u));
  display: flex;
  flex-direction: column;
  border-radius: calc(16 * var(--u));
  background: #161618;
  box-shadow: 0 calc(24 * var(--u)) calc(70 * var(--u)) rgba(0, 0, 0, 0.45), 0 0 0 calc(0.5 * var(--u)) rgba(0, 0, 0, 0.7), inset 0 calc(0.5 * var(--u)) 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.call-win--share { top: calc(34 * var(--u)); height: calc(468 * var(--u)); }
.cw-bar {
  position: relative;
  height: calc(40 * var(--u));
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 calc(16 * var(--u));
  background: #232326;
  border-bottom: calc(0.5 * var(--u)) solid rgba(255, 255, 255, 0.08);
}
.cw-bar .lights i:nth-child(1) { background: #ff5f57; }
.cw-bar .lights i:nth-child(2) { background: #febc2e; }
.cw-bar .lights i:nth-child(3) { background: #28c840; }
.cw-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: calc(13 * var(--u));
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
}
.cw-time {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  font: 500 calc(12 * var(--u)) ui-monospace, "SF Mono", Menlo, monospace;
  color: rgba(255, 255, 255, 0.6);
}
.cw-time i { width: calc(7 * var(--u)); height: calc(7 * var(--u)); border-radius: 50%; background: #34c759; }
.cw-body {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: calc(8 * var(--u));
  padding: calc(10 * var(--u));
}
.cw-side {
  width: calc(222 * var(--u));
  flex: none;
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
}
.tile {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: calc(10 * var(--u));
  background: radial-gradient(90% 90% at 50% 40%, #34343a, #26262a);
  overflow: hidden;
}
.tile--main { flex: 1; min-width: 0; }
.tile-name {
  position: absolute;
  left: calc(8 * var(--u));
  bottom: calc(8 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(5 * var(--u));
  padding: calc(3 * var(--u)) calc(8 * var(--u)) calc(3 * var(--u)) calc(6 * var(--u));
  border-radius: calc(6 * var(--u));
  background: rgba(0, 0, 0, 0.55);
  font-size: calc(12 * var(--u));
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}
.tile-name svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.tile-name .lvl { color: #3ccf6a; }
.tile-name .muted { color: #ff6961; }

.cw-controls {
  height: calc(58 * var(--u));
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(6 * var(--u));
  padding: 0 calc(16 * var(--u));
  background: #1d1d20;
  border-top: calc(0.5 * var(--u)) solid rgba(255, 255, 255, 0.07);
}
.cw-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(3 * var(--u));
  min-width: calc(66 * var(--u));
  font-size: calc(11 * var(--u));
  color: rgba(255, 255, 255, 0.82);
}
.cw-btn svg { width: calc(21 * var(--u)); height: calc(21 * var(--u)); }
.cw-btn b { position: absolute; margin: calc(-4 * var(--u)) 0 0 calc(26 * var(--u)); font-size: calc(9 * var(--u)); font-weight: 600; padding: 0 calc(4 * var(--u)); border-radius: calc(6 * var(--u)); background: rgba(255, 255, 255, 0.2); }
.cw-btn.is-off svg { color: #ff6961; }
.cw-leave {
  position: absolute;
  right: calc(16 * var(--u));
  padding: calc(7 * var(--u)) calc(16 * var(--u));
  border-radius: calc(8 * var(--u));
  background: #e5484d;
  font-size: calc(13 * var(--u));
  font-weight: 600;
}
.cw-controls { position: relative; }

/* Shared slide (class) */
.share {
  position: relative;
  flex: 1;
  min-width: 0;
  display: grid;
  place-items: center;
  border-radius: calc(10 * var(--u));
  background: #0e0e10;
}
.share-pill {
  position: absolute;
  top: calc(8 * var(--u));
  left: 50%;
  transform: translateX(-50%);
  padding: calc(3 * var(--u)) calc(10 * var(--u));
  border-radius: calc(6 * var(--u));
  background: #2f7d4b;
  font-size: calc(11.5 * var(--u));
  font-weight: 600;
  white-space: nowrap;
}
.slide {
  position: relative;
  width: calc(566 * var(--u));
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  padding: calc(26 * var(--u)) calc(32 * var(--u)) calc(14 * var(--u));
  /* A dark keynote theme: deep navy-charcoal with a soft light from the top left. */
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(120, 140, 190, 0.16), transparent 60%),
    linear-gradient(165deg, #1A2130 0%, #11151E 100%);
  color: #F4EBDD;
  font-family: ui-serif, "New York", Georgia, serif;
  margin-top: calc(20 * var(--u));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.sl-kicker {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u));
  font: 600 calc(11.5 * var(--u)) -apple-system, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #D9A066;
}
.sl-kicker::before { content: ""; width: calc(22 * var(--u)); height: 1px; background: currentColor; opacity: 0.7; }
.sl-title {
  margin-top: calc(10 * var(--u)) !important;
  font-size: calc(28 * var(--u));
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: #F7F0E4;
}
/* The slide's chart: said vs. did, paired bars (warm = said, green = did). */
.slide { --said: #D9965F; --did: #86B48E; }
.sl-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(132 * var(--u));
  gap: calc(24 * var(--u));
  align-items: end;
  margin-top: calc(8 * var(--u));
}
.sl-legend { display: flex; gap: calc(16 * var(--u)); font: 500 calc(14 * var(--u))/1.2 -apple-system, sans-serif; color: rgba(244, 235, 221, 0.78); }
.sl-key { display: inline-flex; align-items: center; gap: calc(6 * var(--u)); }
.sl-key::before { content: ""; width: calc(9 * var(--u)); height: calc(9 * var(--u)); border-radius: calc(2 * var(--u)); }
.sl-key--said::before { background: var(--said); }
.sl-key--did::before { background: var(--did); }
.sl-plot { position: relative; aspect-ratio: 340 / 120; margin-top: calc(16 * var(--u)) !important; }
.slide .sl-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.sl-grid line { stroke: rgba(244, 235, 221, 0.10); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sl-base { stroke: rgba(244, 235, 221, 0.32); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sl-bar { transform-box: fill-box; transform-origin: 50% 100%; }
.sl-bar--said { fill: var(--said); }
.sl-bar--did { fill: var(--did); }
.sl-val {
  position: absolute;
  transform: translate(-50%, calc(-3 * var(--u)));
  font: 700 calc(14 * var(--u))/1 -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sl-val--said { color: #EDB383; }
.sl-val--did { color: #A9D3B0; }
.sl-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: calc(6 * var(--u)) !important;
  font: 500 calc(14 * var(--u))/1.2 -apple-system, sans-serif;
  color: rgba(244, 235, 221, 0.82);
  text-align: center;
  white-space: nowrap;
}
.sl-stat { padding: 0 0 calc(24 * var(--u)) calc(18 * var(--u)); border-left: 1px solid rgba(244, 235, 221, 0.12); }
.sl-big { font-size: calc(54 * var(--u)); font-weight: 300; line-height: 1; letter-spacing: -0.02em; color: #F7F0E4; }
.sl-stat-l { margin-top: calc(8 * var(--u)) !important; font: 500 calc(14 * var(--u))/1.3 -apple-system, sans-serif; color: rgba(244, 235, 221, 0.78); }
.sl-note { margin-top: calc(10 * var(--u)) !important; font: 500 calc(14 * var(--u))/1.2 -apple-system, sans-serif; color: rgba(244, 235, 221, 0.66); }
.sl-foot {
  margin-top: auto !important;
  padding-top: calc(8 * var(--u));
  border-top: 1px solid rgba(244, 235, 221, 0.12);
  display: flex;
  justify-content: space-between;
  font: 500 calc(10.5 * var(--u)) -apple-system, sans-serif;
  letter-spacing: 0.04em;
  color: rgba(244, 235, 221, 0.5);
  font-variant-numeric: tabular-nums;
}

/* The caption card (SubtitleView): the app's deep indigo, rounded 18, newest at the bottom */
.caption-card {
  position: absolute;
  left: calc(140 * var(--u));
  top: calc(366 * var(--u));
  width: calc(620 * var(--u));
  height: calc(222 * var(--u));
  padding: calc(10 * var(--u)) calc(16 * var(--u)) calc(10 * var(--u)) calc(8 * var(--u));
  border-radius: calc(18 * var(--u));
  background: linear-gradient(180deg, rgba(33, 31, 54, 0.9), rgba(20, 20, 38, 0.92));
  box-shadow: inset 0 0 0 calc(1 * var(--u)) rgba(255, 255, 255, 0.12), 0 calc(18 * var(--u)) calc(50 * var(--u)) rgba(0, 0, 0, 0.35);
  overflow: hidden;
  --cc: calc(20 * var(--u)); /* font size, the app's default */
}
.stage-hotel .caption-card { left: calc(160 * var(--u)); top: calc(398 * var(--u)); width: calc(640 * var(--u)); height: calc(194 * var(--u)); }
.stage-class .caption-card { left: calc(220 * var(--u)); top: calc(510 * var(--u)); width: calc(660 * var(--u)); height: calc(170 * var(--u)); }
.cc-groups {
  position: absolute;
  left: calc(8 * var(--u));
  right: calc(16 * var(--u));
  bottom: calc(10 * var(--u));
  display: flex;
  flex-direction: column;
}
.cc-group {
  position: relative;
  padding: calc(5 * var(--u)) calc(6 * var(--u)) calc(5 * var(--u)) calc(8 * var(--u));
  border-radius: calc(8 * var(--u));
  opacity: 0.35;
}
.cc-group + .cc-group::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(8 * var(--u));
  right: 0;
  height: calc(1 * var(--u));
  background: rgba(255, 255, 255, 0.08);
}
.cc-group .src,
.cc-group .tr { font-size: calc(var(--cc) * 0.9); line-height: 1.24; }
.cc-group .src { color: rgba(255, 255, 255, 0.72); }
.cc-group .tr { color: #fff; font-weight: 400; }
.cc-group .tr[data-state="provisional"] { color: rgba(255, 255, 255, 0.55); }
.cc-group .who { font-size: max(calc(10 * var(--u)), calc(var(--cc) * 0.55)); font-weight: 700; color: rgb(140, 191, 255); margin-bottom: calc(2 * var(--u)); }
.cc-group .src + .tr { margin-top: calc(2 * var(--u)); }
.cc-group[data-age="1"] { opacity: 0.5; }
.cc-group[data-age="2"] { opacity: 0.4; }
.cc-group--me[data-age="1"] { opacity: 0.375; }
.cc-group--me[data-age="2"] { opacity: 0.3; }
.cc-group--me { opacity: 0.26; }
/* The group being said: full size and brightness, a faint band and a bar on the left */
.cc-group[data-age="0"] { opacity: 1; background: rgba(255, 255, 255, 0.07); }
.cc-group--me[data-age="0"] { opacity: 0.75; }
.cc-group[data-age="0"]::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(8 * var(--u));
  bottom: calc(8 * var(--u));
  width: calc(3 * var(--u));
  border-radius: calc(2 * var(--u));
  background: rgba(255, 255, 255, 0.85);
}
.cc-group[data-age="0"] :is(.src, .tr) { font-size: var(--cc); }
.cc-group[data-age="0"] .src { color: #fff; }
.cc-group[data-age="0"] .tr { font-weight: 600; }
.cc-group[hidden] { display: none; }
.cc-group:first-child::before { content: none; }
.cc-grip {
  position: absolute;
  right: calc(4 * var(--u));
  bottom: calc(4 * var(--u));
  width: calc(9 * var(--u)) !important;
  height: calc(9 * var(--u)) !important;
  margin: calc(4.5 * var(--u));
  color: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}
.desk[data-hover="on"] .cc-grip { color: rgba(255, 255, 255, 0.6); }

/* Its toolbar, shown while the pointer is over the card */
.cc-toolbar {
  position: absolute;
  top: calc(6 * var(--u));
  left: calc(6 * var(--u));
  right: calc(6 * var(--u));
  height: calc(34 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  padding: 0 calc(8 * var(--u));
  border-radius: calc(11 * var(--u));
  background: rgba(51, 48, 77, 0.97);
  font-size: calc(12 * var(--u));
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  opacity: 0;
  white-space: nowrap;
}
.desk[data-hover="on"] .cc-toolbar { opacity: 1; }
.cc-az, .cc-btn {
  display: flex;
  align-items: center;
  height: calc(24 * var(--u));
  border-radius: calc(7 * var(--u));
  background: rgba(255, 255, 255, 0.12);
}
.cc-az span { padding: 0 calc(9 * var(--u)); }
.cc-az i { width: calc(1 * var(--u)); height: calc(14 * var(--u)); background: rgba(255, 255, 255, 0.14); }
.cc-btn { gap: calc(5 * var(--u)); padding: 0 calc(9 * var(--u)); }
.cc-btn svg { width: calc(11 * var(--u)); height: calc(11 * var(--u)); }
.cc-seg {
  display: flex;
  padding: calc(2 * var(--u));
  height: calc(22 * var(--u));
  border-radius: calc(7 * var(--u));
  background: rgba(255, 255, 255, 0.08);
  font-size: calc(11 * var(--u));
}
.cc-seg span { display: grid; place-items: center; padding: 0 calc(8 * var(--u)); border-radius: calc(5 * var(--u)); color: rgba(255, 255, 255, 0.8); }
.cc-seg .on { background: rgba(255, 255, 255, 0.24); color: #fff; box-shadow: 0 calc(1 * var(--u)) calc(2 * var(--u)) rgba(0, 0, 0, 0.25); }
.cc-gap { flex: 1; }

/* The pointer */
.m-cursor {
  position: absolute;
  left: calc(600 * var(--u));
  top: calc(452 * var(--u));
  width: calc(17 * var(--u)) !important;
  height: calc(24 * var(--u)) !important;
  filter: drop-shadow(0 calc(1 * var(--u)) calc(2 * var(--u)) rgba(0, 0, 0, 0.4));
  z-index: 5;
}
.stage-class .m-cursor { left: calc(864 * var(--u)); top: calc(197 * var(--u)); }

/* ---------- The Gistory window, Meetings (class, after the lecture) ---------- */
.g-win {
  --accent: rgb(255, 189, 107);
  --label: rgba(255, 255, 255, 0.58);
  --faint: rgba(255, 255, 255, 0.36);
  position: absolute;
  left: calc(150 * var(--u));
  top: calc(32 * var(--u));
  width: calc(800 * var(--u));
  height: calc(648 * var(--u));
  display: flex;
  flex-direction: column;
  border-radius: calc(18 * var(--u));
  background:
    radial-gradient(calc(520 * var(--u)) calc(520 * var(--u)) at 12% 5%, rgba(255, 149, 0, 0.2), transparent 100%),
    radial-gradient(calc(620 * var(--u)) calc(620 * var(--u)) at 90% 95%, rgba(217, 140, 64, 0.26), transparent 100%),
    linear-gradient(180deg, rgb(48, 43, 33), rgb(28, 26, 20));
  box-shadow: 0 calc(30 * var(--u)) calc(80 * var(--u)) rgba(0, 0, 0, 0.5), 0 0 0 calc(0.5 * var(--u)) rgba(0, 0, 0, 0.8), inset 0 calc(0.5 * var(--u)) 0 rgba(255, 255, 255, 0.16);
  z-index: 3;
}
.desk:not([data-after="on"]) .g-win { visibility: hidden; }
.desk[data-after="on"] .caption-card { visibility: hidden; }
.g-bar {
  position: relative;
  height: calc(56 * var(--u));
  flex: none;
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u));
  padding: 0 calc(16 * var(--u)) 0 calc(18 * var(--u));
}
.g-brand { display: flex; align-items: center; gap: calc(8 * var(--u)); margin-left: calc(26 * var(--u)); font-size: calc(16 * var(--u)); font-weight: 600; }
.g-brand svg { width: calc(17 * var(--u)); height: calc(17 * var(--u)); }
.g-tabs {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  padding: calc(3 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 calc(1 * var(--u)) rgba(255, 255, 255, 0.1);
  font-size: calc(14 * var(--u));
  font-weight: 500;
}
.g-tabs span { padding: calc(6 * var(--u)) calc(16 * var(--u)); border-radius: 999px; color: var(--label); }
.g-tabs .on { background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 600; }
.g-sync, .g-icons .g-ib {
  display: grid;
  place-items: center;
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 calc(1 * var(--u)) rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
}
.g-sync { margin-left: auto; }
.g-sync svg, .g-icons svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.g-rec {
  display: flex;
  align-items: center;
  gap: calc(7 * var(--u));
  height: calc(32 * var(--u));
  padding: 0 calc(13 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 calc(1 * var(--u)) rgba(255, 255, 255, 0.14);
  font-size: calc(13.5 * var(--u));
  font-weight: 600;
}
.g-rec i { width: calc(8 * var(--u)); height: calc(8 * var(--u)); border-radius: 50%; background: rgb(255, 97, 87); }
.g-rec kbd { font: 500 calc(11.5 * var(--u)) -apple-system, sans-serif; color: var(--label); }
.g-body { flex: 1; min-height: 0; display: flex; gap: calc(14 * var(--u)); padding: calc(4 * var(--u)) calc(14 * var(--u)) calc(14 * var(--u)); }
.g-side { width: calc(250 * var(--u)); flex: none; }
.g-search {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  height: calc(32 * var(--u));
  padding: 0 calc(12 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 calc(1 * var(--u)) rgba(255, 255, 255, 0.1);
  font-size: calc(13 * var(--u));
  color: var(--label);
}
.g-search svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.g-filter { display: flex; align-items: center; margin-top: calc(10 * var(--u)) !important; }
.g-select { margin-left: auto; font-size: calc(12.5 * var(--u)); font-weight: 500; color: var(--accent); }
.g-chip {
  display: inline-block;
  padding: calc(3 * var(--u)) calc(8 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: calc(11 * var(--u));
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--label);
  white-space: nowrap;
}
.g-chip--on { background: rgba(255, 255, 255, 0.2); color: #fff; font-size: calc(12 * var(--u)); padding: calc(5 * var(--u)) calc(11 * var(--u)); font-weight: 600; }
.g-day { margin: calc(18 * var(--u)) 0 calc(8 * var(--u)) calc(4 * var(--u)) !important; font-size: calc(12 * var(--u)); font-weight: 600; color: var(--faint); }
.g-item { padding: calc(10 * var(--u)) calc(12 * var(--u)); border-radius: calc(14 * var(--u)); margin-bottom: calc(6 * var(--u)); }
.g-item.is-on { background: rgba(255, 255, 255, 0.13); box-shadow: inset 0 0 0 calc(1 * var(--u)) rgba(255, 255, 255, 0.1); }
.g-item p { display: flex; align-items: baseline; gap: calc(6 * var(--u)); }
.g-item p + p { margin-top: calc(7 * var(--u)) !important; }
.g-item b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13 * var(--u)); font-weight: 600; }
.g-item p > span { font: 500 calc(11 * var(--u)) ui-monospace, "SF Mono", Menlo, monospace; color: var(--faint); }
.g-item:not(.is-on) b { color: rgba(255, 255, 255, 0.85); }
.g-detail { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(12 * var(--u)); }
.g-card {
  border-radius: calc(18 * var(--u));
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 calc(1 * var(--u)) rgba(255, 255, 255, 0.09), inset 0 calc(1 * var(--u)) 0 rgba(255, 255, 255, 0.06);
  padding: calc(18 * var(--u));
}
.g-title-row { display: flex; align-items: center; gap: calc(12 * var(--u)); }
.g-title { flex: 1; min-width: 0; font-size: calc(21 * var(--u)); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-icons { display: flex; gap: calc(6 * var(--u)); }
.g-icons .g-share { position: relative; }
.desk[data-menu="on"] .g-share { background: rgba(255, 255, 255, 0.22); }
.g-facts { display: flex; align-items: flex-start; gap: calc(6 * var(--u)); margin-top: calc(10 * var(--u)); }
.g-chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: calc(5 * var(--u)); }
.g-action {
  display: flex;
  align-items: center;
  gap: calc(5 * var(--u));
  height: calc(32 * var(--u));
  padding: 0 calc(13 * var(--u)) 0 calc(11 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 calc(1 * var(--u)) rgba(255, 255, 255, 0.14);
  font-size: calc(12.5 * var(--u));
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}
.g-action svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.g-action--ai svg { color: var(--accent); }
.g-action--deep svg { color: rgb(115, 217, 153); }
.g-player {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
  margin-top: calc(14 * var(--u));
  padding: calc(8 * var(--u)) calc(10 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}
.g-play { display: grid; place-items: center; width: calc(32 * var(--u)); height: calc(32 * var(--u)); border-radius: 50%; background: #fff; color: #000; flex: none; }
.g-play svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); }
.g-track { position: relative; flex: 1; height: calc(4 * var(--u)); border-radius: 2px; background: rgba(255, 255, 255, 0.16); }
.g-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: inherit; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.g-knob { position: absolute; left: 0; top: 50%; width: calc(20 * var(--u)); height: calc(12 * var(--u)); margin: calc(-6 * var(--u)) 0 0 calc(-2 * var(--u)); border-radius: 999px; background: #fff; box-shadow: 0 calc(1 * var(--u)) calc(3 * var(--u)) rgba(0, 0, 0, 0.35); }
.desk[data-play="on"] .g-fill { transform: scaleX(0.0045); }
.desk[data-play="on"] .g-knob { transform: translateX(calc(2 * var(--u))); }
.g-clock { font: 500 calc(11 * var(--u)) ui-monospace, "SF Mono", Menlo, monospace; color: var(--label); white-space: nowrap; }
.desk[data-play="on"] .when-paused,
.desk:not([data-play="on"]) .when-playing { display: none; }
.g-transcript { flex: 1; min-height: 0; overflow: hidden; padding-bottom: 0; }
.g-th { display: flex; align-items: center; gap: calc(6 * var(--u)); font-size: calc(13 * var(--u)); color: var(--label); }
.g-th > svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.g-th b { margin-right: auto; font-weight: 600; }
.g-th .g-expand { width: calc(12 * var(--u)); height: calc(12 * var(--u)); margin-left: calc(4 * var(--u)); }
.g-rows { list-style: none; margin: calc(8 * var(--u)) 0 0; padding: 0; }
.g-row { display: flex; gap: calc(12 * var(--u)); padding: calc(9 * var(--u)) calc(10 * var(--u)); border-radius: calc(10 * var(--u)); }
.g-meta { width: calc(64 * var(--u)); flex: none; display: flex; flex-direction: column; gap: calc(5 * var(--u)); }
.g-meta time { font: 400 calc(11 * var(--u)) ui-monospace, "SF Mono", Menlo, monospace; color: var(--faint); }
.g-meta span { font: 400 calc(10 * var(--u)) ui-monospace, "SF Mono", Menlo, monospace; color: var(--faint); }
.g-meta b { font: 700 calc(10 * var(--u)) -apple-system, sans-serif; color: var(--accent); margin-right: calc(3 * var(--u)); }
.g-text { display: flex; flex-direction: column; gap: calc(4 * var(--u)); min-width: 0; }
.g-text .o { font-size: calc(14 * var(--u)); color: var(--label); }
.g-text .t { font-size: calc(14 * var(--u)); font-weight: 500; color: #fff; }
.desk[data-play="on"] .g-row--pick { background: rgba(255, 189, 107, 0.14); }

/* The export menu (a macOS menu, dark: the app is dark). It hangs from its button, left
   edges aligned (a pull-down menu). */
.g-menu {
  position: absolute;
  left: calc(-4 * var(--u));
  top: calc(100% + 6 * var(--u));
  width: calc(262 * var(--u));
  padding: calc(5 * var(--u));
  border-radius: calc(12 * var(--u));
  background: rgba(46, 44, 42, 0.9);
  -webkit-backdrop-filter: blur(calc(30 * var(--u))) saturate(1.6);
  backdrop-filter: blur(calc(30 * var(--u))) saturate(1.6);
  box-shadow: 0 calc(12 * var(--u)) calc(36 * var(--u)) rgba(0, 0, 0, 0.45), 0 0 0 calc(0.5 * var(--u)) rgba(0, 0, 0, 0.7), inset 0 0 0 calc(1 * var(--u)) rgba(255, 255, 255, 0.1);
  font-size: calc(13 * var(--u));
  text-align: left;
  font-style: normal;
  z-index: 4;
}
.g-menu > span { display: block; padding: calc(4 * var(--u)) calc(10 * var(--u)); border-radius: calc(7 * var(--u)); color: rgba(255, 255, 255, 0.92); white-space: nowrap; }
.desk[data-pick="on"] .g-srt { background: rgb(10, 110, 235); color: #fff; }
.desk:not([data-menu="on"]) .g-menu { visibility: hidden; }

/* The scene waits, unseen, for its first frame (cleared by mac.js, or after 2.5 s). */
html.mac-pending .stage-mac > * { opacity: 0; }

/* Phones: a close-up of the same desktop, large enough to read. --cx/--cy is the point of
   the desktop (in its points) at the middle of the screen. */
@media (max-width: 767px) {
  .stage-mac .device.mac { width: 100%; }
  .stage-mac .device.mac .screen { aspect-ratio: 16 / 10; }
  .stage-mac .cam {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 880px; /* u = 0.8 */
    transform: translate(calc(var(--cx) * -0.8px), calc(var(--cy) * -0.8px));
  }
  .stage-hotel .cam { --cx: 440; --cy: 470; }
  .stage-class .cam { --cx: 640; --cy: 196; }
  .stage-mac .chip { white-space: normal; text-align: left; margin-top: 18px; }
  .stage-hotel .caption-card { left: calc(240 * var(--u)); top: calc(350 * var(--u)); width: calc(400 * var(--u)); height: calc(240 * var(--u)); }
  .stage-class .caption-card { left: calc(250 * var(--u)); top: calc(470 * var(--u)); width: calc(400 * var(--u)); height: calc(210 * var(--u)); }
  .stage-hotel .m-cursor { left: calc(560 * var(--u)); top: calc(430 * var(--u)); }
  .stage-class .m-cursor { left: calc(752 * var(--u)); top: calc(196 * var(--u)); }
  /* The window is narrower here, so its detail column fits the close-up. */
  .stage-class .g-win { width: calc(680 * var(--u)); }
}
.mb-g { display: none; }
.desk[data-after="on"] .mb-g { display: inline; }
.desk[data-after="on"] :is(.mb-call, .mb-rec) { display: none; }
.cc-mode { display: none; }
@media (max-width: 767px) {
  /* The card is narrow: its toolbar drops to icons (ViewThatFits, compact) */
  .cc-seg, .cc-btn .lbl { display: none; }
  .cc-mode { display: grid; place-items: center; height: calc(24 * var(--u)); padding: 0 calc(8 * var(--u)); font-weight: 600; }
  .cc-btn { padding: 0 calc(7 * var(--u)); }
}

/* Participants: each tile shows its camera, a portrait already framed like a webcam view
   (the owner's artwork), cropped to the tile around the face (object-position, inline). */
.tile .cam-feed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
/* The active speaker's ring, drawn over the camera picture. */
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inherit; pointer-events: none; }
/* The "+21 more" group tile. */
.tint-2 { background: linear-gradient(180deg, #D6DEEA, #C3CEDF); }
.tile.is-speaking { box-shadow: inset 0 0 0 calc(3 * var(--u)) #34c759; }
.tile--more { display: flex; flex-direction: column; justify-content: center; }
.tile--more .more-faces { display: flex; justify-content: center; margin-top: calc(-18 * var(--u)); }
.tile--more .more-faces img { width: calc(54 * var(--u)); height: calc(54 * var(--u)); margin: 0 calc(-6 * var(--u)); border-radius: 50%; background: #F1E7D6; box-shadow: 0 0 0 calc(2 * var(--u)) #D4C8DE; object-fit: cover; }
.desk[data-speaker="me"] .tile--main.is-speaking { box-shadow: none; }
.desk[data-speaker="me"] .tile--main .lvl { color: rgba(255, 255, 255, 0.9); }
.desk[data-speaker="me"] .tile--you { box-shadow: inset 0 0 0 calc(3 * var(--u)) #34c759; }
.g-chips .g-chip { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* "You": the traveler on his own camera, in the warm light of his room */
.tile--self { background: radial-gradient(90% 80% at 30% 20%, #F6D9B4, #B98A62 70%, #7A5A40); }
.tile--self .self {
  position: absolute;
  left: 50%;
  top: 0;
  width: 128%;
  max-width: none;
  transform: translate(-50%, -2%);
}
