:root{color-scheme:dark;font:15px/1.5 system-ui,sans-serif;background:#080d17;color:#e9f0f8}
*{box-sizing:border-box}body{margin:0}header,main{max-width:1240px;margin:auto;padding:18px 24px}
header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #253447}
header strong{letter-spacing:.12em;font-size:19px}header span{display:block;color:#a4b6c9;font-size:13px}
.brand{display:flex;align-items:center;gap:18px}.brand-badge{flex:none;padding:9px 12px;background:#f4f1e6;border:1px solid #ddd9cb;border-radius:2px}.brand-badge img{display:block;width:52px;height:auto}
button{font:inherit;font-weight:600;border:1px solid #41516a;border-radius:5px;color:#edf5ff;background:#17263c;padding:10px 18px;cursor:pointer}
button:hover:enabled{background:#263e5e}button:focus-visible,canvas:focus-visible{outline:3px solid #70d7ff;outline-offset:3px}
button:disabled{opacity:.45;cursor:wait}#start{background:#b6eb74;color:#101c10;border-color:#b6eb74}
#stage{position:relative;min-height:450px;background:#030713;border:1px solid #253447;border-radius:6px;overflow:hidden}
body.playing #stage{width:min(100%,calc((100dvh - 225px)*var(--game-ratio,1.777778)));min-height:0;margin-inline:auto}
body.playing #stage:fullscreen{width:100vw;height:100vh}
canvas{display:block;width:100%;height:auto;aspect-ratio:var(--game-aspect,16 / 9);outline:none}
#stage:fullscreen{border:0;border-radius:0;display:flex;align-items:center;justify-content:center;background:black}
#stage:fullscreen canvas{width:100%;height:100%;max-width:100vw;max-height:100vh;object-fit:contain}
body:not(.playing) #canvas{display:none}
#launch{position:relative;display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:32px;align-items:center;min-height:560px;padding:clamp(24px,4vw,56px);background:#0b1525}
.launch-copy{min-width:0}.launch-mascot{display:block;width:100%;max-width:350px;height:auto;justify-self:center;pointer-events:none}
#launch[hidden]{display:none}h1{font-size:clamp(28px,4vw,50px);line-height:1.12;margin:16px 0 26px;letter-spacing:-.035em}
.eyebrow{color:#b6eb74;font-size:12px;letter-spacing:.16em}.actions{display:flex;gap:12px;margin:24px 0 12px}
progress{width:min(420px,90%);height:7px;accent-color:#b6eb74}#status{min-height:24px;color:#c9d9ec}.note{font-size:12px;color:#97aac2}
footer{display:flex;justify-content:space-between;gap:20px;align-items:center;font-size:13px;color:#b7c7db}#storage{color:#a5ce9a}
.original-game-link{color:#b7c7db;text-underline-offset:3px}.original-game-link span{font-size:11px;color:#97aac2}.original-game-link:hover{color:#fff}.original-game-link:focus-visible{outline:3px solid #70d7ff;outline-offset:4px}
.controls{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:20px 0;color:#b7c7db;font-size:13px}.controls h2{margin:0 0 6px;font-size:15px;color:#e9f0f8}.controls h2 span{font-size:12px;font-weight:400;color:#97aac2}.controls p{margin:6px 0}.controls .note{max-width:none}
@media(max-width:650px){.controls{grid-template-columns:1fr;gap:12px}}
#retry-save{padding:4px 9px;margin-left:8px}details{font-size:12px;color:#93a7be;margin-top:20px}pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:200px;overflow:auto}
@media(max-width:650px){header,main{padding:12px}header strong{font-size:16px}footer{display:block}.actions{flex-direction:column}#stage{min-height:480px}.note{max-width:360px}header span{font-size:11px}}

.display-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}select{font:inherit;color:#edf5ff;background:#17263c;border:1px solid #41516a;border-radius:5px;padding:10px}select:focus-visible{outline:3px solid #70d7ff}select:disabled{opacity:.5}header{gap:14px;flex-wrap:wrap}
.save-tools{margin-top:22px;padding:20px 0;border-block:1px solid #253447;display:grid;grid-template-columns:1fr auto;gap:10px 24px;align-items:center}
.save-tools h2{font-size:17px;margin:0 0 5px}.save-tools p{margin:5px 0;font-size:13px;color:#b7c7db}.save-tools .note{font-size:12px;color:#97aac2}.save-actions{display:flex;gap:10px;flex-wrap:wrap}#transfer-status{grid-column:1/-1;color:#b6eb74}
.update-tools{display:flex;gap:14px;align-items:center;margin-top:16px;font-size:12px;color:#97aac2}.update-tools button{font-size:12px;padding:6px 10px}
dialog{background:#0b1525;color:#e9f0f8;border:1px solid #41516a;border-radius:8px;padding:24px;max-width:min(540px,calc(100vw - 24px))}dialog::backdrop{background:#000a}dialog h2{margin-top:0}dialog p{font-size:14px}dialog .actions{margin-bottom:0}#confirm-import{background:#b6eb74;color:#101c10}
@media(max-width:650px){.save-tools{grid-template-columns:1fr}.update-tools{align-items:flex-start;flex-direction:column}}
@media(max-width:650px){.brand{gap:14px}.brand-badge{padding:7px 9px}.brand-badge img{width:40px}}
@media(max-width:760px){#launch{grid-template-columns:1fr;gap:14px;text-align:center;padding:28px 24px}.launch-mascot{grid-row:1;width:128px}.launch-copy .actions{justify-content:center}.launch-copy .note{margin-inline:auto}}
.match-gallery{margin:30px 0 28px}.gallery-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px 24px;flex-wrap:wrap;margin-bottom:14px}.gallery-heading h2{margin:0;font-size:19px;letter-spacing:-.02em}.gallery-heading p{margin:0;font-size:12px;color:#97aac2}.gallery-shots{display:grid;grid-template-columns:1fr 1fr;gap:20px}.gallery-shots figure{margin:0;min-width:0}.gallery-shots a{display:block;border:1px solid #253447;border-radius:4px;overflow:hidden}.gallery-shots a:hover{border-color:#70d7ff}.gallery-shots a:focus-visible{outline:3px solid #70d7ff;outline-offset:4px}.gallery-shots img{display:block;width:100%;height:auto}.gallery-shots figcaption{display:flex;justify-content:space-between;gap:6px 16px;flex-wrap:wrap;padding-top:10px;font-size:13px}.gallery-shots figcaption span{color:#97aac2;font-size:12px}body.playing .match-gallery{display:none}
@media(max-width:650px){.gallery-shots{grid-template-columns:1fr;gap:22px}.gallery-heading{gap:6px}.match-gallery{margin-block:24px}}
