/* An arcade cabinet in attract mode: the page is the machine. Hero is a playable level, the rest are bands of flat colour joined by checker strips. One deliberate look, in light and dark system themes alike. */
:root {
  color-scheme: light;
  --ink: #15104a; --sky: #3a2be8; --sky-deep: #2a1fc4; --yolk: #ffd23f; --yolk-deep: #e09a00; --coral: #ff4d6d; --mint: #2ee6a6; --paper: #f4f5ff; --soft: #c9ccf5;
  --display: "Handjet", "Golos Text", ui-monospace, Menlo, monospace;
  --body: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", sans-serif;
  --px: 4px;
}
h1, h2, h3, .button, .hud, .tag { letter-spacing: .02em; }
:lang(ja) { --display: "DotGothic16", "Hiragino Sans", sans-serif; --body: "Noto Sans JP", "Hiragino Sans", sans-serif; }
:lang(zh-Hans) { --display: "ZCOOL KuaiLe", "PingFang SC", sans-serif; --body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 18px/1.55 var(--body); overflow-x: hidden; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; font-weight: 700; }
h3 { font-size: 26px; line-height: 1.15; font-weight: 700; }
:focus-visible { outline: var(--px) dashed var(--coral); outline-offset: var(--px); }
.yolk :focus-visible, .coral :focus-visible, .mint :focus-visible { outline-color: var(--ink); }
svg.spr { display: block; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yolk); color: var(--ink); padding: 8px 14px; z-index: 30; }
.skip:focus { left: 16px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.band { padding-block: 88px; }
.ink { background: var(--ink); color: var(--paper); }
.yolk { background: var(--yolk); color: var(--ink); }
.mint { background: var(--mint); color: var(--ink); }
.paper { background: var(--paper); color: var(--ink); }
.coral { background: var(--coral); color: var(--ink); }
.sky { background: var(--sky); color: #fff; }
.lede { font-size: 21px; line-height: 1.45; max-width: 34em; }

/* the machine's top bar */
.hud { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 12px 24px; padding: 10px max(24px, env(safe-area-inset-right, 0px)) 10px max(24px, env(safe-area-inset-left, 0px)); background: var(--ink); color: #fff; font: 500 17px/1.2 var(--display); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; }
.brand svg { width: 24px; height: 28px; }
.free { color: var(--yolk); white-space: nowrap; }
.blink { color: var(--coral); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hud nav { display: flex; gap: 18px; margin-left: auto; }
.hud nav a { text-decoration: none; white-space: nowrap; }
.hud nav a:hover { color: var(--yolk); }
.credit { white-space: nowrap; color: var(--soft); }
.credit b { color: var(--mint); font: 600 .9em var(--body); font-variant-numeric: tabular-nums; }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; padding: 6px 12px; background: var(--sky); white-space: nowrap; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " ▾"; }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; min-width: 170px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 var(--px) var(--ink), 8px 8px 0 var(--px) var(--sky); z-index: 25; font-family: var(--body); font-size: 16px; }
.lang li a { display: block; padding: 7px 10px; text-decoration: none; }
.lang li a:hover, .lang li a[aria-current] { background: var(--yolk); }

/* hero: the text stands in the level's sky */
.hero { position: relative; background: var(--sky); color: #fff; overflow: hidden; background-image: radial-gradient(#fff5 1px, transparent 1.5px); background-size: 32px 32px; }
.hero-copy { position: relative; padding-top: 56px; padding-bottom: 28px; }
.tag { display: inline-block; font: 700 18px/1.2 var(--display); background: var(--yolk); color: var(--ink); padding: 6px 12px; box-shadow: 0 var(--px) 0 var(--yolk-deep); }
.ink-tag { background: var(--ink); color: var(--yolk); box-shadow: none; margin-bottom: 18px; }
h1 { margin-top: 22px; font-size: clamp(50px, 8.6vw, 124px); line-height: .96; font-weight: 700; letter-spacing: -.01em; text-shadow: 6px 6px 0 var(--ink); hyphens: auto; overflow-wrap: break-word; max-width: 11.5em; }
h1:lang(ja), h1:lang(zh-Hans) { word-break: auto-phrase; line-height: 1.12; font-size: clamp(42px, 7.2vw, 100px); }
.hero-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px 56px; margin-top: 38px; align-items: start; }
.actions { display: flex; flex-wrap: wrap; gap: 18px; }
.note { margin-top: 18px; font-size: 16px; color: #e4e5ff; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 12px 22px; font: 700 22px/1.1 var(--display); text-decoration: none; text-align: center; background: var(--yolk); color: var(--ink); box-shadow: 0 calc(-1 * var(--px)) 0 var(--ink), 0 var(--px) 0 var(--ink), calc(-1 * var(--px)) 0 0 var(--ink), var(--px) 0 0 var(--ink), inset 0 -6px 0 var(--yolk-deep); }
a.button:hover { transform: translateY(-2px); }
a.button:active { transform: translateY(3px); }
.button.quiet { background: #fff; box-shadow: 0 calc(-1 * var(--px)) 0 var(--ink), 0 var(--px) 0 var(--ink), calc(-1 * var(--px)) 0 0 var(--ink), var(--px) 0 0 var(--ink), inset 0 -6px 0 var(--soft); }
.button.soon { background: var(--ink); color: #fff; box-shadow: 0 calc(-1 * var(--px)) 0 var(--ink), 0 var(--px) 0 var(--ink), calc(-1 * var(--px)) 0 0 var(--ink), var(--px) 0 0 var(--ink); cursor: default; }

/* the level itself */
.game { position: relative; height: 260px; cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.game canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.game-hud { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; padding: 6px max(24px, calc((100% - 1200px) / 2 + 24px)) 0; font: 500 17px/1.3 var(--display); color: #fff; pointer-events: none; }
.game-hud b { color: var(--yolk); font: 600 .9em var(--body); font-variant-numeric: tabular-nums; }
#game-msg { color: var(--yolk); }

.ticker { background: var(--yolk); color: var(--ink); overflow: hidden; }
.ticker-run { display: flex; width: max-content; animation: run 34s linear infinite; }
.ticker p { display: flex; align-items: center; gap: 18px; padding: 12px 9px; white-space: nowrap; font: 700 22px/1.2 var(--display); }
.ticker svg { width: 18px; height: 18px; }
@keyframes run { to { transform: translateX(-25%); } }

.check { height: 16px; background-size: 16px 16px; }
.ink-yolk { background-color: var(--yolk); background-image: conic-gradient(var(--ink) 25%, transparent 0 50%, var(--ink) 0 75%, transparent 0); }
.yolk-mint { background-color: var(--mint); background-image: conic-gradient(var(--yolk) 25%, transparent 0 50%, var(--yolk) 0 75%, transparent 0); }

/* high scores and the versus screen */
.scores { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-family: var(--display); }
.scores li { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.scores strong { font-size: clamp(36px, 5vw, 60px); line-height: 1; font-weight: 700; color: var(--yolk); }
.scores li:nth-child(2) strong { color: var(--mint); }
.scores li:nth-child(3) strong { color: var(--coral); }
.scores i { flex: 1 1 40px; border-bottom: var(--px) dotted #5a57a6; transform: translateY(-6px); }
.scores span { font-size: 22px; line-height: 1.2; }
.vs-title { margin-top: 84px; }
.vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 28px; align-items: center; margin-top: 36px; }
.lane { display: grid; gap: 16px; padding: 24px; background: #221c6c; align-self: stretch; align-content: start; }
.lane.win { background: var(--sky); }
.lane h3 { font-size: 32px; }
.chain { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 0; min-height: 96px; }
.node { padding: 8px 12px; background: var(--paper); color: var(--ink); font: 700 17px/1.15 var(--display); }
.node.mid { background: var(--coral); }
.link { flex: 0 0 18px; height: var(--px); background: var(--paper); }
.link.long { flex: 1 1 60px; position: relative; background: repeating-linear-gradient(90deg, var(--yolk) 0 8px, transparent 8px 16px); }
.link.long svg { position: absolute; left: 50%; bottom: 4px; width: 36px; height: 42px; transform: translateX(-50%); }
.vs-mark { font: 700 56px/1 var(--display); color: var(--yolk); text-shadow: 4px 4px 0 var(--coral); }

/* the stage map */
.map { position: relative; margin-top: 44px; }
.rail { position: relative; height: 72px; margin-bottom: 8px; border-bottom: var(--px) dashed var(--ink); }
.walker { position: absolute; bottom: 0; left: calc(var(--p, 0) * (100% - 48px)); width: 48px; height: 56px; }
.walker svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.walker svg:last-child { visibility: hidden; }
.walker[data-f="1"] svg:first-child { visibility: hidden; }
.walker[data-f="1"] svg:last-child { visibility: visible; }
.stages { list-style: none; margin: 0; padding: 18px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.stages li { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.stage { font: 700 20px/1 var(--display); background: var(--ink); color: var(--yolk); padding: 6px 10px; }
.stages h3 { font-size: 32px; }
.badge { margin-top: auto; font: 700 18px/1.2 var(--display); padding: 5px 10px; box-shadow: inset 0 0 0 3px var(--ink); }

/* the app's real windows */
.shots-title { margin-top: 64px; font-size: clamp(30px, 3.6vw, 44px); }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 24px; }
.shots figure { margin: 0; display: grid; gap: 14px; align-content: start; min-width: 0; }
.shots img { display: block; width: 100%; height: auto; max-width: 100%; filter: drop-shadow(8px 8px 0 var(--ink)); }
.shots figcaption { font-weight: 600; }
.shots-note { margin-top: 18px; font-size: 15px; }

/* player select */
.picker { border: 0; margin: 40px 0 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.picker legend { font: 700 24px/1.2 var(--display); padding: 0; margin-bottom: 14px; }
.picker input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.picker > label { display: flex; align-items: center; gap: 14px; padding: 14px 24px 14px 16px; cursor: pointer; background: #fff; font: 700 28px/1 var(--display); box-shadow: inset 0 0 0 var(--px) var(--ink); }
.picker > label svg { width: 48px; height: 48px; }
.picker input:checked + label { background: var(--ink); color: var(--yolk); }
.picker input:checked + label svg { outline: var(--px) solid var(--yolk); background: var(--paper); }
.picker input:focus-visible + label { outline: var(--px) dashed var(--ink); outline-offset: var(--px); }
.slots { flex: 1 1 100%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.slot { grid-column: span 2; display: flex; gap: 16px; padding: 20px; background: #fff; box-shadow: inset 0 0 0 var(--px) var(--ink); }
.slot svg { width: 48px; height: 48px; }
.slot div { min-width: 0; }
.slot h3 { font-size: 24px; margin-bottom: 6px; }
.slot p { font-size: 16px; }
.slot.wide { grid-column: span 3; }
.slot.full { grid-column: 1 / -1; display: none; }
#p-mac:checked ~ .slots .only-iphone { display: none; }
#p-mac:checked ~ .slots .only-mac { display: flex; }

/* the practice screen */
.controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 40px; margin-top: 44px; align-items: center; }
.controls-copy { display: grid; gap: 14px; }
.controls-copy h3 { font-size: 34px; }
.hint { font-weight: 600; }
.sliders { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; align-items: center; }
.sliders input { width: 100%; accent-color: var(--sky); }
.toggles { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.check-label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.check-label input { width: 20px; height: 20px; accent-color: var(--sky); }
.mini { font: 700 17px/1 var(--display); padding: 9px 14px; background: var(--ink); color: #fff; border: 0; cursor: pointer; }
.phone { padding: 14px 22px; background: var(--ink); border-radius: 34px; min-width: 0; }
.screen { position: relative; aspect-ratio: 19.5 / 9; overflow: hidden; border-radius: 14px; background: var(--sky); background-image: radial-gradient(#fff5 1px, transparent 1.5px); background-size: 20px 20px; container-type: inline-size; --s: 1; --o: 1; }
.scene { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: var(--ink); }
.scene svg { position: absolute; bottom: 100%; }
.scene svg:nth-child(1) { left: 31%; width: 7cqw; height: 8.2cqw; }
.scene svg:nth-child(2) { left: 56%; width: 5.5cqw; height: 4.4cqw; }
.scene svg:nth-child(3) { left: 46%; bottom: 190%; width: 4cqw; height: 4cqw; }
.screen button { position: absolute; padding: 0; margin: 0; border: 0; cursor: grab; touch-action: none; opacity: var(--o); transform: scale(var(--s)); transform-origin: center; color: var(--ink); font: 700 clamp(11px, 2.6cqw, 22px)/1 var(--display); background: none; }
.screen button.drag { cursor: grabbing; filter: drop-shadow(0 0 0 var(--yolk)) drop-shadow(0 4px 0 #15104a80); }
.screen.off button { display: none; }
.pad { width: 19cqw; height: 19cqw; }
.pad i { position: absolute; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); }
.pad i:first-child { left: 34%; right: 34%; top: 0; bottom: 0; }
.pad i:last-child { top: 34%; bottom: 34%; left: 0; right: 0; }
.abxy { width: 19cqw; height: 19cqw; }
.abxy b { position: absolute; width: 38%; height: 38%; display: grid; place-items: center; background: var(--yolk); box-shadow: inset 0 0 0 2px var(--ink); }
.abxy b:nth-child(1) { left: 31%; top: 0; }
.abxy b:nth-child(2) { left: 0; top: 31%; }
.abxy b:nth-child(3) { right: 0; top: 31%; }
.abxy b:nth-child(4) { left: 31%; bottom: 0; }
.pill { width: 11cqw; height: 6.5cqw; background: var(--paper) !important; box-shadow: inset 0 0 0 2px var(--ink); }
.pill.small { width: 6.5cqw; }

/* power-ups */
.items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 64px; }
.items article { display: flex; gap: 16px; }
.items svg { width: 48px; height: 48px; }
.items div { min-width: 0; }
.items h3 { margin-bottom: 6px; }
.items p { font-size: 17px; }

/* FAQ as a dialogue box */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 32px 56px; }
.dialogue { display: grid; gap: 14px; min-width: 0; }
.dialogue details { background: var(--ink); box-shadow: 0 calc(-1 * var(--px)) 0 #fff, 0 var(--px) 0 #fff, calc(-1 * var(--px)) 0 0 #fff, var(--px) 0 0 #fff; }
.dialogue summary { list-style: none; cursor: pointer; padding: 14px 18px; font: 700 22px/1.2 var(--display); display: flex; gap: 12px; }
.dialogue summary::-webkit-details-marker { display: none; }
.dialogue summary::before { content: "▶"; color: var(--yolk); font-size: 16px; line-height: 1.6; flex: none; }
.dialogue details[open] summary::before { content: "▼"; }
.dialogue summary:hover { color: var(--yolk); }
.dialogue details p { padding: 0 18px 18px 44px; max-width: 42em; color: #e4e5ff; }

/* coin slot */
.support { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px 64px; align-items: center; }
.support .lede { margin-top: 18px; }
.support .actions { margin-top: 28px; }
.machine { display: grid; justify-items: center; gap: 14px; padding: 28px; background: var(--ink); color: #fff; text-align: center; font-size: 15px; }
.coin { background: none; border: 0; padding: 8px; cursor: pointer; }
.coin svg { width: 96px; height: 96px; animation: spin 1.1s steps(6) infinite; }
@keyframes spin { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.12); } }
.coin.in svg { animation: drop .35s steps(6) forwards; }
@keyframes drop { to { transform: translateY(70px) scaleX(.4); opacity: 0; } }
.slot-mouth { width: 120px; height: 44px; display: grid; place-items: center; background: #221c6c; }
.slot-mouth i { width: 16px; height: 30px; background: var(--ink); box-shadow: 0 0 0 2px var(--yolk); }

.continue { text-align: center; }
.continue h2 { font-size: clamp(56px, 11vw, 160px); line-height: 1; text-shadow: 6px 6px 0 var(--ink); }
.continue .actions { justify-content: center; margin-top: 30px; }
footer { padding-block: 36px 44px; font-size: 15px; color: var(--soft); }
footer p + p { margin-top: 8px; }
footer .wrap > p { max-width: 62em; }
html.crt body::after { content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none; background: repeating-linear-gradient(#0000 0 2px, #0003 2px 4px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-run, .blink, .coin svg { animation: none; }
  .ticker { overflow-x: auto; }
}
@media (max-width: 1040px) {
  .hud { flex-wrap: wrap; }
  .hud nav { order: 5; width: 100%; margin: 0; overflow-x: auto; }
  .credit { margin-left: auto; }
  .faq, .controls { grid-template-columns: minmax(0, 1fr); }
  .vs { grid-template-columns: minmax(0, 1fr); }
  .vs-mark { justify-self: center; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .band { padding-block: 60px; }
  .hud { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 8px 12px; }
  .hud { position: static; }
  html { scroll-padding-top: 12px; }
  .free { order: 4; }
  .credit { order: 3; margin-left: auto; }
  .hero-row, .support { grid-template-columns: minmax(0, 1fr); }
  h1 { text-shadow: 4px 4px 0 var(--ink); }
  .lede { font-size: 19px; }
  .actions .button { flex: 1 1 100%; }
  .game { height: 220px; }
  .game-hud { padding-left: 16px; padding-right: 16px; font-size: 15px; }
  .map { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .rail { height: auto; margin: 0; border-bottom: 0; border-right: var(--px) dashed var(--ink); }
  .walker { bottom: auto; left: 0; top: calc(var(--p, 0) * (100% - 56px)); }
  .stages { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 36px; }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .slots { grid-template-columns: minmax(0, 1fr); }
  .slot, .slot.wide { grid-column: auto; }
  .picker > label { flex: 1 1 130px; }
  .items { grid-template-columns: minmax(0, 1fr); }
  .phone { padding: 10px 12px; border-radius: 22px; }
  .dialogue details p { padding-left: 18px; }
}
