* { box-sizing: border-box; }
:root { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif; background: #fff; color: #2a2328; }
body { margin: 0; }
button { font: inherit; border: 0; border-radius: 8px; background: #f3f4f6; color: #2a2328; min-height: 44px; padding: 10px 18px; touch-action: manipulation; }
button:disabled { opacity: .4; }
button:focus-visible { outline: 3px solid #3b8596; outline-offset: 2px; }
[hidden] { display: none !important; }
main { max-width: 450px; margin: auto; height: calc(100dvh - var(--nav-height, 64px)); min-height: 400px; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #10283d; }
canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.hud { position: absolute; inset: 0 0 auto; height: 52px; display: flex; align-items: center; gap: 12px; padding: 4px 8px 4px 12px; background: #fff; pointer-events: none; font-variant-numeric: tabular-nums; font-size: 13px; }
.hud strong { margin-right: auto; font-size: 18px; }
.hud button { pointer-events: auto; min-width: 44px; padding: 4px; }
#life { color: #b24a4a; letter-spacing: 2px; }
#overlay { position: absolute; inset: 0; display: grid; place-items: center; background: #08122170; padding: 16px; }
.panel { max-width: 330px; width: 100%; padding: 20px; background: #fff; border-radius: 12px; text-align: center; max-height: 100%; overflow: auto; }
.panel img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.panel .name { font-size: 12px; margin: 4px 0 12px; color: #6e626a; }
h2 { font-size: 20px; margin: 0 0 12px; }
p { font-size: 14px; line-height: 1.6; margin: 12px 0; }
#summary, #scoring { white-space: pre-line; }
#play { width: 100%; font-weight: 700; margin-top: 4px; }
#best { font-size: 13px; color: #6e626a; }
.small { font-size: 12px; color: #6e626a; margin: 12px 0 0; }
.buddy { min-height: 68px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff; }
.buddy img { border-radius: 8px; object-fit: cover; width: 48px; height: 48px; }
.buddy-copy { min-width: 0; }
.buddy-name { font-size: 11px; color: #6e626a; }
.buddy p { font-size: 13px; margin: 2px 0 0; line-height: 1.45; }
@media (max-height: 650px) { .panel { padding: 16px; } .panel .name { margin-bottom: 8px; } h2 { font-size: 19px; margin-bottom: 8px; } .panel p { margin: 8px 0; } }
