:root { --primary: #1F3A93; --bg: #0B0F1A; --text: #FFFFFF; --muted: rgba(255,255,255,.65); --card: rgba(255,255,255,.06); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font: 500 clamp(16px, 2.2vw, 28px)/1.25 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; display: flex; flex-direction: column; overflow: hidden; cursor: none; }
header { display: flex; align-items: center; justify-content: space-between; padding: 1.2vw 2vw; background: var(--primary); }
.brand { display: flex; align-items: center; gap: 1.2vw; min-width: 0; }
.brand img { height: 3.4em; max-width: 30vw; object-fit: contain; }
h1 { font-size: 1.6em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock { font-size: 2.2em; font-weight: 800; font-variant-numeric: tabular-nums; }
main { flex: 1; display: grid; gap: 1.5vw; padding: 1.5vw 2vw; grid-template-columns: repeat(auto-fit, minmax(min(100%, 38vw), 1fr)); align-content: start; overflow: hidden; }
.stop { background: var(--card); border-radius: 1vw; padding: 1vw 1.4vw; }
.stop h2 { font-size: 1.1em; font-weight: 700; color: var(--muted); margin-bottom: .6vw; text-transform: uppercase; letter-spacing: .04em; }
.row { display: grid; grid-template-columns: 3.2em 1fr auto; gap: 1vw; align-items: center; padding: .45vw 0; border-top: 1px solid rgba(255,255,255,.08); }
.row:first-of-type { border-top: 0; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 2.8em; height: 1.8em; padding: 0 .4em; border-radius: .5em; font-weight: 800; font-size: 1em; }
.badge[data-mode="metro"], .badge[data-mode="rer"] { border-radius: 50%; min-width: 1.8em; }
.dest { min-width: 0; }
.dest .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dest .sub { color: var(--muted); font-size: .75em; }
.when { font-size: 1.5em; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.when small { font-size: .5em; font-weight: 600; color: var(--muted); margin-left: .2em; }
.when[data-status="cancelled"] { text-decoration: line-through; color: #FF7A7A; }
.when[data-status="delayed"] { color: #FFC857; }
.when[data-status="at_stop"] { color: #7EE081; }
.empty { color: var(--muted); padding: 1vw 0; }
.traffic { background: #B3261E; color: #fff; padding: .8vw 2vw; display: flex; gap: 2vw; align-items: center; overflow: hidden; white-space: nowrap; }
.traffic .badge { flex: none; }
.traffic .ticker { display: inline-block; animation: ticker 40s linear infinite; padding-left: 100%; }
@keyframes ticker { to { transform: translateX(-100%); } }
footer { display: flex; justify-content: space-between; gap: 2vw; padding: .6vw 2vw; font-size: .6em; color: var(--muted); }
.rt::before { content: "●"; margin-right: .4em; color: #7EE081; }
.rt[data-status="degraded"]::before { color: #FFC857; }
.rt[data-status="unavailable"]::before { color: #FF7A7A; }
.overlay { position: fixed; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 1vw; background: var(--bg); text-align: center; padding: 4vw; }
.overlay p { font-size: 1.8em; font-weight: 700; }
.overlay .detail { font-size: .9em; color: var(--muted); font-weight: 500; }
body[data-state="loading"] .overlay, body[data-state="error"] .overlay { display: flex; }
body[data-state="stale"] footer { color: #FFC857; }
