:root{color-scheme:light;font-family:system-ui,-apple-system,'Hiragino Kaku Gothic ProN',sans-serif;color:#2a2328;background:#fff}*{box-sizing:border-box}body{margin:0;min-height:100svh;min-height:100dvh;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent}button{font:inherit;min-height:44px;padding:8px 12px;color:inherit;background:#f3f4f6;border:1px solid #e0dce0;border-radius:8px;touch-action:manipulation}button:disabled{opacity:.45}button:focus-visible,a:focus-visible{outline:3px solid #496d83;outline-offset:-3px}[hidden]{display:none!important}.shell{width:100%;max-width:450px;margin:0 auto;padding:3px 5px max(5px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:4px;height:calc(100svh - 88px);height:calc(100dvh - 88px);min-height:480px}.scoreboard{font-size:11px;flex:none}.score-row{display:grid;grid-template-columns:60px repeat(5,minmax(0,1fr)) 35px;align-items:stretch;gap:2px;margin-bottom:2px}.score-row>span{background:#f3f4f6;border-radius:4px;padding:3px 1px;min-height:34px;text-align:center;display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.score-row small{font-size:9px;color:#6e626a}.score-row .active{box-shadow:inset 0 0 0 2px #496d83;background:#eef0f3}.score-row .who{font-size:10px}.stage{position:relative;flex:1;min-height:270px;background:#e5ecee;border:1px solid #d9dfe3;border-radius:12px;overflow:hidden}canvas{display:block;width:100%;height:100%;position:absolute;inset:0;touch-action:none;user-select:none}.hud{position:absolute;top:5px;left:7px;right:7px;display:flex;align-items:center;gap:6px;font-size:11px;pointer-events:none}.hud b,.hud span{background:#fffdf9e8;padding:6px;border-radius:6px}.hud span{margin-left:auto}.hud button{pointer-events:auto;font-size:12px;padding:6px}.notice{position:absolute;left:10px;right:10px;top:38%;text-align:center;color:#304d68;font-weight:800;font-size:23px;pointer-events:none;text-shadow:0 1px 3px #fff,0 0 7px #fff}.panel{position:absolute;inset:0;display:flex;overflow:auto;overscroll-behavior:contain;background:#f6f4efef;padding:12px}.panel-content{margin:auto;width:100%;text-align:center;display:flex;flex-direction:column;align-items:center;gap:9px}.panel-content>*{flex-shrink:0}.panel img{object-fit:contain}.panel h2{font-size:19px;margin:0}.panel p{font-size:12px;line-height:1.6;margin:0;max-width:340px}.panel button{width:100%}#go{background:#496d83;color:white;border-color:#496d83;font-weight:700}.cast-options{display:flex;gap:7px;width:100%}.cast-options button{flex:1;min-width:0;padding:4px 1px;font-size:10px}.cast-options img{display:block;width:58px;height:58px;max-width:100%;margin:auto}.cast-options button[aria-pressed=true]{border:2px solid #496d83;background:#eef0f3}.companion{display:flex;align-items:center;gap:8px;flex:none;min-height:64px;padding:0 6px}.companion img{object-fit:contain;flex-shrink:0}.companion b{font-size:10px;color:#6e626a}.companion p{margin:2px 0;font-size:12px;line-height:1.4}#hint{font-size:12px;text-align:center;margin:0;line-height:1.5}#save-note{font-size:10px;color:#6e626a;margin:0;line-height:1.4}#record{color:#6e626a}@media(max-height:680px){.panel-content{gap:6px}.panel-content>img{width:70px;height:70px}.cast-options img{width:42px;height:42px}.companion{min-height:52px}.companion img{width:54px;height:52px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Keep turn feedback below the pin deck and the touch origin unobstructed. */
.notice:empty{display:none}.cast-options button[aria-pressed=true] span::before{content:"✓ ";font-weight:700}.hud b{max-width:57%;line-height:1.4}.hud span{white-space:nowrap}.companion>div{min-width:0}

/* The common header owns its actual height; the lane takes remaining space. */
body{height:100svh;height:100dvh}.game-nav-header{flex-shrink:0}.shell{height:auto;flex:1;min-height:0}.scoreboard,.companion,#hint,#save-note{flex-shrink:0}.stage{min-height:220px}.panel-content{max-width:340px}.panel #record{font-size:11px}.score-row>span:last-child{font-weight:700}
@media(max-height:600px){.stage{min-height:200px}.companion{min-height:46px}.companion img{height:46px;width:48px}.panel-content>img{width:54px;height:54px}}
