/* game.css - page shell: top strip, the integer-scaled canvas, overlay root, footer. UI lane styles live in css/ui.css. */
:root { --bg: #0b0a08; --fg: #e9e2d0; --gold: #e8c24a; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.4 system-ui, sans-serif; min-height: 100%; }
.tdb-strip { display: flex; gap: 12px; align-items: center; padding: 6px 12px; background: #15120d; border-bottom: 1px solid #2a2418; font-size: 13px; }
.tdb-strip a { color: var(--gold); text-decoration: none; }
.tdb-strip .tdb-brand { font-weight: 700; }
.tdb-strip .tdb-sep { flex: 1; }
#game { position: relative; display: flex; justify-content: center; align-items: center; width: 100%; height: calc(100vh - 120px); min-height: 270px; touch-action: none; user-select: none; -webkit-user-select: none; }
#world { image-rendering: auto; background: #000; display: block; }   /* HD canvas: backing store at display size, smoothing on */
#overlay { position: absolute; inset: 0; pointer-events: none; }
#overlay > * { pointer-events: auto; }
.fcp { padding: 8px 16px 16px; max-width: 900px; margin: 0 auto; font-size: 12px; color: #9a927f; }
.fcp a { color: var(--gold); }
.fcp .build { margin: 4px 0 0; opacity: 0.6; }
@media (max-width: 640px) { #game { height: calc(100vh - 150px); } .fcp { padding: 8px 16px 16px; } }

/* phone in landscape (or any very short window): the canvas takes the whole window height, page chrome gets out of the way */
@media (max-height: 480px) { #game { height: 100vh; min-height: 0; } .tdb-strip, .fcp { display: none; } body { overflow: hidden; } }

/* phone in portrait: the picture sits directly under the page strip and the space below it belongs to the hotbar and touch buttons */
@media (max-width: 640px) and (orientation: portrait) { #game { align-items: flex-start; padding-top: 118px; box-sizing: border-box; } }
#sheet-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 8, 12, 0.88); color: #e8dcc0; font: 600 20px/1 system-ui, sans-serif; letter-spacing: 0.08em; z-index: 40; }   /* above the HUD, the teaching sign (6), screens (10) and toasts (30): nothing draws over the loading card */
#sheet-loading[hidden] { display: none; }

/* desktop: the page is exactly one window tall (strip + canvas area + footer), so 1920x1080 and every other desktop size shows no scrollbar; the canvas area takes what the strip and footer leave */
@media (min-width: 641px) and (min-height: 481px) {
  html, body { height: 100%; overflow: hidden; }
  body { display: flex; flex-direction: column; }
  .tdb-strip, .fcp { flex: none; }
  #game { flex: 1 1 0; height: auto; min-height: 270px; }
}
