.tv-game-host { container-type: inline-size; color: #f4ecd8; background: #24182e; }
.tv-game { width: 100%; height: 100%; min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; font-family: var(--font-body, Manrope), Arial, sans-serif; font-size: 14px; background: #24182e; color: #f4ecd8; overflow: hidden; }
.tv-game *, .tv-game *::before, .tv-game *::after { box-sizing: border-box; }
.tv-game button, .tv-game input { font: inherit; }
.tv-game button { min-height: 44px; cursor: pointer; color: inherit; }
.tv-game button:disabled { opacity: .45; cursor: default; }
.tv-game button:focus-visible, .tv-game input:focus-visible, .tv-game canvas:focus-visible { outline: 3px solid #f4ecd8; outline-offset: -4px; }
.tv-game button:focus-visible, .tv-game input:focus-visible { outline-offset: 3px; }
.tv-game-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 26px; border-bottom: 1px solid #574061; }
.tv-game-title { margin: 0; font-size: clamp(20px, 2.5cqw, 28px); line-height: 1.2; font-weight: 700; letter-spacing: -.045em; }
.tv-game-back { flex: 0 0 auto; padding: 8px 0 8px 16px; border: 0; background: transparent; font-size: 14px; font-weight: 600; }
.tv-game-stats { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 8cqw, 90px); padding: 12px 20px 5px; }
.tv-game-stat { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.tv-game-stat span { color: #c7b4d4; font-size: 14px; }
.tv-game-stat strong { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tv-game-board { position: relative; min-height: 0; min-width: 0; margin: 3px 20px; overflow: hidden; }
.tv-game-canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.tv-game-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; text-align: center; background: #24182eee; }
.tv-game-overlay[hidden] { display: none; }
.tv-game-overlay h3 { margin: 0 0 12px; font-size: clamp(24px, 3.4cqw, 36px); line-height: 1.12; font-weight: 700; letter-spacing: -.045em; }
.tv-game-overlay p { max-width: 350px; margin: 0 0 23px; color: #d4c3de; font-size: 15px; line-height: 1.55; }
.tv-game-primary { min-width: 145px; padding: 11px 22px; border: 1px solid #f4ecd8; border-radius: 7px; color: #291c33 !important; background: #f4ecd8; font-weight: 700 !important; }
.tv-game-footer { padding: 6px 26px 15px; }
.tv-game-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; }
.tv-game-button { padding: 8px 17px; border: 1px solid #78568c; border-radius: 6px; background: transparent; font-size: 14px; font-weight: 600; }
.tv-game-slower { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 7px; cursor: pointer; white-space: nowrap; color: #d4c3de; }
.tv-game-slower input { width: 18px; height: 18px; margin: 0; accent-color: #c5a1dd; }
.tv-game-instructions { margin: 8px 0 0; text-align: center; font-size: 14px; line-height: 1.5; color: #c7b4d4; }
.tv-game-touch { display: none; gap: 12px; margin-top: 12px; }
.tv-game-direction { flex: 1; min-height: 50px !important; padding: 10px; border: 1px solid #78568c; border-radius: 8px; background: #3e2b4a; font-weight: 650 !important; touch-action: none; user-select: none; -webkit-user-select: none; }
.tv-game-direction[aria-pressed=true] { background: #78568c; }
.tv-game-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (hover: hover) { .tv-game-back:hover { color: #d2b4e8; } .tv-game-button:hover:not(:disabled) { background: #493157; } .tv-game-primary:hover:not(:disabled) { background: #fff8e7; } }
@media (pointer: coarse) { .tv-game-touch { display: flex; } }
@container (max-width: 600px) {
  .tv-game-header { min-height: 60px; padding: 8px 18px; }
  .tv-game-title { font-size: 23px; }
  .tv-game-stats { justify-content: space-between; gap: 12px; padding: 12px 18px 6px; }
  .tv-game-stat { gap: 7px; }
  .tv-game-stat strong { font-size: 18px; }
  .tv-game-board { margin: 4px 9px; }
  .tv-game-footer { padding: 6px 16px max(14px, env(safe-area-inset-bottom)); }
  .tv-game-controls { gap: 8px; }
  .tv-game-button { padding-inline: 14px; }
  .tv-game-overlay { padding: 20px; }
  .tv-game-overlay h3 { font-size: 28px; }
  .tv-game-overlay p { max-width: 270px; font-size: 15px; }
  .tv-game-touch { display: flex; }
}
@media (max-height: 500px) and (pointer: coarse) {
  .tv-game-header { min-height: 48px; padding-block: 2px; }
  .tv-game-stats { padding-block: 3px; }
  .tv-game-footer { padding-block: 2px; }
  .tv-game-instructions { display: none; }
  .tv-game-touch { position: absolute; inset: auto 20px 8px; margin: 0; pointer-events: none; justify-content: space-between; }
  .tv-game-direction { flex: 0 0 80px; pointer-events: auto; }
  .tv-game-overlay h3 { font-size: 24px; margin-bottom: 8px; }
  .tv-game-overlay p { margin-bottom: 12px; }
}
