/* TV mode: one full-screen map, everything else floats on it. Big type, read from across a room. */
.tvmode [hidden] { display: none !important; }
body.tvmode { margin: 0; height: 100vh; height: 100dvh; overflow: hidden; background: #05090c; color: var(--ink); transition: filter 2s; }
#tvmap { position: fixed; inset: 0; background: #05090c; }
#windcv { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; transition: opacity 2s; }
.maplibregl-ctrl-attrib { font-size: 10px; background: rgba(5,9,12,.55) !important; color: var(--mute); }
.maplibregl-ctrl-attrib a { color: var(--mute); }
.maplibregl-ctrl-bottom-right { bottom: 226px; }

.tvtop { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: flex-start; gap: 14px; padding: 16px 24px 40px; background: linear-gradient(180deg, rgba(5,9,12,.82), rgba(5,9,12,0)); pointer-events: none; }
.tvtop a { pointer-events: auto; }
.tvhome { display: flex; flex: none; }
.tvmode-badge { font: 800 24px/44px var(--head); letter-spacing: .12em; text-transform: uppercase; padding: 0 16px; border-radius: 6px; background: rgba(5,9,12,.7); color: var(--mute); border: 1px solid var(--line); }
.tvmode-badge.active { color: #0b1115; background: var(--watch); border-color: var(--watch); }
.tvmode-badge.breaking { color: #fff; background: #d81f26; border-color: #d81f26; animation: badge 1.4s ease-in-out infinite; }
@keyframes badge { 50% { background: #7e1014; border-color: #7e1014; } }
.tvlevel { font: 700 22px/44px var(--head); letter-spacing: .04em; padding: 0 12px; }
.tvnow { margin-left: auto; text-align: right; line-height: 1; min-width: 0; }
.tvclock { font: 800 60px/1 var(--head); letter-spacing: .03em; text-shadow: 0 2px 10px #000; }
.tvcond { font: 500 19px/1.3 var(--body); color: var(--ink); margin-top: 4px; text-shadow: 0 1px 6px #000; }
.tvcond b { font-weight: 600; }
.tvplaces { margin-top: 6px; font: 600 18px/1.3 var(--body); text-shadow: 0 1px 6px #000; }
.tvplaces a { color: var(--ink); text-decoration: none; display: block; pointer-events: auto; }
.tvplaces .hit { color: var(--watch); }

/* What the anchor is saying. */
/* Three areas: the topic bar, what is being said, and what is next. */
.tvlower { position: fixed; left: 0; right: 0; bottom: 56px; z-index: 5; display: flex; align-items: stretch; pointer-events: none; }
.tvsay { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tvhead { box-sizing: border-box; height: 62px; overflow: hidden; white-space: nowrap; display: flex; align-items: center; gap: 4px 14px; padding: 0 24px; background: #16303c; border-top: 3px solid var(--accent); }
.tvhead b { font: 800 38px/1.05 var(--head); letter-spacing: .02em; text-transform: uppercase; }
.tvhead span { font: 600 21px/1.15 var(--head); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.tvline { box-sizing: border-box; height: calc(2.56em + 22px); overflow: hidden; display: flex; align-items: center; font: 500 30px/1.28 var(--body); padding: 0 24px; background: rgba(5,9,12,.95); }
.tvbars { display: flex; align-items: center; gap: 4px; flex: none; padding: 0 2px 0 22px; background: rgba(5,9,12,.95); border-top: 3px solid var(--accent); }
.tvbars i { width: 6px; height: 8px; border-radius: 3px; background: var(--accent); transition: height .08s; }

/* Clocks: how long a warning has, town by town. */
.tvcard { position: fixed; left: 24px; top: 96px; z-index: 5; width: min(420px, calc(100vw - 48px)); background: rgba(5,9,12,.86); border-left: 10px solid var(--c, var(--accent)); border-radius: 8px; padding: 12px 16px; }
.tvcard h3 { font: 800 26px/1.05 var(--head); letter-spacing: .03em; text-transform: uppercase; margin: 0; }
.tvcard .left { font: 800 64px/1 var(--head); font-variant-numeric: tabular-nums; margin: 4px 0 0; }
.tvcard .lbl { font: 600 16px var(--body); color: var(--mute); }
.tvcard ul { list-style: none; margin: 10px 0 0; padding: 0; }
.tvcard li { display: flex; justify-content: space-between; gap: 12px; font: 600 24px/1.3 var(--body); border-top: 1px solid var(--line); padding: 4px 0; }
.tvcard li b { font: 800 28px/1.1 var(--head); font-variant-numeric: tabular-nums; }
.tvcard .note { font: 500 14px/1.3 var(--body); color: var(--mute); margin: 8px 0 0; }

.tvgrid { position: fixed; right: 24px; top: 200px; z-index: 5; width: min(340px, calc(100vw - 48px)); background: rgba(5,9,12,.86); border-radius: 8px; padding: 12px 16px; }
.tvgrid h3 { font: 800 24px var(--head); text-transform: uppercase; margin: 0; letter-spacing: .03em; }
.tvgrid .big { font: 800 52px/1.05 var(--head); }
.tvgrid p { font: 500 16px/1.35 var(--body); margin: 4px 0 0; color: var(--mute); }

.tvmodel { position: fixed; left: 24px; top: 96px; z-index: 5; background: rgba(5,9,12,.86); border-left: 10px solid var(--accent); border-radius: 8px; padding: 10px 16px; }
.tvmodel b { font: 800 56px/1 var(--head); display: block; text-transform: uppercase; }
.tvmodel .warn { font: 800 22px/1.2 var(--head); color: var(--accent); letter-spacing: .04em; }
.tvmodel .lbl { font: 500 15px var(--body); color: var(--mute); }

/* Live station, only while a Texas station is on the air with hazard coverage during Breaking. */
.tvpip { position: fixed; right: 24px; bottom: 250px; z-index: 5; width: min(420px, 34vw); border-radius: 8px; overflow: hidden; background: #000; box-shadow: 0 8px 30px rgba(0,0,0,.6); }
.tvpip iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.tvpip div { font: 700 16px/1.4 var(--head); letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; background: #0b1115; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvpip .rdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #d81f26; margin-right: 6px; }

.tvtap { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 6; font: 800 44px var(--head); letter-spacing: .06em; text-transform: uppercase; color: #0b1115; background: var(--accent); border: 0; border-radius: 12px; padding: 22px 48px; cursor: pointer; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.tvbtns { position: fixed; right: 24px; top: 104px; z-index: 6; display: flex; gap: 6px; transition: opacity .6s; }
.tvbtns .btn { margin: 0; padding: 7px 12px; font-size: 15px; background: rgba(5,9,12,.75); }
.tvbtns #full, .tvbtns #update { background: var(--accent); }
body.tvmode.idle { cursor: none; }
body.idle .tvbtns { opacity: 0; pointer-events: none; }

.town { font: 700 15px/1 var(--body); color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000; display: flex; align-items: center; gap: 5px; white-space: nowrap; pointer-events: none; }
.town::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px #000; flex: none; }
.regname { font: 800 22px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; pointer-events: none; color: #fff; opacity: 0; text-shadow: 0 2px 10px #000, 0 0 2px #000; transition: opacity 1.2s, font-size 1.2s; }
.regname.on { opacity: .95; font-size: 54px; color: #ffe9b8; transition-delay: 1.5s; text-shadow: 0 0 22px rgba(255,190,90,.65), 0 2px 10px #000; }
body.temps .town:not(.temp):not(.hit) { display: none; }
.town.temp b { color: #ffd27a; font-weight: 800; }
.town.hit { font-size: 19px; color: #ffd27a; }
.town.hit::before { width: 11px; height: 11px; background: #f25c24; animation: beat 1.4s ease-out infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(242,92,36,.8); } 100% { box-shadow: 0 0 0 16px rgba(242,92,36,0); } }

.rep { padding: 4px 9px; border-radius: 6px; white-space: nowrap; font: 800 17px/1 var(--head); letter-spacing: .03em; color: #0b1115; background: #e4b840; box-shadow: 0 0 0 2px #0b1115, 0 2px 8px #000; animation: drop .7s cubic-bezier(.3,1.5,.5,1); }
.repH { background: #7fd4ff; } .repW { background: #e4b840; } .repT { background: #ff5a5f; color: #fff; } .repF { background: #5fe08a; }
@keyframes drop { from { transform: translateY(-60px) scale(1.6); opacity: 0; } }
.tvweek { position: fixed; left: 24px; top: 96px; z-index: 5; display: flex; gap: 2px; background: rgba(5,9,12,.86); border-radius: 8px; padding: 8px; }
.tvweek div { width: 92px; text-align: center; display: flex; flex-direction: column; }
.tvweek b { font: 800 24px var(--head); text-transform: uppercase; }
.tvweek .hi { font: 800 42px/1.1 var(--head); } .tvweek .lo { font: 600 24px/1.1 var(--head); color: var(--mute); min-height: 26px; } .tvweek .rn { font: 700 19px/1.2 var(--head); color: #7fd4ff; min-height: 23px; }
.tvhead .tvai { font: 500 14px var(--body); letter-spacing: 0; text-transform: none; margin-left: auto; white-space: nowrap; }
.tvnear { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 5; background: #d81f26; color: #fff; font: 800 28px/1.15 var(--head); letter-spacing: .03em; text-transform: uppercase; padding: 8px 18px; border-radius: 8px; text-align: center; max-width: 46vw; }
.tvnear small { display: block; font: 500 13px var(--body); letter-spacing: 0; text-transform: none; }
.tvslam { position: fixed; inset: 0; z-index: 9; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; animation: slamout 2.1s forwards; }
.tvslam b { font: 800 clamp(48px, 11vw, 190px)/.95 var(--head); text-transform: uppercase; color: var(--c, #ff2b2b); animation: slam .35s cubic-bezier(.2,1.4,.4,1); }
.tvslam span { font: 700 clamp(22px, 3.4vw, 56px)/1.15 var(--head); color: #fff; text-transform: uppercase; letter-spacing: .05em; margin-top: 14px; }
@keyframes slam { from { transform: scale(2.4); opacity: 0; } }
@keyframes slamout { 85% { opacity: 1; } 100% { opacity: 0; } }
.tvboard { display: flex; align-items: center; gap: 22px; padding: 8px 16px; } .tvweek .tvboard div { width: auto; } .tvboard .vs { font: 700 22px var(--head); color: var(--mute); } .tvboard b { font-size: 26px; } .tvboard .hi { font-size: 60px; }
.tvlive { font: 800 22px/44px var(--head); letter-spacing: .1em; color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.tvlive i { width: 13px; height: 13px; border-radius: 50%; background: #e5484d; animation: livedot 1.6s ease-in-out infinite; }
@keyframes livedot { 50% { opacity: .35; } }
.tvnext { flex: none; width: 250px; display: flex; flex-direction: column; justify-content: center; padding: 10px 18px; font: 800 27px/1.08 var(--head); letter-spacing: .03em; text-transform: uppercase; color: #fff; background: #2b3d2f; border-top: 3px solid var(--accent); border-left: 1px solid rgba(255,255,255,.14); }
.tvnext span { display: block; font-weight: 700; font-size: 16px; letter-spacing: .12em; color: var(--accent); margin-bottom: 4px; }
.tvticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; background: #0b1115; height: 56px; overflow: hidden; }
.tvticker .lbl { font: 800 20px var(--head); letter-spacing: .1em; text-transform: uppercase; background: var(--accent); color: #0b1115; padding: 0 16px; height: 100%; display: flex; align-items: center; flex: none; }
.tvticker .track { overflow: hidden; white-space: nowrap; flex: 1; }
.tvticker #ticker { display: inline-block; padding-left: 100%; font-size: 24px; animation: tick linear infinite; will-change: transform; }
.tvticker .it + .it::before { content: "\2022"; color: var(--mute); margin: 0 22px; }
.tvticker .sev { display: inline-block; width: 13px; height: 13px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.tvticker .tag { font: 800 16px var(--head); letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; margin-right: 8px; vertical-align: 2px; }
.tvticker .tag.mine { background: var(--accent); color: #0b1115; }
.tvticker .tag.new { border: 1.5px solid var(--accent); color: var(--accent); }
@keyframes tick { to { transform: translateX(-100%); } }

/* Ranked boards for the data features: bars grow in as the anchor reads them. */
.tvrank { position: fixed; right: 24px; top: 150px; z-index: 5; width: min(430px, 36vw); background: rgba(5,9,12,.86); border-top: 4px solid var(--accent); border-radius: 8px; padding: 12px 16px 14px; animation: rankin .6s ease-out; }
.tvrank h3 { font: 800 26px/1.1 var(--head); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 8px; }
.tvrank .row { display: block; margin: 9px 0 0; width: auto; gap: 0; animation: rankin .5s ease-out backwards; }
.tvrank .row div { display: flex; justify-content: space-between; gap: 12px; font: 600 20px/1.15 var(--body); }
.tvrank .row b { font: 800 24px/1 var(--head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tvrank .row i { display: block; height: 7px; margin-top: 4px; border-radius: 4px; background: var(--c, var(--accent)); width: var(--w); transform-origin: left; animation: bargrow 1.1s cubic-bezier(.2,.8,.3,1) backwards; animation-delay: inherit; }
@keyframes rankin { from { transform: translateX(40px); opacity: 0; } }
@keyframes bargrow { from { transform: scaleX(0); } }
/* Real video from space, in a window on the map. */
.tvvid { position: fixed; left: 24px; top: 96px; z-index: 5; width: min(430px, 36vw); margin: 0; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 8px 30px rgba(0,0,0,.7); animation: rankin .6s ease-out; }
.tvvid.big { width: min(62vh, 46vw); left: 50%; top: 84px; margin-left: calc(min(62vh, 46vw) / -2); }
.tvvid.wide { width: min(58vw, 96vh); left: 50%; top: 84px; margin-left: calc(min(58vw, 96vh) / -2); }
.tvvid img { display: block; width: 100%; aspect-ratio: var(--ar, 1.5); object-fit: cover; background: #fff; }
.tvvid video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.tvvid figcaption { font: 600 15px/1.3 var(--body); padding: 6px 10px; background: #0b1115; color: var(--mute); }
/* Title sweep at the start of a feature. Passes over the map and leaves. */
.tvbump { position: fixed; left: 0; right: 0; top: 40%; z-index: 4; pointer-events: none; font: 800 clamp(44px, 8vw, 130px)/1.1 var(--head); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; color: #fff; padding: 6px 40px; background: linear-gradient(90deg, transparent, rgba(5,9,12,.82) 18%, rgba(5,9,12,.82) 82%, transparent); text-align: center; animation: bump 2.6s cubic-bezier(.2,.8,.3,1) forwards; }
.tvbump::before, .tvbump::after { content: ""; position: absolute; left: 12%; right: 12%; height: 3px; background: var(--accent); }
.tvbump::before { top: 0; } .tvbump::after { bottom: 0; }
@keyframes bump { 0% { transform: translateX(-30%); opacity: 0; } 18%, 78% { transform: none; opacity: 1; } 100% { transform: translateX(14%); opacity: 0; } }
.plane-note { font: 500 13px var(--body); color: var(--mute); }

/* Edge glow: the worst condition at your saved places, readable from the corner of your eye. */
.edge { position: fixed; inset: 0; pointer-events: none; z-index: 7; transition: box-shadow 1.5s; }
.edge.watch { box-shadow: inset 0 0 0 6px rgba(228,184,64,.85), inset 0 0 60px 10px rgba(228,184,64,.30); }
.edge.warning { animation: edgepulse 4s ease-in-out infinite; }
.edge.unknown { box-shadow: inset 0 0 0 3px rgba(142,154,160,.35); }
@keyframes edgepulse {
  0%, 100% { box-shadow: inset 0 0 0 8px rgba(229,72,77,.95), inset 0 0 90px 20px rgba(229,72,77,.45); }
  50% { box-shadow: inset 0 0 0 8px rgba(229,72,77,.45), inset 0 0 40px 6px rgba(229,72,77,.15); }
}

/* While you were away */
.away { position: fixed; right: 30px; bottom: 80px; width: min(560px, 90vw); z-index: 8; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.away h3 { font: 800 28px var(--head); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 8px; }
.away li { font-size: 18px; margin: 4px 0; }
.away .mute { font-size: 15px; }
.tvnomap { position: fixed; inset: 30% 24px auto; z-index: 6; text-align: center; font: 600 24px/1.4 var(--body); }

/* Night: dimmed so a dark room stays dark. Lifted while a warning is up. */
body.tvmode.night { filter: brightness(.6); }

/* 4K and big TVs scale up with the screen. */
@media (min-width: 2400px) { html { zoom: 1.6; } }
@media (max-width: 1280px) {
  .tvclock { font-size: 44px; } .tvhead b { font-size: 30px; } .tvhead span { font-size: 18px; } .tvline { font-size: 24px; } .tvnext { width: 200px; font-size: 22px; }
  .tvcard .left { font-size: 52px; } .tvcard li { font-size: 20px; } .tvcard li b { font-size: 24px; }
}
/* Phones: same show, smaller. */
@media (max-width: 760px) {
  .tvtop { padding: 8px 10px 26px; gap: 8px; align-items: center; }
  .tvtop img { height: 28px; width: auto; }
  .tvmode-badge { font-size: 15px; line-height: 28px; padding: 0 8px; }
  .tvlevel, .tvcond, .tvplaces { display: none; }
  .tvclock { font-size: 28px; }
  .tvlower { bottom: 40px; flex-wrap: wrap; }
  .tvsay { flex: 1 1 100%; } .tvhead { height: 40px; padding: 0 12px; } .tvline { padding: 0 12px; }
  .tvbars { display: none; }
  .tvweek { left: 10px; right: 10px; top: 100px; padding: 6px; justify-content: space-between; } .tvweek div { width: auto; flex: 1; } .tvweek b { font-size: 14px; } .tvweek .hi { font-size: 20px; } .tvweek .lo { font-size: 14px; min-height: 16px; } .tvweek .rn { font-size: 12px; min-height: 14px; }
  .tvhead .tvai { display: none; }
  .tvlive { font-size: 14px; line-height: 28px; gap: 5px; padding: 0; } .tvlive i { width: 9px; height: 9px; }
  .tvnext { flex: 1 1 100%; width: auto; flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 8px; border-top: 0; border-left: 0; font-size: 14px; padding: 3px 12px; } .tvnext span { font-size: 11px; margin: 0; }
  .tvnear { top: 46px; left: 10px; right: 10px; transform: none; max-width: none; font-size: 17px; padding: 6px 10px; }
  .tvhead b { font-size: 22px; } .tvhead span { font-size: 14px; }
  .tvline { font-size: 17px; height: calc(3.84em + 14px); }
  .tvticker { height: 40px; } .tvticker .lbl { font-size: 14px; padding: 0 8px; } .tvticker #ticker { font-size: 17px; }
  .tvcard, .tvmodel { left: 10px; top: 56px; width: min(250px, calc(100vw - 20px)); padding: 8px 10px; border-left-width: 6px; }
  .tvcard h3 { font-size: 18px; } .tvcard .left { font-size: 34px; } .tvcard li { font-size: 15px; } .tvcard li b { font-size: 17px; } .tvcard .note { display: none; }
  .tvmodel b { font-size: 30px; } .tvmodel .warn { font-size: 15px; } .tvmodel .lbl { display: none; }
  .tvgrid { right: 10px; top: auto; bottom: 230px; width: 190px; padding: 8px 10px; } .tvgrid .big { font-size: 30px; } .tvgrid h3 { font-size: 16px; } .tvgrid p { font-size: 12px; }
  .tvpip { right: 10px; bottom: 190px; width: 46vw; }
  .tvrank { right: 10px; top: 96px; width: 56vw; padding: 6px 10px 8px; } .tvrank h3 { font-size: 15px; margin-bottom: 2px; } .tvrank .row { margin: 4px 0 0; } .tvrank .row div { font-size: 12px; } .tvrank .row b { font-size: 13px; } .tvrank .row i { height: 4px; margin-top: 2px; } .tvrank .row:nth-child(n+5) { display: none; }
  .tvvid, .tvvid.big, .tvvid.wide { left: 10px; right: 10px; top: 56px; width: auto; margin-left: 0; } .tvvid figcaption { font-size: 10px; padding: 3px 6px; }
  .tvbtns { right: 10px; top: 50px; } .tvbtns #full, .tvbtns #night { display: none; }
  .tvtap { font-size: 18px; padding: 9px 18px; top: auto; bottom: 214px; white-space: nowrap; }
  .regname { font-size: 13px; } .regname.on { font-size: 28px; }
  .town { font-size: 12px; } .town.hit { font-size: 14px; }
  .maplibregl-ctrl-bottom-right { bottom: 176px; }
  .maplibregl-ctrl-attrib { font-size: 9px; white-space: nowrap; }
}
