/* Showroom chrome: Apple-inspired, light, glass controls over a 3D scene. */
:root {
  --bg: #eeede9;
  --surface: #f5f5f7;
  --fg: #1d1d1f;
  --fg-2: #424245;
  --muted: #6e6e73;
  --meta: #86868b;
  --border: #d2d2d7;
  --border-soft: #e8e8ed;
  --accent: #0071e3;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Monaco, monospace;
  --ease: cubic-bezier(0.28, 0, 0.22, 1);
  --glass-bg: rgba(250, 250, 248, 0.68);
  --glass-strong: rgba(252, 252, 251, 0.86);
  --glass-line: rgba(255, 255, 255, 0.7);
  --shadow-1: 0 1px 2px rgba(20, 18, 14, 0.06), 0 8px 24px rgba(20, 18, 14, 0.08);
  --shadow-2: 0 2px 6px rgba(20, 18, 14, 0.06), 0 30px 80px rgba(20, 18, 14, 0.18);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--font); font-size: 15px; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid rgba(0, 113, 227, 0.55); outline-offset: 2px; }

.stage { position: fixed; inset: 0; outline: none; }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage.is-pointer { cursor: pointer; }
.stage.is-grab { cursor: grabbing; }

.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-1), inset 0 0 0 0.5px var(--glass-line);
}
.glass-strong {
  background: var(--glass-strong);
  -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--shadow-2), inset 0 0 0 0.5px var(--glass-line);
}

/* Top bar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px 0; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 14px; border-radius: 980px; }
.brand-mark { width: 12px; height: 16px; fill: var(--fg); stroke: none; }
.wordmark { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.wordmark small { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 13px; }
.top-actions { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 980px;
  font-size: 14px; font-weight: 500; transition: transform .2s var(--ease), background .2s;
}
.pill svg { width: 16px; height: 16px; }
.pill:hover { background: rgba(255, 255, 255, 0.85); }
.pill:active { transform: scale(0.96); }

/* Walk bar */
.walkbar {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%);
  z-index: 20; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 980px;
  width: min(640px, calc(100vw - 32px));
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
body[data-state="board"] .walkbar, body[data-state="detail"] .walkbar { opacity: 0; transform: translate(-50%, 24px); pointer-events: none; }
.wb-btn {
  width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.75); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  transition: transform .2s var(--ease), background .2s;
}
.wb-btn:hover { background: #fff; }
.wb-btn:active { transform: scale(0.92); }
.wb-btn:disabled { opacity: 0.35; cursor: default; }
/* Fixed width: a changing label must not resize the scrubber mid-drag. */
.wb-label { flex: none; width: 132px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }

.scrub { position: relative; flex: 1; height: 40px; cursor: pointer; touch-action: none; outline: none; }
.scrub-track { position: absolute; left: 0; right: 0; top: 50%; height: 14px; transform: translateY(-50%); display: flex; gap: 4px; }
.scrub-seg { position: relative; height: 100%; flex: 1; }
.scrub-seg::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; transform: translateY(-50%); border-radius: 2px; background: rgba(29, 29, 31, 0.12); }
.scrub-seg .tick { position: absolute; top: 50%; width: 2px; height: 4px; border-radius: 1px; transform: translate(-50%, -50%); background: rgba(29, 29, 31, 0.28); }
.scrub-seg .tick.is-section { height: 12px; width: 2px; background: rgba(29, 29, 31, 0.55); }
.scrub-thumb {
  position: absolute; top: 50%; left: 0; width: 22px; height: 22px; border-radius: 50%; transform: translate(-50%, -50%);
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.12), inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}
.scrub-tip {
  position: absolute; bottom: calc(100% + 10px); left: 0; transform: translateX(-50%); padding: 6px 10px; border-radius: 10px;
  background: rgba(29, 29, 31, 0.86); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .2s;
}
.scrub.is-active .scrub-tip, .scrub:hover .scrub-tip { opacity: 1; }

/* Board bar */
.board-bar {
  position: fixed; top: max(16px, env(safe-area-inset-top)); left: 50%; z-index: 21;
  display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 16px 0 4px; border-radius: 980px;
  transform: translate(-50%, -70px); opacity: 0; transition: transform .5s var(--ease), opacity .3s; pointer-events: none;
}
body[data-state="board"] .board-bar { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.bb-back { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 10px 0 6px; border-radius: 980px; font-weight: 500; font-size: 14px; color: var(--accent); }
.bb-back:hover { background: rgba(0, 113, 227, 0.08); }
.bb-sep { width: 1px; height: 18px; background: rgba(0, 0, 0, 0.12); margin: 0 8px 0 4px; }
.bb-title { font-size: 14px; font-weight: 600; white-space: nowrap; }
.bb-title small { font-weight: 400; color: var(--muted); margin-left: 6px; }

/* Hint */
.hint {
  position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); z-index: 19; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 980px; font-size: 13px; color: var(--fg-2);
  animation: hint-in .7s var(--ease) both .8s;
}
.hint .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--meta); }
.hint.is-out { opacity: 0; transform: translate(-50%, 8px); transition: opacity .4s, transform .4s var(--ease); }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* Loader */
.loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--bg); transition: opacity .8s var(--ease); }
body:not(.is-loading) .loader { opacity: 0; pointer-events: none; }
.loader-bar { width: 160px; height: 3px; border-radius: 2px; background: rgba(0, 0, 0, 0.08); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 100%; background: var(--fg); border-radius: 2px; transform: scaleX(0); transform-origin: left center; transition: transform .3s var(--ease); }

/* Toast */
.toast {
  position: fixed; left: 50%; top: max(70px, calc(env(safe-area-inset-top) + 56px)); z-index: 60;
  transform: translate(-50%, -10px); opacity: 0; padding: 9px 16px; border-radius: 980px;
  background: rgba(29, 29, 31, 0.88); color: #fff; font-size: 13px; font-weight: 500; pointer-events: none;
  transition: opacity .25s, transform .35s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.round-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(118, 118, 128, 0.12); color: var(--fg-2); transition: background .2s, transform .2s var(--ease);
}
.round-btn:hover { background: rgba(118, 118, 128, 0.2); }
.round-btn:active { transform: scale(0.92); }
.round-btn:disabled { opacity: .35; cursor: default; }
.round-btn svg { width: 16px; height: 16px; stroke-width: 2.2; }

/* Index sheet */
.index { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; }
.ix-backdrop { position: absolute; inset: 0; background: rgba(238, 237, 233, 0.4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.ix-sheet {
  position: relative; width: min(980px, calc(100vw - 32px)); height: min(760px, calc(100vh - 64px)); border-radius: 28px;
  display: flex; flex-direction: column; overflow: hidden; transform: translateY(24px) scale(.98); opacity: 0;
  transition: transform .45s var(--ease), opacity .3s;
}
.index.is-open .ix-backdrop { opacity: 1; }
.index.is-open .ix-sheet { transform: none; opacity: 1; }
.ix-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px 28px; }
.ix-head h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.ix-body { flex: 1; overflow: auto; padding: 0 28px 28px; user-select: none; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.ix-section h3 { margin: 18px 0 12px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px; }
.ix-card { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.ix-card img, .ix-card .ph { width: 100%; aspect-ratio: 1400 / 1700; object-fit: cover; border-radius: 6px; background: #e6e4de; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 6px 16px rgba(0, 0, 0, .06); transition: transform .25s var(--ease), box-shadow .25s; }
.ix-card:hover img { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 14px 26px rgba(0, 0, 0, .12); }
.ix-card span { font-size: 12px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.ix-card.is-current span { color: var(--accent); font-weight: 600; }

/* Detail sheet */
.detail { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; }
.dt-backdrop { position: absolute; inset: 0; background: rgba(238, 237, 233, 0.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .4s; }
.dt-sheet {
  position: relative; width: min(1040px, calc(100vw - 48px)); height: min(680px, calc(100vh - 96px));
  border-radius: 28px; overflow: hidden; display: grid; grid-template-columns: 1.15fr 1fr;
  transform: translateY(30px) scale(.97); opacity: 0; transition: transform .5s var(--ease), opacity .3s;
}
.detail.is-open .dt-backdrop { opacity: 1; }
.detail.is-open .dt-sheet { transform: none; opacity: 1; }
.dt-grab { display: none; }
.dt-stage {
  position: relative; overflow: hidden; display: grid; place-items: center; touch-action: none; cursor: zoom-in;
  background: radial-gradient(120% 90% at 50% 40%, #ffffff 0%, #f3f2ef 70%, #ebe9e4 100%);
}
.dt-img { display: block; max-width: 78%; max-height: 78%; object-fit: contain; transform-origin: center; will-change: transform; filter: drop-shadow(0 18px 30px rgba(40, 30, 20, 0.16)); }
.dt-stage.is-photo .dt-img { border-radius: 50%; }
.dt-zoom { position: absolute; left: 16px; bottom: 16px; padding: 5px 10px; border-radius: 980px; background: rgba(29, 29, 31, .7); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.dt-side { display: flex; flex-direction: column; min-height: 0; border-left: 0.5px solid rgba(0, 0, 0, 0.06); }
.dt-info { flex: 1; overflow: auto; padding: 36px 32px 16px; user-select: text; -webkit-user-select: text; touch-action: pan-y; }
.dt-eyebrow { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.dt-title { margin: 0; font-size: 30px; line-height: 1.12; font-weight: 600; letter-spacing: -0.022em; }
.dt-code {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 980px;
  background: rgba(118, 118, 128, 0.12); font-family: var(--mono); font-size: 13px; color: var(--fg); transition: background .2s;
}
.dt-code:hover { background: rgba(118, 118, 128, 0.2); }
.dt-code svg { width: 14px; height: 14px; color: var(--muted); }
.dt-desc { margin: 16px 0 0; font-size: 15px; line-height: 1.47; color: var(--fg-2); }
.dt-section { margin-top: 24px; }
.dt-section h3 { margin: 0 0 8px 16px; font-size: 13px; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.inset-list { margin: 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.05); }
.inset-list .row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; position: relative; font-size: 15px; }
.inset-list .row + .row::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 0.5px; background: rgba(60, 60, 67, 0.18); }
.inset-list dt { color: var(--fg); }
.inset-list dd { margin: 0; color: var(--muted); text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 2px; }
.chip { padding: 6px 12px; border-radius: 980px; background: #fff; font-size: 13px; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 2px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; padding: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: box-shadow .2s, transform .2s var(--ease); }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--sw); background-size: cover; background-position: center; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, .12); }
.swatch.is-on { box-shadow: inset 0 0 0 2px var(--accent); }
.swatch:hover { transform: scale(1.06); }
.dt-swatch-label { margin: 8px 2px 0; font-size: 13px; color: var(--muted); }
.dt-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 0.5px solid rgba(0, 0, 0, 0.06); }
.dt-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dt-close { position: absolute; top: 14px; right: 14px; z-index: 3; }

/* Phones: bottom sheets */
@media (max-width: 720px) {
  .topbar { padding-left: 12px; padding-right: 12px; }
  .pill span { display: none; }
  .pill { width: 40px; padding: 0; justify-content: center; }
  .wordmark small { display: none; }
  .walkbar { bottom: calc(12px + var(--safe-b)); }
  .wb-label { width: 92px; font-size: 12px; }
  .hint { bottom: calc(74px + var(--safe-b)); white-space: nowrap; }
  .detail { place-items: end center; }
  .dt-sheet {
    width: 100vw; height: 92vh; height: 92dvh; border-radius: 22px 22px 0 0;
    grid-template-columns: 1fr; grid-template-rows: auto 42% 1fr; transform: translateY(100%);
  }
  .dt-grab { display: grid; place-items: center; height: 22px; touch-action: none; cursor: grab; }
  .dt-handle { width: 36px; height: 5px; border-radius: 3px; background: rgba(60, 60, 67, 0.3); }
  .dt-side { border-left: 0; border-top: 0.5px solid rgba(0, 0, 0, 0.06); }
  .dt-info { padding: 22px 20px 12px; }
  .dt-title { font-size: 24px; }
  .dt-foot { padding-bottom: calc(12px + var(--safe-b)); }
  .dt-close { top: 26px; }
  .index { place-items: end center; }
  .ix-sheet { width: 100vw; height: 88vh; height: 88dvh; border-radius: 22px 22px 0 0; transform: translateY(100%); }
  .ix-head { padding: 18px 16px 8px 20px; }
  .ix-body { padding: 0 20px 28px; }
  .ix-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.dt-sheet:focus { outline: none; }

/* ---------------------------------------------------------------- intro */
.pill-quiet { font-size: 13px; color: var(--fg-2); }
body[data-state="intro"] .top-actions,
body[data-state="intro"] .walkbar,
body[data-state="intro"] .hint { opacity: 0; pointer-events: none; transform: translate(-50%, 24px); }
body[data-state="intro"] .top-actions { transform: none; transition: opacity .4s; }
.top-actions { transition: opacity .5s var(--ease); }

.whiteout { position: fixed; inset: 0; z-index: 30; background: #fbfaf7; opacity: 0; pointer-events: none; }

.intro-ui { position: fixed; inset: 0; z-index: 22; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease); }
.intro-ui.is-on { opacity: 1; }
.intro-ui.is-ending .intro-bar, .intro-ui.is-ending .intro-skip { opacity: 0; transform: translate(-50%, 16px); }
.intro-ui.is-ending .intro-skip { transform: translateY(-8px); }
.intro-ui > * { pointer-events: auto; }
.intro-ui .intro-caption, .intro-ui .intro-title, .intro-ui .intro-hint { pointer-events: none; }

.intro-skip {
  position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px; font-size: 14px;
  transition: opacity .4s, transform .4s var(--ease), background .2s;
}

.intro-caption {
  position: fixed; left: 50%; bottom: calc(118px + var(--safe-b)); width: min(680px, calc(100vw - 32px));
  margin-left: calc(min(680px, calc(100vw - 32px)) / -2); text-align: center; opacity: 0;
  will-change: opacity, transform;
}
.ic-line {
  margin: 0; font-size: clamp(22px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.022em; line-height: 1.15;
  color: var(--fg); text-shadow: 0 1px 18px rgba(255, 255, 255, 0.85), 0 0 2px rgba(255, 255, 255, 0.6);
}
.ic-sub {
  margin: 8px 0 0; font-size: 14px; color: var(--fg-2); letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.9);
}

.intro-title {
  position: fixed; left: 0; right: 0; top: max(9%, 64px); text-align: center; opacity: 0; will-change: opacity, transform;
}
.intro-title h1 {
  margin: 0; font-size: clamp(38px, 6.4vw, 84px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; color: var(--fg);
  text-shadow: 0 2px 40px rgba(255, 255, 255, 0.9);
}
.intro-title p { margin: 14px 0 0; font-size: clamp(14px, 1.4vw, 19px); color: var(--fg-2); letter-spacing: 0.02em; }

.intro-hint {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, 140px);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 13px; font-weight: 500; color: var(--fg-2); padding: 10px 16px; border-radius: 980px;
  background: rgba(250, 250, 248, 0.6); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: opacity .5s, transform .5s var(--ease);
  animation: hint-in .8s var(--ease) both 1s;
}
.intro-hint svg { width: 16px; height: 16px; animation: chev 1.6s var(--ease) infinite; }
.intro-hint.is-out { opacity: 0; transform: translate(-50%, 150px); }
@keyframes chev { 0%, 100% { transform: translateY(-2px); opacity: .5; } 50% { transform: translateY(3px); opacity: 1; } }

.intro-bar {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px)); padding: 10px 14px 8px; border-radius: 22px;
  transition: opacity .4s, transform .5s var(--ease);
}
.ib-track { position: relative; height: 3px; border-radius: 2px; background: rgba(29, 29, 31, 0.12); margin: 0 6% 8px; overflow: hidden; }
.ib-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--fg); border-radius: 2px; }
.ib-steps { display: grid; grid-template-columns: repeat(5, 1fr); }
.ib-steps button { height: 28px; border-radius: 980px; font-size: 13px; color: var(--muted); transition: color .25s, background .25s; }
.ib-steps button:hover { background: rgba(118, 118, 128, 0.1); color: var(--fg); }
.ib-steps button.is-on { color: var(--fg); font-weight: 600; }

@media (max-width: 720px) {
  .intro-bar { padding: 8px 8px 6px; }
  .ib-steps button { font-size: 11px; }
  .intro-caption { bottom: calc(100px + var(--safe-b)); }
  .intro-title { top: 12%; }
  .pill-quiet span { display: none; }
}

/* Intro v3: per-beat captions, autoplay, scrub track */
.intro-ui .intro-caption { opacity: 1; transition: opacity .26s ease, transform .45s var(--ease); }
.intro-ui .intro-caption.is-swap, .intro-ui .intro-caption.is-empty { opacity: 0; transform: translateY(8px); }
.intro-bar { padding-left: 104px; }
.ib-play {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border-radius: 980px;
  font-size: 13px; font-weight: 500; color: var(--fg); background: rgba(118, 118, 128, 0.12); transition: background .2s;
}
.ib-play:hover { background: rgba(118, 118, 128, 0.2); }
.ib-play svg { width: 14px; height: 14px; }
.ib-play[aria-pressed="true"] { background: var(--fg); color: #fff; }
.ib-track { height: 19px; padding: 8px 0; background-clip: content-box; cursor: pointer; touch-action: none; margin-bottom: 0; }
.ib-fill { top: 8px; bottom: 8px; }
@media (max-width: 720px) {
  .intro-bar { padding-left: 52px; }
  .ib-play { padding: 0; width: 34px; justify-content: center; left: 8px; }
  .ib-play span { display: none; }
}
@media (max-width: 720px) {
  .intro-ui .intro-skip { width: auto; padding: 0 14px; white-space: nowrap; font-size: 13px; }
}

/* Intro v4: captions sit on a soft frosted scrim so every beat reads in both themes.
   intro.js sets .is-night from the scene theme, independent of the page theme. */
.intro-ui .intro-caption {
  left: 50%; margin-left: 0; width: max-content; max-width: calc(100vw - 32px);
  transform: translate(-50%, 0); padding: 12px 22px 13px; border-radius: 22px;
  background: rgba(250, 249, 246, 0.58);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 2px rgba(20, 18, 14, 0.06), 0 10px 30px rgba(20, 18, 14, 0.1), inset 0 0 0 0.5px rgba(255, 255, 255, 0.6);
}
.intro-ui .intro-caption.is-swap, .intro-ui .intro-caption.is-empty { transform: translate(-50%, 8px); }
.intro-ui .ic-line { color: #1d1d1f; text-shadow: none; white-space: normal; }
.intro-ui .ic-sub { color: #4a4a4f; text-shadow: none; }
.intro-ui .intro-hint { background: rgba(250, 249, 246, 0.7); color: #2c2c2e; }
.intro-ui.is-night .intro-caption {
  background: rgba(28, 25, 22, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(255, 246, 232, 0.12);
}
.intro-ui.is-night .ic-line { color: #f5f3ef; }
.intro-ui.is-night .ic-sub { color: #d6d1c9; }
.intro-ui.is-night .intro-hint { background: rgba(34, 31, 28, 0.72); color: #ece8e1; }
.intro-ui .intro-title h1 { color: #1d1d1f; text-shadow: 0 2px 40px rgba(255, 255, 255, 0.9); }
.intro-ui .intro-title p { color: #424245; }
.intro-ui.is-night .intro-title h1 { color: #f7f5f1; text-shadow: 0 2px 36px rgba(0, 0, 0, 0.6); }
.intro-ui.is-night .intro-title p { color: #d6d1c9; }
@media (max-width: 720px) { .intro-ui .intro-caption { padding: 10px 16px 11px; } }

/* Welcome beat: call to action into the real showroom */
.intro-enter {
  pointer-events: none; opacity: 0; transform: translateY(8px) scale(.98);
  display: inline-flex; align-items: center; gap: 6px; margin-top: 26px;
  height: 48px; padding: 0 20px 0 26px; border-radius: 980px;
  background: #1d1d1f; color: #fff; font: 600 16px/1 var(--font); letter-spacing: -0.01em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: opacity .4s var(--ease), transform .4s var(--ease), background .2s;
}
.intro-enter svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.intro-enter.is-on { pointer-events: auto; opacity: 1; transform: none; }
.intro-enter:hover { background: #000; }
.intro-enter:hover svg { transform: translateX(3px); }
.intro-enter:focus-visible { outline: 3px solid rgba(0, 113, 227, 0.6); outline-offset: 3px; }
.intro-ui.is-night .intro-enter { background: #f5f5f7; color: #1d1d1f; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.intro-ui.is-night .intro-enter:hover { background: #fff; }
@media (prefers-reduced-motion: reduce) { .intro-enter, .intro-enter svg { transition: none; } }

/* Play-only intro: large centred start / resume button */
.intro-start {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  display: inline-flex; align-items: center; gap: 14px;
  height: 72px; padding: 0 30px 0 12px; border-radius: 980px;
  background: rgba(255, 255, 255, 0.82); color: #1d1d1f;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22), inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  font: 600 19px/1 var(--font); letter-spacing: -0.015em;
  opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.94);
  transition: opacity .35s var(--ease), transform .35s var(--ease), background .2s;
}
.intro-start.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.intro-start:hover { background: rgba(255, 255, 255, 0.94); }
.intro-start:active { transform: translate(-50%, -50%) scale(.97); }
.intro-start:focus-visible { outline: 3px solid rgba(0, 113, 227, 0.6); outline-offset: 4px; }
.intro-start .is-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: #1d1d1f; color: #fff;
}
.intro-start .is-icon svg { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; }
.intro-start.is-on .is-icon { animation: introPulse 2.2s var(--ease) infinite; }
@keyframes introPulse {
  0% { box-shadow: 0 0 0 0 rgba(29, 29, 31, 0.35); }
  70% { box-shadow: 0 0 0 16px rgba(29, 29, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(29, 29, 31, 0); }
}
.intro-ui.is-night .intro-start { background: rgba(36, 33, 30, 0.8); color: #f5f5f7; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 0.5px rgba(255, 255, 255, 0.12); }
.intro-ui.is-night .intro-start:hover { background: rgba(48, 44, 40, 0.9); }
.intro-ui.is-night .intro-start .is-icon { background: #f5f5f7; color: #1d1d1f; }
/* Chapter labels and the track are progress only, not controls. */
.intro-bar .ib-steps button, .intro-bar .ib-track { cursor: default; }
@media (max-width: 520px) { .intro-start { height: 60px; font-size: 17px; padding-right: 24px; } .intro-start .is-icon { width: 40px; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .intro-start, .intro-start.is-on .is-icon { transition: none; animation: none; } }
