/* Ralphthon deck engine — Missions design system (team-attention.com/missions) on a 1920×1080 stage.
   Source of truth for the look: design/DESIGN.md. Do not add new colors or fonts here without updating it.
   black ASCII-field hero + neon #DFFF2F · cream body · white rounded cards · pill tags · pixel labels · Geist.
   Motion: cubic-bezier(0.22,1,0.36,1), transform and opacity only. */

@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("fonts/Silkscreen-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* tokens — identical to missions */
  --ink: #111; --soft: #4a4a4a; --mute: #8a8780; --cream: #FDFAE8; --paper: #fff; --line: #e8e3cc;
  --neon: #DFFF2F; --peach: #ffb06c; --lilac: #af98ef; --sky: #8bc7fc; --rose: #fc9ea0; --mint: #7de290;
  --night: #000; --night-text: #f2f0e6; --night-soft: #cfccc1; --night-mute: #9c998f; --night-line: #2a2a2a;
  --sans: "Geist", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --zh: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", var(--sans);
  --mono: "Geist Mono", ui-monospace, monospace; --pixel: "Silkscreen", var(--mono);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* stage scale: missions px × 2 */
  --pad-x: 120px; --pad-top: 150px; --pad-bottom: 110px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; overflow: hidden; }
body { font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word; }

/* ---------- stage ---------- */
#viewport { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#stage { width: 1920px; height: 1080px; position: relative; transform-origin: center center; flex: none; }
.slide { position: absolute; inset: 0; background: var(--cream); overflow: hidden; display: none; }
.slide.on { display: block; }
.slide.on .in-anim { animation: rise .7s var(--ease) both; }
.slide.on .in-anim:nth-child(2) { animation-delay: .05s; } .slide.on .in-anim:nth-child(3) { animation-delay: .1s; }
.slide.on .in-anim:nth-child(4) { animation-delay: .15s; } .slide.on .in-anim:nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.body { position: absolute; inset: var(--pad-top) var(--pad-x) var(--pad-bottom); display: flex; flex-direction: column; justify-content: center; }
.body.top { justify-content: flex-start; }

/* dark slides */
.slide.dark { background: var(--night); color: var(--night-text); }
.slide.dark canvas.ascii { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }

/* ---------- top bar (header.top) ---------- */
.topbar { position: absolute; left: 0; right: 0; top: 0; height: 84px; background: rgba(0,0,0,.88); color: var(--night-text); border-bottom: 1px solid var(--night-line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad-x); font-size: 24px; z-index: 5; }
.topbar b { font-weight: 600; white-space: nowrap; }
.topbar b i { display: inline-block; width: 14px; height: 14px; background: var(--neon); margin-right: 14px; vertical-align: 1px; }
.topbar nav { display: flex; gap: 32px; font-family: var(--mono); color: #a7a49a; font-size: 22px; }
.topbar nav .now { color: var(--night-text); }
.topbar nav .pill { border: 1px solid #3a3a3a; border-radius: 999px; padding: 4px 16px; }

/* ---------- type ---------- */
.prompt { font-family: var(--pixel); font-size: 24px; letter-spacing: .04em; text-transform: uppercase; color: var(--neon); }
.prompt .cur { display: inline-block; width: 14px; height: 26px; background: var(--neon); vertical-align: -3px; margin-left: 10px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.label { font-family: var(--pixel); font-size: 24px; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.dark .label { color: var(--night-mute); }
.proposal { display: inline-block; align-self: flex-start; font-family: var(--mono); font-size: 26px; color: #000; background: var(--neon); padding: 10px 24px; border-radius: 999px; }

h1.t { font-weight: 400; font-size: 116px; line-height: 1.06; letter-spacing: -.035em; margin-top: 36px; max-width: 1640px; text-wrap: balance; }
h1.t .l2 { display: block; }
h1.t mark, .h mark { background: var(--neon); color: #000; padding: 0 .1em; border-radius: 10px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.h { font-weight: 400; font-size: 88px; line-height: 1.1; letter-spacing: -.03em; margin: 24px 0 48px; max-width: 1560px; text-wrap: balance; }
.sub { color: #d9d6cb; max-width: 1280px; margin-top: 44px; font-size: 38px; line-height: 1.55; }
.note { color: var(--soft); font-size: 34px; line-height: 1.6; max-width: 1400px; }
.dark .note { color: var(--night-soft); }
.zh { display: block; font-family: var(--zh); font-weight: 400; letter-spacing: 0; color: var(--mute); font-size: .52em; line-height: 1.4; margin-top: .35em; }
.dark .zh { color: var(--night-mute); }
.sub .zh, .note .zh, .card .zh, .row .zh { font-size: .82em; margin-top: .2em; }

/* ---------- chips & pills ---------- */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 48px; font-size: 26px; }
.chips .lbl { font-family: var(--mono); color: var(--night-mute); font-size: 22px; margin-right: 8px; }
.chips span.c { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 10px 26px; font-weight: 500; }
.dark .chips span.c.ghost { background: transparent; color: var(--night-text); border-color: #3a3a3a; }
.k { display: inline-block; font-family: var(--pixel); font-size: 22px; text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; padding: 6px 22px; background: var(--neon); color: #111; }
.k.peach { background: var(--peach); } .k.sky { background: var(--sky); } .k.lilac { background: var(--lilac); } .k.rose { background: var(--rose); } .k.mint { background: var(--mint); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 32px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 48px; padding: 52px; }
.card b { display: block; font-size: 42px; font-weight: 600; line-height: 1.3; margin-top: 28px; letter-spacing: -.01em; }
.card p { color: var(--soft); margin-top: 16px; font-size: 30px; line-height: 1.55; }
.card .num { display: block; font-family: var(--mono); font-weight: 600; font-size: 104px; line-height: 1; letter-spacing: -.04em; margin-top: 28px; }
.dark .card { background: #111; border-color: var(--night-line); color: var(--night-text); }
.dark .card p { color: var(--night-soft); }

/* ---------- schedule (.log / .row) ---------- */
.log { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 250px 1fr auto; gap: 48px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.row .d { font-family: var(--mono); font-size: 30px; color: var(--soft); }
.row b { display: block; font-size: 38px; font-weight: 600; letter-spacing: -.01em; }
.row span.s { display: block; color: var(--soft); margin-top: 6px; font-size: 28px; }
.row .go { font-family: var(--mono); font-size: 24px; color: var(--mute); text-align: right; }
.row.main { background: #111; color: var(--night-text); border-radius: 36px; padding: 26px 40px; margin: 8px -40px; border-bottom: 0; box-shadow: inset 8px 0 0 var(--neon); }
.row.main .d, .row.main span.s, .row.main .zh { color: var(--night-soft); }
.row.main .go { color: var(--neon); }
.log.tight .row { padding: 18px 0; } .log.tight .row.main { padding: 18px 40px; }
.row b .zh { display: inline; margin-left: .7em; font-size: .7em; }
.compact .h { font-size: 64px; margin: 12px 0 28px; }
.compact .row { padding: 18px 0; } .compact .row.main { padding: 18px 40px; margin: 6px -40px; }

/* ---------- side box (.side .facts) ---------- */
.split { display: grid; grid-template-columns: 1fr 480px; gap: 80px; align-items: end; }
.split h1.t { font-size: 100px; }
.split .sub { font-size: 32px; margin-top: 36px; }
.split .chips { margin-top: 36px; }
.side { border: 1px solid var(--night-line); border-radius: 48px; background: rgba(0,0,0,.6); overflow: hidden; }
.facts div { padding: 26px 36px; border-bottom: 1px solid var(--night-line); }
.facts div:last-child { border-bottom: 0; }
.facts span { display: block; font-family: var(--pixel); font-size: 20px; color: var(--night-mute); text-transform: uppercase; letter-spacing: .04em; }
.facts b { display: block; font-weight: 500; margin-top: 6px; color: var(--night-text); font-size: 30px; line-height: 1.35; }
.facts b .zh { font-size: .8em; }

/* ---------- logos ---------- */
.logos { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 24px; }
.logos .lg { background: var(--paper); border: 1px solid var(--line); border-radius: 32px; height: 168px; display: flex; align-items: center; justify-content: center; padding: 40px 44px; font-weight: 600; font-size: 34px; }
.logos .lg img { max-width: 100%; max-height: 100%; object-fit: contain; filter: brightness(0); }
.logos .lg img.keep { filter: none; mix-blend-mode: multiply; }
.logos.big .lg { height: 240px; }

/* ---------- photos (.ph) ---------- */
.photos { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 32px; }
.ph { background: var(--paper); border: 1px solid var(--line); border-radius: 36px; overflow: hidden; }
.ph div { aspect-ratio: 4 / 3; background: #ddd center / cover no-repeat; filter: saturate(.82) contrast(.96) sepia(.1) brightness(1.02); }
.ph figcaption { font-size: 26px; color: var(--soft); padding: 22px 30px; line-height: 1.4; }
.ph figcaption b { color: var(--ink); font-weight: 600; }

/* ---------- final (black rounded box on cream) ---------- */
.final { background: #000; color: var(--night-text); border-radius: 64px; padding: 96px 112px; }
.final .h { margin-top: 20px; }
.final .note { color: var(--night-soft); }

/* ---------- clock / timer ---------- */
.clock { font-family: var(--mono); font-weight: 500; font-size: 300px; line-height: 1; letter-spacing: -.04em; color: var(--neon); margin-top: 40px; font-variant-numeric: tabular-nums; }
.clock.warn { color: var(--rose); }
.editable { outline: none; border-bottom: 2px dashed transparent; }
.editable:focus { border-bottom-color: var(--neon); }

/* ---------- qr ---------- */
.qrwrap { display: grid; grid-template-columns: 1fr 520px; gap: 96px; align-items: center; }
.qrcard { background: var(--paper); border: 1px solid var(--line); border-radius: 48px; padding: 44px; text-align: center; }
.qrcard svg, .qrcard .ph-qr { width: 100%; aspect-ratio: 1; display: block; }
.qrcard .ph-qr { border: 4px dashed var(--line); border-radius: 24px; display: flex; align-items: center; justify-content: center; font-family: var(--pixel); font-size: 26px; color: var(--mute); }
.qrcard .u { font-family: var(--mono); font-size: 24px; color: var(--soft); margin-top: 22px; word-break: break-all; }
ul.pts { list-style: none; display: grid; gap: 18px; margin-top: 8px; }
ul.pts li { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 20px 32px; font-size: 32px; color: var(--ink); line-height: 1.4; }
ul.pts li .zh { font-size: .78em; }
.dark ul.pts li { background: #111; border-color: var(--night-line); color: var(--night-text); }

/* ---------- winners (reveal) ---------- */
.rank { display: grid; grid-template-columns: 200px 1fr auto; gap: 40px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 40px; padding: 36px 48px; margin-bottom: 24px; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rank .p { font-family: var(--pixel); font-size: 40px; }
.rank b { font-size: 56px; font-weight: 600; letter-spacing: -.02em; }
.rank .go { font-family: var(--mono); font-size: 34px; }
.rank.first { background: #000; color: var(--night-text); border-color: #000; box-shadow: inset 10px 0 0 var(--neon); }
.rank.first .go { color: var(--neon); }
.frag { opacity: 0; transform: translateY(24px); }
.frag.shown { opacity: 1; transform: none; }

/* ---------- footer ---------- */
.foot { position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 40px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 20px; color: var(--mute); z-index: 4; }
.dark .foot { color: #6f6c63; }

/* ---------- overview (O key) ---------- */
body.overview #viewport { overflow: auto; align-items: flex-start; background: #111; }
body.overview #stage { transform: none !important; width: auto; height: auto; display: grid; grid-template-columns: repeat(4, 456px); gap: 24px; padding: 40px; }
body.overview .slide { display: block; position: relative; width: 1920px; height: 1080px; transform: scale(.2375); transform-origin: top left; margin: 0 -1464px -823px 0; cursor: pointer; outline: 4px solid transparent; }
body.overview .slide.on { outline-color: var(--neon); }

/* ---------- help ---------- */
#help { position: fixed; right: 24px; bottom: 24px; background: rgba(0,0,0,.85); color: #cfccc1; font: 13px/1.7 var(--mono); padding: 14px 18px; border-radius: 14px; border: 1px solid #333; display: none; z-index: 20; }
body.help #help { display: block; }

@media (prefers-reduced-motion: reduce) { .slide.on .in-anim, .prompt .cur { animation: none; } .rank, .frag { transition: none; } }
@media print {
  @page { size: 1920px 1080px; margin: 0; }
  html, body { overflow: visible; height: auto; background: none; }
  #viewport { position: static; display: block; } #stage { transform: none !important; }
  .slide { display: block !important; position: relative; page-break-after: always; }
  .frag { opacity: 1; transform: none; } #help { display: none !important; }
}
