.game-header{background:#27476e;color:#efe6d2;padding:.75rem 1rem;display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:.9rem}
.game-header a{color:#efe6d2;text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.game-tag{opacity:.8;font-size:.8rem}
.game-title p{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:#c8402a;font-weight:800}
.game-title h1{font-family:Georgia,"Times New Roman",serif;font-size:1.3rem;margin-bottom:.5rem}
.stage{position:relative;width:100%;border:3px solid #1f2a3a;border-radius:6px;overflow:hidden;background:#efe6d2;box-shadow:4px 4px 0 rgba(31,42,58,.35);touch-action:none;-webkit-user-select:none;user-select:none}
#cv{display:block;touch-action:none;-webkit-tap-highlight-color:transparent;outline:none}
.ov{position:absolute;left:0;right:0;bottom:0;top:200px;background:#efe6d2;border-top:3px solid #c8402a;padding:.75rem .9rem;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem;touch-action:manipulation}
.ov[hidden]{display:none}
.ov h2{font-family:Georgia,serif;font-size:1.35rem;text-align:center}
.lede{font-size:.88rem;line-height:1.35;text-align:center}
.row{display:flex;gap:.5rem}
.btn{font:inherit;font-weight:700;font-size:.9rem;min-height:48px;padding:.4rem .8rem;border:2px solid #1f2a3a;border-radius:6px;background:#f5ead0;color:#1f2a3a;box-shadow:0 3px 0 #1f2a3a;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;flex:1}
.btn:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #1f2a3a}
.btn:focus-visible,.chip:focus-visible{outline:3px solid #c8402a;outline-offset:2px}
.btn.primary{background:#c8402a;color:#f5ead0}
.btn:disabled{opacity:.45;cursor:default}
.stat{text-align:center;font-size:.84rem;font-weight:600;min-height:1.1em}
.meta{font-weight:500;font-size:.78rem;opacity:.85;line-height:1.35}
.lab{font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;font-weight:800;text-align:center;opacity:.7}
.chips{display:grid;grid-template-columns:repeat(4,1fr);gap:.3rem}
.chip{font:inherit;font-size:.68rem;padding:0 .1rem;font-weight:700;min-height:44px;border:2px solid #1f2a3a;border-radius:6px;background:#f5ead0;color:#1f2a3a;cursor:pointer;touch-action:manipulation}
.chip.on{background:#27476e;color:#efe6d2}
.chip:disabled{opacity:.45;cursor:default}
.res{display:grid;grid-template-columns:repeat(4,1fr);gap:.3rem}
.res div{background:#f5ead0;border:2px solid #1f2a3a;border-radius:6px;padding:.3rem .5rem;text-align:center}
.res dt{font-size:.6rem;letter-spacing:.08em;text-transform:uppercase;font-weight:800;opacity:.7}
.res dd{font-family:Georgia,serif;font-size:1.05rem;font-weight:800}
.controls{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem;margin-top:.7rem}
.controls .btn{font-size:.72rem;padding:.3rem .2rem;line-height:1.15}
.fine{font-size:.74rem;line-height:1.4;margin-top:.7rem;opacity:.8}
.foot{text-align:center;font-size:.8rem;padding:1rem;opacity:.8}
.foot a{color:inherit;display:inline-block;min-height:44px;line-height:44px;padding:0 .2rem}
@media (prefers-reduced-motion:reduce){.btn:active:not(:disabled){transform:none}}
@supports (padding:max(0px)){.game-header{padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(1rem,env(safe-area-inset-right))}.game-wrap{padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(1rem,env(safe-area-inset-right))}}
/* Full screen (shell: html.pip-native / html.pip-immersive). The stage is .game-wrap. */
html.pip-immersive .game-wrap,html.pip-native .game-wrap{display:flex;flex-direction:column;gap:.4rem;max-width:none;padding:.4rem max(.5rem,env(safe-area-inset-right)) max(.4rem,env(safe-area-inset-bottom)) max(.5rem,env(safe-area-inset-left));overflow:hidden}
html.pip-native .game-wrap{height:100%}
html.pip-immersive .game-title,html.pip-immersive .fine,html.pip-immersive .ad-well,html.pip-immersive .foot,html.pip-native .fine{display:none}
html.pip-immersive #stage,html.pip-native #stage{flex:1 1 auto;min-height:0;width:auto;box-shadow:none}
html.pip-immersive #cv,html.pip-native #cv{position:absolute;left:0;top:0}
html.pip-immersive .controls,html.pip-native .controls{margin-top:0;flex:none}
html.pip-immersive .controls .btn,html.pip-native .controls .btn{min-height:48px}
@media (orientation:landscape) and (max-height:520px){
html.pip-immersive .game-wrap,html.pip-native .game-wrap{flex-direction:row;align-items:stretch}
html.pip-immersive .controls,html.pip-native .controls{grid-template-columns:1fr;width:132px;align-content:center;gap:.35rem}
html.pip-immersive .ov,html.pip-native .ov{padding:.4rem .6rem;gap:.3rem}
html.pip-immersive .chips,html.pip-native .chips{display:none}
html.pip-immersive .lab,html.pip-native .lab{display:none}
}
