/* Grand Loop trains page: live map + Harry-Potter-style departure boards (gold on maroon) */
.tr-main { padding-block: var(--sp-5, 24px) var(--sp-6, 40px); }
.tr-hero { margin-bottom: var(--sp-4, 18px); }
.tr-kicker { margin: 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #e8c35a; font-weight: 800; }
.tr-hero h1 { margin: 4px 0 6px; font-size: var(--step-4, 2.2rem); line-height: 1.05; }
.tr-sub { margin: 0 0 8px; color: var(--fg-muted, #b8bcc8); max-width: 60ch; }
.tr-live { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--fg-muted, #b8bcc8); }
.tr-dot { width: 10px; height: 10px; border-radius: 50%; background: #6c7080; flex: none; }
.tr-live.on .tr-dot { background: var(--accent, #3ccf7a); box-shadow: 0 0 0 0 rgba(60, 207, 122, .6); animation: trPulse 2s infinite; }
.tr-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--fg, #eef0f5); }
@keyframes trPulse { 0% { box-shadow: 0 0 0 0 rgba(60, 207, 122, .55); } 70% { box-shadow: 0 0 0 8px rgba(60, 207, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 207, 122, 0); } }
@media (prefers-reduced-motion: reduce) { .tr-live.on .tr-dot { animation: none; } }

.tr-card { background: var(--surface, #181c26); border: 1px solid var(--line, #2a3040); border-radius: var(--radius, 14px); padding: var(--sp-4, 16px); margin-bottom: var(--sp-5, 24px); }
.tr-card h2, .tr-h2 { margin: 0 0 10px; font-size: var(--step-2, 1.35rem); }
.tr-mapwrap { border-radius: 10px; overflow: hidden; background: #0f2236; }
.tr-map { display: block; width: 100%; height: auto; }
.tr-map .sea { fill: #10304d; }
.tr-map .track { fill: none; stroke: #6a1f1a; stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; }
.tr-map .track2 { fill: none; stroke: #e8c35a; stroke-width: 1.6; stroke-dasharray: 5 5; stroke-linejoin: round; }
.tr-map .stn circle { fill: #11141b; stroke: #e8c35a; stroke-width: 3; }
.tr-map .stn text { font: 700 13px var(--font, system-ui); fill: #fff; paint-order: stroke; stroke: #0b1520; stroke-width: 4px; }
.tr-map .train { transition: transform 5s linear; }
.tr-map .train circle { stroke: #11141b; stroke-width: 2.5; }
.tr-map .train.cw circle { fill: #f2b53a; }
.tr-map .train.ccw circle { fill: #d9e2ff; }
.tr-map .train text { font: 800 11px var(--font, system-ui); fill: #11141b; text-anchor: middle; dominant-baseline: central; }
@media (prefers-reduced-motion: reduce) { .tr-map .train { transition: none; } }
.tr-legend { list-style: none; padding: 0; margin: 10px 0 12px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--fg-muted, #b8bcc8); }
.tr-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 2px solid #11141b; }
.tr-legend i.cw { background: #f2b53a; } .tr-legend i.ccw { background: #d9e2ff; }

.tr-trains { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tr-train { border: 1px solid var(--line, #2a3040); border-radius: 12px; padding: 10px 12px; background: var(--surface-2, #1f2431); }
.tr-train h3 { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.tr-train h3 .b { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 900; color: #11141b; flex: none; }
.tr-train.cw h3 .b { background: #f2b53a; } .tr-train.ccw h3 .b { background: #d9e2ff; }
.tr-train p { margin: 0; font-size: 14px; color: var(--fg-muted, #b8bcc8); }
.tr-train p b { color: var(--fg, #eef0f5); }

.tr-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: thin; }
.tr-chips a { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line, #2a3040); color: var(--fg, #eef0f5); text-decoration: none; font-size: 14px; background: var(--surface, #181c26); }
.tr-chips a:hover, .tr-chips a:focus-visible { border-color: #e8c35a; }

/* the boards */
.tr-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; margin-bottom: 14px; }
.tr-board { background: #2a0d0b; border: 3px solid #8a6a1f; border-radius: 10px; box-shadow: inset 0 0 0 2px #120403, 0 6px 18px rgba(0, 0, 0, .35); color: #f3cf62; scroll-margin-top: 80px; }
.tr-board header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 14px 8px; border-bottom: 2px solid #8a6a1f; background: linear-gradient(#3a120f, #2a0d0b); border-radius: 7px 7px 0 0; }
.tr-board header h3 { margin: 0; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: #ffd978; }
.tr-board header .clk { font: 700 15px ui-monospace, "Cascadia Mono", Consolas, monospace; color: #ffd978; font-variant-numeric: tabular-nums; }
.tr-plats { display: grid; grid-template-columns: 1fr 1fr; }
.tr-plat { padding: 8px 12px 12px; min-width: 0; }
.tr-plat + .tr-plat { border-left: 2px solid #5a1a14; }
.tr-plat h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #d9b65a; font-weight: 800; }
.tr-plat h4 span { display: block; font-size: 11px; letter-spacing: .04em; text-transform: none; color: #b8944a; font-weight: 600; }
.tr-row { display: grid; grid-template-columns: 3.4em 1fr auto; gap: 6px; align-items: baseline; padding: 4px 0; border-top: 1px dashed #5a1a14; font: 600 14px ui-monospace, "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.tr-row:first-of-type { border-top: 0; }
.tr-row .t { color: #ffd978; }
.tr-row .d { color: #f3cf62; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-row .s { color: #ffe9a8; font-weight: 800; }
.tr-row.due .s { color: #8fffb0; }
.tr-row.dep .s { color: #ffb3a1; }
.tr-empty { font: 600 13px ui-monospace, Consolas, monospace; color: #b8944a; }
@media (max-width: 480px) { .tr-plats { grid-template-columns: 1fr; } .tr-plat + .tr-plat { border-left: 0; border-top: 2px solid #5a1a14; } }

/* town emblems (pixel art: keep crisp) */
.tr-map .stn image.logo { image-rendering: pixelated; }
.tr-map .stn circle { opacity: 0; }
img.tl, img.bl, img.cl { display: inline-block; image-rendering: pixelated; vertical-align: -4px; margin-right: 6px; }
img.bl { width: 26px; height: 26px; vertical-align: -6px; margin-right: 8px; }
.tr-chips a { display: inline-flex; align-items: center; }
img.cl { width: 18px; height: 18px; vertical-align: -3px; }
