/* Tricky Quest: In Range: 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; right: 3vw; bottom: 25vh; z-index: 6; }
.atr .atr-title { font-family: var(--display); }
.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-rows: auto auto auto minmax(0, 1fr) auto auto; gap: 1.8vh; padding: 2.6vh 3vw; }
.t-head { display: flex; align-items: center; gap: 2.5vw; }
.t-head h1 { font-size: 5vh; }
.t-head .ladder { gap: .8vw; font-size: 3vh; } .t-head .rung { padding: .4vh 1vw; gap: .4vw; }
.t-hearts { margin-left: auto; font-size: 4vh; } .t-hearts .hearts { gap: .6vw; }
.t-code { font: 700 4vh var(--display); letter-spacing: .5vh; color: var(--dim); }
.t-mon { display: flex; align-items: center; gap: 2vw; background: #0006; border-radius: 2vh; padding: 1.2vh 2vw; }
.t-mon .mon { font-size: 3.4vh; gap: 1.4vw; flex-wrap: nowrap; } .t-mon .mon-hp { gap: .6vw; } .t-mon .mon-hp i { width: 3.2vh; height: 3.2vh; border-width: .3vh; }
.t-say { margin-left: auto; color: var(--dim); font-size: 2.5vh; text-align: right; }
.t-meters { display: grid; gap: 1.4vh; font-size: 3vh; }
.t-meters .m-track { height: 4.4vh; border-radius: 2.2vh; } .t-meters .m-fill { top: .8vh; bottom: .8vh; border-radius: 0 1.6vh 1.6vh 0; }
.t-meters .meter.side .m-track { height: 2.6vh; } .t-meters .meter.side .m-fill { top: .5vh; bottom: .5vh; }
.t-meters .m-band { border-width: .4vh; }
.t-trick { display: grid; align-content: center; min-height: 0; font-size: 3.7vh; padding-top: 1vh; }
.t-trick .trick { gap: 2vw; } .t-trick .play { gap: .6vh; } .t-trick .play-name { font-size: .5em; max-width: 9em; } .t-trick .tag { font-size: .42em; padding: .3vh .8vw; } .t-trick .play-tags { min-height: 3vh; gap: .4vw; }
.t-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2vw; min-height: 9vh; }
.t-feed { font-size: 2.3vh; color: var(--dim); display: grid; gap: .3vh; } .t-feed div:last-of-type { color: var(--ink); }
.t-changes { font-size: 2.2vh; color: var(--storm); text-align: right; }
.t-seats { display: flex; justify-content: center; gap: 1.4vw; }
.t-seat { position: relative; min-width: 15vw; background: #0006; border: .4vh solid var(--line); border-radius: 2vh; padding: 1.2vh 1.2vw; display: grid; gap: .6vh; justify-items: center; }
.t-seat.up { border-color: var(--amber); background: #ffb84a1c; transform: translateY(-.8vh); }
.t-name { font-size: 2.8vh; font-weight: 800; white-space: nowrap; }
.t-name .bot, .t-name .off { font-size: 1.7vh; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: .2vh .6vw; border-radius: 99px; background: var(--night3); color: var(--dim); margin-right: .6vw; vertical-align: middle; }
.t-hero { font-size: 2.1vh; color: var(--dim); white-space: nowrap; } .t-pow i { width: 1.2vh; height: 1.2vh; margin-left: .3vw; }
.t-cards { display: flex; gap: .4vw; min-height: 4.4vh; align-items: center; }
.t-cards i { width: 3vh; height: 4.4vh; border-radius: .6vh; background: repeating-linear-gradient(45deg, var(--night3) 0 .6vh, var(--line) .6vh 1.2vh); border: .25vh solid var(--line); font-style: normal; }
.t-coin { margin-left: .8vw; color: #ffd27a; font-weight: 800; font-size: 2.2vh; white-space: nowrap; }
.t-tag { position: absolute; top: -1.8vh; right: -.6vw; background: var(--amber); color: var(--inkd); font-size: 1.9vh; font-weight: 800; padding: .2vh .9vw; border-radius: 99px; }
.t-banner { position: fixed; left: 50%; top: 66vh; transform: translateX(-50%); z-index: 8; pointer-events: none; padding: 1.6vh 3.4vw; border-radius: 99px; font: 700 5.4vh var(--display); background: var(--paper); color: var(--inkd); box-shadow: 0 1vh 4vh #000a; animation: bannerin .3s ease-out; white-space: nowrap; }
.t-banner.good { background: var(--good); } .t-banner.bad { background: var(--bad); color: #fff; } .t-banner.meh { background: var(--amber); }
@keyframes bannerin { from { opacity: 0; transform: translate(-50%, -2vh); } to { opacity: 1; transform: translate(-50%, 0); } }
.t-banner.epic { top: 63vh; font-size: 10vh; padding: 2vh 5vw; color: #2a1f0c; background: linear-gradient(100deg, #ffd27a, #fff4d6 45%, #ffb84a); box-shadow: 0 0 0 .8vh #fff4d6aa, 0 0 12vh 3vh #ffb84acc; animation: epicin .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes epicin { from { opacity: 0; transform: translate(-50%, 0) scale(.3) rotate(-4deg); } to { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(0); } }
.tv.epic::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 7; background: radial-gradient(circle at 50% 45%, #ffd27a66, transparent 60%); animation: epicglow 1.5s ease-in-out 3; }
@keyframes epicglow { 50% { opacity: .25; } }
.tv.epic .meter .m-fill { box-shadow: 0 0 3vh #58d68d; }

/* the speaker button (a tap on it is also what lets a browser start the sound) */
.t-snd { flex: none; width: 5.4vh; height: 5.4vh; padding: 0; border-radius: 50%; font-size: 2.6vh; line-height: 1; background: #0006; }
.atr .atr-game .buttons.extras { align-items: center; } .atr .atr-game .t-snd { width: 2.4vw; height: 2.4vw; font-size: 1.1vw; }
.atr .atr-game .tq-introbtn { font-size: 1vw; padding: .35em 1em .35em .4em; gap: .5em; } .atr .atr-game .tq-introbtn .pl { width: 1.5vw; height: 1.5vw; }
.atr .atr-game .tq-introbtn .pl::after { left: .58vw; top: .42vw; border-width: .33vw 0 .33vw .52vw; }
/* the endings (tv/ending.ts): a film full screen under a title, over the end screen */
.tq-end { position: fixed; inset: 0; z-index: 2147483000; background: #000; opacity: 0; transition: opacity .6s ease-out; cursor: pointer; }
.tq-end.on { opacity: 1; } .tq-end.out { opacity: 0; transition: opacity .6s ease-in; }
.tq-end video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tq-end::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70vw 40vh at 50% 100%, #000c, transparent 70%); pointer-events: none; }
.tq-end .title { position: absolute; z-index: 2; left: 0; right: 0; bottom: 9vh; text-align: center; opacity: 0; transform: translateY(3vh); transition: opacity 1.2s ease-out, transform 1.2s ease-out; }
.tq-end.titled .title { opacity: 1; transform: none; }
.tq-end .title b { display: block; font: 700 8vw/1 var(--display); letter-spacing: .04em; }
.tq-end .title span { display: block; margin-top: 1.6vh; font: 600 2.2vw var(--body); color: #f2f0e6; text-shadow: 0 0 1vw #000; }
.tq-end.win .title b { color: var(--amber); text-shadow: 0 0 2vw #ffb84a, 0 0 5vw #e08a1c; }
.tq-end.lose .title b { color: var(--bad); text-shadow: 0 0 2vw #ff6b6b, 0 0 5vw #800; }
.tq-end .skip { position: absolute; z-index: 2; right: 2.4vw; top: 2.4vh; font: 700 1.1vw var(--body); letter-spacing: .2em; color: #ffffff73; text-transform: uppercase; }
