/* $TITTYWARS
 *
 * void   #040306  deep space, a breath of red in it
 * gold   #E7B53C  the crawl, the title's outline, marks of rank
 * blood  #8E0E14  fills: the one primary button, the active state
 * saber  #FF2A2A  light only: glows, bolts, focus
 * bone   #EFE6D4  text
 * smoke  #8C8478  quiet text
 *
 * Archivo at its widest and heaviest is the imperial display face; News
 * Cycle (a News Gothic revival, the face of the crawl) carries everything
 * that is read.
 */
:root {
  --void: #040306;
  --gold: #e7b53c;
  --blood: #8e0e14;
  --saber: #ff2a2a;
  --bone: #efe6d4;
  --smoke: #8c8478;
  --line: rgba(239, 230, 212, .13);
  --wide: "Archivo", "Arial Black", "Noto Sans", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Yu Gothic", sans-serif;
  --news: "News Cycle", "Franklin Gothic Medium", "Arial Narrow", "Noto Sans", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Yu Gothic", sans-serif;
  --gut: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.16, .84, .24, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font: 400 18px/1.55 var(--news);
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--saber); outline-offset: 3px; }

/* The display face: Archivo stretched to its widest. */
.logo, .sec-h, .coin-name, .bar-mark, .btn, .gate-go, .decree h2, .crawl .c-title,
.p-title, .p-num, .box-title, .tile-t, .coin-facts dt {
  font-family: var(--wide);
  font-stretch: 125%;
}

#stars, #fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#stars { z-index: 0; }
#fx { z-index: 45; }
main, .foot, .bar { position: relative; z-index: 1; }
main, .foot { transition: opacity 1.2s ease .3s; }
body:not(.entered) main, body:not(.entered) .foot { opacity: 0; }
section[id] { scroll-margin-top: 60px; }

/* ---------- the gate ---------- */
#gate {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-content: center; justify-items: center; gap: 40px;
  padding: var(--gut);
  background: radial-gradient(ellipse at 50% 55%, rgba(142, 14, 20, .16), transparent 62%);
  transition: opacity .8s ease, visibility 0s linear .8s;
}
#gate.gone { opacity: 0; visibility: hidden; }
.gate-line {
  margin: 0; max-width: 30ch; text-align: center; text-wrap: balance;
  font: 400 clamp(22px, 3.1vw, 36px)/1.35 var(--news);
  color: #5ec4e6; letter-spacing: .01em;
  opacity: 0; animation: fadeIn 2.2s ease .3s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }
.gate-go {
  min-width: 230px; padding: 18px 40px;
  background: none; border: 1px solid rgba(255, 42, 42, .5);
  font-weight: 800; font-size: 17px; letter-spacing: .42em; text-indent: .42em; text-transform: uppercase;
  color: var(--bone);
  opacity: 0; animation: fadeIn 1s ease 2s forwards;
  box-shadow: inset 0 0 18px rgba(255, 42, 42, .14);
  transition: box-shadow .4s, border-color .4s, background .4s;
}
.gate-go:hover, .gate-go:focus-visible {
  outline: none; border-color: var(--saber); background: rgba(142, 14, 20, .35);
  box-shadow: 0 0 36px rgba(255, 42, 42, .45), inset 0 0 22px rgba(255, 42, 42, .3);
}
.gate-langs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 520px;
  opacity: 0; animation: fadeIn 1s ease 2.7s forwards;
}
.gate-langs button {
  min-width: 44px; min-height: 34px; padding: 0 10px; background: none; border: 1px solid transparent;
  color: var(--smoke); font: 700 14px/1 var(--news); letter-spacing: .04em; transition: color .2s, border-color .2s;
}
.gate-langs button:hover { color: var(--bone); }
.gate-langs button[aria-pressed="true"] { color: var(--gold); border-color: rgba(231, 181, 60, .45); }

/* ---------- the bar ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px var(--gut);
  opacity: 0; transition: opacity .8s ease, background .4s;
}
.bar.on { opacity: 1; transition-delay: 3s, 0s; }
.bar.solid { background: linear-gradient(rgba(4, 3, 6, .94), rgba(4, 3, 6, .72)); backdrop-filter: blur(8px); transition-delay: 0s; }
.bar-mark { font-weight: 900; font-size: 15px; letter-spacing: .08em; text-decoration: none; }
.bar-right { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 34px); }
.bar-nav { display: flex; gap: clamp(16px, 2.6vw, 34px); }
.lang-pick { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px;
  background: rgba(4, 3, 6, .45); border: 1px solid var(--line);
  font: 700 14px/1 var(--news); letter-spacing: .04em; color: var(--bone);
  transition: border-color .2s, color .2s;
}
.lang-btn svg { width: 15px; height: 15px; fill: var(--gold); }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: rgba(231, 181, 60, .6); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  display: grid; min-width: 230px; padding: 6px;
  background: rgba(8, 6, 10, .97); border: 1px solid rgba(231, 181, 60, .3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .4);
  backdrop-filter: blur(10px);
  animation: menuIn .22s var(--ease);
}
.lang-menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }
.lang-menu button {
  display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 6px;
  min-height: 42px; padding: 0 12px; text-align: left;
  background: none; border: 0; color: var(--smoke); font: 400 16px/1 var(--news);
  transition: background .15s, color .15s;
}
.lang-menu button:hover, .lang-menu button:focus-visible { background: rgba(239, 230, 212, .06); color: var(--bone); outline: none; }
.lang-menu .lm-code { font-weight: 700; font-size: 13px; letter-spacing: .05em; color: var(--gold); }
.lang-menu button[aria-checked="true"] { color: var(--bone); background: rgba(142, 14, 20, .35); box-shadow: inset 2px 0 0 var(--saber); }
.bar-nav a { text-decoration: none; font-weight: 700; font-size: 16px; color: var(--smoke); transition: color .2s; }
.bar-nav a:hover, .bar-nav a.here { color: var(--bone); }
.bar:not(.solid) .bar-nav a, .bar:not(.solid) .bar-mark { color: rgba(239, 230, 212, .86); text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.bar:not(.solid) .bar-nav a:hover { color: var(--bone); }

/* ---------- hero ---------- */
.hero {
  position: relative; height: 100svh; min-height: 560px;
  display: grid; place-items: center;
  overflow: hidden; isolation: isolate;
}
.hero-film { position: absolute; inset: 0; z-index: -1; background: #000 url(/media/p/the-republic-falls.webp) center/cover; }
.hero-film video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.hero-film video.live { opacity: 1; }
.hero-film video { filter: contrast(1.08) saturate(1.12) brightness(1.04); }
.hero-film::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 48% 36% at 50% 52%, rgba(4, 3, 6, .42), transparent 100%),
    radial-gradient(ellipse 95% 85% at 50% 50%, transparent 50%, rgba(4, 3, 6, .62) 100%),
    linear-gradient(to top, var(--void) 0%, rgba(4, 3, 6, .6) 12%, transparent 32%),
    linear-gradient(to bottom, rgba(4, 3, 6, .75), transparent 16%),
    rgba(4, 3, 6, .26);
}

.hero-title { text-align: center; padding: 0 var(--gut); }
/* The title: an outline in gold that pulls back into the distance once. */
.logo {
  margin: 0 auto;
  display: grid; justify-items: center;
  font-weight: 900; line-height: .8; letter-spacing: .015em;
  color: rgba(231, 181, 60, .06);
  -webkit-text-stroke: clamp(1.5px, .22vw, 3px) var(--gold);
  paint-order: stroke fill;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, .7)) drop-shadow(0 0 22px rgba(231, 181, 60, .2));
  opacity: 0; transform: scale(3.4); transform-origin: 50% 55%;
}
.logo span:first-child { font-size: clamp(60px, 13.2vw, 210px); }
.logo span:last-child { font-size: clamp(70px, 15.6vw, 248px); }
body.entered .logo { animation: pullback 3.6s cubic-bezier(.12, .7, .2, 1) .35s forwards; }
@keyframes pullback {
  0% { opacity: 0; transform: scale(3.4); }
  12% { opacity: 1; }
  100% { opacity: 1; transform: scale(1); }
}
.hero-line {
  margin: 28px auto 0; max-width: 40ch;
  font-weight: 700; font-size: clamp(18px, 1.8vw, 23px); letter-spacing: .02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 24px rgba(0, 0, 0, .8);
  opacity: 0;
}
.hero-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; opacity: 0; }
body.entered .hero-line { animation: fadeIn 1.2s ease 3.1s forwards; }
body.entered .hero-acts { animation: fadeIn 1.2s ease 3.4s forwards; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font-weight: 800; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  border: 1px solid transparent;
  transition: border-color .25s, background .25s, box-shadow .25s, color .25s;
}
.btn-red { background: var(--blood); }
.btn-red:hover { background: #a3121a; box-shadow: 0 0 34px rgba(255, 42, 42, .4); }
.btn-ghost { border-color: rgba(239, 230, 212, .32); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.hero-foot {
  position: absolute; left: var(--gut); right: var(--gut); bottom: 18px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px;
  opacity: 0;
}
body.entered .hero-foot { animation: fadeIn 1s ease 3.8s forwards; }
.now-playing { margin: 0; white-space: nowrap; display: flex; align-items: center; gap: 10px; color: var(--smoke); font-size: 15px; font-weight: 700; }
.np-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--saber); box-shadow: 0 0 10px var(--saber); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* The film's timeline: a hairline that ignites into a blade as it plays.
   Hover lifts it and shows where a press would land; drag to scrub. */
.seek {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  height: 34px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
  outline: none;
}
.seek-time { color: var(--smoke); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4ch; transition: color .2s; }
.seek-time:last-child { text-align: right; }
.seek:hover .seek-time, .seek.drag .seek-time { color: var(--bone); }
.seek-track {
  position: relative; height: 2px; background: rgba(239, 230, 212, .16);
  transform-origin: 0 50%; transform: scaleX(0);
  transition: height .25s var(--ease);
}
body.entered .seek-track { animation: ignite 1.1s cubic-bezier(.6, 0, .1, 1) 4s forwards; }
@keyframes ignite { to { transform: scaleX(1); } }
.seek:hover .seek-track, .seek.drag .seek-track, .seek:focus-visible .seek-track { height: 5px; }
.seek-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(#fff3ef, #fff3ef) center / 100% 40% no-repeat, var(--saber);
  box-shadow: 0 0 6px 1px rgba(255, 42, 42, .9), 0 0 18px 3px rgba(255, 42, 42, .45);
  border-radius: 0 3px 3px 0;
}
.seek-tip-glow {
  position: absolute; right: -10px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 210, .9), rgba(255, 42, 42, .4) 40%, transparent 70%);
  animation: hum 1.8s ease-in-out infinite;
}
@keyframes hum { 50% { transform: scale(.7); opacity: .7; } }
.seek-ghost {
  position: absolute; inset: 0 auto 0 0; width: 0; opacity: 0;
  background: rgba(231, 181, 60, .35); transition: opacity .2s;
}
.seek:hover .seek-ghost { opacity: 1; }
.seek-knob {
  position: absolute; top: 50%; left: 0; width: 4px; height: 16px; margin: -8px 0 0 -2px;
  background: var(--bone); box-shadow: 0 0 10px rgba(255, 42, 42, .8);
  transform: scaleY(0); transition: transform .25s var(--ease);
}
.seek:hover .seek-knob, .seek.drag .seek-knob, .seek:focus-visible .seek-knob { transform: scaleY(1); }
.seek:focus-visible .seek-track { outline: 1px solid rgba(255, 42, 42, .6); outline-offset: 8px; }
.seek-hover {
  position: absolute; bottom: 16px; left: 0; transform: translateX(-50%);
  padding: 5px 8px; background: var(--gold); color: var(--void);
  font: 700 13px/1 var(--news); font-variant-numeric: tabular-nums; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.seek:hover .seek-hover, .seek.drag .seek-hover { opacity: 1; }
.sound {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 0; background: none; border: 0;
  font-weight: 700; font-size: 15px; color: var(--smoke); transition: color .2s;
}
.sound:hover, .sound[aria-pressed="true"] { color: var(--bone); }
.sound-bars { display: inline-flex; align-items: end; gap: 2px; height: 14px; }
.sound-bars i { width: 3px; height: 3px; background: currentColor; }
.sound[aria-pressed="true"] .sound-bars i { background: var(--saber); animation: eq .9s ease-in-out infinite alternate; }
.sound-bars i:nth-child(2) { animation-delay: -.3s !important; }
.sound-bars i:nth-child(3) { animation-delay: -.6s !important; }
.sound-bars i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

/* ---------- the crawl ---------- */
.law { position: relative; }
.crawl-track { position: relative; height: 470vh; }
.crawl-stage {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  perspective: 420px; perspective-origin: 50% 30%;
}
.crawl-fade {
  position: absolute; inset: 0 0 auto; height: 42%; z-index: 2; pointer-events: none;
  background: linear-gradient(var(--void) 28%, transparent);
}
.crawl-plane { position: absolute; inset: 0; transform-origin: 50% 100%; transform: rotateX(26deg); }
.crawl {
  position: absolute; left: 50%; top: 100%;
  width: min(760px, 90vw); margin-left: max(-380px, -45vw);
  color: var(--gold); text-align: justify; hyphens: auto;
  font: 700 clamp(26px, 3.3vw, 44px)/1.3 var(--news);
  will-change: transform;
}
.crawl .c-ep { text-align: center; margin: 0; font-weight: 700; font-size: .78em; letter-spacing: .04em; }
.crawl .c-title { text-align: center; margin: .3em 0 .9em; font-weight: 900; font-size: 1.5em; line-height: 1; letter-spacing: .03em; }
.crawl p { margin: 0 0 1.05em; }
.crawl .c-break { height: 2.4em; }

/* ---------- the decree: the same text, to read ---------- */
.decree { display: none; }
@media (prefers-reduced-motion: reduce) { .decree { display: block; } }
.decree {
  position: relative; max-width: 64ch; margin: 0 auto; padding: 60px var(--gut) 140px;
}
.decree .r-part + .r-part { margin-top: 90px; }
.decree .r-ep { margin: 0; color: var(--gold); font-weight: 700; font-size: 16px; letter-spacing: .06em; }
.decree h2 { margin: 10px 0 30px; font-weight: 900; font-size: clamp(34px, 5vw, 60px); line-height: .95; letter-spacing: .01em; text-transform: uppercase; }
.decree p { margin: 0 0 1.15em; font-size: 20px; line-height: 1.72; color: rgba(239, 230, 212, .9); }
.decree h2 + p::first-letter {
  float: left; margin: .08em .12em 0 0;
  font: 900 3.4em/.8 var(--wide); font-stretch: 125%; color: var(--gold);
}
.decree .r-coin { color: var(--gold); font-weight: 700; }

/* ---------- section heads ---------- */
.films, .archive { padding: 110px var(--gut) 40px; max-width: 1560px; margin: 0 auto; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 40px; margin-bottom: 36px; }
.sec-h { margin: 0; font-weight: 900; font-size: clamp(40px, 6.6vw, 100px); line-height: .86; letter-spacing: .005em; text-transform: uppercase; }

/* ---------- films: four panels, the one in hand opens wide ---------- */
.panels { display: flex; gap: 6px; height: min(74vh, 720px); min-height: 420px; }
.panel {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden;
  border: 0; padding: 0; background: #000; text-align: left;
  transition: flex-grow .85s var(--ease);
}
.panel.on { flex-grow: 3.6; }
.panel img, .panel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel img { filter: grayscale(.55) brightness(.55); transform: scale(1.06); transition: filter .8s, transform 1.4s var(--ease); }
.panel.on img { filter: none; transform: none; }
.panel video { opacity: 0; transition: opacity .6s; }
.panel.playing video { opacity: 1; }
.panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(4, 3, 6, .92), rgba(4, 3, 6, .1) 50%, rgba(4, 3, 6, .35));
}
.p-num {
  position: absolute; top: 20px; left: 22px; z-index: 1;
  font-weight: 900; font-size: 15px; letter-spacing: .1em; color: var(--gold);
}
.p-vert {
  position: absolute; left: 50%; bottom: 26px; z-index: 1;
  writing-mode: vertical-rl; transform: translateX(-50%) rotate(180deg);
  font: 700 17px/1 var(--news); letter-spacing: .08em; white-space: nowrap;
  transition: opacity .4s;
}
.panel.on .p-vert { opacity: 0; }
.p-full {
  position: absolute; left: 26px; right: 26px; bottom: 24px; z-index: 1;
  display: flex; align-items: end; justify-content: space-between; gap: 20px;
  opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .6s var(--ease);
}
.panel.on .p-full { opacity: 1; transform: none; transition-delay: .35s; }
.p-title { font-weight: 900; font-size: clamp(24px, 2.8vw, 42px); line-height: .95; text-transform: uppercase; letter-spacing: .01em; }
.p-meta { flex: none; display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--bone); }
.p-play {
  width: 54px; height: 54px; border-radius: 50%; position: relative;
  border: 1px solid rgba(239, 230, 212, .55);
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.p-play::before { content: ""; position: absolute; left: 21px; top: 17px; border-left: 16px solid var(--bone); border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.panel:hover .p-play, .panel:focus-visible .p-play { background: var(--blood); border-color: var(--saber); box-shadow: 0 0 26px rgba(255, 42, 42, .45); }

/* ---------- archive ---------- */
.wall { columns: 4 250px; column-gap: 8px; }
.tile {
  position: relative; display: block; width: 100%; margin: 0 0 8px; padding: 0;
  break-inside: avoid; border: 0; background: #000; overflow: hidden; text-align: left;
}
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile img { filter: brightness(.8) saturate(.85); transition: filter .5s, transform 1.4s var(--ease); }
.tile video { opacity: 0; transition: opacity .35s; }
.tile.playing video { opacity: 1; }
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(231, 181, 60, 0); transition: box-shadow .35s;
}
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(4, 3, 6, .88), transparent 45%);
  opacity: .9; transition: opacity .35s;
}
.tile:hover img, .tile:focus-visible img { filter: none; transform: scale(1.035); }
.tile:hover::before, .tile:focus-visible::before { box-shadow: inset 0 0 0 1px rgba(231, 181, 60, .8), inset 0 0 40px rgba(231, 181, 60, .12); }
.tile-cap {
  position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1;
  display: flex; justify-content: space-between; align-items: end; gap: 10px;
}
.tile-t { font-weight: 800; font-size: 15px; line-height: 1.1; text-transform: uppercase; letter-spacing: .02em; }
.tile-d { color: var(--smoke); font-size: 14px; font-weight: 700; flex: none; }

/* ---------- coin ---------- */
.coin { text-align: center; padding: 140px var(--gut) 120px; }
.coin-name {
  margin: 0; font-weight: 900; font-size: clamp(30px, 8.4vw, 140px); line-height: .9;
  color: rgba(231, 181, 60, .06); -webkit-text-stroke: clamp(1px, .15vw, 2px) var(--gold);
}
.coin-line { margin: 18px auto 0; color: var(--smoke); font-size: 19px; max-width: 40ch; }
.coin-facts { max-width: 680px; margin: 50px auto 0; text-align: left; border-top: 1px solid var(--line); }
.coin-facts div {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: baseline;
  padding: 20px 4px; border-bottom: 1px solid var(--line);
}
.coin-facts dt { font-weight: 800; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.coin-facts dd { margin: 0; color: var(--smoke); }

.foot { padding: 34px var(--gut) 48px; border-top: 1px solid var(--line); color: var(--smoke); font-size: 15px; text-align: center; }
.foot p { margin: 4px auto; max-width: 80ch; }

/* ---------- player ---------- */
.box {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(3, 2, 4, .97); color: var(--bone);
}
.box::backdrop { background: rgba(0, 0, 0, .75); }
.box[open] { animation: boxIn .4s var(--ease); }
@keyframes boxIn { from { opacity: 0; transform: scale(.985); } }
.box-inner { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; height: 100dvh; padding: 16px var(--gut) max(22px, env(safe-area-inset-bottom)); gap: 14px; }
.box-head { display: flex; align-items: baseline; gap: 16px; }
.box-count { margin: 0; color: var(--gold); font-size: 15px; font-weight: 700; flex: none; }
.box-title { margin: 0; font-weight: 900; font-size: clamp(20px, 2.6vw, 34px); line-height: 1; text-transform: uppercase; flex: 1; min-width: 0; }
.box-x { background: none; border: 1px solid var(--line); width: 44px; height: 44px; font-size: 26px; line-height: 1; flex: none; }
.box-x:hover { border-color: var(--saber); }
/* The video always fits the space between the title and the share row,
   whatever its shape, so the share row is never pushed off the screen. */
.box-stage { position: relative; min-height: 0; overflow: hidden; }
.box-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.box-nav { position: absolute; top: 50%; z-index: 2; width: 52px; height: 72px; margin-top: -36px; background: rgba(4, 3, 6, .55); border: 1px solid var(--line); }
.box-nav::before { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; margin: -7px 0 0 -9px; border-top: 2px solid var(--bone); border-right: 2px solid var(--bone); transform: rotate(45deg); }
.box-nav.prev { left: 0; }
.box-nav.prev::before { transform: rotate(-135deg); margin-left: -4px; }
.box-nav.next { right: 0; }
.box-nav:hover { border-color: var(--saber); }

.share-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.share-row .now { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
  background: rgba(239, 230, 212, .05); border: 1px solid var(--line);
  font-weight: 700; font-size: 16px; text-decoration: none; transition: background .2s, border-color .2s;
}
.chip:hover { background: rgba(239, 230, 212, .1); border-color: rgba(239, 230, 212, .35); }
.chip svg { width: 16px; height: 16px; fill: currentColor; }
.chip.x { background: var(--bone); color: var(--void); border-color: var(--bone); }
.chip.x:hover { background: #fff; }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 60;
  padding: 12px 18px; background: var(--gold); color: var(--void); font-weight: 700;
  transform: translate(-50%, 30px); opacity: 0; visibility: hidden;
  transition: transform .35s var(--ease), opacity .35s, visibility 0s linear .35s;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }

/* ---------- smaller screens ---------- */
@media (max-width: 760px) {
  .panels { flex-direction: column; height: auto; min-height: 0; }
  .panel { flex: none; aspect-ratio: 16 / 10; }
  .panel img { filter: brightness(.75); transform: none; }
  .p-vert { display: none; }
  .p-full { opacity: 1; transform: none; left: 18px; right: 18px; bottom: 16px; }
  .p-num { top: 14px; left: 18px; }
  .p-play { width: 46px; height: 46px; }
  .p-play::before { left: 18px; top: 14px; }
}
@media (max-width: 640px) {
  .gate-langs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(320px, 100%); }
  body { font-size: 17px; }
  .bar-nav { display: none; }
  .hero-acts .btn { flex: 1 1 100%; }
  .hero-foot { bottom: 10px; grid-template-columns: 1fr auto; gap: 0 12px; }
  .hero-foot .seek { grid-column: 1 / -1; grid-row: 1; height: 40px; }
  .hero-foot .now-playing { font-size: 14px; }
  .hero-title { margin-top: -40px; }
  .crawl-track { height: 520vh; }
  .crawl { font-size: 22px; line-height: 1.32; text-align: left; }
  .crawl-stage { perspective: 300px; }
  .decree p { font-size: 18px; }
  .wall { columns: 2; column-gap: 6px; }
  .tile { margin-bottom: 6px; }
  .tile-t { font-size: 12px; }
  .tile-d { display: none; }
  .coin-facts div { grid-template-columns: 1fr; gap: 4px; }
  .box-nav { width: 40px; height: 56px; margin-top: -28px; }
}

/* ---------- less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .crawl-track { display: none; }
}

/* ---------- scripts without capitals or spaces ---------- */
:lang(zh) .crawl, :lang(ja) .crawl { text-align: left; hyphens: none; line-height: 1.5; letter-spacing: .04em; }
:lang(zh) .decree p, :lang(ja) .decree p { line-height: 1.9; }
:lang(zh) .sec-h, :lang(ja) .sec-h, :lang(zh) .decree h2, :lang(ja) .decree h2 { letter-spacing: .06em; }
:lang(zh) .decree h2 + p::first-letter, :lang(ja) .decree h2 + p::first-letter { float: none; font: inherit; color: inherit; margin: 0; }
