/* Transit Project's default board. Presentation only: the existing fitter,
   feeds, agency colours, density settings and alternative designs own their
   behaviour. Literal tokens also work on older TV browsers. */
:root:not([data-style]), :root[data-style="glass"]{
  --bg:#12101A; --bg-glow:#12101A;
  --panel:#1D1A26; --panel2:#17141F; --row-bg:#1D1A26;
  --line:#373140; --row-line:#332D3D;
  --text:#FFFCF5; --muted:#B7B0C2; --sched-b:#D6D0DF;
  --accent:#FF3D77; --accent-ink:#FF91B1;
  --blue-bright:#9BBCFF; --blue-deep:#12101A;
  --tb-brand-live:#00E0C6;
}
:root:not([data-style])[data-theme="black"], :root[data-style="glass"][data-theme="black"]{
  --bg:#000; --bg-glow:#000; --panel:#101014; --panel2:#07070A;
  --row-bg:#101014; --line:#303037; --row-line:#28282F;
  --blue-deep:#000;
}
:root:not([data-style])[data-theme="day"], :root[data-style="glass"][data-theme="day"]{
  --bg:#F4F0E8; --bg-glow:#F4F0E8;
  --panel:#FFFCF5; --panel2:#F2EDE3; --row-bg:#FFFCF5;
  --line:#DCD5C9; --row-line:#E7E1D4;
  --text:#12101A; --muted:#665F70; --sched-b:#51495E;
  --accent-ink:#B5194A; --blue-bright:#2453AA; --blue-deep:#F4F0E8;
  --tb-brand-live:#00695D;
}

/* New chrome disappears when one of the optional board designs is selected. */
.tb-board-kicker,.tb-board-city,.tb-section-heading{display:none}
.tb-board-views{display:contents}
.tb-board-views > summary{display:none}

:root:not([data-style]) body, :root[data-style="glass"] body{background:var(--bg)}
:root:not([data-style]) body::before, :root[data-style="glass"] body::before{display:none}
:root:not([data-style]) body #app > header, :root[data-style="glass"] body #app > header{
  position:relative; z-index:10; flex-wrap:wrap;
  gap:10px 14px; padding:16px 22px;
  padding-top:calc(16px + env(safe-area-inset-top, 0px));
  background:var(--bg); border:0; border-bottom:1px solid var(--line);
  border-image:none; box-shadow:none;
}
:root:not([data-style]) body #app > header::before, :root[data-style="glass"] body #app > header::before{
  content:""; position:absolute; left:22px; top:0; width:104px; height:3px;
  background:linear-gradient(90deg,#FF3D77 0%,#FF3D77 33.333%,#00E0C6 33.333%,#00E0C6 66.666%,#2F7BFF 66.666%);
}
:root:not([data-style]) header .brandmark--sm, :root[data-style="glass"] header .brandmark--sm{
  width:34px; height:34px; margin:5px;
}
:root:not([data-style]) header .title, :root[data-style="glass"] header .title{
  flex:1 1 240px; min-width:0; line-height:1.15; letter-spacing:0;
}
:root:not([data-style]) .tb-board-kicker, :root[data-style="glass"] .tb-board-kicker{
  display:block; color:var(--muted); font:500 9px/1.3 var(--mono);
  letter-spacing:.13em; margin-bottom:5px;
}
:root:not([data-style]) header .title .t-grad, :root[data-style="glass"] header .title .t-grad{display:none}
:root:not([data-style]) header .tb-board-city, :root[data-style="glass"] header .tb-board-city{
  display:block; color:var(--text); font:800 26px/1.05 var(--display);
  letter-spacing:-.035em; text-transform:uppercase;
}
:root:not([data-style]) header .title small, :root[data-style="glass"] header .title small{
  display:block; margin:5px 0 0; color:var(--muted); font:400 11px/1.3 var(--body);
}
:root:not([data-style]) #tbLocBtn, :root[data-style="glass"] #tbLocBtn{color:var(--muted); font-weight:400}
:root:not([data-style]) .city-picker select, :root[data-style="glass"] .city-picker select{
  background-color:var(--panel); border:1px solid var(--line);
  border-radius:8px; padding:10px 30px 10px 12px; font-size:12px;
}
:root:not([data-style]) header button, :root[data-style="glass"] header button, :root:not([data-style]) .tb-board-views > summary, :root[data-style="glass"] .tb-board-views > summary{
  min-height:36px; border-radius:8px; background:var(--panel);
  border:1px solid var(--line); color:var(--text); box-shadow:none;
}
:root:not([data-style]) #settingsBtn, :root[data-style="glass"] #settingsBtn{
  background:var(--brand-pink)!important; color:#12101A!important;
  border-color:var(--brand-pink)!important; font-weight:700;
}
:root:not([data-style]) #settingsBtn::after, :root[data-style="glass"] #settingsBtn::after{color:inherit}
:root:not([data-style]) #settingsBtn:hover, :root[data-style="glass"] #settingsBtn:hover{filter:brightness(1.08); color:#12101A!important}
:root:not([data-style]) header .clock, :root[data-style="glass"] header .clock{margin-left:8px; flex:0 0 auto}
:root:not([data-style]) header .clock .time, :root[data-style="glass"] header .clock .time{
  background:none; -webkit-text-fill-color:currentColor; color:var(--text);
  font:500 26px/1.15 var(--mono); letter-spacing:-.045em;
}
:root:not([data-style]) header .clock .meta, :root[data-style="glass"] header .clock .meta{
  font:400 9px/1.4 var(--mono); letter-spacing:0; margin-top:5px;
}

/* Native disclosure keeps every view and account link one keyboard action away. */
:root:not([data-style]) .tb-board-views, :root[data-style="glass"] .tb-board-views{display:block; position:relative; flex:0 0 auto}
:root:not([data-style]) .tb-board-views > summary, :root[data-style="glass"] .tb-board-views > summary{
  display:flex; align-items:center; gap:14px; padding:8px 12px;
  font:600 12px/1.2 var(--body); list-style:none; cursor:pointer;
}
.tb-board-views > summary::-webkit-details-marker{display:none}
:root:not([data-style]) .tb-board-views > summary::after, :root[data-style="glass"] .tb-board-views > summary::after{content:"⌄"; color:var(--muted)}
:root:not([data-style]) .tb-board-views[open] > summary, :root[data-style="glass"] .tb-board-views[open] > summary{border-color:var(--accent)}
:root:not([data-style]) .tb-board-views .view-links, :root[data-style="glass"] .tb-board-views .view-links{
  display:none; position:absolute; top:calc(100% + 9px); right:0;
  width:182px; padding:7px; gap:2px; margin:0;
  background:var(--panel); border:1px solid var(--line); border-radius:10px;
  box-shadow:0 14px 35px #0005; z-index:1200;
}
:root:not([data-style]) .tb-board-views[open] .view-links, :root[data-style="glass"] .tb-board-views[open] .view-links{display:flex; flex-direction:column}
:root:not([data-style]) .tb-board-views .view-links a, :root[data-style="glass"] .tb-board-views .view-links a{
  display:block; width:100%; padding:9px 11px; margin:0; border:0;
  border-radius:5px; color:var(--text); font:500 13px/1.25 var(--body);
}
:root:not([data-style]) .tb-board-views .view-links a:hover, :root[data-style="glass"] .tb-board-views .view-links a:hover{background:var(--panel2)}

/* Summary numbers read as one strip instead of competing coloured tiles. */
:root:not([data-style]) body #statStrip, :root[data-style="glass"] body #statStrip{
  padding:13px 22px; gap:8px 0; background:var(--bg);
  border-bottom:1px solid var(--line);
}
:root:not([data-style]) body #statStrip .stat, :root[data-style="glass"] body #statStrip .stat{
  background:none; border:0; border-radius:0; box-shadow:none;
  padding:0 22px; border-left:1px solid var(--line);
  display:flex; align-items:baseline; gap:9px;
}
:root:not([data-style]) body #statStrip .stat:first-of-type, :root[data-style="glass"] body #statStrip .stat:first-of-type{padding-left:0; border-left:0}
:root:not([data-style]) body #statStrip .s-label, :root[data-style="glass"] body #statStrip .s-label{
  display:flex; order:2; font:500 9px/1.3 var(--mono); letter-spacing:.07em;
  color:var(--muted); white-space:nowrap; opacity:1;
}
:root:not([data-style]) body #statStrip .s-glyph, :root[data-style="glass"] body #statStrip .s-glyph{display:none}
:root:not([data-style]) body #statStrip .s-value, :root[data-style="glass"] body #statStrip .s-value{
  order:1; background:none; -webkit-text-fill-color:currentColor; filter:none;
  color:var(--text); font:500 24px/1.1 var(--mono); letter-spacing:-.045em; margin:0;
}
:root:not([data-style]) body #statStrip #stTotal, :root[data-style="glass"] body #statStrip #stTotal{color:var(--brand-pink)}
:root:not([data-style]) body #statStrip #stG1, :root[data-style="glass"] body #statStrip #stG1{color:var(--tb-brand-live)}
:root:not([data-style])[data-theme="day"] body #statStrip #stTotal, :root[data-style="glass"][data-theme="day"] body #statStrip #stTotal{color:var(--accent-ink)}
:root:not([data-style]) body #statStrip .s-sub, :root[data-style="glass"] body #statStrip .s-sub{display:none}
:root:not([data-style]) #statsToggle, :root[data-style="glass"] #statsToggle{
  top:0; right:18px; background:var(--panel); color:var(--muted);
  border-color:var(--line); box-shadow:none;
}
:root:not([data-style]) body.stats-min #statStrip, :root[data-style="glass"] body.stats-min #statStrip{padding-top:5px; padding-bottom:5px}
:root:not([data-style]) body.stats-min #statStrip .s-label, :root[data-style="glass"] body.stats-min #statStrip .s-label{display:none}
:root:not([data-style]) body.stats-min #statStrip .s-value, :root[data-style="glass"] body.stats-min #statStrip .s-value{font-size:16px}

/* Fit-cards continues to allocate all heights and columns. */
:root:not([data-style]) body main, :root[data-style="glass"] body main{gap:18px; padding:16px 22px 12px}
:root:not([data-style]) body main > .col, :root[data-style="glass"] body main > .col{gap:10px}
:root:not([data-style]) .tb-section-heading, :root[data-style="glass"] .tb-section-heading{
  display:flex; align-items:baseline; justify-content:space-between; gap:10px;
  flex:none; margin:0; color:var(--text); font:600 13px/1.2 var(--body);
  letter-spacing:0; text-transform:none;
}
:root:not([data-style]) .tb-section-heading span, :root[data-style="glass"] .tb-section-heading span{
  color:var(--muted); font:400 8px/1.4 var(--mono); letter-spacing:.08em;
}
:root:not([data-style]) body #map, :root[data-style="glass"] body #map{
  border:1px solid var(--line); border-radius:12px; box-shadow:none;
}
:root:not([data-style]) body:not(.map-full) #map, :root[data-style="glass"] body:not(.map-full) #map{z-index:0}
:root:not([data-style]) body.map-full #map, :root[data-style="glass"] body.map-full #map{border:0; border-radius:0}
:root:not([data-style]) body .legend, :root[data-style="glass"] body .legend{font-family:var(--body); font-size:10px}
:root:not([data-style]) body .card, :root[data-style="glass"] body .card{
  background:var(--panel); border:1px solid var(--line); border-radius:10px;
  padding:11px 13px; box-shadow:none;
}
:root:not([data-style]) body .card::after, :root[data-style="glass"] body .card::after{display:none}
:root:not([data-style]) body .card h2, :root[data-style="glass"] body .card h2{
  margin:0 0 7px; gap:7px; color:var(--text); font:600 12px/1.25 var(--body);
  text-transform:none; letter-spacing:0; flex:none; opacity:1;
}
:root:not([data-style]) body .card h2 .t, :root[data-style="glass"] body .card h2 .t{
  color:var(--text); background:none; -webkit-text-fill-color:currentColor; filter:none;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;
}
:root:not([data-style]) body .card h2::before, :root[data-style="glass"] body .card h2::before{
  width:3px; height:12px; background:var(--sys,var(--accent)); border-radius:2px;
}
:root:not([data-style]) body .card h2 .count, :root[data-style="glass"] body .card h2 .count{
  color:var(--muted); font:400 9px/1.3 var(--mono); letter-spacing:0; opacity:1;
}
:root:not([data-style]) body .card .statline, :root[data-style="glass"] body .card .statline{
  color:var(--muted); opacity:1; font:400 9px/1.4 var(--mono); margin:0 0 6px;
}
:root:not([data-style]) body .card .statline b, :root[data-style="glass"] body .card .statline b{color:var(--text); filter:none; font-weight:500}
:root:not([data-style]) body .card .mini-btn, :root[data-style="glass"] body .card .mini-btn{
  border:0; color:var(--muted); background:transparent; border-radius:4px; margin-left:0;
}
:root:not([data-style]) body .card .mini-btn:hover, :root[data-style="glass"] body .card .mini-btn:hover{background:var(--panel2); color:var(--text)}
:root:not([data-style]) body .card.mini, :root[data-style="glass"] body .card.mini{background:var(--panel2)}
:root:not([data-style]) body .card.mini h2, :root[data-style="glass"] body .card.mini h2{margin-bottom:0}
:root:not([data-style]) body .list .row, :root[data-style="glass"] body .list .row{
  background:transparent; border:0; border-bottom:1px solid var(--row-line);
  border-radius:0; padding:5px 0; box-shadow:none;
}
:root:not([data-style]) body .list .row:last-child, :root[data-style="glass"] body .list .row:last-child{border-bottom-color:transparent}
:root:not([data-style]) body .list .row .dest, :root[data-style="glass"] body .list .row .dest{
  font-family:var(--body); font-weight:600; font-size:var(--dest-fs); line-height:1.2;
}
:root:not([data-style]) body .list .row .sub, :root[data-style="glass"] body .list .row .sub{line-height:1.3}
:root:not([data-style]) body .list .row .badge, :root[data-style="glass"] body .list .row .badge{border-radius:5px}
:root:not([data-style]) body .list .row .live, :root[data-style="glass"] body .list .row .live, :root:not([data-style]) body .list .row .live-eta, :root[data-style="glass"] body .list .row .live-eta{font-weight:500; letter-spacing:-.03em}
:root:not([data-style]) body .list .row .sched, :root[data-style="glass"] body .list .row .sched{font-size:9px; opacity:1}
:root:not([data-style]) body .list .stop-label, :root[data-style="glass"] body .list .stop-label{
  color:var(--muted); opacity:1; font:500 9px/1.3 var(--mono); margin:4px 0 2px;
}
:root:not([data-style]) body .list .row:hover, :root[data-style="glass"] body .list .row:hover{background:var(--panel2)}
:root:not([data-style]) body .alert-row, :root[data-style="glass"] body .alert-row{
  background:var(--panel2); border:0; border-left:2px solid var(--sev,var(--accent));
  border-radius:0 5px 5px 0;
}
:root:not([data-style]) body footer, :root[data-style="glass"] body footer{
  background:var(--bg); border-color:var(--line); color:var(--muted);
  font:400 9px/1.3 var(--mono); padding:7px 22px;
  padding-bottom:calc(7px + env(safe-area-inset-bottom, 0px));
}
:root:not([data-style]) body footer .dot, :root[data-style="glass"] body footer .dot{box-shadow:none}
:root:not([data-style]) :focus-visible, :root[data-style="glass"] :focus-visible{outline:2px solid var(--accent-ink); outline-offset:3px}
:root:not([data-style])[data-map="off"] .tb-map-heading, :root[data-style="glass"][data-map="off"] .tb-map-heading, :root:not([data-style]) body.map-full .tb-section-heading, :root[data-style="glass"] body.map-full .tb-section-heading{display:none}

/* The fitter's compact and phone layouts retain their existing height budget. */
@media(min-width:481px) and (max-width:1220px){
  :root:not([data-style]) body #app > header, :root[data-style="glass"] body #app > header{padding:9px 14px; gap:8px 10px}
  :root:not([data-style]) body #app > header, :root[data-style="glass"] body #app > header{padding-top:calc(9px + env(safe-area-inset-top, 0px))}
  :root:not([data-style]) header .brandmark--sm, :root[data-style="glass"] header .brandmark--sm{width:26px; height:26px; margin:2px}
  :root:not([data-style]) header .title, :root[data-style="glass"] header .title{flex-basis:170px}
  :root:not([data-style]) header .homelink, :root[data-style="glass"] header .homelink{order:-3}
  :root:not([data-style]) header .title, :root[data-style="glass"] header .title{order:-2; flex-basis:calc(100% - 280px)}
  :root:not([data-style]) header .clock, :root[data-style="glass"] header .clock{order:-1; margin-left:auto}
  :root:not([data-style]) header .tb-board-city, :root[data-style="glass"] header .tb-board-city{font-size:24px}
  :root:not([data-style]) .tb-board-kicker, :root[data-style="glass"] .tb-board-kicker{font-size:8px; margin-bottom:3px}
  :root:not([data-style]) header .clock .time, :root[data-style="glass"] header .clock .time{font-size:20px}
  :root:not([data-style]) header .clock .meta, :root[data-style="glass"] header .clock .meta{font-size:8px; margin-top:3px}
  :root:not([data-style]) body #statStrip, :root[data-style="glass"] body #statStrip{padding:9px 14px}
  :root:not([data-style]) body #statStrip .stat, :root[data-style="glass"] body #statStrip .stat{padding:0 12px; gap:6px}
  :root:not([data-style]) body #statStrip .s-value, :root[data-style="glass"] body #statStrip .s-value{font-size:19px}
  :root:not([data-style]) body #statStrip .s-label, :root[data-style="glass"] body #statStrip .s-label{font-size:8px}
  :root:not([data-style]) body main, :root[data-style="glass"] body main{padding:10px 14px; gap:12px}
  :root:not([data-style]) body main > .col, :root[data-style="glass"] body main > .col{gap:7px}
  :root:not([data-style]) body .card, :root[data-style="glass"] body .card{padding:7px 9px}
  :root:not([data-style]) body .card h2, :root[data-style="glass"] body .card h2{font-size:11px; margin-bottom:4px}
  :root:not([data-style]) body .card .statline, :root[data-style="glass"] body .card .statline{font-size:9px; margin-bottom:3px}
  :root:not([data-style]) body .list .row, :root[data-style="glass"] body .list .row{padding:3px 0}
}
@media(max-width:767px){
  :root:not([data-style]) header .clock, :root[data-style="glass"] header .clock{margin-left:auto}
  :root:not([data-style]) .tb-section-heading span, :root[data-style="glass"] .tb-section-heading span{display:none}
  :root:not([data-style]) .tb-section-heading, :root[data-style="glass"] .tb-section-heading{font-size:12px}
  :root:not([data-style]) body #statStrip .stat, :root[data-style="glass"] body #statStrip .stat{padding:0 10px}
  :root:not([data-style]) body #statStrip .s-label, :root[data-style="glass"] body #statStrip .s-label{font-size:7px}
  :root:not([data-style]) .city-picker select, :root[data-style="glass"] .city-picker select{padding:8px 25px 8px 9px; font-size:11px}
}
@media(max-width:480px){
  :root:not([data-style]) body #app > header, :root[data-style="glass"] body #app > header{padding:13px 14px; gap:10px 6px}
  :root:not([data-style]) body #app > header, :root[data-style="glass"] body #app > header{padding-top:calc(13px + env(safe-area-inset-top, 0px))}
  :root:not([data-style]) header .brandmark--sm, :root[data-style="glass"] header .brandmark--sm{width:28px; height:28px; margin:2px}
  :root:not([data-style]) header .title, :root[data-style="glass"] header .title{flex:1 1 calc(100% - 50px)}
  :root:not([data-style]) header .tb-board-city, :root[data-style="glass"] header .tb-board-city{font-size:26px}
  :root:not([data-style]) header .title small, :root[data-style="glass"] header .title small{font-size:11px}
  :root:not([data-style]) header .clock, :root[data-style="glass"] header .clock{display:none}
  :root:not([data-style]) body #statStrip, :root[data-style="glass"] body #statStrip{display:none}
  :root:not([data-style]) .city-picker select, :root[data-style="glass"] .city-picker select{width:106px; padding:8px 23px 8px 8px; font-size:10px}
  :root:not([data-style]) header button, :root[data-style="glass"] header button{min-height:36px}
  :root:not([data-style]) #fsBtn, :root[data-style="glass"] #fsBtn, :root:not([data-style]) #minAllBtn, :root[data-style="glass"] #minAllBtn, :root:not([data-style]) #cityToolkitBtn, :root[data-style="glass"] #cityToolkitBtn, :root:not([data-style]) #settingsBtn, :root[data-style="glass"] #settingsBtn{width:36px; height:36px; padding:0!important; justify-content:center}
  :root:not([data-style]) .tb-board-views > summary, :root[data-style="glass"] .tb-board-views > summary{min-height:36px; width:65px; padding:8px; gap:7px; font-size:11px}
  :root:not([data-style]) .tb-board-views .view-links, :root[data-style="glass"] .tb-board-views .view-links{right:auto; left:0}
  :root:not([data-style]) body main, :root[data-style="glass"] body main{padding:14px; gap:20px}
  :root:not([data-style]) body .card, :root[data-style="glass"] body .card{padding:13px 14px; border-radius:11px}
  :root:not([data-style]) body .card h2, :root[data-style="glass"] body .card h2{font-size:14px; margin-bottom:9px}
  :root:not([data-style]) body .list .row, :root[data-style="glass"] body .list .row{padding:8px 0}
  :root:not([data-style]) body .card .statline, :root[data-style="glass"] body .card .statline{font-size:10px}
  :root:not([data-style]) body footer, :root[data-style="glass"] body footer{padding:12px 14px; flex-wrap:wrap}
  :root:not([data-style]) body footer, :root[data-style="glass"] body footer{padding-bottom:calc(12px + env(safe-area-inset-bottom, 0px))}
}
@media(prefers-reduced-motion:reduce){
  :root:not([data-style]) body .card, :root[data-style="glass"] body .card, :root:not([data-style]) body header button, :root[data-style="glass"] body header button{transition:none}
}

/* GLASS — the map stretches up under the header, the button row and the stat
   strip, and that chrome floats over it as clear, frosted glass. Every width
   uses the stacked layout (map band on top, departures full-width below),
   because the map is the backdrop for the chrome and needs the full width.

   How the map reaches the top with no measured heights: #app gets one extra
   row (header, strip, map band, cards, footer) and main spans rows 1-4 as a
   SUBGRID, so main's rows are #app's rows. The map column then spans header +
   strip + band, the cards column sits in row 4. The chrome's real height is
   only needed for the map's own top controls; settings-ui.js publishes it as
   --tb-glass-top.

   Gated on subgrid (Chrome 117, Safari 16): an older TV just keeps the
   classic layout with the glass colours, which is still a working board.
   The blur sits on ::after (::before is the brand strip), never on the
   header itself: backdrop-filter makes an element the containing block for
   position:fixed descendants, and the header's menus must still escape it. */
:root[data-style="glass"]{
  --glass-tint:rgba(12,14,18,.16);
  --glass-tint-strong:rgba(12,14,18,.62);
  --glass-chip:rgba(255,255,255,.08);
  --glass-chip-hover:rgba(255,255,255,.16);
  --glass-edge:rgba(255,255,255,.16);
  --glass-ink-shadow:0 0 2px rgba(0,0,0,.9), 0 1px 6px rgba(0,0,0,.7);
  --glass-band:clamp(240px,40dvh,520px);
}
/* Glass's own neutral palette — graphite, no purple cast. It comes after
   the Classic tokens it shares a selector with, so it wins on order alone. */
:root[data-style="glass"]{
  --bg:#0F1115; --bg-glow:#0F1115;
  --panel:#181B21; --panel2:#13161B; --row-bg:#181B21;
  --line:#2C3038; --row-line:#262A31;
  --text:#F7F8FA; --muted:#A8AFBA; --sched-b:#CDD2DA;
  --blue-deep:#0F1115;
}
:root[data-style="glass"][data-theme="black"]{
  --bg:#000; --bg-glow:#000; --panel:#0E0F12; --panel2:#07080A;
  --row-bg:#0E0F12; --line:#26282D; --row-line:#202226; --blue-deep:#000;
}
:root[data-style="glass"][data-theme="day"]{
  --bg:#F3F4F6; --bg-glow:#F3F4F6;
  --panel:#FFFFFF; --panel2:#EEF0F3; --row-bg:#FFFFFF;
  --line:#D6DAE0; --row-line:#E3E6EA;
  --text:#111318; --muted:#5B6270; --sched-b:#434A57; --blue-deep:#F3F4F6;
}
:root[data-style="glass"][data-theme="black"]{
  --glass-tint:rgba(0,0,0,.2);
  --glass-tint-strong:rgba(0,0,0,.66);
}
:root[data-style="glass"][data-theme="day"]{
  --glass-tint:rgba(255,255,255,.2);
  --glass-tint-strong:rgba(255,255,255,.72);
  --glass-chip:rgba(255,255,255,.42);
  --glass-chip-hover:rgba(255,255,255,.66);
  --glass-edge:rgba(20,30,50,.14);
  --glass-ink-shadow:0 0 2px rgba(255,255,255,.95), 0 1px 6px rgba(255,255,255,.8);
}

/* The surfaces: no panel, no seam — the blur on ::after does the work. */
:root[data-style="glass"] body #app > header,
:root[data-style="glass"] body #statStrip{
  position:relative; z-index:6; background:transparent; box-shadow:none;
  border-image:none; border-bottom:0;
}
/* The header sits a layer above the stat strip: both were z6, and the strip
   comes later in the page, so the Views menu (which hangs out of the header)
   opened BEHIND the stat pills. */
:root[data-style="glass"] body #app > header{ z-index:8 }
:root[data-style="glass"] body #app > header::after,
:root[data-style="glass"] body #statStrip::before{
  content:""; position:absolute; top:0; right:0; bottom:0; left:0; z-index:-1;
  pointer-events:none;
  background:var(--glass-tint);
  -webkit-backdrop-filter:blur(3px);
  backdrop-filter:blur(3px);
}
/* Clear map: no band across the top. Only the things you read — the title,
   the clock and each number — sit on a small frosted pill, so the map is
   untinted everywhere else. */
:root[data-style="glass"] body #app > header::after,
:root[data-style="glass"] body #statStrip::before{ display:none }
:root[data-style="glass"] body #app > header .title,
:root[data-style="glass"] body #app > header .clock,
:root[data-style="glass"] body #statStrip .stat{
  background:var(--glass-tint-strong) !important;
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  border-radius:10px; box-shadow:0 0 0 1px var(--glass-edge) !important;
}
:root[data-style="glass"] body #app > header .title{ flex:0 1 auto; padding:8px 14px 9px }
/* No footer bar in Glass (settings-ui.js re-homes what it held): the logo
   ends the "Departures & details" heading, the live status sits under the
   clock, the aircraft credit joins the map's attribution, and the
   non-affiliation notice is at the foot of Settings. */
:root[data-style="glass"] body #app > header::before,
:root[data-style="glass"] #tbAdsbCredit{ display:none !important }
/* …and the footer becomes just the brand colour: a hairline of the three
   stripes along the bottom edge. Fixed and click-through, so it takes no
   room from the boxes and never covers anything you can press. */
:root[data-style="glass"] body #app > footer{
  display:block !important; position:fixed; left:0; right:0; bottom:0; z-index:5;
  height:3px; padding:0 !important; margin:0; min-height:0; overflow:hidden; pointer-events:none;
  border:0 !important; box-shadow:none;
  background:linear-gradient(90deg,#FF3D77 0,#FF3D77 33.333%,#00E0C6 33.333%,#00E0C6 66.666%,#2F7BFF 66.666%) !important;
}
:root[data-style="glass"] body #app > footer > *{ display:none !important }
:root[data-style="glass"] .tb-departure-heading > span{ display:none }
:root[data-style="glass"] .tb-departure-heading .homelink{
  display:flex; align-items:center; flex:0 0 auto; margin:0; opacity:1;
}
:root[data-style="glass"] .tb-departure-heading .homelink img{ width:40px; height:40px; margin:0 }
:root[data-style="glass"] .tb-departure-heading{ align-items:center }
/* The Smart board strip is folded into this heading line (settings-ui.js
   moves its controls here), so there is no separate row under the map. */
:root[data-style="glass"] body .sb-bar{ display:none !important }
:root[data-style="glass"] .tb-departure-heading .sb-controls{ margin-left:auto; margin-right:12px; font-weight:400 }
:root[data-style="glass"] .tb-departure-heading .sb-controls button{
  border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--text);
  padding:4px 9px; font:12px/1.3 var(--body); cursor:pointer; min-height:28px;
}
:root[data-style="glass"] .tb-departure-heading .sb-controls button[hidden]{ display:none }
:root[data-style="glass"] .tb-departure-heading .sb-controls button:disabled{ opacity:.4; cursor:default }
/* Map furniture at the foot: no scale bar; the credits (required by
   OpenStreetMap and adsb.lol's licence, so they stay) as one small line. */
:root[data-style="glass"] #map .leaflet-control-scale{ display:none }
:root[data-style="glass"] #map .leaflet-control-attribution{
  background:transparent !important; box-shadow:none; padding:0 8px 2px;
  font-size:9px; line-height:1.3; color:var(--text) !important; opacity:.72;
  text-shadow:var(--glass-ink-shadow);
}
:root[data-style="glass"] #map .leaflet-control-attribution a{ color:inherit !important }
:root[data-style="glass"] header .clock .tb-glass-status{
  display:flex; align-items:center; justify-content:flex-end; gap:6px; margin-top:4px;
  font:400 9px/1.3 var(--mono); color:var(--text);
}
:root[data-style="glass"] header .clock .tb-glass-status .dot{ flex:none; margin:0 }
#tbGlassAbout{ margin:14px 0 4px; padding-top:10px; border-top:1px solid var(--line); color:var(--muted); font:400 10.5px/1.5 var(--body) }
:root:not([data-style="glass"]) #tbGlassAbout{ display:none }
/* Title & clock can go away too (Settings → Display). */
:root[data-style="glass"].tb-glass-notitle body #app > header .title,
:root[data-style="glass"].tb-glass-notitle body #app > header .clock{ display:none }
:root:not([data-style="glass"]) #tbTitleSwitch{ display:none !important }
:root[data-style="glass"] body #app > header .clock{ padding:6px 12px 7px }
:root[data-style="glass"] body #app > header .title::after{ content:none }
:root[data-style="glass"] body #app > header{ justify-content:flex-start }
:root[data-style="glass"] body #app > header .clock{ margin-left:auto }
:root[data-style="glass"] body #statStrip{ gap:6px; padding-top:0 }
:root[data-style="glass"] body #statStrip .stat,
:root[data-style="glass"] body #statStrip .stat:first-of-type{ padding:5px 11px; border-left:0 }
/* Muted labels have to carry over a busy map, so the chrome's text runs at
   full ink in Glass. */
:root[data-style="glass"] .tb-board-kicker,
:root[data-style="glass"] header .title small,
:root[data-style="glass"] #tbLocBtn,
:root[data-style="glass"] header .clock .meta,
:root[data-style="glass"] body #statStrip .s-label{ color:var(--text) !important }
:root[data-style="glass"] body #app > header,
:root[data-style="glass"] body #statStrip{ text-shadow:var(--glass-ink-shadow) }
:root[data-style="glass"] body header .title .t-grad,
:root[data-style="glass"] body .stat .s-value{ text-shadow:none }

/* The buttons: faded chips the map shows through. Settings keeps its accent
   as a tinted glass chip rather than a solid slab. */
:root[data-style="glass"] body #app > header button:not(#tbLocBtn),
:root[data-style="glass"] .tb-board-views > summary,
:root[data-style="glass"] #statsToggle,
:root[data-style="glass"] body header select{
  background:var(--glass-chip) !important;
  border:1px solid var(--glass-edge) !important;
  box-shadow:none !important;
  color:var(--text) !important;
}
:root[data-style="glass"] body header button:hover,
:root[data-style="glass"] body header select:hover{ background:var(--glass-chip-hover) !important }
/* When the controls are up they must read at a glance over a bright map:
   the same solid frosted pill as the title, full-ink text, and a clear
   pressed state. (Only the idle fade makes them disappear.) */
:root[data-style="glass"] body #app > header button:not(#tbLocBtn),
:root[data-style="glass"] .tb-board-views > summary,
:root[data-style="glass"] body header select{
  background:var(--glass-tint-strong) !important;
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  border-color:var(--glass-edge) !important; color:var(--text) !important;
  font-weight:600; text-shadow:none !important;
}
:root[data-style="glass"] body #app > header button:not(#tbLocBtn):hover,
:root[data-style="glass"] .tb-board-views > summary:hover,
:root[data-style="glass"] body header select:hover{
  background:var(--panel) !important; border-color:var(--accent) !important;
}
:root[data-style="glass"] body #app > header button:not(#tbLocBtn):active,
:root[data-style="glass"] .tb-board-views[open] > summary,
:root[data-style="glass"] body #app > header #tbGlassHideBtn[aria-pressed="true"]{
  background:var(--panel) !important; border-color:var(--accent) !important;
  box-shadow:0 0 0 2px var(--accent) !important;
}
/* Brand chips: every control carries one of the three brand colours as an
   underline and icon tint, and fills with it on hover, so the row reads as
   Transit Project rather than generic grey. Pink → teal → blue repeats along
   the row; Settings (below) is the one solid pink. */
:root[data-style="glass"]{ --chip-c:#2F7BFF }
:root[data-style="glass"] header .city-picker select{ --chip-c:#FF3D77 }
:root[data-style="glass"] .tb-board-views > summary{ --chip-c:#00E0C6 }
:root[data-style="glass"] header #fsBtn{ --chip-c:#2F7BFF }
:root[data-style="glass"] header #minAllBtn{ --chip-c:#FF3D77 }
:root[data-style="glass"] header #cityDiscoveryBtn{ --chip-c:#00E0C6 }
:root[data-style="glass"] header #cityToolkitBtn{ --chip-c:#2F7BFF }
:root[data-style="glass"] header #tbGlassHideBtn{ --chip-c:#FF3D77 }
:root[data-style="glass"] body #app > header button:not(#tbLocBtn):not(#settingsBtn),
:root[data-style="glass"] .tb-board-views > summary,
:root[data-style="glass"] body header select{
  box-shadow:inset 0 -3px 0 var(--chip-c) !important;
}
:root[data-style="glass"] body #app > header button:not(#tbLocBtn):not(#settingsBtn) svg,
:root[data-style="glass"] .tb-board-views > summary::after{ color:var(--chip-c) !important; stroke:currentColor }
@supports (color: color-mix(in srgb, red 10%, blue)){
  :root[data-style="glass"] body #app > header button:not(#tbLocBtn):not(#settingsBtn):hover,
  :root[data-style="glass"] .tb-board-views > summary:hover,
  :root[data-style="glass"] body header select:hover{
    background:color-mix(in srgb, var(--chip-c) 55%, #3A3F4A) !important;
    border-color:var(--chip-c) !important; color:#fff !important;
  }
  :root[data-style="glass"] .tb-board-views[open] > summary,
  :root[data-style="glass"] body #app > header #tbGlassHideBtn[aria-pressed="true"]{
    background:color-mix(in srgb, var(--chip-c) 55%, #3A3F4A) !important;
    border-color:var(--chip-c) !important; color:#fff !important;
    box-shadow:inset 0 -3px 0 var(--chip-c), 0 0 0 2px color-mix(in srgb, var(--chip-c) 55%, transparent) !important;
  }
}
/* Settings keeps its brand pink, solid, so it is the brightest control. */
:root[data-style="glass"] body #app > header button#settingsBtn{
  background:var(--brand-pink) !important; border-color:var(--brand-pink) !important; color:#12101A !important;
}
/* Hover brightens it — it must never fall back to the dark panel colour the
   other chips' generic hover uses (that rule outranked this one). */
:root[data-style="glass"] body #app > header button#settingsBtn:hover,
:root[data-style="glass"] body #app > header button#settingsBtn:focus-visible{
  background:#FF6A97 !important; border-color:#FF6A97 !important; color:#12101A !important;
  filter:none; box-shadow:0 0 0 2px rgba(255,61,119,.45) !important;
}
:root[data-style="glass"] body #app > header button#settingsBtn:active{ background:#E8336B !important }
#tbGlassHideBtn{ display:none }
:root[data-style="glass"] body #app > header #tbGlassHideBtn{ display:inline-flex; align-items:center; white-space:nowrap }
/* One click (or H) clears the overlay: title, clock and stats go. */
:root[data-style="glass"].tb-glass-bare body #app > header .title,
:root[data-style="glass"].tb-glass-bare body #app > header .clock,
:root[data-style="glass"].tb-glass-bare body #app > #statStrip{ display:none !important }
@supports (color: color-mix(in srgb, red 10%, blue)){
  :root[data-style="glass"] body header #settingsBtn{
    background:color-mix(in srgb, var(--accent) 34%, transparent) !important;
    border-color:color-mix(in srgb, var(--accent) 70%, transparent) !important;
  }
}

/* Out of the way when unused: after a few idle seconds (settings-ui.js sets
   .tb-glass-idle) every control in the chrome fades out and stops taking
   clicks, leaving the title, clock and numbers over a clear map. Any mouse
   move, touch or key brings them straight back; a menu that is open or a
   control that has focus keeps them up. */
:root[data-style="glass"] body #app > header > :not(.title):not(.clock):not(.homelink),
:root[data-style="glass"] #statsToggle,
:root[data-style="glass"] #map .leaflet-control,
:root[data-style="glass"] #mapFsBtn{ transition:opacity .45s ease }
:root[data-style="glass"].tb-glass-idle body #app > header:not(:focus-within) > :not(.title):not(.clock):not(.homelink),
:root[data-style="glass"].tb-glass-idle #statsToggle,
:root[data-style="glass"].tb-glass-idle #map .leaflet-control:not(.leaflet-control-attribution):not(.leaflet-control-scale),
:root[data-style="glass"].tb-glass-idle #mapFsBtn{ opacity:0; pointer-events:none }
@media (prefers-reduced-motion:reduce){
  :root[data-style="glass"] body #app > header > *, :root[data-style="glass"] #map .leaflet-control{ transition:none }
}

/* NOT ON AMAZON DEVICES (.tb-lowfx, set by keepalive.js): an Echo Show 21
   photographed this block half-applied: the map squeezed to a strip and map
   and boxes both stuck in the left ~39% with the rest of the screen empty.
   Amazon devices get the same Glass layout built a second way, at the end of
   this file. :where() keeps every selector's specificity exactly as it was. */
@supports (grid-template-rows: subgrid){
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app{
    display:grid; grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto var(--glass-band) minmax(0,1fr) auto;
  }
  /* --glass-band is in dvh, i.e. real screen pixels, but #app is zoomed on a
     TV (and shrunk on a small desk screen), so the band was scaled twice: at
     1.2x on a 1080p panel the map took 945 of 1080px and the boxes got 67px.
     Same correction theme.css makes for its own map row. */
  @supports (zoom: 1){
    :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app{
      grid-template-rows:auto auto calc(var(--glass-band) / var(--ui-zoom, 1)) minmax(0,1fr) auto;
    }
  }
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > header    { grid-column:1; grid-row:1 }
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > #statStrip{ grid-column:1; grid-row:2 }
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > main{
    grid-column:1; grid-row:1 / 5; z-index:1; min-height:0;
    display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:subgrid;
    gap:0; padding:0;
  }
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > footer    { grid-column:1; grid-row:5; z-index:6 }

  /* The map column: header + strip + band. Its own stacking context keeps
     Leaflet's 400-1000 panes below the chrome (z6 in #app). */
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > main > .col:first-child{
    grid-column:1; grid-row:1 / 4; position:relative; z-index:0;
    min-width:0; min-height:0; display:block;
  }
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > main > .col:first-child > .tb-map-heading{ display:none }
  /* The map's foot fades into the page instead of ending on a hard edge.
     Leaflet's own bottom controls (z1000: scale, attribution) stay above it. */
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body:not(.map-full) #app > main > .col:first-child::after{
    content:""; position:absolute; left:0; right:0; bottom:0; height:min(140px,38%);
    z-index:900; pointer-events:none;
    background:linear-gradient(180deg, rgba(0,0,0,0), var(--bg) 92%);
  }
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > main > .col:last-child{ position:relative; z-index:2 }
  /* #map must not be its own stacking context here (Classic gives it z0), or
     the fade would bury the scale and the OpenStreetMap attribution. The
     column above is still the context that keeps Leaflet under the chrome. */
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body:not(.map-full) #map{ z-index:auto }
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app #map{
    position:absolute; top:0; right:0; bottom:0; left:0;
    height:auto; min-height:0; border:0 !important; border-radius:0;
  }
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body .legend{
    position:absolute; left:12px; bottom:10px; z-index:950; max-width:60%;
    text-shadow:var(--glass-ink-shadow);
  }
  /* The map's own controls clear the frosted chrome above them. */
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body:not(.map-full) #map .leaflet-top{ top:var(--tb-glass-top, 0px) }
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body:not(.map-full) #mapFsBtn{ top:calc(var(--tb-glass-top, 0px) + 10px) }
  /* "Following UAL2297 · Stop" lives at the map's top edge, which in Glass is
     under the header: it sat behind the buttons, half hidden. Below them. */
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body:not(.map-full) #followBanner{ top:calc(var(--tb-glass-top, 0px) + 10px) }

  /* The departures sit below the band, as they do in the stacked layout. */
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > main > .col:last-child{
    grid-column:1; grid-row:4; min-width:0; min-height:0; padding:14px 16px 12px;
  }

  /* Map-only: the column's z-index:0 would trap the fixed map under the
     chrome, so the chrome steps aside — same as Atlas. */
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body.map-full #app > header,
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body.map-full #app > #statStrip,
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body.map-full #app > footer,
  :root[data-style="glass"]:where(:not(.tb-lowfx)) body.map-full #app > main > .col:last-child{ display:none }

  /* Tablet and up: the boxes FILL the space under the map. The fitter caps
     tile height when everything already fits, which on a big screen left
     a band of black under one short row. Here the rows are 1fr of the
     column, the column count comes from settings-ui.js (--tb-glass-cols,
     chosen so rows come out even), and each list takes its box's full
     height — trimmed to whole rows by the same script. */
  @media (min-width:481px){
    :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > main > .col:last-child{ display:flex; flex-direction:column; overflow:hidden }
    :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > main > .col:last-child > .cards{ flex:1 1 auto; min-height:0 }
    :root[data-style="glass"]:where(:not(.tb-lowfx)).tb-grid body .cards{
      grid-template-columns:repeat(var(--tb-glass-cols, var(--tb-card-cols, 3)), minmax(0,1fr)) !important;
      grid-auto-rows:minmax(0,1fr) !important; align-content:stretch !important;
    }
    :root[data-style="glass"]:where(:not(.tb-lowfx)).tb-grid body .card:not(.mini){ height:auto !important; min-height:0; display:flex; flex-direction:column }
    :root[data-style="glass"]:where(:not(.tb-lowfx)).tb-grid body .card:not(.mini) .list{ flex:1 1 auto; min-height:0; max-height:none !important; height:auto !important }
  }

  /* Large screens: the map is the point, so it gets most of the height.
     The boxes below re-flow into whatever is left (settings-ui.js picks
     the columns), which on a wide screen is usually one row of tall boxes.
     Laptop-height screens get a smaller step so each box keeps two rows. */
  @media (min-width:1221px){
    :root[data-style="glass"]:where(:not(.tb-lowfx)){ --glass-band:clamp(360px, 50dvh, 900px) }
  }
  @media (min-width:1221px) and (min-height:950px){
    :root[data-style="glass"]:where(:not(.tb-lowfx)){ --glass-band:clamp(360px, 58dvh, 1100px) }
  }

  /* Phones scroll the page instead of fitting it; the band stays a map. */
  @media (max-width:480px){
    :root[data-style="glass"]:where(:not(.tb-lowfx)){ --glass-band:max(230px,34dvh) }
    :root[data-style="glass"]:where(:not(.tb-lowfx)) body #app > main > .col:last-child{ padding:10px }
  }
}

/* GLASS, SECOND BUILD — for Amazon devices (.tb-lowfx).
   The same picture as the block above (map under the header and stat strip,
   boxes below it), without the two things an Echo Show's Silk engine got
   wrong there:
     - no subgrid: <main> is display:contents (Chrome 65), so its two columns
       are placed straight into #app's own rows. Same geometry, one grid.
     - no dvh in the band: plain vh. A var() holding dvh on an engine without
       it voids the whole grid-template-rows at computed-value time — which is
       exactly a map collapsed to a strip.
   The band is divided by --ui-zoom, because an Echo counts as a TV and #app
   is zoomed (see the matching correction in the block above). */
:root[data-style="glass"].tb-lowfx{ --glass-band-lite:40vh; --glass-band-min:240px; --glass-band-max:520px }
/* Big screens: a smaller share than the block above gives (50-58dvh). An Echo
   is zoomed, so its header and strip are taller too, and at 58% the boxes
   under the map were down to their title bars with no departures in them.
   42vh leaves the map about two-thirds of the screen and the boxes the rest. */
@media (min-width:1221px){
  :root[data-style="glass"].tb-lowfx{ --glass-band-lite:42vh; --glass-band-min:300px; --glass-band-max:900px }
}
@media (min-width:481px){
  :root[data-style="glass"].tb-lowfx body #app{
    display:grid; grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto calc(max(var(--glass-band-min), min(var(--glass-band-lite), var(--glass-band-max))) / var(--ui-zoom, 1)) minmax(0,1fr) auto;
  }
  :root[data-style="glass"].tb-lowfx body #app > header    { grid-column:1; grid-row:1 }
  :root[data-style="glass"].tb-lowfx body #app > #statStrip{ grid-column:1; grid-row:2 }
  :root[data-style="glass"].tb-lowfx body #app > main{ display:contents }
  :root[data-style="glass"].tb-lowfx body #app > footer    { grid-column:1; grid-row:5; z-index:6 }
  :root[data-style="glass"].tb-lowfx body #app > main > .col:first-child{
    grid-column:1; grid-row:1 / 4; position:relative; z-index:0;
    min-width:0; min-height:0; display:block; margin:0; padding:0;
  }
  :root[data-style="glass"].tb-lowfx body #app > main > .col:first-child > .tb-map-heading{ display:none }
  :root[data-style="glass"].tb-lowfx body:not(.map-full) #app > main > .col:first-child::after{
    content:""; position:absolute; left:0; right:0; bottom:0; height:140px; max-height:38%;
    z-index:900; pointer-events:none;
    background:linear-gradient(180deg, rgba(0,0,0,0), var(--bg) 92%);
  }
  :root[data-style="glass"].tb-lowfx body:not(.map-full) #map{ z-index:auto }
  :root[data-style="glass"].tb-lowfx body #app #map{
    position:absolute; top:0; right:0; bottom:0; left:0;
    width:auto; height:auto; min-height:0; border:0 !important; border-radius:0;
  }
  :root[data-style="glass"].tb-lowfx body .legend{
    position:absolute; left:12px; bottom:10px; z-index:950; max-width:60%;
    text-shadow:var(--glass-ink-shadow);
  }
  :root[data-style="glass"].tb-lowfx body:not(.map-full) #map .leaflet-top{ top:var(--tb-glass-top, 0px) }
  :root[data-style="glass"].tb-lowfx body:not(.map-full) #mapFsBtn{ top:calc(var(--tb-glass-top, 0px) + 10px) }
  :root[data-style="glass"].tb-lowfx body:not(.map-full) #followBanner{ top:calc(var(--tb-glass-top, 0px) + 10px) }
  :root[data-style="glass"].tb-lowfx body #app > main > .col:last-child{
    grid-column:1; grid-row:4; position:relative; z-index:2;
    min-width:0; min-height:0; padding:14px 16px 12px;
    display:flex; flex-direction:column; overflow:hidden;
  }
  :root[data-style="glass"].tb-lowfx body #app > main > .col:last-child > .cards{ flex:1 1 auto; min-height:0 }
  :root[data-style="glass"].tb-lowfx.tb-grid body .cards{
    grid-template-columns:repeat(var(--tb-glass-cols, var(--tb-card-cols, 3)), minmax(0,1fr)) !important;
    grid-auto-rows:minmax(0,1fr) !important; align-content:stretch !important;
  }
  :root[data-style="glass"].tb-lowfx.tb-grid body .card:not(.mini){ height:auto !important; min-height:0; display:flex; flex-direction:column }
  :root[data-style="glass"].tb-lowfx.tb-grid body .card:not(.mini) .list{ flex:1 1 auto; min-height:0; max-height:none !important; height:auto !important }
  :root[data-style="glass"].tb-lowfx body.map-full #app > header,
  :root[data-style="glass"].tb-lowfx body.map-full #app > #statStrip,
  :root[data-style="glass"].tb-lowfx body.map-full #app > footer,
  :root[data-style="glass"].tb-lowfx body.map-full #app > main > .col:last-child{ display:none }
}

/* Shared visual view switcher. The original anchors keep their city routing,
   account state, and gate handlers. Fixed colors make the panel readable over
   either a dark transit board or a bright street map. */
#app header details.tb-view-launcher{display:block;position:relative;flex:0 0 auto}
#app header details.tb-view-launcher > summary{display:flex;align-items:center;justify-content:center;gap:12px;list-style:none;cursor:pointer;padding:10px 14px;font:600 13px/1.2 var(--body);border-radius:9px}
#app header details.tb-view-launcher > summary:focus-visible{outline:2px solid #93ded3;outline-offset:4px}
#app header details.tb-view-launcher > summary::after{content:'⌄';font-size:14px;transition:transform .18s}
#app header details.tb-view-launcher[open] > summary::after{transform:rotate(180deg)}
#app header details.tb-view-launcher > .view-links{display:none;position:absolute;right:0;left:auto;top:calc(100% + 12px);width:540px;padding:22px;margin:0;overflow-y:auto;background:#101824;color:#edf3fc;border:1px solid #3b4c62;border-radius:14px;box-shadow:0 24px 70px #0008;z-index:1200;text-shadow:none;scrollbar-width:thin;scrollbar-color:#41536d transparent}
#app header details.tb-view-launcher[open] > .view-links{display:block;animation:tb-view-reveal .16s ease-out}
#app header .tb-view-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 18px;padding:0 0 16px;border-bottom:1px solid #2c3b50}
#app header .tb-view-head strong{font:600 21px/1.2 var(--body);letter-spacing:-.035em;color:#f1f6ff}
#app header .tb-view-head > span{font:500 11px/1.3 var(--mono);color:#8eafaF;max-width:45%;text-align:right}
#app header .tb-view-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
#app header details.tb-view-launcher .view-links a.tb-view-card{position:relative;display:flex;align-items:flex-start;gap:12px;min-width:0;width:auto;min-height:95px;margin:0;padding:17px 13px;background:#172334;color:#eef4fc;border:1px solid #2e4057;border-radius:9px;font:500 14px/1.3 var(--body);white-space:normal;transition:border-color .15s,background .15s,box-shadow .15s;text-decoration:none}
#app header details.tb-view-launcher .view-links a.tb-view-card:hover,#app header details.tb-view-launcher .view-links a.tb-view-card:focus-visible{background:#21364a;border-color:#78c5c1;box-shadow:inset 0 0 0 1px #78c5c1;outline:none}
#app header details.tb-view-launcher .view-links a[data-view-kind=projector]{border-color:#3f6865;background:#173034}
#app header .tb-view-icon{flex:none;display:flex;width:25px;color:#91aecd;padding-top:1px}
#app header .tb-view-icon svg{display:block;width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
#app header [data-view-kind=sky] .tb-view-icon{color:#b0b8e5}
#app header [data-view-kind=board] .tb-view-icon{color:#e1c48c}
#app header [data-view-kind=projector] .tb-view-icon{color:#83cec1}
#app header [data-view-kind=home] .tb-view-icon{color:#d7ab8c}
#app header .tb-view-copy{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
#app header .tb-view-name{display:block;font:600 17px/1.2 var(--body);letter-spacing:-.025em;color:#f1f6ff}
#app header .tb-view-desc{display:block;font:400 11px/1.4 var(--body);color:#9cb0c9;max-width:170px}
#app header .tb-view-arrow{font:400 14px/1 var(--body);color:#7d96b6;flex:none;transition:transform .15s}
#app header a.tb-view-card:hover .tb-view-arrow,#app header a.tb-view-card:focus-visible .tb-view-arrow{transform:translate(2px,-2px);color:#bdfff2}
#app header .tb-view-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:15px;padding-top:14px;border-top:1px solid #2c3b50}
#app header details.tb-view-launcher .view-links a.tb-view-tool{display:flex;align-items:center;gap:7px;width:auto;margin:0;padding:8px 9px;border:1px solid transparent;border-radius:6px;background:transparent;color:#b9c8dd;text-decoration:none}
#app header details.tb-view-launcher .view-links a.tb-view-tool:hover,#app header details.tb-view-launcher .view-links a.tb-view-tool:focus-visible{background:#21364a;border-color:#70859f;outline:none}
#app header .tb-view-tool .tb-view-icon,#app header .tb-view-tool .tb-view-icon svg{width:16px;height:16px}
#app header .tb-view-tool .tb-view-name{font-size:12px;font-weight:500;color:#b9c8dd}
#app header .tb-view-tool .tb-view-desc{display:none}
#app header .tb-view-hint{font:400 11px/1.45 var(--body);color:#839bb8;margin:14px 0 0;min-height:32px;white-space:normal;text-align:left}
@keyframes tb-view-reveal{from{opacity:0;translate:0 -5px}to{opacity:1;translate:0 0}}
@media(max-width:600px){#app header details.tb-view-launcher > .view-links{padding:16px}#app header .tb-view-head{margin-bottom:13px;padding-bottom:13px}#app header .tb-view-head strong{font-size:20px}#app header .tb-view-head > span{font-size:10px}#app header .tb-view-grid{gap:7px}#app header details.tb-view-launcher .view-links a.tb-view-card{gap:9px;min-height:92px;padding:14px 10px}#app header .tb-view-name{font-size:16px}#app header .tb-view-desc{font-size:11px}#app header .tb-view-icon,#app header .tb-view-icon svg{width:22px;height:22px}#app header .tb-view-arrow{display:none}}
@media(prefers-reduced-motion:reduce){#app header details.tb-view-launcher *,#app header details.tb-view-launcher[open] > .view-links{animation:none!important;transition:none!important}}
/* Direct-child links preserve the board modules' existing insertion points. */
#app header details.tb-view-launcher[open] > .view-links{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}
#app header .tb-view-head,#app header .tb-view-hint,#app header .tb-view-tools{grid-column:1 / -1}
#app header .tb-view-head{margin-bottom:4px;padding-bottom:14px}
#app header details.tb-view-launcher .view-links a.tb-view-card{grid-column:span 3}
#app header .tb-view-tools{height:0;padding:0;margin:5px 0 0;border-top:1px solid #2c3b50}
#app header details.tb-view-launcher .view-links a.tb-view-tool{grid-column:span 2;justify-content:center;padding:8px 2px}
#app header .tb-view-hint{margin-top:1px;margin-bottom:0}
