body { min-width: 320px; }
.rs-game-nav { display:flex; gap: .8rem; flex-wrap:wrap; align-items:center; padding:.6rem 1rem; background:var(--card); color:var(--text); }
.rs-game-nav a,.rs-game-nav button { color:inherit; font:inherit; }
.rs-game-nav button,.rs-load-failure button { border:1px solid currentColor; border-radius:.4rem; padding:.35rem .7rem; background:transparent; color:inherit; cursor:pointer; }
:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
header { padding:.4rem 1rem; }
.ntg-logo { width:52px; } .ntg-brand { float:left; }
header h1 { font-size:1.25rem; } header .subtitle { display:none; }
main { padding:.65rem 1rem; }
.rs-load-failure { padding:2rem; background:var(--card); color:var(--text); }
.rs-load-failure a { margin-left:1rem; color:inherit; }
.overlay-card { max-height:calc(100dvh - 8rem); overflow-y:auto; }
html[data-theme="light"] { --bg:#f5f4ef; --card:#fff; --text:#202332; --muted:#505367; --accent:#684c00; }
html[data-theme="light"] .rs-game-nav { border-bottom:1px solid #b9b9c1; }
@media (prefers-reduced-motion:reduce) { .rs-game-nav * { transition:none;scroll-behavior:auto; } }

/* Preserve Tim's authored dark game panels inside either site theme. */
#game-wrap, .controls-panel { --bg:#1a1a2e; --card:#2b2b40; --text:#f0f0f5; --muted:#b4b4c8; --accent:#ffd54d; color:var(--text); }
header { background:var(--card); }
header h1 { color:var(--text); background:none; -webkit-text-fill-color:currentColor; }

/* Give the supplied full-screen arena its own remaining-height region. */
body { display:flex; flex-direction:column; }
.rs-game-nav { position:relative; z-index:10; flex:none; }
main { position:relative; flex:1; min-height:0; height:auto; padding:0; width:100%; }
.rs-load-failure { position:relative; z-index:11; }

/* Rotation guidance must not trap players or cover load recovery. */
#bkr-rotate { z-index:9; }
html.bkr-touch[data-rumbler-ready="failed"] #bkr-rotate { display:none; }

/* Navigation occupies its own row, clear of the arena and touch controls. */
.rs-game-nav a,.rs-game-nav button { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; box-sizing:border-box; }
#bkr-top button { width:44px; height:44px; min-width:44px; min-height:44px; }
