:root{color-scheme:light;font-family:system-ui,-apple-system,'Hiragino Kaku Gothic ProN',sans-serif;color:#2a2328;background:white}*{box-sizing:border-box}body{margin:0;height:100svh;height:100dvh;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent}.game-nav-header{flex-shrink:0}[hidden]{display:none!important}button{min-height:44px;font:inherit;color:inherit;background:#f3f4f6;border:1px solid #dedbdf;border-radius:8px;padding:8px 12px;touch-action:manipulation}button:disabled{opacity:.45}.shell{flex:1;min-height:0;width:100%;max-width:450px;margin:auto;padding:4px 8px max(6px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:6px}.stage{position:relative;flex:1;min-height:300px;border:1px solid #e7dfe1;border-radius:12px;overflow:hidden;background:#fcf8f6}.hud{position:absolute;top:5px;left:8px;right:8px;display:flex;align-items:center;gap:10px;font-size:12px;z-index:1}.hud button{margin-left:auto}canvas{width:100%;height:100%;display:block;touch-action:none;user-select:none}.controls{display:flex;gap:8px}.controls button{flex:1;font-weight:700}.companion{display:flex;gap:8px;align-items:center;min-height:60px}.companion img{object-fit:contain}.companion b{font-size:11px;color:#6e626a}.companion p{font-size:13px;line-height:1.5;margin:3px 0;min-height:2.8em}#save{font-size:10px;color:#6e626a;margin:0}.panel{position:absolute;inset:0;background:#fffffff5;display:flex;align-items:center;justify-content:center;z-index:3;padding:16px;overflow:auto}.panel>div{text-align:center;margin:auto;width:100%}.panel h2{font-size:20px}.panel p{font-size:13px;line-height:1.6}.panel img{object-fit:contain}.panel button{width:100%;font-weight:700}#record{color:#6e626a}@media(max-height:700px){.companion img{width:44px;height:44px}.companion{min-height:44px}.panel img{width:72px;height:72px}.panel h2{margin:8px}.panel p{margin:8px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Design review 3: keep touch controls legible on compact portrait phones. */
#flow:not(:disabled){border-color:#8faeb9;background:#edf4f6}button:focus-visible{outline:2px solid #527b8b;outline-offset:2px}.hud{background:#fcf8f6e8;border-radius:8px}.panel img{display:block;margin:0 auto}
