:root{color-scheme:light;font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans",sans-serif;color:#273e53;background:#e7e9e7;-webkit-text-size-adjust:100%}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:#273e53;background:#f3f4f6;border:1px solid #bdcbd0;border-radius:8px;min-height:44px;touch-action:manipulation}button:disabled{opacity:.5}button:focus-visible,a:focus-visible{outline:3px solid #526e84;outline-offset:2px}[hidden]{display:none!important}.shell{max-width:450px;margin:0 auto;height:calc(100svh - var(--nav-height,88px));height:calc(100dvh - var(--nav-height,88px));min-height:330px;padding:1px 2px max(2px,env(safe-area-inset-bottom));display:flex;flex-direction:column}.stage{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;background:#f8faf9;border:1px solid #a5b5bd;border-radius:14px 14px 0 0;overflow:hidden}.hud{display:flex;align-items:center;gap:8px;height:44px;flex-shrink:0;padding-left:9px;background:#eef2f2;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}#lives{margin-left:auto;color:#b44f73;letter-spacing:2px}.hud button{width:44px;border:0;background:transparent}.view{flex:1;min-height:0;overflow:hidden}canvas{width:100%;height:100%;display:block;touch-action:manipulation}.controls{display:flex;align-items:center;gap:8px;padding:5px 8px;min-height:56px;background:#eef2f2}.controls p{flex:1;margin:0;font-size:12px;line-height:1.4}#jump{width:46%;font-weight:700;background:#304d68;color:white;border:0}#jump[data-ready=true]{background:#38695c}.buddy{display:flex;gap:8px;align-items:center;height:62px;flex-shrink:0;padding:3px 8px;background:#e5ecee;border:1px solid #a5b5bd;border-top:0;border-radius:0 0 14px 14px}.buddy img{object-fit:contain;flex-shrink:0}.buddy>div{min-width:0}#name{font-size:10px;color:#526779}#talk{font-size:12px;line-height:1.4;margin:2px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.overlay{position:absolute;inset:0;z-index:3;display:grid;place-items:center;padding:12px;background:#e7edf0e6}.panel{display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px;width:min(100%,310px);max-height:100%;overflow:auto;overscroll-behavior:contain;background:#fffdf8;border:1px solid #b5c4cb;border-radius:12px;box-shadow:0 10px 26px #304d6826}.panel>*{flex-shrink:0}.panel>img{width:120px;height:120px;object-fit:contain}.panel h2{font-size:17px;margin:0}.panel p{font-size:12px;line-height:1.7;margin:0}.panel a{color:#526779;font-size:12px;min-height:44px;display:grid;place-items:center}.panel>button{width:100%;border:0;background:#e8edf0}.panel #play{font-weight:700}.picker{display:flex;gap:10px}.picker button{width:52px;height:52px;padding:2px;background:#e5ecee}.picker img{width:100%;height:100%;object-fit:contain}.picker [aria-pressed=true]{outline:2px solid #526e84;outline-offset:1px}.picker [aria-pressed=true]::after{content:'✓';position:absolute;margin-left:-12px;color:#304d68;background:#fff;font-size:12px}.game-title-accessible{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#record{color:#526779;font-size:11px}@media(max-height:660px){.panel{gap:7px;padding:12px}.panel>img{width:82px;height:82px}.buddy{height:54px}.buddy img{width:48px;height:48px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.panel{box-shadow:none}}

/* The main action stays above optional companion and record details. */
#description{white-space:pre-line;font-size:13px}
#reset{background:transparent;border:1px solid #bdcbd0;font-size:12px}
.overlay[data-mode=pause] .panel>img,.overlay[data-mode=result] .panel>img{width:94px;height:94px}

/* Event feedback shares the existing HUD rather than covering the course. */
.hud-copy{min-width:0;display:flex;flex-direction:column;gap:2px}
#feedback{font-size:10px;line-height:12px;min-height:12px;font-weight:400;color:#526779}
#partner{font-size:12px;color:#526779}
.picker button{position:relative;flex-shrink:0}
.picker [aria-pressed=true]::after{top:-4px;right:-4px;margin:0;width:16px;height:16px;border-radius:50%;border:1px solid #526e84;line-height:14px}
button:active:not(:disabled){filter:brightness(.94)}

/* Preserve touch targets when the available portrait viewport gets shorter. */
.controls{flex-shrink:0}
#jump{flex-shrink:0;min-width:120px;min-height:44px}
.panel>img{max-height:24vh}
@media(max-height:560px){.overlay{padding:8px}.panel{gap:6px;padding:10px}.panel>img,.overlay[data-mode=pause] .panel>img,.overlay[data-mode=result] .panel>img{width:62px;height:62px}.panel h2{font-size:15px}}
