/* Layout: brand header + mode switch; composer = step rail | 3D stage with caption bar. Single committed dark-navy look (brand). */
:root {
  --navy-900: #071a31; --navy-800: #0c2646; --navy-700: #12335c; --navy-600: #1b4373;
  --line: rgba(196, 214, 238, 0.14); --ink: #f3f6fa; --ink-dim: #a9b8cc; --ink-faint: #6f84a0;
  --orange: #ea5501; --orange-soft: #ff8a3d; --ok: #3fb37f;
  --f-display: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Barlow", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
html, body { height: 100%; }
body { background: var(--navy-900); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--navy-800); }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
header.top { background: var(--navy-800); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.top-in { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-block: 12px; max-width: 1440px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { height: 46px; width: auto; background: #fff; border-radius: 6px; padding: 5px 9px; }
.brand-txt { font-family: var(--f-display); font-weight: 500; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }
.modes { margin-left: auto; display: flex; background: var(--navy-900); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.modes button { font-family: var(--f-display); font-size: 15px; letter-spacing: .04em; color: var(--ink-dim); background: none; border: 0; padding: 8px 18px; border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.modes button[aria-pressed="true"] { background: var(--orange); color: #fff; }
.modes button:focus-visible, .btn:focus-visible, .step:focus-visible { outline: 2px solid var(--orange-soft); outline-offset: 2px; }

main { max-width: 1440px; margin: 0 auto; padding-block: 20px 28px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.intro h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(24px, 3.2vw, 38px); line-height: 1.1; margin: 0; text-wrap: balance; }
.intro h1 span { color: var(--orange); }
.intro p { margin: 6px 0 0; color: var(--ink-dim); max-width: 62ch; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-faint); flex-wrap: wrap; }
.legend b { color: var(--ink-dim); font-weight: 600; }

/* composer */
.composer { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; }
.rail { background: var(--navy-800); border: 1px solid var(--line); border-radius: 10px; padding: 10px; max-height: 720px; overflow-y: auto; }
.rail-h { font-family: var(--f-display); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); padding: 6px 8px 10px; display: flex; justify-content: space-between; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.step { width: 100%; display: grid; grid-template-columns: 34px 1fr 16px; align-items: center; gap: 8px; text-align: left; background: none; border: 0; color: var(--ink-dim); padding: 7px 8px; border-radius: 7px; cursor: pointer; font-family: var(--f-body); font-size: 14.5px; }
.step .n { font-family: var(--f-display); font-size: 17px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.step .dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink-faint); justify-self: end; }
.step:hover { background: var(--navy-700); color: var(--ink); }
.step.done { color: var(--ink); }
.step.done .n { color: var(--orange-soft); }
.step.done .dot { background: var(--orange); border-color: var(--orange); }
.step.cur { background: var(--navy-600); color: #fff; }
.step.cur .n { color: var(--orange); }
.step.cur .dot { background: #fff; border-color: #fff; box-shadow: 0 0 0 3px rgba(234, 85, 1, .55); }

.stage { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #9fc3e6; aspect-ratio: 16 / 10; max-height: 720px; width: 100%; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.wm { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: 46%; opacity: .07; pointer-events: none; }
.corner-logo { position: absolute; right: 14px; top: 12px; height: 40px; background: rgba(255,255,255,.92); border-radius: 6px; padding: 4px 8px; pointer-events: none; }
.hint { position: absolute; left: 14px; top: 12px; font-size: 12.5px; color: #0c2646; background: rgba(255,255,255,.78); border-radius: 999px; padding: 4px 11px; pointer-events: none; }
.cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 22px 18px; background: linear-gradient(to top, rgba(6,14,26,.86), rgba(6,14,26,.55) 55%, rgba(6,14,26,0)); display: flex; align-items: end; gap: 18px; flex-wrap: wrap; }
.cap-num { font-family: var(--f-display); font-weight: 600; font-size: 54px; line-height: .9; color: var(--orange); font-variant-numeric: tabular-nums; padding-right: 16px; border-right: 2px solid rgba(255,255,255,.75); }
.cap-txt { min-width: 0; flex: 1 1 320px; }
.cap-t { font-family: var(--f-display); font-weight: 500; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.15; color: #fff; text-wrap: balance; }
.cap-s { color: #e6ecf3; font-size: 15px; margin-top: 3px; }
.cap-d { color: #b9c7d8; font-size: 13.5px; margin-top: 6px; max-width: 70ch; }
.ctrl { display: flex; gap: 8px; align-items: center; }
.btn { font-family: var(--f-display); font-size: 15px; letter-spacing: .03em; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); background: rgba(12,38,70,.75); color: #fff; padding: 9px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.btn:hover { border-color: #fff; }
.btn.primary { background: var(--orange); border-color: var(--orange); }
.btn.primary:hover { background: #ff6410; }
.btn:disabled { opacity: .4; cursor: default; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.12); }
.bar i { display: block; height: 100%; width: 0; background: var(--orange); transition: width .5s ease; }
.badge { position: absolute; left: 50%; top: 18%; transform: translate(-50%, 0); background: var(--ok); color: #fff; font-family: var(--f-display); letter-spacing: .06em; font-size: 18px; padding: 8px 18px; border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.below { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; color: var(--ink-faint); font-size: 13px; }
.below a { color: var(--orange-soft); }

/* video */
.video-box { max-width: 1100px; margin: 0 auto; }
.video-box video { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 10px; border: 1px solid var(--line); background: #000; }
.video-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.video-meta p { margin: 0; color: var(--ink-dim); max-width: 64ch; }

@media (max-width: 900px) {
  .composer { grid-template-columns: minmax(0, 1fr); }
  .rail { max-height: none; order: 2; padding: 8px; }
  .steps { grid-auto-flow: column; grid-auto-columns: minmax(150px, max-content); overflow-x: auto; padding-bottom: 4px; }
  .rail-h { padding-bottom: 6px; }
  .stage { aspect-ratio: 4 / 5; max-height: 78vh; }
  .cap { padding: 44px 14px 14px; gap: 10px; }
  .cap-num { font-size: 40px; }
  .cap-d { display: none; }
  .brand-txt { display: none; }
  header.top { position: static; }
  .brand img { height: 38px; }
  .step { grid-template-columns: auto auto auto; white-space: nowrap; gap: 8px; }
  .steps { grid-auto-columns: max-content; }
  .modes button { font-size: 14px; white-space: nowrap; }
  .modes { margin-left: 0; width: 100%; }
  .modes button { flex: 1; justify-content: center; padding: 8px 10px; }
  .wm { width: 70%; }
}
@media (prefers-reduced-motion: reduce) { .bar i { transition: none; } }

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