/* Bing Bong, dressed as the subway: white tile walls, black signs with white Helvetica, amber
   countdown clocks, mosaic name tablets, yellow platform edges and service notices. The route
   colours are the MTA's own. Everything is drawn here in CSS, with no MTA logos or artwork. */

:root {
  /* Walls and signs */
  --tile: #f3efe4;
  --grout: #d8d1c0;
  --surface: #fdfcf8;
  --surface-2: #f1ede3;
  --ink: #111111;
  --ink-2: #3f4247;
  --muted: #6d7178;
  --line: #cfc8b7;
  --sign: #111111;
  --sign-ink: #ffffff;
  /* Countdown clocks: amber dots on black, in every theme */
  --led-bg: #0a0a0a;
  --led: #ffaa1d;
  --led-dim: #7a5312;
  --led-line: #2a2116;
  /* Platform edge, fare cards and service notices */
  --yellow: #fccc0a;
  --yellow-ink: #111111;
  --accent: #0039a6;
  --good: #00933c;
  --shadow: 0 1px 0 rgb(0 0 0 / 0.08), 0 4px 14px rgb(0 0 0 / 0.1);
  --radius: 4px;
  --panel: 400px;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --dots: Doto, "Courier New", ui-monospace, monospace;
  /* 3 by 6 inch tiles in running bond, drawn as a little SVG so the rows stagger */
  --tiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Cpath d='M0 .5H48M0 12.5H48M.5 1V12M24.5 13V24' stroke='%23d8d1c0' fill='none'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* Dark: a station late at night. The tiles go grey, the signs and clocks stay as they are. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tile: #1c1e20;
    --grout: #2a2d30;
    --surface: #222528;
    --surface-2: #2a2d31;
    --ink: #ececea;
    --ink-2: #c3c5c8;
    --muted: #93979d;
    --line: #3a3e43;
    --sign: #000000;
    --accent: #6f9bf0;
    --good: #3fc072;
    --shadow: 0 1px 0 rgb(0 0 0 / 0.4), 0 6px 18px rgb(0 0 0 / 0.4);
    --tiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Cpath d='M0 .5H48M0 12.5H48M.5 1V12M24.5 13V24' stroke='%232a2d30' fill='none'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --tile: #1c1e20;
  --grout: #2a2d30;
  --surface: #222528;
  --surface-2: #2a2d31;
  --ink: #ececea;
  --ink-2: #c3c5c8;
  --muted: #93979d;
  --line: #3a3e43;
  --sign: #000000;
  --accent: #6f9bf0;
  --good: #3fc072;
  --shadow: 0 1px 0 rgb(0 0 0 / 0.4), 0 6px 18px rgb(0 0 0 / 0.4);
  --tiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Cpath d='M0 .5H48M0 12.5H48M.5 1V12M24.5 13V24' stroke='%232a2d30' fill='none'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--tile);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }
/* The hidden attribute wins over any display set below */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.b-app { display: flex; height: 100dvh; }
.b-panel {
  width: var(--panel);
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--tile) var(--tiles);
  border-right: 3px solid var(--sign);
  z-index: 2;
  min-height: 0;
}
.b-map-wrap { position: relative; flex: 1; min-width: 0; }
.b-map { position: absolute; inset: 0; background: var(--surface-2); }

/* ---- Signs: black, with a thin white rule along the top, and white Helvetica */

.sign,
.b-head,
.b-map-hint,
.b-toast,
.b-table thead th,
.b-kicker {
  background: var(--sign);
  color: var(--sign-ink);
}

.b-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 14px 12px;
}
.b-head::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 1px;
  background: rgb(255 255 255 / 0.85);
}
.b-logo { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.b-chime { display: inline-flex; align-items: center; gap: 3px; }
.b-chime i { display: block; width: 15px; height: 15px; border-radius: 50%; background: var(--yellow); }
.b-chime i + i { width: 11px; height: 11px; opacity: 0.75; }
.b-head-actions { margin-left: auto; display: flex; gap: 6px; }
.b-icon-btn {
  border: 1.5px solid rgb(255 255 255 / 0.6);
  background: transparent;
  color: var(--sign-ink);
  border-radius: 999px;
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
}
.b-icon-btn:hover { background: rgb(255 255 255 / 0.14); }

/* ---- The clock: a countdown board, with the platform edge under it */

.b-hud {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 0.8fr;
  gap: 2px 10px;
  padding: 10px 14px 20px;
  background: var(--led-bg);
  color: var(--led);
  font-family: var(--dots);
}
.b-hud::after {
  /* The yellow edge strip, with its raised dots */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: var(--yellow) radial-gradient(circle, rgb(0 0 0 / 0.28) 1.4px, transparent 1.9px) 0 0 / 8px 8px;
}
.b-hud > div { display: flex; flex-direction: column; }
.b-hud strong { font-size: 19px; font-weight: 800; letter-spacing: 0.02em; text-shadow: 0 0 6px rgb(255 170 29 / 0.45); white-space: nowrap; }
.b-hud .b-clock strong { font-size: 26px; }
.b-hud .b-label { color: var(--led-dim); }
.b-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.b-left { grid-column: 1 / -1; font-size: 14px; color: var(--led); opacity: 0.85; text-transform: uppercase; letter-spacing: 0.05em; }

.b-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
/* Panels keep their full height and the column scrolls, rather than squashing them */
.b-body > * { flex-shrink: 0; }
.b-empty { color: var(--ink-2); padding: 12px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---- Panels: enamel signs on the tile */

.b-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.b-card h1, .b-card h2 { margin: 0 0 6px; letter-spacing: -0.01em; line-height: 1.2; font-weight: 700; }
.b-card h1 { font-size: 24px; }
.b-card h2 { font-size: 19px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.b-card p { margin: 6px 0; }
.b-kicker {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  margin: 0 0 8px !important;
}
.b-big { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.b-small { font-size: 13px; color: var(--muted); }
.b-sub {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sign-ink);
  background: var(--sign);
  margin: 6px 0 0;
  padding: 5px 10px;
  border-radius: 2px;
  align-self: flex-start;
}

.b-field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 13px; margin: 12px 0 8px; }
.b-field select,
.b-field input,
.b-join input {
  font: inherit;
  font-weight: 500;
  padding: 9px 10px;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
}
.b-field .b-small { font-weight: 400; }
.b-join { display: flex; gap: 8px; margin-top: 10px; }
.b-join input { flex: 1; min-width: 0; font-family: var(--dots); font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.b-check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0 14px; }
.b-check input { accent-color: var(--ink); width: 18px; height: 18px; }
.b-peek { list-style: none; margin: 4px 0 0; padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; background: var(--led-bg); color: var(--led); font-family: var(--dots); border-radius: var(--radius); }
.b-peek li { display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.b-peek li span { flex: 1; min-width: 0; }
.b-share { font-size: 22px; letter-spacing: 2px; margin: 8px 0 !important; }

/* Buttons: the yellow of a fare card, and plain black-on-white */
.b-primary, .b-secondary {
  border-radius: var(--radius);
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--ink);
}
.b-primary { background: var(--yellow); color: var(--yellow-ink); border-color: #111; box-shadow: 0 2px 0 #111; }
.b-primary:hover { background: #ffd83d; }
.b-primary:active { transform: translateY(2px); box-shadow: none; }
.b-secondary { background: var(--surface); }
.b-secondary:hover:not(:disabled) { background: var(--surface-2); }
.b-secondary:disabled { opacity: 0.45; cursor: default; }
.b-intro .b-primary { width: 100%; }
.b-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.b-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- Route bullets, as on the signs */

.b-bullet, .b-bus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c);
  color: var(--t);
  font-family: var(--sans);
  font-weight: 700;
  flex: none;
}
.b-bullet { width: 26px; height: 26px; border-radius: 50%; font-size: 16px; }
.b-diamond { border-radius: 3px; transform: rotate(45deg) scale(0.82); }
.b-diamond > span { transform: rotate(-45deg); }
/* Buses go by kind, the way the bus stop signs do: local blue, Select light blue, express green */
.b-bus { height: 22px; padding: 0 7px; border-radius: 3px; font-size: 12px; letter-spacing: 0.02em; background: #0039a6; color: #fff; }
.b-sbs { background: #00a1de; }
.b-express { background: #00933c; }
.b-bullets { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.b-arrow { color: var(--muted); margin: 0 2px; }
.b-walk-only { font-size: 12px; color: var(--muted); }

/* ---- A station's name, in mosaic: a border band in the line's colour around tiled letters */

.b-mosaic {
  --band: #8b2f22;
  padding: 9px;
  border-radius: 2px;
  background:
    conic-gradient(from 90deg, rgb(0 0 0 / 0.22) 25%, transparent 0 50%, rgb(255 255 255 / 0.12) 0 75%, transparent 0) 0 0 / 9px 9px,
    var(--band);
  box-shadow: var(--shadow);
}
.b-mosaic-field {
  position: relative;
  padding: 12px 10px 10px;
  text-align: center;
  background: #ece3cb linear-gradient(rgb(0 0 0 / 0.06) 1px, transparent 1px) 0 0 / 5px 5px;
  outline: 3px solid rgb(0 0 0 / 0.25);
  outline-offset: -3px;
}
.b-mosaic-name {
  display: block;
  font: 800 23px/1.1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #2b1d12;
}
/* Grout lines over the letters, so they read as tiles */
.b-mosaic-field::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(#ece3cb 1px, transparent 1px) 0 0 / 4px 4px,
    linear-gradient(90deg, #ece3cb 1px, transparent 1px) 0 0 / 4px 4px;
  opacity: 0.55;
}
.b-mosaic-lines { position: relative; z-index: 1; justify-content: center; margin-top: 6px; }
.b-mosaic-note { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6b4a2d; }

.b-lines { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; }

/* A bus stop: the blue flag on the pole */
.b-busstop { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.b-busstop-flag { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: #0039a6; color: #fff; }
.b-busstop-word { font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: 0.04em; }
.b-busstop-flag .b-bus { background: #fff; color: #0039a6; }
.b-busstop-flag .b-sbs { background: #00a1de; color: #fff; }
.b-busstop-flag .b-express { background: #00933c; color: #fff; }
.b-busstop-name { padding: 10px 12px 4px; font-weight: 700; font-size: 18px; }
.b-busstop-note { padding: 0 12px 8px; }
.b-busstop-name:last-child { padding-bottom: 12px; }

/* ---- Departures: a countdown board */

.b-deps {
  display: flex;
  flex-direction: column;
  background: var(--led-bg);
  border-radius: var(--radius);
  padding: 4px 0;
  box-shadow: var(--shadow), inset 0 0 0 3px #1d1d1d;
}
.b-dep {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--led-line);
  cursor: default;
}
.b-dep:last-child { border-bottom: none; }
.b-dep:hover { background: rgb(255 170 29 / 0.06); }
.b-dep-to { font-family: var(--dots); font-weight: 800; font-size: 16px; color: var(--led); text-transform: uppercase; letter-spacing: 0.03em; min-width: 0; text-shadow: 0 0 6px rgb(255 170 29 / 0.35); }
.b-deps .b-empty { background: none; border: none; color: var(--led); font-family: var(--dots); }
.b-times { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.b-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 66px;
  padding: 5px 8px;
  border-radius: 2px;
  border: 1px solid var(--led-dim);
  background: transparent;
  color: var(--led);
  font-family: var(--dots);
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  cursor: pointer;
}
.b-time:hover:not(:disabled) { background: rgb(255 170 29 / 0.14); border-color: var(--led); }
.b-time:disabled { opacity: 0.35; cursor: default; text-decoration: line-through; }
.b-time small { font-size: 11px; color: var(--led-dim); font-weight: 600; }

/* ---- Lists */

.b-list { display: flex; flex-direction: column; gap: 6px; }
.b-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  cursor: pointer;
}
.b-item:hover:not(:disabled) { border-color: var(--ink); }
.b-item:disabled { opacity: 0.5; cursor: default; }
.b-item-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.b-item-side { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.b-item small { font-size: 11px; color: var(--muted); font-weight: 500; }
.b-stop-name { font-weight: 700; }
.b-item.b-lit { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }

/* On board: the stops ahead as the strip map over the doors, a line in the route's colour */
.b-strip { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 0; box-shadow: var(--shadow); }
.b-strip .b-ride-stop {
  position: relative;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 8px 12px 8px 42px;
}
.b-strip .b-ride-stop::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--c, #808183);
}
.b-strip .b-ride-stop:first-child::before { top: 50%; }
.b-strip .b-ride-stop:last-child::before { bottom: 50%; }
.b-strip .b-ride-stop::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #111;
}
.b-strip .b-ride-stop:disabled { opacity: 1; }
.b-strip .b-ride-stop:disabled .b-item-main,
.b-strip .b-ride-stop:disabled .b-item-side { opacity: 0.45; }
.b-strip .b-ride-stop:disabled::after { background: var(--surface); border-color: var(--muted); width: 10px; height: 10px; left: 17px; margin-top: -5px; }
.b-strip .b-ride-stop:hover:not(:disabled),
.b-strip .b-ride-stop.b-lit { background: var(--surface-2); box-shadow: none; }
.b-strip .b-ride-stop:hover:not(:disabled)::after,
.b-strip .b-ride-stop.b-lit::after { background: var(--yellow); }

.b-announce {
  margin: 8px 0 0 !important;
  padding: 8px 10px;
  border-left: 4px solid var(--yellow);
  background: var(--surface-2);
  font-size: 14px;
  font-style: italic;
  color: var(--ink-2);
}

/* ---- Service notices: the yellow posters taped up in stations */

.b-alerts {
  background: var(--yellow);
  color: #111;
  border-radius: 2px;
  padding: 10px 12px;
  font-size: 14px;
  box-shadow: var(--shadow);
  border-top: 8px solid #111;
}
.b-alerts summary { cursor: pointer; font-weight: 800; display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.b-alerts ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.b-alerts strong { font-size: 15px; }
.b-alert-icon { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: #111; color: var(--yellow); align-items: center; justify-content: center; font-weight: 800; }
.b-closed span { display: flex; width: 20px; height: 20px; border-radius: 50%; background: #ee352e; color: #fff; font-weight: 800; font-size: 15px; line-height: 1; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.4); }
.b-skipped span { background: #ff6319; }

/* ---- Racing people: a second board under the clock */

.b-race { display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px; background: var(--led-bg); border-bottom: 2px solid #1d1d1d; font-size: 13px; font-family: var(--dots); }
.b-racer { flex: none; padding: 4px 10px; border-radius: 2px; color: var(--led); border: 1px solid var(--led-dim); white-space: nowrap; text-transform: uppercase; }
.b-racer strong { font-weight: 800; }
.b-racer.b-you { border-color: var(--led); background: rgb(255 170 29 / 0.12); }
.b-racer.b-gone { opacity: 0.45; }
.b-code {
  display: inline-block !important;
  font-family: var(--dots);
  font-size: 40px !important;
  font-weight: 800 !important;
  letter-spacing: 0.18em;
  color: var(--led);
  background: var(--led-bg);
  padding: 6px 14px;
  border-radius: var(--radius);
  text-shadow: 0 0 8px rgb(255 170 29 / 0.45);
}
.b-link { word-break: break-all; font-size: 14px; }
.b-riders { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
#countdown { font-family: var(--dots); font-weight: 800; }
.b-ghost span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ff6319;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.4);
}

/* ---- Results: arriving is a station sign */

.b-result { background: var(--sign); color: var(--sign-ink); border-color: var(--sign); position: relative; padding-top: 18px; }
.b-result::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: rgb(255 255 255 / 0.85); }
.b-result .b-kicker { background: var(--yellow); color: #111; }
.b-result .b-small { color: #b9bcc2; }
.b-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.b-table th, .b-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; vertical-align: top; }
.b-table th:first-child { text-align: left; font-weight: 700; }
.b-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.b-table tbody tr { cursor: pointer; }
.b-table tbody tr:hover, .b-table tbody tr.on { background: var(--surface-2); }
.b-table tbody tr.on th:first-child { box-shadow: inset 4px 0 0 var(--yellow); }
.b-table tr.b-you th { color: var(--accent); }
.b-table .b-bullets { margin-top: 4px; }
.b-table .b-bullet { width: 20px; height: 20px; font-size: 12px; }
.b-table .b-bus { height: 18px; font-size: 11px; padding: 0 5px; }
.b-legs { margin: 0; padding: 10px 12px 10px 32px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.b-legs .b-bullet { width: 20px; height: 20px; font-size: 12px; vertical-align: middle; }
.b-legs .b-bus { height: 18px; font-size: 11px; vertical-align: middle; }
.b-leg-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; margin-right: 4px; }
#legs:empty { display: none; }

/* ---- Map pieces */

.b-pin span, .b-pin-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
}
.b-pin span { width: 30px; height: 30px; font-size: 15px; }
.b-pin-inline { width: 20px; height: 20px; font-size: 11px; vertical-align: -4px; }
.b-pin-start span, .b-pin-inline.b-pin-start { background: #00933c; }
.b-pin-end span, .b-pin-inline.b-pin-end { background: #ee352e; }
.b-pin-end { cursor: pointer; }
.b-me span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yellow);
  border: 4px solid #111;
  box-shadow: 0 0 0 5px rgb(252 204 10 / 0.35), 0 1px 4px rgb(0 0 0 / 0.4);
}
.b-map-hint {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  padding: 9px 16px 7px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow);
  border-top: 1px solid rgb(255 255 255 / 0.85);
  outline: 3px solid var(--sign);
}
.leaflet-container { font: inherit; }

/* Switches on the map, as small signs: yellow when on */
.b-map-switch {
  font: 700 13px/1 var(--sans);
  padding: 8px 12px;
  border-radius: 2px;
  border: 2px solid var(--sign);
  background: var(--sign);
  color: var(--sign-ink);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.b-map-switch[aria-pressed="true"] { background: var(--yellow); color: #111; }
.leaflet-tooltip.b-ends { font-size: 12px; padding: 3px 7px; }

.b-spot span {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #111;
  background: rgb(252 204 10 / 0.45);
  animation: b-pulse 1.2s ease-out infinite;
}
@keyframes b-pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.25); opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .b-spot span { animation: none; }
}
.leaflet-tooltip.b-spot-label { font-weight: 700; font-size: 13px; padding: 5px 9px; background: var(--sign); color: var(--sign-ink); border: none; border-radius: 2px; }
.leaflet-tooltip-top.b-spot-label::before { border-top-color: var(--sign); }

/* Announcements: a strip like the sign in a car */
.b-toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 2000; pointer-events: none; }
.b-toast { padding: 10px 18px; border-radius: 2px; font-size: 14px; font-weight: 700; box-shadow: var(--shadow); text-align: center; border-bottom: 4px solid var(--yellow); }

.b-dialog { max-width: 560px; width: calc(100% - 32px); border: none; border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 0 22px 22px; box-shadow: 0 10px 40px rgb(0 0 0 / 0.35); }
.b-dialog::backdrop { background: rgb(0 0 0 / 0.55); }
.b-dialog h2 { margin: 0 -22px 14px; padding: 20px 22px 14px; background: var(--sign); color: var(--sign-ink); position: relative; }
.b-dialog h2::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: rgb(255 255 255 / 0.85); }
.b-dialog h3 { font-size: 15px; margin: 18px 0 6px; }
.b-dialog ul { padding-left: 20px; }
.b-dialog-close { position: absolute; right: 12px; top: 12px; z-index: 1; }
.b-dialog-close button { border: none; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: #fff; }
.b-credits { font-size: 12px; color: var(--muted); }

/* Phones: map on top, the panel as a sheet below */
@media (max-width: 760px) {
  .b-app { flex-direction: column-reverse; }
  .b-panel { width: 100%; height: 54dvh; border-right: none; border-top: 3px solid var(--sign); }
  .b-map-wrap { flex: 1; min-height: 0; }
  .b-body { padding: 12px 16px; }
  .b-head { padding: 14px 16px 10px; }
  .b-logo { font-size: 18px; }
  .b-hud { padding: 8px 16px 18px; }
  .b-hud .b-clock strong { font-size: 22px; }
  .b-hud strong { font-size: 16px; }
  .b-map-hint { white-space: normal; text-align: center; max-width: calc(100% - 32px); }
}
