/* travel.css — the screen between cities (js/travel-screen.js). */
.flight-fade .tv-root ~ .flight-banner,
.flight-fade .tv-root ~ .flight-plane { display: none; }
.flight-fade:has(.tv-root) .flight-banner, .flight-fade:has(.tv-root) .flight-plane { display: none; }
.tv-root { position: absolute; inset: 0; overflow: hidden; color: #f6f1e7; font-family: var(--ww-ui, 'Barlow Condensed', sans-serif); }
.tv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tv-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,.65) 100%); }
.flight-fade.on .tv-root > :not(canvas):not(.tv-vignette) { animation: tv-rise .5s cubic-bezier(.2,.9,.25,1.15) both; }

/* ---------------- cab ---------------- */
.tv-cab-top { position: absolute; top: max(28px, env(safe-area-inset-top)); left: 0; right: 0; text-align: center; }
.tv-cab-badge { display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px; border-radius: 10px; background: #ffc83c; color: #111; box-shadow: 0 10px 40px rgba(255,200,60,.35), inset 0 -3px 0 rgba(0,0,0,.18); }
.tv-cab-badge b { font: 400 clamp(22px, 5vw, 34px)/1 var(--ww-display, Anton, Impact, sans-serif); letter-spacing: .08em; }
.tv-checker { width: 34px; height: 16px; background: conic-gradient(#111 25%, #ffc83c 0 50%, #111 0 75%, #ffc83c 0) 0 0 / 8px 8px; border-radius: 2px; }
.tv-cab-sub { margin-top: 12px; font-weight: 700; font-size: clamp(14px, 3.4vw, 18px); letter-spacing: .32em; opacity: .9; text-shadow: 0 2px 10px #000; transition: color .3s; }
.tv-arrived .tv-cab-sub { color: #ffd166; }
.tv-dash { position: absolute; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(620px, 92vw); display: flex; gap: 12px; align-items: stretch; }
.tv-meter { flex: 0 0 auto; min-width: 128px; padding: 10px 14px 12px; border-radius: 14px; background: linear-gradient(#17121a, #0b080d); border: 1px solid #ffffff1a; box-shadow: 0 14px 40px rgba(0,0,0,.6), inset 0 1px 0 #ffffff12; text-align: center; }
.tv-meter-k { font-size: 11px; letter-spacing: .3em; opacity: .6; }
.tv-meter-v { font: 700 clamp(26px, 7vw, 36px)/1.1 ui-monospace, 'SF Mono', Menlo, monospace; color: #ff9f43; text-shadow: 0 0 12px rgba(255,140,40,.7); font-variant-numeric: tabular-nums; }
.tv-meter-light { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 4px; font-size: 10px; letter-spacing: .25em; background: #ff3b5c; color: #fff; box-shadow: 0 0 12px #ff3b5c; animation: tv-blink 1s steps(2) infinite; }
.tv-route { flex: 1; min-width: 0; padding: 12px 16px; border-radius: 14px; background: rgba(12,10,20,.78); backdrop-filter: blur(8px); border: 1px solid #ffffff1a; box-shadow: 0 14px 40px rgba(0,0,0,.55); display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.tv-route-ends { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: clamp(13px, 3.4vw, 16px); letter-spacing: .08em; text-transform: uppercase; }
.tv-route-ends span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-route-ends span:last-child { color: #ffd166; text-align: right; }
.tv-route-line { position: relative; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, #ffffff30 0 8px, transparent 8px 14px); }
.tv-route-line i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: linear-gradient(90deg, #ffc83c, #ff4f7b); box-shadow: 0 0 10px #ff7a59; }
.tv-route-line b { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #ffc83c; border: 3px solid #111; box-shadow: 0 0 0 3px #ffc83c66, 0 0 16px #ffc83c; }
.tv-route-eta { font-size: 12px; letter-spacing: .22em; opacity: .75; font-variant-numeric: tabular-nums; }

/* -------------- flight -------------- */
.tv-fl-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 14px; padding: max(24px, env(safe-area-inset-top)) 14px 0; }
.tv-board { width: min(640px, 94vw); padding: 10px 12px 12px; border-radius: 14px; background: linear-gradient(#141821, #0b0d13); border: 1px solid #ffffff14; box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 1px 0 #ffffff10; }
.tv-board-head { display: flex; justify-content: space-between; font-weight: 700; letter-spacing: .3em; font-size: 12px; color: #ffd166; padding: 0 2px 8px; }
.tv-board-head span:last-child { font-family: ui-monospace, Menlo, monospace; letter-spacing: .1em; color: #fff; opacity: .8; }
.tv-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; margin-top: 5px; }
.tv-row.dim { opacity: .45; }
.tv-flap { display: inline-flex; gap: 2px; white-space: nowrap; overflow: hidden; }
.tv-flap i { font-style: normal; display: inline-grid; place-items: center; width: clamp(11px, 2.9vw, 19px); height: clamp(18px, 4.6vw, 28px); border-radius: 3px; background: linear-gradient(#262a34 0 49%, #0e1016 49% 51%, #20242d 51%); color: #fbf3df; font: 700 clamp(11px, 3vw, 17px)/1 ui-monospace, 'SF Mono', Menlo, monospace; box-shadow: inset 0 -1px 0 #0006; }
.tv-flap i.fl { animation: tv-flip .09s ease-out; }
.tv-stat.live i { color: #7dffb0; }
.tv-stat.warn i { color: #ff9aa8; }
.tv-stat.ok i { color: #ffd166; }
.tv-pass { display: flex; width: min(560px, 92vw); border-radius: 16px; overflow: hidden; background: #fbf4e4; color: #1b1420; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.tv-pass-main { flex: 1; min-width: 0; padding: 12px 16px 14px; border-right: 2px dashed #1b142033; position: relative; }
.tv-pass-k { font-weight: 700; font-size: 11px; letter-spacing: .3em; color: #ff2f6a; }
.tv-pass-route { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 8px; }
.tv-pass-route > div { min-width: 0; }
.tv-pass-route b { display: block; font: 400 clamp(34px, 10vw, 52px)/1 var(--ww-display, Anton, Impact, sans-serif); letter-spacing: .04em; }
.tv-pass-route small { display: block; font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-pass-route > div:last-child { text-align: right; }
.tv-pass-arrow { font-size: 22px; color: #ff2f6a; }
.tv-pass-meta { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 8px; font-weight: 700; font-size: clamp(13px, 3.5vw, 16px); }
.tv-pass-meta small { display: block; font-size: 10px; letter-spacing: .2em; opacity: .55; }
.tv-pass-stub { flex: 0 0 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #ffc83c; }
.tv-pass-stub small { font-weight: 700; font-size: 11px; letter-spacing: .1em; writing-mode: vertical-rl; }
.tv-barcode { width: 40px; height: 70px; background: repeating-linear-gradient(0deg, #1b1420 0 2px, transparent 2px 4px, #1b1420 4px 5px, transparent 5px 8px, #1b1420 8px 11px, transparent 11px 12px); }
.tv-fl-status { margin-top: auto; margin-bottom: max(28px, env(safe-area-inset-bottom)); font-weight: 700; font-size: clamp(14px, 3.6vw, 20px); letter-spacing: .34em; text-align: center; text-shadow: 0 2px 12px #000; }
.tv-arrived .tv-fl-status { color: #ffd166; }
.tv-arrived .tv-pass { animation: tv-stamp .4s ease both; }

/* phones held sideways: board and pass side by side */
@media (orientation: landscape) and (max-height: 520px) {
  .tv-fl-wrap { flex-direction: row; flex-wrap: wrap; justify-content: center; align-content: flex-start; padding-top: max(14px, env(safe-area-inset-top)); gap: 10px; }
  .tv-board { width: min(380px, 48vw); }
  .tv-pass { width: min(380px, 46vw); }
  .tv-pass-route b { font-size: 32px; }
  .tv-fl-status { position: absolute; left: 0; right: 0; bottom: max(12px, env(safe-area-inset-bottom)); margin: 0; }
  .tv-cab-top { top: 14px; }
  .tv-dash { bottom: 14px; }
}

/* big screens: the same layout, larger */
@media (min-width: 1000px) and (min-height: 680px) {
  .tv-board, .tv-pass, .tv-dash, .tv-cab-top, .tv-fl-status { zoom: 1.4; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .tv-board { width: min(420px, 50vw); padding: 8px 8px 10px; }
  .tv-row { gap: 5px; }
  .tv-flap { gap: 1px; }
  .tv-flap i { width: 10px; height: 17px; font-size: 11px; }
}

@keyframes tv-rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.tv-dash { animation-name: tv-rise-x !important; }
@keyframes tv-rise-x { from { opacity: 0; transform: translate(-50%, 18px); } to { transform: translate(-50%, 0); } }
@keyframes tv-flip { from { transform: scaleY(.2); filter: brightness(1.6); } }
@keyframes tv-blink { 50% { opacity: .35; } }
@keyframes tv-stamp { 50% { transform: scale(1.03) rotate(-.6deg); } }
@media (prefers-reduced-motion: reduce) {
  .tv-root *, .flight-fade.on .tv-root > * { animation: none !important; }
}

/* Over everything while it runs — the HUD, the thumb controls, event
   banners, and the renderer's arrival veil (z 9000), which it hands over to
   as it fades. */
.flight-fade:has(.tv-root) { position: fixed; z-index: 9500; }
