*{box-sizing:border-box;margin:0;padding:0}
html,body{background:#2A0F14;color:#F3E6C8}
body{font-family:ui-rounded,"Trebuchet MS",system-ui,sans-serif;padding-bottom:env(safe-area-inset-bottom)}
.game-header{background:#1a0b10;padding:.75rem 1rem;padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(1rem,env(safe-area-inset-right));display:flex;justify-content:space-between;align-items:center;border-bottom:3px solid #E8A93A}
.game-header a{color:#E8A93A;text-decoration:none;font-weight:700;min-height:44px;display:inline-flex;align-items:center}
.game-tag{font-size:.8rem;color:#F3E6C8aa;opacity:.7}
.game-title{text-align:center;margin-bottom:.5rem}
.game-title h1{font-size:1.5rem;font-weight:800;letter-spacing:.02em}
.cc-hud{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:8px}
.cc-hud div{background:#1a0b10;border-bottom:3px solid #5a1a24;padding:6px 4px;text-align:center}
.cc-hud span{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.08em;opacity:.65}
.cc-hud b{font-size:1.05rem;font-variant-numeric:tabular-nums}
.cc-stage{position:relative;width:100%;background:#0f2b2e;border:3px solid #1a0b10;box-shadow:5px 6px 0 #1a0b10;overflow:hidden}
#cc-canvas{display:block;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;cursor:pointer;min-height:340px;width:100%}
.cc-overlay{position:absolute;inset:0;background:rgba(26,11,16,.9);display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:12px;padding:20px;text-align:center}
.cc-overlay[hidden]{display:none}
.cc-overlay h2{font-size:1.7rem;color:#E8A93A}
.cc-overlay p{line-height:1.45}
.cc-fine{font-size:.82rem;opacity:.75}
.cc-big{font-size:2rem;font-weight:800;color:#E8A93A}
.cc-rec{color:#2f8f83;font-weight:800}
.cc-btn,.cc-small,.cc-next{font:inherit;font-weight:800;color:#1a0b10;background:#E8A93A;border:3px solid #1a0b10;box-shadow:3px 4px 0 #1a0b10;min-height:48px;padding:10px 16px;cursor:pointer}
.cc-btn.alt{background:#F3E6C8}
.cc-btn:active,.cc-small:active,.cc-next:active{transform:translate(2px,3px);box-shadow:1px 1px 0 #1a0b10}
.cc-btn:focus-visible,.cc-small:focus-visible,.cc-next:focus-visible{outline:3px solid #F3E6C8;outline-offset:2px}
.cc-bar{display:flex;gap:8px;margin:12px 0 6px;align-items:stretch}
.cc-small{flex:1;font-size:.85rem;background:#F3E6C8}
.cc-small:disabled{opacity:.4;box-shadow:none}
.cc-next{flex:2;background:#2f8f83;color:#F3E6C8}
.cc-next[hidden]{display:none}
.cc-status{min-height:1.4em;text-align:center;font-weight:700;color:#E8A93A}
.cc-about{margin-top:14px;font-size:.88rem;line-height:1.5;opacity:.85;display:grid;gap:8px}
.pip-actions{margin-top:14px;text-align:center}
.pip-actions .btn{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;color:#1a0b10;background:#F3E6C8;font-weight:700;text-decoration:none}
footer{text-align:center;padding:16px;font-size:.8rem;opacity:.7}
footer a{color:#E8A93A}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}.cc-btn:active,.cc-small:active,.cc-next:active{transform:none}}
/* full screen: stage fills the shell frame, playfield grows, extras hidden */
html.pip-immersive .game-wrap.pip-stage,html.pip-native .game-wrap.pip-stage,.game-wrap.pip-stage:fullscreen{display:flex;flex-direction:column;gap:6px;max-width:none;overflow:hidden;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right));padding-bottom:max(8px,env(safe-area-inset-bottom))}
html.pip-immersive .cc-about,html.pip-native .cc-about,.cc-stage:fullscreen~.cc-about{display:none}
html.pip-immersive .cc-hud,html.pip-native .cc-hud{margin-bottom:0;flex:none}
html.pip-immersive .cc-stage,html.pip-native .cc-stage{flex:1 1 0;min-height:0;box-shadow:none}
html.pip-immersive #cc-canvas,html.pip-native #cc-canvas{min-height:0}
html.pip-immersive .cc-bar,html.pip-native .cc-bar{margin:0;flex:none}
html.pip-immersive .cc-small,html.pip-immersive .cc-next,html.pip-native .cc-small,html.pip-native .cc-next{min-height:48px}
html.pip-immersive .cc-status,html.pip-native .cc-status{flex:none;min-height:1.2em}
@media (orientation:landscape) and (max-height:520px){
html.pip-immersive .game-wrap.pip-stage,html.pip-native .game-wrap.pip-stage{display:grid;grid-template-columns:minmax(0,1fr) 200px;grid-template-rows:auto 1fr auto auto;column-gap:10px}
html.pip-immersive .cc-stage,html.pip-native .cc-stage{grid-column:1;grid-row:1/5}
html.pip-immersive .cc-hud,html.pip-native .cc-hud{grid-column:2;grid-row:1;grid-template-columns:1fr 1fr}
html.pip-immersive .cc-bar,html.pip-native .cc-bar{grid-column:2;grid-row:2;flex-direction:column;justify-content:flex-end}
html.pip-immersive .cc-status,html.pip-native .cc-status{grid-column:2;grid-row:3}
}
html.pip-native .game-wrap.pip-stage>.game-title,html.pip-native .game-wrap.pip-stage>.pip-actions{display:none}
