/* Blam!: the TV. 1920x1080, read from across the room: everything is sized in vh/vw. */
body.tvpage { overflow: hidden; }
body.tvpage #cs-pres-slot { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1vh; z-index: 6; }
.atr .atr-title { font-family: var(--display); font-style: italic; }
.atr .atr-game { display: flex; flex-direction: column; align-items: center; gap: .8vh; }
.atr .atr-game .opts { display: flex; flex-wrap: wrap; justify-content: center; gap: .5vh 1.2vw; font-size: .95vw; white-space: nowrap; }
.atr .atr-game label { display: inline-flex; align-items: center; gap: .4vw; }
.atr .atr-game select { font-size: .9vw; padding: .15em .3em; }
.atr .atr-game .buttons { display: flex; gap: .7vw; }
.atr .atr-game .buttons button { font-size: 1vw; padding: .35em 1em; }

.tv { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 1.2vh 1.6vw; padding: 1.8vh 2vw 1.6vh; }
.t-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 3vw; }
.t-head h1 { font-size: 6vh; }
.t-move { flex: 1; text-align: center; font: 400 3.6vh var(--display); letter-spacing: .05em; color: var(--ink); }
.t-code { font: 400 3.6vh var(--display); letter-spacing: .5vh; color: var(--dim); }
.t-mid { position: relative; align-self: center; height: 100%; aspect-ratio: 1; max-height: 80vh; }
.t-board { width: 100%; height: 100%; background: var(--bg2); border: .3vh solid var(--line); border-radius: 1.6vh; overflow: hidden; box-shadow: 0 0 8vh #000a; }
.t-col { display: flex; flex-direction: column; justify-content: center; gap: 1.6vh; min-height: 0; }
.t-side { display: grid; align-content: start; gap: .7vh; padding: 1.5vh 1.2vw 1.6vh; border-radius: 2vh; background: #1f1612d9;
  border: .3vh solid var(--line); border-top: .9vh solid var(--c); min-height: 0; overflow: hidden; }
.t-side.up { border-color: var(--c); box-shadow: 0 0 3vh color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 9%, #1f1612); }
.t-who { display: flex; align-items: center; gap: .5vw; font-size: 3.4vh; font-weight: 800; min-width: 0; }
.t-who .t-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-who .t-pyr { width: 3.4vh; height: 3.4vh; }
.t-who .bot, .t-who .off { font-size: 1.5vh; padding: .2vh .6vw; margin: 0; }
.t-state { font: 400 2.5vh var(--display); letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.t-state.on { color: var(--good); } .t-state.warn { color: var(--pop); }
.t-score { display: flex; align-items: center; gap: .8vw; color: var(--c); }
.t-score b { font: 400 10vh/0.95 var(--display); }
.t-score span { font-size: 2.1vh; line-height: 1.2; color: var(--dim); font-weight: 700; }
.t-chest { display: flex; flex-wrap: wrap; gap: .3vh; min-height: 3.4vh; align-content: flex-start; color: var(--dim); font-size: 2vh; }
.t-chest .pyr { width: 3.2vh; height: 3.2vh; }
.t-stash { display: flex; align-items: center; justify-content: space-between; gap: .8vw; padding-top: .8vh; border-top: .2vh solid var(--line); font-size: 2.6vh; }
.t-stash .t-lab { font-size: 1.8vh; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.t-stash .stash { gap: 1vw; }
.t-stash .pyr { width: 3vh; height: 3vh; }
/* four players: two panels a side, so each one is shorter */
.tv.n3 .t-score b, .tv.n4 .t-score b { font-size: 7.5vh; }
.tv.n3 .t-side, .tv.n4 .t-side { gap: .5vh; padding-top: 1.1vh; padding-bottom: 1.2vh; }
.t-feed { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 3vw; align-items: baseline; min-height: 4.2vh; font-size: 2.7vh; padding-bottom: 4.4vh; }
.t-last { color: var(--ink); } .t-wait { color: var(--dim); white-space: nowrap; }

/* the bang: a piece went into a chest */
.t-blam { position: absolute; left: 50%; top: 50%; width: 46vh; height: 34vh; margin: -17vh 0 0 -23vh; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none;
  background: var(--pop); color: #17100d; filter: drop-shadow(0 0 0 #000);
  clip-path: polygon(50% 0, 58% 17%, 72% 4%, 73% 22%, 91% 13%, 85% 31%, 100% 34%, 88% 48%, 100% 62%, 85% 66%, 92% 86%, 74% 79%, 72% 97%, 59% 84%, 50% 100%, 41% 84%, 27% 96%, 26% 79%, 8% 87%, 15% 67%, 0 62%, 12% 48%, 0 34%, 15% 31%, 9% 13%, 27% 22%, 28% 4%, 42% 17%);
  animation: t-blam 1.9s ease-out forwards; }
.t-blam[hidden] { display: none; }
.t-blam span { font: italic 400 9vh/1 var(--display); color: #e0350b; transform: rotate(-5deg); text-shadow: .05em .05em 0 #17100d; }
.t-blam b { font: 800 2.6vh var(--body); margin-top: .6vh; }
@keyframes t-blam { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 12% { transform: scale(1.08) rotate(2deg); opacity: 1; } 20% { transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .t-blam { animation: none; } }
