/* Opt-in on this device only. No viewport or user-agent rule enables TV mode. */
html.tv-view #pokerGameScreen {
  height: 100vh;
  height: 100dvh;
  padding: 12px;
  overflow: hidden;
}
html.tv-view #pokerGameScreen .poker-game-shell {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
}
html.tv-view #pokerGameScreen .poker-hud {
  grid-template-columns: 40px repeat(3, minmax(0, 1fr)) auto 40px;
  padding: 6px 10px;
  gap: 6px;
}
html.tv-view #pokerGameScreen .poker-hud > div { min-width: 0; }
html.tv-view #pokerGameScreen .poker-icon-btn { width: 38px; height: 38px; }
html.tv-view #pokerGameScreen .poker-table-wrap { overflow: visible; min-height: 0; }
html.tv-view #pokerGameScreen .poker-rail {
  width: min(94%, 930px, calc(var(--tv-table-height, 280px) * 1.78));
  aspect-ratio: 1.78 / 1;
  padding: 10px;
}
html.tv-view #pokerGameScreen .poker-seat {
  width: 128px;
  gap: 3px;
}
html.tv-view #pokerGameScreen .poker-seat[data-seat="0"] { top: 94%; }
html.tv-view #pokerGameScreen .poker-seat-cards { min-height: 44px; margin-top: 0; }
html.tv-view #pokerGameScreen .poker-seat-cards .playing-card { width: 31px; }
html.tv-view #pokerGameScreen .poker-community { min-height: 54px; gap: 5px; }
html.tv-view #pokerGameScreen .poker-community .playing-card { width: 38px; }
html.tv-view #pokerGameScreen .playing-card .card-rank { font-size: 11px; }
html.tv-view #pokerGameScreen .playing-card .card-suit { font-size: 23px; }
html.tv-view #pokerGameScreen .poker-player-panel { padding: 4px 6px; gap: 5px; }
html.tv-view #pokerGameScreen .poker-avatar { width: 27px; font-size: 11px; }
html.tv-view #pokerGameScreen .poker-player-copy strong { font-size: 12px; }
html.tv-view #pokerGameScreen .poker-player-copy small { font-size: 11px; }
html.tv-view #pokerGameScreen .poker-center { gap: 4px; width: 55%; }
html.tv-view #pokerGameScreen .poker-message { font-size: 12px; }
html.tv-view #pokerGameScreen .poker-controls { padding: 8px; gap: 6px; }
html.tv-view #pokerGameScreen .poker-action { min-height: 40px; }
html.tv-view #pokerGameScreen .poker-raise-panel {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding-top: 6px;
}
html.tv-view #pokerGameScreen .poker-raise-panel .poker-primary-btn {
  min-height: 38px;
  padding: 6px 12px;
  font-size: 13px;
}
html.tv-view #pokerGameScreen button:focus-visible {
  outline: 3px solid #ffe39a;
  outline-offset: 2px;
}
html.tv-view #tvPokerExitDialog > div { width: min(520px, 90vw); }
html.tv-view #tvPokerExitDialog .tv-exit-actions { display: flex; gap: 12px; }
html.tv-view #tvPokerExitDialog button { flex: 1; min-height: 44px; }
html.tv-view #tvPokerExitDialog button:focus-visible { outline: 3px solid #ffe39a; outline-offset: 3px; }

/* Labels containing hidden radio inputs become focusable only in TV mode. */
html.tv-view :is(button, a[href], summary, select, input, textarea, label[data-tv-focusable]):focus {
  outline: 3px solid #ffe39a;
  outline-offset: 3px;
}
html.tv-view label[data-tv-focusable]:focus > span {
  box-shadow: 0 0 0 3px #ffe39a;
}
