:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #0e1512; color: #edf4e9; font-family: system-ui, sans-serif; }
.tanukade-game-shell { height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.game-shell-header { min-height: 48px; display: flex; align-items: center; gap: 18px; padding: 7px 18px; padding-top: max(7px, env(safe-area-inset-top)); background: #17231b; border-bottom: 1px solid #324535; }
.game-shell-header h1 { margin: 0; font-size: clamp(17px, 3vw, 24px); flex: 1; }
.game-shell-home { color: #d6ff62; font-weight: 700; text-decoration: none; }
.game-shell-header button { min-height: 40px; border: 1px solid #78904b; border-radius: 8px; padding: 0 14px; color: #0e1512; background: #d6ff62; font-weight: 700; cursor: pointer; }
.game-shell-header button:focus-visible, .game-shell-home:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.game-shell-save { display: none; margin: 0; padding: 7px 18px; color: #aebbac; font-size: 12px; background: #111b15; }
.game-shell-frame { flex: 1; min-height: 0; display: flex; }
.game-shell-header, .game-shell-save { flex-shrink: 0; }
.game-shell-frame iframe { width: 100%; height: 100%; min-height: 0; flex: 1; border: 0; display: block; background: #0e1512; }
@media (max-width: 600px) { .game-shell-header { gap: 10px; padding-inline: 12px; } .game-shell-home { font-size: 14px; } .game-shell-header h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .game-shell-header button { min-width: 44px; padding-inline: 10px; } .game-shell-save { padding-inline: 12px; } }
html.tanukade-fallback-fullscreen .tanukade-game-shell .game-shell-header { position: absolute; z-index: 2; inset: 0 0 auto; background: transparent; border: 0; pointer-events: none; }
html.tanukade-fallback-fullscreen .tanukade-game-shell .game-shell-header > * { pointer-events: auto; }
html.tanukade-fallback-fullscreen .tanukade-game-shell .game-shell-home,
html.tanukade-fallback-fullscreen .tanukade-game-shell .game-shell-header h1 { display: none; }
html.tanukade-fallback-fullscreen .tanukade-game-shell .game-shell-header button { margin-left: auto; }
html.tanukade-fallback-fullscreen .tanukade-game-shell .game-shell-frame { position: absolute; inset: 0; }

/* Pool owns its exit control inside the game, including Safari's expanded view. */
html.tanukade-pool-maximized .game-shell-header{display:none}
html.tanukade-pool-maximized .game-shell-frame{position:absolute;inset:0}
html.tanukade-pool-maximized #tanukade-chat-launcher{display:none}
@media(max-width:760px),(max-height:520px) and (max-width:1100px){
  .tanukade-pool-shell .game-shell-header{min-height:calc(44px + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left));gap:10px}
  .tanukade-pool-shell .game-shell-header h1{font-size:14px}
  .tanukade-pool-shell .game-shell-home{font-size:12px}
  .tanukade-pool-shell .game-shell-header button{min-height:44px;font-size:11px}
}
