:root { color-scheme: dark; }
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; color: #effaf9; background: radial-gradient(circle at 50% -20%, #214d5b 0%, #102c3c 42%, #081823 100%); font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; }
button { font: inherit; }
a { color: #9ff3d5; }
.arcade { width: min(100% - 32px, 760px); margin: auto; padding: 24px 0 32px; }
.page-header, footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.back-link { text-decoration: none; font-size: 14px; font-weight: 800; }
.back-link:hover, footer a:hover { text-decoration: underline; }
.edition, footer span { color: #89b2b5; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.heading { padding: 10px 0 19px; text-align: center; }
.eyebrow { margin: 0 0 4px; color: #ffc777; font-size: 11px; font-weight: 900; letter-spacing: .26em; }
.heading h1 { margin: 0; font-size: clamp(38px, 9vw, 62px); font-weight: 1000; line-height: 1.06; letter-spacing: -.065em; text-shadow: 0 5px 20px #051923; }
.heading h1 span { color: #ffca73; }
.heading > p:last-child { margin: 10px 0 0; color: #bdd9d8; font-size: 13px; }
.game-shell { width: min(100%, 420px); margin: auto; overflow: hidden; border: 2px solid #8fd4c8; border-radius: 17px; background: #b4eced; box-shadow: 0 20px 80px #020d18a8, 0 0 50px #48dacc20; }
.hud { height: 64px; display: flex; align-items: center; justify-content: center; gap: 28px; border-bottom: 2px solid #305d60; color: #132e3c; background: #e2f6e9; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hud > div:not(.hud-divider) { display: flex; align-items: baseline; gap: 8px; }
.hud-label { color: #52797d; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.hud strong { min-width: 30px; font-size: 25px; font-weight: 900; line-height: 1; }
.hud-divider { height: 26px; width: 1px; background: #a3cac5; }
.stage { position: relative; width: 100%; aspect-ratio: 420 / 640; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; cursor: pointer; touch-action: none; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; }
.overlay[hidden] { display: none; }
.intro { background: linear-gradient(180deg, #0c293a2b 0%, #103944d9 45%, #0b2d40ef 100%); }
.intro-card, .result-card { width: 100%; }
.preview-wrap { height: 208px; width: 168px; margin: 0 auto 7px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #fff5c4aa 0%, #fff5c400 65%); }
.preview-wrap img { display: block; width: auto; height: 200px; max-width: 160px; object-fit: contain; transform: scaleX(-1); filter: drop-shadow(0 9px 10px #071e2b99); }
.card-kicker { color: #ffd08c; font: 900 12px ui-monospace, monospace; letter-spacing: .2em; }
.overlay h2 { margin: 8px 0 10px; color: #fff; font-size: 35px; line-height: 1.1; text-shadow: 0 3px 15px #082030; }
.overlay p { margin: 0 auto 22px; color: #e1f5ec; font-size: 13px; line-height: 1.8; }
.main-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 40px; min-width: 208px; padding: 13px 18px; border: 0; border-radius: 8px; color: #173545; background: #ffd078; box-shadow: 0 5px 0 #c2843c; font-weight: 900; cursor: pointer; }
.main-button:hover { background: #ffe1a1; }
.main-button:active { transform: translateY(3px); box-shadow: 0 2px 0 #c2843c; }
.share-button { display: block; margin: 15px auto 0; padding: 8px 12px; border: 1px solid #aad8cb; border-radius: 6px; color: #e1f5ec; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.share-button:hover { color: #173545; background: #e1f5ec; }
.main-button:focus-visible, a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.share-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.result { background: #0c283ddc; }
.result-card { padding: 30px 18px; border: 1px solid #aad8cb; border-radius: 14px; background: #103649ec; box-shadow: 0 20px 50px #051b29ad; }
.result-card h2 { font-size: 40px; }
.result-card p { margin-bottom: 14px; }
.result-card p strong { color: #ffd078; font-size: 28px; }
.result-card .record-message { margin: 0 0 16px; color: #ffd078; font-weight: 900; letter-spacing: .16em; }
.result-card .record-message[hidden] { display: none; }
.game-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 7px 13px; color: #2d585c; background: #e2f6e9; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.game-bottom span:last-child { font-family: ui-monospace, monospace; letter-spacing: .12em; white-space: nowrap; }
.controls-note { text-align: center; color: #9ebfc3; font-size: 11px; line-height: 1.6; }
footer { max-width: 420px; margin: 24px auto 0; font-size: 12px; }
@media (max-width: 460px) { .arcade { width: 100%; padding-top: 15px; } .page-header, footer { margin-inline: 16px; } .game-shell { border-left: 0; border-right: 0; border-radius: 0; } .heading { padding-bottom: 15px; } .heading > p:last-child { padding-inline: 12px; } .controls-note { padding-inline: 14px; } }
