/* ── Viewer page (viewer.html) ── */

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-body);
  font-family: 'Segoe UI', sans-serif;
}

/* ── Game Screen layout ── */
#game-screen {
  display: none;
  width: 100vw;
  height: 100vh;
  grid-template-columns: 1fr 34%;
}
#game-screen.active { display: grid; }

/* TV-friendly join sizing (overrides components clamp defaults) */
@media (min-height: 500px) {
  #join-screen { gap: 2.5vh; }
  #join-screen h1 {
    font-size: clamp(2rem, 6vh, 5rem);
    letter-spacing: 8px;
  }
  #join-screen p { font-size: clamp(12px, 1.8vh, 18px); }
  #code-input {
    font-size: clamp(1.8rem, 4.5vh, 3.5rem);
    padding: 1vh 3vw;
    width: clamp(200px, 38vw, 300px);
    border-radius: 12px;
  }
  #join-btn {
    font-size: clamp(13px, 1.8vh, 18px);
    padding: clamp(10px, 1.4vh, 16px) clamp(28px, 5vw, 56px);
    width: auto;
  }
  #join-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
  #join-status { font-size: clamp(11px, 1.4vh, 15px); min-height: 1.5em; }
}

/* ════════════════════════════
   MOBILE / PORTRAIT LAYOUT
════════════════════════════ */
@media (orientation: portrait) {
  #game-screen.active {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
  }

  #panel {
    order: -1;
    max-height: 52vh;
    overflow-y: auto;
    border-left: none;
    border-bottom: 2px solid var(--border-primary);
    padding: 1.5vh 5vw;
  }

  #board-wrap { padding: 1vh 2vw; }

  #panel h1, #hero-wrap, .divider, #last-called, #call-count, #game-type-wrap {
    margin-bottom: 0.6vh;
  }

  #room-info { padding-top: 0.6vh; }
}