@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');
  :root {
    --bg: #0a0a0a; --panel-border: rgba(255,255,255,0.07);
    --text: #fff; --text-soft: #e8e8e8; --text-dim: rgba(255,255,255,0.35); --text-faint: rgba(255,255,255,0.25);
    --btn-border: rgba(255,255,255,0.08); --btn-on-border: rgba(255,255,255,0.2);
    --input-bg: rgba(255,255,255,0.04); --input-focus-bg: rgba(255,255,255,0.06); --input-placeholder: rgba(255,255,255,0.2);
    --divider: rgba(255,255,255,0.06);
    --zoom-bg: rgba(10,10,10,0.85); --zoom-hover-bg: rgba(30,30,30,0.9);
    --attrib-bg: rgba(0,0,0,0.6); --attrib-text: rgba(255,255,255,0.4); --attrib-link: rgba(255,255,255,0.5);
    --glass-sheet-bg: rgba(28,28,30,0.55); --glass-pill-bg: rgba(28,28,30,0.55);
    --glass-border: rgba(255,255,255,0.12); --glass-highlight: rgba(255,255,255,0.18);
    --glass-fab-bg: rgba(28,28,30,0.6);
    --glass-solid-fallback: rgba(20,20,22,0.96);
    --glass-tile-bg: rgba(255,255,255,0.10); --glass-tile-active: rgba(255,255,255,0.18);
  }
  body.light {
    --bg: #f0f0f0; --panel-border: rgba(0,0,0,0.08);
    --text: #1a1a1a; --text-soft: #2a2a2a; --text-dim: rgba(0,0,0,0.45); --text-faint: rgba(0,0,0,0.3);
    --btn-border: rgba(0,0,0,0.1); --btn-on-border: rgba(0,0,0,0.2);
    --input-bg: rgba(0,0,0,0.04); --input-focus-bg: rgba(0,0,0,0.06); --input-placeholder: rgba(0,0,0,0.3);
    --divider: rgba(0,0,0,0.08);
    --zoom-bg: rgba(255,255,255,0.9); --zoom-hover-bg: rgba(240,240,240,0.95);
    --attrib-bg: rgba(255,255,255,0.7); --attrib-text: rgba(0,0,0,0.5); --attrib-link: rgba(0,0,0,0.6);
    --glass-sheet-bg: rgba(255,255,255,0.55); --glass-pill-bg: rgba(255,255,255,0.65);
    --glass-border: rgba(255,255,255,0.55); --glass-highlight: rgba(255,255,255,0.7);
    --glass-fab-bg: rgba(255,255,255,0.7);
    --glass-solid-fallback: rgba(250,250,252,0.98);
    --glass-tile-bg: rgba(255,255,255,0.45); --glass-tile-active: rgba(255,255,255,0.75);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-overflow-scrolling: auto; touch-action: pan-x pan-y; }
  /* Pinch and double-tap zoom only the map (Mapbox handles its own touches); the page itself never zooms. */
  body { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text-soft); height: var(--app-h, 100dvh); transition: background 0.3s, color 0.3s; }
  #map { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; }
  #search-pill {
    position: absolute; top: 16px; left: 16px; z-index: 1000;
    display: flex; align-items: center; gap: 8px;
    height: 48px; padding: 0 20px;
    border-radius: 24px; border: 1px solid var(--glass-border);
    background: var(--glass-pill-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 4px 16px rgba(0,0,0,0.12);
    color: var(--text-dim); font-family: 'DM Sans', sans-serif;
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: transform 0.2s, opacity 0.3s, width 0.3s, padding 0.3s;
  }
  #search-pill:active { transform: scale(0.97); }
  #search-pill svg { width: 18px; height: 18px; flex-shrink: 0; }
  body[data-state="search"] #search-pill { opacity: 0; pointer-events: none; }
  body[data-state="modepicker"] #search-pill { opacity: 0; pointer-events: none; }
  body[data-state="travel"] #search-pill { padding: 0; width: 48px; justify-content: center; }
  body[data-state="travel"] #search-pill .pill-label { display: none; }
  .theme-fab {
    display: flex; position: absolute; bottom: 16px; right: 16px; z-index: 1000;
    width: 40px; height: 40px; border-radius: 20px;
    background: var(--glass-fab-bg);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 4px 16px rgba(0,0,0,0.12);
    align-items: center; justify-content: center; cursor: pointer; color: var(--text);
    transition: transform 0.2s, background 0.3s;
  }
  .theme-fab:active { transform: scale(0.94); }
  .coffee-btn {
    position: absolute; top: 16px; left: 0; right: 0; width: fit-content; margin: 0 auto; z-index: 1000;
    display: flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 18px;
    background: #ffdd00; color: #1a1a1a; box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  }
  .coffee-btn:active { transform: scale(0.97); }
  .theme-fab svg { width: 18px; height: 18px; }
  .sinput { width: 100%; padding: 10px 12px; border: 1px solid var(--btn-border); border-radius: 10px; background: var(--input-bg); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 13px; outline: none; margin-bottom: 8px; transition: all 0.2s; }
  .sinput::placeholder { color: var(--input-placeholder); }
  .sinput:focus { border-color: var(--btn-on-border); background: var(--input-focus-bg); }
  .sugg-item { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--panel-border); }
  .sugg-item:last-child { border-bottom: none; }
  .sugg-item:hover, .sugg-item.active { background: var(--input-focus-bg); }
  .sugg-name { font-size: 13px; color: var(--text); }
  .sugg-addr { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
  .sugg-postcode { border-left: 3px solid #8b5cf6; }
  .sugg-pc-icon { color: #8b5cf6; font-size: 14px; margin-right: 4px; }
  .sugg-recent-icon { color: var(--text-dim); font-size: 14px; margin-right: 4px; }
  .mapboxgl-ctrl-group { border: none !important; box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important; background: transparent !important; }
  .mapboxgl-ctrl-group button { background: var(--zoom-bg) !important; backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important; color: var(--text) !important; border: 1px solid var(--btn-border) !important; width: 36px !important; height: 36px !important; }
  .mapboxgl-ctrl-group button:hover { background: var(--zoom-hover-bg) !important; }
  .mapboxgl-ctrl-group button:first-child { border-radius: 10px 10px 0 0 !important; }
  .mapboxgl-ctrl-group button:last-child { border-radius: 0 0 10px 10px !important; }
  .mapboxgl-ctrl-icon { filter: brightness(0) invert(1); }
  body.light .mapboxgl-ctrl-icon { filter: brightness(0); }
  .mapboxgl-ctrl-attrib { background: var(--attrib-bg) !important; color: var(--attrib-text) !important; font-size: 10px !important; backdrop-filter: blur(8px) !important; -webkit-backdrop-filter: blur(8px) !important; border-radius: 6px 0 0 0 !important; padding: 3px 8px !important; }
  .mapboxgl-ctrl-attrib a { color: var(--attrib-link) !important; }
  .search-overlay {
    position: fixed; inset: 0; z-index: 1200;
    background: var(--glass-sheet-bg);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
    display: flex; flex-direction: column;
    padding-top: env(safe-area-inset-top, 0px);
    transform: translateY(100%); opacity: 0;
    transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.28s ease;
    pointer-events: none;
  }
  .search-overlay.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .search-overlay-header {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--glass-border); flex-shrink: 0;
  }
  .search-overlay-back {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--glass-border); background: var(--glass-tile-bg);
    box-shadow: inset 0 1px 0 0 var(--glass-highlight);
    color: var(--text); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; cursor: pointer;
  }
  .search-overlay-back:active { opacity: 0.6; }
  .search-overlay-back svg { width: 18px; height: 18px; }
  .search-overlay-header .sinput { flex: 1; margin-bottom: 0; font-size: 16px; }
  .search-overlay-list {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; padding: 8px 10px;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
  }
  .search-overlay-list .sugg-item { border-radius: 12px; border-bottom: none; margin-bottom: 2px; }
  .search-overlay-list .sugg-item:hover, .search-overlay-list .sugg-item.active { background: var(--glass-tile-bg); }
  .search-helper { padding: 12px 4px 8px; }
  .search-helper-hint { font-size: 13px; color: var(--text-dim); margin: 0 0 12px; }
  .search-helper-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .search-helper-chip { font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); background: var(--glass-tile-bg); border: 1px solid var(--btn-border); border-radius: 20px; padding: 6px 14px; cursor: pointer; }
  .search-helper-chip:active { opacity: 0.6; }
  .search-tip { flex-shrink: 0; align-self: center; margin-top: 10px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: #1a1a1a; text-decoration: none; background: #ffdd00; border-radius: 18px; }
  .search-tip:active { opacity: 0.6; }
  .travel-card, .postcode-chip {
    position: absolute; bottom: 76px; left: 16px; z-index: 1100;
    width: 320px; border-radius: 20px;
    background: var(--glass-pill-bg);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 4px 16px rgba(0,0,0,0.12);
    padding: 14px 16px;
    opacity: 0; transform: translateY(16px); pointer-events: none;
    transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  }
  body[data-state="travel"] .travel-card { opacity: 1; transform: translateY(0); pointer-events: auto; }
  body:not([data-state="travel"]) .travel-card { transition-delay: 0.05s; }
  .postcode-chip.postcode-chip-active { opacity: 1; transform: translateY(0); pointer-events: auto; z-index: 1101; }
  @keyframes pc-loading-dots { 0%,80%,100% { opacity: .2; } 40% { opacity: 1; } }
  .postcode-chip-status.is-loading::after { content: ' ···'; display: inline-block; animation: pc-loading-dots 1.2s infinite ease-in-out; }
  .travel-card-header, .postcode-chip-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  }
  .travel-card-btn {
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid var(--glass-border); background: var(--glass-tile-bg);
    box-shadow: inset 0 1px 0 0 var(--glass-highlight);
    color: var(--text); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; cursor: pointer;
  }
  .travel-card-btn:active { opacity: 0.6; }
  .travel-card-btn svg { width: 14px; height: 14px; }
  .travel-card-title {
    flex: 1; font-size: 13px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .travel-card-title.error { color: #e74c3c; font-weight: 500; cursor: pointer; }
  .travel-modes { display: flex; gap: 6px; margin-bottom: 10px; }
  .travel-mode-btn {
    flex: 1; padding: 7px 0; border-radius: 10px; border: 1px solid var(--glass-border);
    background: var(--glass-tile-bg); color: var(--text); font-family: 'DM Sans', sans-serif;
    font-size: 12px; font-weight: 500; cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  }
  .travel-mode-btn:not(.active):hover { background: var(--glass-tile-active); }
  .travel-mode-btn.active {
    background: rgba(91, 141, 238, 0.22); border-color: rgba(91, 141, 238, 0.55);
    color: #a8c4f5; font-weight: 600;
  }
  .travel-modes:has(.active) .travel-mode-btn:not(.active) { opacity: 0.5; }
  body.light .travel-mode-btn.active {
    background: rgba(91, 141, 238, 0.14); border-color: rgba(91, 141, 238, 0.65); color: #2c5fcc;
  }
  body.light .travel-modes:has(.active) .travel-mode-btn:not(.active) { opacity: 0.55; }
  .travel-slots { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; }
  .travel-slot {
    padding: 8px 4px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--slot-color) 55%, transparent);
    background: var(--glass-tile-bg); text-align: center;
    cursor: pointer; transition: opacity 0.2s ease, background 0.15s;
  }
  .travel-slot:hover { background: var(--glass-tile-active); }
  .travel-slot-min { font-size: 10px; color: var(--text-dim); font-weight: 500; }
  .travel-slot.active { background: var(--glass-tile-active); box-shadow: 0 0 0 1.5px var(--slot-color); }
  .travel-slots.has-selection .travel-slot:not(.active) { opacity: 0.4; }
  .postcode-chip-info { flex: 1; min-width: 0; }
  .postcode-chip-label { font-size: 14px; font-weight: 600; color: #8b5cf6; }
  .postcode-chip-status { font-size: 11px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .postcode-chip-title-row { display: flex; align-items: baseline; gap: 6px; }
  .postcode-chip-badge { font-size: 11px; font-weight: 500; color: var(--text-dim); white-space: nowrap; flex-shrink: 0; }
  .postcode-chip-badge:empty { display: none; }
  .pc-copy-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    align-self: center;
  }
  .pc-copy-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
  .pc-copy-btn:hover { color: var(--text); background: var(--glass-tile-bg); border-color: var(--glass-border); }
  .pc-copy-btn:active { opacity: 0.6; }
  .pc-copy-btn--copied { color: #2ecc71; border-color: rgba(46,204,113,0.3); background: rgba(46,204,113,0.08); }
  body.light .pc-copy-btn--copied { color: #059669; border-color: rgba(5,150,105,0.3); background: rgba(5,150,105,0.08); }
  .postcode-chip-attrib { font-size: 9px; color: var(--text-faint); text-align: right; margin-top: 6px; }
  .postcode-cta-row { margin-top: 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
  .postcode-cta-btns { display: flex; gap: 6px; }
  .postcode-cta-btns .travel-mode-btn {
    flex: 1; font-weight: 600; padding: 10px 0;
    display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  }
  .postcode-cta-btns .travel-mode-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
  /* The desktop card is 320px wide, so its two buttons use slightly smaller labels. */
  #postcode-cta-btn, #postcode-fuel-btn { font-size: 12px; }
  @media (max-width: 768px) {
    #postcode-cta-btn, #postcode-fuel-btn { font-size: 13px; }
    .postcode-cta-btns .travel-mode-btn svg { width: 16px; height: 16px; }
    .postcode-cta-btns .travel-mode-btn { gap: 7px; }
  }
  .postcode-cta-btns .travel-mode-btn[hidden] { display: none; }
  .postcode-cta-btns .travel-mode-btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
  #postcode-cta-btn {
    background: rgba(91, 141, 238, 0.22);
    border-color: rgba(91, 141, 238, 0.45);
    color: #a8c4f5;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  #postcode-cta-btn:not(:disabled):hover {
    background: rgba(91, 141, 238, 0.34);
    border-color: rgba(91, 141, 238, 0.65);
    color: #c4d8f8;
  }
  #postcode-cta-btn:not(:disabled):active {
    background: rgba(91, 141, 238, 0.45);
    border-color: rgba(91, 141, 238, 0.80);
    color: #ffffff;
  }
  body.light #postcode-cta-btn {
    background: rgba(91, 141, 238, 0.14);
    border-color: rgba(91, 141, 238, 0.55);
    color: #2c5fcc;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  body.light #postcode-cta-btn:not(:disabled):hover {
    background: rgba(91, 141, 238, 0.24);
    border-color: rgba(91, 141, 238, 0.70);
    color: #1a4ab8;
  }
  body.light #postcode-cta-btn:not(:disabled):active {
    background: rgba(91, 141, 238, 0.36);
    border-color: rgba(91, 141, 238, 0.85);
    color: #0f3a9e;
  }
  /* Fuel Prices: the green twin of Check Travel Time (green = cheapest pins on the map). */
  #postcode-fuel-btn {
    background: rgba(46, 204, 113, 0.18);
    border-color: rgba(46, 204, 113, 0.45);
    color: #7fe0a8;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  #postcode-fuel-btn:hover { background: rgba(46, 204, 113, 0.28); border-color: rgba(46, 204, 113, 0.65); color: #a6ecc4; }
  #postcode-fuel-btn:active { background: rgba(46, 204, 113, 0.38); border-color: rgba(46, 204, 113, 0.8); color: #ffffff; }
  body.light #postcode-fuel-btn { background: rgba(5, 150, 105, 0.10); border-color: rgba(5, 150, 105, 0.45); color: #047857; }
  body.light #postcode-fuel-btn:hover { background: rgba(5, 150, 105, 0.18); border-color: rgba(5, 150, 105, 0.6); color: #065f46; }
  body.light #postcode-fuel-btn:active { background: rgba(5, 150, 105, 0.28); border-color: rgba(5, 150, 105, 0.75); color: #064e3b; }
  @media (max-width: 768px) {
    #search-pill {
      top: auto; bottom: 16px; left: 50%; transform: translateX(-50%);
    }
    #search-pill:active { transform: translateX(-50%) scale(0.97); }
    .theme-fab { top: 12px; bottom: auto; left: 12px; right: auto; }
    /* Centred between the corner buttons, as the charge chip below it is. */
    .coffee-btn { top: 14px; left: 60px; right: 60px; }
    body[data-state="travel"] .coffee-btn { left: 114px; right: 54px; padding: 0 10px; }   /* clear of the search button */
    .sinput { font-size: 16px; }
    .travel-card, .postcode-chip {
      bottom: 0; left: 0; right: 0; width: auto;
      border-radius: 20px 20px 0 0;
      padding: 16px 16px max(16px, env(safe-area-inset-bottom, 16px));
    }
    body[data-state="travel"] #search-pill {
      bottom: auto; top: 12px; left: 60px;
      transform: none;
      padding: 0; width: 48px; justify-content: center;
    }
    body[data-state="travel"] #search-pill .pill-label { display: none; }
    body[data-state="travel"] #search-pill:active { transform: scale(0.97); }
  }
  @media (max-width: 768px) and (prefers-reduced-transparency: reduce) {
    #search-pill, .theme-fab {
      backdrop-filter: none; -webkit-backdrop-filter: none;
      background: var(--glass-solid-fallback);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    #search-pill, .theme-fab { transition: none !important; }
  }

  /* ===== SHARE / PERMALINK ===== */
  /* Share button in the travel-card header; inherits .travel-card-btn sizing/shape. */
  .share-btn { transition: color 0.15s, background 0.15s, border-color 0.15s; }
  .share-btn--copied {
    color: #2ecc71;
    border-color: rgba(46,204,113,0.4);
    background: rgba(46,204,113,0.12);
  }
  body.light .share-btn--copied {
    color: #059669;
    border-color: rgba(5,150,105,0.35);
    background: rgba(5,150,105,0.10);
  }
  /* ===== end permalink ===== */

  /* ===== NEARBY STATIONS ===== */
  .travel-stations { margin-top: 12px; max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .travel-stations:empty { display: none; }
  .travel-stations-title { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 8px; }
  .travel-stations-empty { font-size: 12px; color: var(--text-dim); padding: 4px 2px 2px; }
  .travel-station-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 10px;
    border: 1px solid var(--glass-border); background: var(--glass-tile-bg);
    cursor: pointer; margin-bottom: 6px;
    transition: background 0.15s, border-color 0.15s;
  }
  .travel-station-row:last-child { margin-bottom: 0; }
  .travel-station-row:hover { background: var(--glass-tile-active); }
  .travel-station-row:active { opacity: 0.7; }
  /* Name fills the row so the time pill is pushed to the right edge. */
  .travel-station-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Time pill: colour/border-color/background are set inline per bucket (see renderStationList).
     Outlined + faintly tinted to match the 5/10/15/20 travel-slot buttons above. */
  .travel-station-time { flex-shrink: 0; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 52px; text-align: center; padding: 3px 10px; border: 1px solid transparent; border-radius: 999px; }
  @media (max-width: 768px) {
    .travel-stations { max-height: 200px; }
  }
  /* ===== END NEARBY STATIONS ===== */

  /* ===== DRAGGABLE BOTTOM SHEET (mobile snap points) ===== */
  /* Desktop: grabber hidden, travel-card behaves as the original left-side card. */
  .sheet-grabber { display: none; }

  @media (max-width: 768px) {
    /* Grabber handle (the pill at the top of the sheet). */
    .sheet-grabber {
      display: flex; align-items: center; justify-content: center;
      flex: 0 0 auto; height: 22px; cursor: grab;
      touch-action: none; -webkit-tap-highlight-color: transparent;
    }
    .sheet-grabber span {
      width: 36px; height: 5px; border-radius: 3px;
      background: var(--text-dim); opacity: 0.4;
    }

    /* The travel-card becomes a fixed-height sheet whose vertical position
       (transform: translateY) is owned by JS snap logic in app.js.
       postcode-chip is intentionally NOT a drag sheet. */
    .travel-card {
      height: calc(var(--app-h, 100dvh) * 0.92);
      max-height: calc(var(--app-h, 100dvh) * 0.92);
      padding: 0 16px max(16px, env(safe-area-inset-bottom, 16px));
      display: flex; flex-direction: column;
      overflow: hidden;
      touch-action: none;
      transform: translateY(100%);
    }
    /* Header is part of the drag area; let JS handle vertical gestures. */
    .travel-card .travel-card-header { touch-action: none; flex: 0 0 auto; }
    /* Disable the position transition while a finger is dragging. */
    .travel-card.no-anim { transition: none !important; }
    /* Stations grow to fill the sheet at full height instead of a fixed cap. */
    .travel-card .travel-stations { max-height: none; flex: 1 1 auto; }
  }
  /* ===== END DRAGGABLE BOTTOM SHEET ===== */

  /* ===== FUEL PRICES ===== */
  /* Desktop: a floating card on the right, clear of the left-hand travel card. */
  .fuel-panel {
    position: absolute; right: 16px; bottom: 64px; z-index: 1150;
    width: 340px; max-height: min(560px, calc(var(--app-h, 100dvh) - 140px));
    display: flex; flex-direction: column;
    border-radius: 20px;
    background: var(--glass-pill-bg);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 4px 16px rgba(0,0,0,0.12);
    padding: 14px 16px 10px;
    opacity: 0; transform: translateY(16px); pointer-events: none;
    transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .fuel-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .fuel-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-shrink: 0; }
  .fuel-title { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); }
  .fuel-form { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
  .fuel-form .fuel-input { flex: 1; margin-bottom: 0; }
  .fuel-send {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    border: 1px solid rgba(91,141,238,0.55); background: rgba(91,141,238,0.22); color: var(--text);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .fuel-send:disabled { opacity: 0.4; cursor: default; }
  .fuel-locate {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    border: 1px solid var(--glass-border); background: var(--glass-tile-bg); color: var(--text);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .fuel-locate:disabled { opacity: 0.4; cursor: default; }
  .fuel-locate svg { width: 16px; height: 16px; }
  #travel-fuel-btn[hidden] { display: none; }
  .fuel-send svg { width: 16px; height: 16px; }
  .fuel-types { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; flex-shrink: 0; }
  .fuel-type {
    padding: 5px 11px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--glass-border); background: var(--glass-tile-bg); color: var(--text-soft);
    font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  }
  .fuel-type[aria-checked="true"] { color: var(--text); border-color: rgba(91,141,238,0.6); background: rgba(91,141,238,0.22); font-weight: 600; }
  .fuel-results {
    flex: 1 1 auto; min-height: 120px; overflow-y: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    display: flex; flex-direction: column; gap: 8px; padding: 2px 0 6px;
  }
  .fuel-empty { padding: 4px 0; }
  .fuel-msg { padding: 8px 11px; border-radius: 12px; font-size: 13px; line-height: 1.4; color: var(--text); }
  .fuel-msg--pending { color: var(--text-dim); }
  .fuel-msg--pending::after { content: ' ···'; display: inline-block; animation: pc-loading-dots 1.2s infinite ease-in-out; }
  .fuel-msg--error { color: #e74c3c; background: rgba(231,76,60,0.08); border: 1px solid rgba(231,76,60,0.3); }
  .fuel-msg--warn { font-size: 12px; color: #f39c12; background: rgba(243,156,18,0.08); border: 1px solid rgba(243,156,18,0.3); }
  .fuel-summary { display: flex; align-items: center; gap: 8px; }
  .fuel-summary-text { flex: 1; font-size: 12px; color: var(--text-dim); }
  .fuel-map-btn {
    padding: 4px 12px; border-radius: 999px; flex-shrink: 0;
    border: 1px solid rgba(46,204,113,0.5); background: rgba(46,204,113,0.12); color: #2ecc71;
    font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 600; cursor: pointer;
  }
  body.light .fuel-map-btn { color: #059669; border-color: rgba(5,150,105,0.45); background: rgba(5,150,105,0.08); }
  .fuel-map-btn:active { opacity: 0.6; }
  .fuel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
  .fuel-row {
    width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
    padding: 8px 11px; border-radius: 12px;
    border: 1px solid var(--glass-border); background: var(--glass-tile-bg); color: var(--text);
    font-family: 'DM Sans', sans-serif;
  }
  .fuel-row:active { opacity: 0.7; }
  .fuel-row--cheapest { border-color: rgba(46,204,113,0.55); }
  .fuel-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .fuel-row-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fuel-row-meta { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fuel-row-price { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .fuel-row--cheapest .fuel-row-price { color: #2ecc71; }
  body.light .fuel-row--cheapest .fuel-row-price { color: #059669; }
  .fuel-attrib { font-size: 9px; color: var(--text-faint); text-align: right; margin-top: 6px; flex-shrink: 0; }

  /* Station popup on the map. */
  .fuel-popup .mapboxgl-popup-content {
    background: var(--glass-solid-fallback); color: var(--text-soft);
    border: 1px solid var(--glass-border); border-radius: 12px; padding: 10px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2); font-family: 'DM Sans', sans-serif;
  }
  .fuel-popup .mapboxgl-popup-tip { display: none; }
  .fuel-pop-name { font-size: 13px; font-weight: 600; color: var(--text); }
  .fuel-pop-meta { font-size: 11px; color: var(--text-dim); margin: 2px 0 6px; }
  .fuel-pop-row { display: flex; align-items: baseline; gap: 8px; font-size: 12px; padding: 2px 0; }
  .fuel-pop-row span:first-child { flex: 1; }
  .fuel-pop-price { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
  .fuel-pop-ago { font-size: 10px; color: var(--text-dim); min-width: 44px; text-align: right; }

  @media (max-width: 768px) {
    /* Mobile: a draggable bottom sheet like the travel card. Its vertical position
       (transform: translateY) is owned by makeSnapSheet() in app.js. */
    .fuel-panel {
      position: fixed; left: 0; right: 0; bottom: 0; z-index: 1150; width: auto;
      height: calc(var(--app-h, 100dvh) * 0.92); max-height: calc(var(--app-h, 100dvh) * 0.92);
      border-radius: 20px 20px 0 0; border-bottom: none;
      padding: 0 16px max(12px, env(safe-area-inset-bottom, 12px));
      overflow: hidden; touch-action: none;
      opacity: 1; transform: translateY(100%);
      transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    }
    .fuel-panel .fuel-header { touch-action: none; }
    .fuel-panel .fuel-results { touch-action: pan-y; }
    .fuel-panel.no-anim { transition: none !important; }
    /* The sheet takes over from the postcode / travel card while it is open. */
    body.fuel-open .postcode-chip,
    body.fuel-open .travel-card { opacity: 0 !important; pointer-events: none !important; }
    .fuel-form .fuel-input { font-size: 16px; }
    .fuel-type { font-size: 13px; padding: 7px 13px; }
    .fuel-row { padding: 10px 12px; }
    .fuel-row-name { font-size: 14px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .fuel-panel { transition: none !important; }
  }
  /* ===== END FUEL PRICES ===== */

  /* ===== CONGESTION CHARGE ===== */
  /* The C map button (the round sign TfL uses), and the chip saying whether the charge applies
     now. The chip sits top centre, level with the buttons beside it; on mobile it is on two lines,
     and in the travel view moves right of the search button, under every sheet and the search screen. */
  .ccz-sign {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%; background: #dc2626; color: #fff;
    font: 700 13px/1 'DM Sans', sans-serif;
  }
  .mapboxgl-ctrl-group .ccz-ctrl { display: flex; align-items: center; justify-content: center; }
  .mapboxgl-ctrl-group .ccz-ctrl[aria-pressed="true"] { background: linear-gradient(rgba(234,88,12,0.22), rgba(234,88,12,0.22)), var(--zoom-bg) !important; }
  .ccz-chip {
    position: absolute; top: 60px; left: 50%; z-index: 1000;   /* under the coffee button */
    display: flex; align-items: center; gap: 8px;
    max-width: calc(100% - 32px); min-height: 48px; padding: 7px 16px;
    border-radius: 24px; border: 1px solid var(--glass-border);
    background: var(--glass-pill-bg);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 4px 16px rgba(0,0,0,0.12);
    color: var(--text); font: 500 13px/1.3 'DM Sans', sans-serif;
    opacity: 0; pointer-events: none; transform: translate(-50%, -8px);
    transition: opacity 0.2s, transform 0.2s;
  }
  .ccz-chip.open { opacity: 1; transform: translate(-50%, 0); }
  .ccz-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #15803d; }
  .ccz-chip.is-charging .ccz-chip-dot { background: #ea580c; }
  body:not(.light) .ccz-chip-dot { background: #4ade80; }
  body:not(.light) .ccz-chip.is-charging .ccz-chip-dot { background: #fb923c; }
  .ccz-chip-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ccz-chip-name { font-weight: 700; }
  .ccz-chip-name::after { content: ':'; }
  @media (max-width: 768px) {
    .ccz-chip {
      top: 58px; left: 60px; right: 60px; width: fit-content; margin: 0 auto; max-width: none;
      min-height: 40px; padding: 3px 14px; border-radius: 20px; font-size: 12px; line-height: 1.25;
      transform: translateY(-8px);
    }
    .ccz-chip.open { transform: none; }
    body[data-state="travel"] .ccz-chip { left: 116px; right: 56px; }   /* clear of the search button */
    .ccz-chip-name, .ccz-chip-status { display: block; overflow: hidden; text-overflow: ellipsis; }
    .ccz-chip-name::after { content: none; }
    .ccz-chip-status { font-size: 11px; color: var(--text-dim); }
  }
  @media (max-width: 768px) and (prefers-reduced-transparency: reduce) {
    .ccz-chip { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--glass-solid-fallback); }
  }
  @media (prefers-reduced-motion: reduce) {
    .ccz-chip { transition: none !important; }
  }
  /* ===== END CONGESTION CHARGE ===== */

  /* ===== PARKING ===== */
  /* The panel reuses .fuel-panel for its position, glass and mobile sheet. */
  .pk-sign {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 4px; background: #1d4ed8; color: #fff;
    font: 700 13px/1 'DM Sans', sans-serif;
  }
  .mapboxgl-ctrl-group .parking-ctrl { display: flex; align-items: center; justify-content: center; }
  .mapboxgl-ctrl-group .parking-ctrl[aria-pressed="true"] { background: rgba(29,78,216,0.16); }
  .parking-area { font-weight: 400; color: var(--text-dim); margin-left: 4px; }
  .parking-when { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
  .parking-day, .parking-time {
    padding: 5px 8px; border-radius: 10px; border: 1px solid var(--glass-border);
    background: var(--glass-tile-bg); color: var(--text); font: 500 13px 'DM Sans', sans-serif;
  }
  .parking-time { min-width: 0; }
  #parking-now[aria-pressed="true"] { color: var(--text); border-color: rgba(91,141,238,0.6); background: rgba(91,141,238,0.22); font-weight: 600; }
  .parking-event { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-soft); cursor: pointer; }
  .parking-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 8px; font-size: 11px; color: var(--text-dim); flex-shrink: 0; }
  .parking-legend span { display: inline-flex; align-items: center; gap: 5px; }
  /* The map's parking colours (PARKING_PALETTES in app.js): red only for red routes, sign blue for
     pay to park, magenta for permit only. Dark map shades by default, light ones in body.light. */
  :root { --pk-ctrl: #60a5fa; --pk-free: #4ade80; --pk-permit: #e879f9; --pk-unknown: #9ca3af; --pk-tfl: #f87171; }
  body.light { --pk-ctrl: #1d4ed8; --pk-free: #15803d; --pk-permit: #a21caf; --pk-unknown: #6b7280; --pk-tfl: #dc2626; }
  .pk-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
  .pk-ctrl { background: var(--pk-ctrl); } .pk-free { background: var(--pk-free); } .pk-permit { background: var(--pk-permit); } .pk-unknown { background: var(--pk-unknown); } .pk-tfl { background: var(--pk-tfl); }
  .parking-body p { margin: 0; }
  .pk-hint { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text); padding: 2px 0; }
  .pk-small { font-size: 11px; line-height: 1.45; color: var(--text-dim); }
  .pk-small a, .pk-yellow a { color: inherit; }
  .pk-card {
    display: flex; flex-direction: column; gap: 7px; padding: 12px; border-radius: 14px;
    background: var(--glass-tile-bg); border: 1px solid var(--glass-border);
  }
  .pk-card-head { display: flex; align-items: flex-start; gap: 8px; }
  .pk-card-titles { flex: 1; min-width: 0; }
  .pk-card-title { font-size: 15px; font-weight: 700; color: var(--text); }
  .pk-card-sub { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
  .pk-card-close {
    width: 28px; height: 28px; border-radius: 14px; border: 1px solid var(--glass-border);
    background: transparent; color: var(--text-dim); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .pk-card-close svg { width: 14px; height: 14px; }
  .pk-pill { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; }
  .pk-headline { margin: 6px 0 2px; font-size: 13px; font-weight: 600; color: var(--text); }
  /* White text on these, so the light theme's darker shades in both themes. */
  .pk-pill--ctrl { background: #1d4ed8; } .pk-pill--free { background: #15803d; } .pk-pill--permit { background: #a21caf; } .pk-pill--unknown { background: #6b7280; } .pk-pill--tfl { background: #dc2626; }
  .pk-row { display: flex; gap: 10px; font-size: 12px; line-height: 1.4; }
  .pk-row-label { flex: 0 0 96px; color: var(--text-dim); }
  .pk-row-value { flex: 1; color: var(--text); }
  .pk-note { font-size: 12px; line-height: 1.4; color: var(--text); padding: 6px 9px; border-radius: 10px; background: rgba(243,156,18,0.10); border: 1px solid rgba(243,156,18,0.3); }
  .pk-yellow { display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 1.4; color: var(--text); padding-top: 6px; border-top: 1px solid var(--divider); }
  .pk-section { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); padding-top: 6px; border-top: 1px solid var(--divider); }
  .pk-machines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
  .pk-machines li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); }
  .pk-m-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); background: #6b7280; flex-shrink: 0; }
  .pk-m-cardonly { background: #1f2937; } .pk-m-cardcash { background: #2563eb; }
  .pk-m-id { font-weight: 600; font-variant-numeric: tabular-nums; }
  .pk-m-type { flex: 1; color: var(--text-dim); }
  .pk-m-dist { font-variant-numeric: tabular-nums; color: var(--text-dim); }
  .pk-zone-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .pk-zone-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text); }
  .pk-mini-pill { padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; color: #fff; }
  .pk-zone-code { font-weight: 700; }
  .pk-zone-name { color: var(--text-dim); }
  .pk-pdf { font-size: 12px; font-weight: 600; color: #2563eb; }
  body:not(.light) .pk-pdf { color: #93b4f5; }
  .pk-signs { font-size: 12px; font-weight: 600; color: var(--text); }
  .pk-charges { border-radius: 14px; border: 1px solid var(--glass-border); padding: 8px 12px; font-size: 12px; color: var(--text); flex-shrink: 0; }
  .pk-charges summary { cursor: pointer; font-weight: 600; font-size: 13px; }
  .pk-charges[open] { display: flex; flex-direction: column; gap: 8px; }
  .pk-bands { width: 100%; border-collapse: collapse; margin-top: 6px; font-variant-numeric: tabular-nums; }
  .pk-bands th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text-dim); padding: 3px 4px; }
  .pk-bands td { padding: 4px; border-top: 1px solid var(--divider); cursor: pointer; }
  .pk-bands td:last-child, .pk-bands th:last-child { text-align: right; }
  .pk-bands tr.is-on td { background: rgba(91,141,238,0.18); font-weight: 600; }
  .pk-diesel { display: flex; align-items: center; gap: 6px; cursor: pointer; margin-top: 4px; }
  .pk-calc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .pk-cost { margin-left: auto; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
  @media (max-width: 768px) {
    /* The parking sheet takes over from the postcode / travel card while it is open. */
    body.parking-open .postcode-chip,
    body.parking-open .travel-card { opacity: 0 !important; pointer-events: none !important; }
    .parking-panel .parking-body { touch-action: pan-y; }
    .parking-day, .parking-time { font-size: 16px; padding: 6px 9px; }
    .parking-event { font-size: 14px; }
    .pk-row, .pk-yellow, .pk-machines li, .pk-note, .pk-charges { font-size: 13px; }
    .pk-small { font-size: 12px; }
  }
  /* ===== END PARKING ===== */

  /* ===== PARK NEAR HERE ===== */
  /* The place card's button, and a panel that reuses .fuel-panel for its position, glass and
     mobile sheet. Prices use a coloured dot with neutral text: red text is unreadable on dark. */
  .park-cta {
    width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px;
    padding: 6px 14px; border: none; border-radius: 14px; cursor: pointer; text-align: left;
    background: #3d6fd6; color: #fff; font-family: 'DM Sans', sans-serif;
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.22);
    transition: background 0.15s, opacity 0.15s;
  }
  .park-cta:not(:disabled):hover { background: #3463c4; }
  .park-cta:not(:disabled):active { background: #2c55aa; }
  .park-cta:disabled { opacity: 0.4; cursor: default; }
  .park-cta .pk-sign { width: 26px; height: 26px; border-radius: 6px; background: #fff; color: #1d4ed8; font-size: 16px; flex-shrink: 0; }
  .park-cta-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .park-cta-title { font-size: 15px; font-weight: 700; }
  .park-cta-sub { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .park-cta svg { width: 18px; height: 18px; flex-shrink: 0; }

  .park-panel {
    --park-muted: rgba(255,255,255,0.62); --park-free: #2ecc71; --park-unknown: #9ca3af;
    --park-on-bg: rgba(91,141,238,0.22); --park-on-border: rgba(91,141,238,0.6);
  }
  body.light .park-panel {
    --park-muted: rgba(0,0,0,0.6); --park-free: #047857; --park-unknown: #4b5563;
    --park-on-bg: rgba(91,141,238,0.16); --park-on-border: rgba(61,111,214,0.7);
  }
  .park-panel .travel-card-btn[hidden] { display: none; }
  /* The map key, between the header and the body: one or two short lines on a phone. */
  .park-legend { gap: 3px 10px; margin: -4px 0 8px; color: var(--park-muted); }
  .park-legend span { gap: 4px; white-space: nowrap; }
  .park-legend .pk-dot { width: 12px; height: 5px; border-radius: 3px; }   /* line-shaped, like the streets */
  .park-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .park-body p { margin: 0; }
  .park-body .pk-small { color: var(--park-muted); }
  .park-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--park-muted); margin-top: 2px; }
  .park-chips { display: flex; gap: 6px; flex-shrink: 0; }
  .park-days { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 1px; touch-action: pan-x; }
  .park-days::-webkit-scrollbar { display: none; }
  .park-stays { flex-wrap: wrap; }
  .park-stays .park-chip { flex: 1 1 auto; }
  .park-chip, .park-step, .park-time, .park-edit, .park-seg-btn, .park-secondary {
    min-height: 44px; border-radius: 12px; border: 1px solid var(--glass-border);
    background: var(--glass-tile-bg); color: var(--text); cursor: pointer;
    font: 500 13px 'DM Sans', sans-serif;
  }
  .park-chip { flex: 0 0 auto; padding: 0 14px; border-radius: 999px; white-space: nowrap; }
  .park-chip[aria-pressed="true"], .park-seg-btn[aria-pressed="true"] {
    border-color: var(--park-on-border); background: var(--park-on-bg); font-weight: 700;
  }
  .park-time-row { display: flex; gap: 6px; align-items: stretch; }
  .park-step { width: 44px; flex-shrink: 0; font-size: 18px; font-weight: 600; padding: 0; }
  .park-time { flex: 1; min-width: 0; padding: 0 10px; font-size: 16px; font-weight: 700; text-align: center; cursor: text; }
  body:not(.light) .park-time { color-scheme: dark; }
  .park-summary { padding: 10px 12px; border-radius: 12px; background: var(--glass-tile-bg); border: 1px solid var(--glass-border); }
  .park-summary-main { font-size: 15px; font-weight: 700; color: var(--text); }
  .park-primary {
    display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px;
    border: none; border-radius: 12px; background: #3d6fd6; color: #fff; text-decoration: none;
    font: 700 15px 'DM Sans', sans-serif; cursor: pointer; flex-shrink: 0;
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.22);
  }
  .park-primary:hover { background: #3463c4; }
  .park-primary:active { background: #2c55aa; }
  .park-secondary { padding: 0 16px; font-weight: 600; }

  .park-res-head { display: flex; align-items: center; gap: 8px; }
  .park-res-when { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text); }
  .park-edit { padding: 0 16px; font-weight: 600; }
  .park-seg { display: flex; gap: 4px; padding: 3px; border-radius: 14px; background: var(--input-bg); border: 1px solid var(--glass-border); flex-shrink: 0; }
  .park-seg-btn { flex: 1; min-height: 40px; border-color: transparent; background: transparent; border-radius: 11px; }
  .park-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
  /* A zone's card lists the streets in it with rules of their own, as rows like the results'. */
  .park-sublist .park-row { min-height: 48px; }
  .park-row {
    width: 100%; min-height: 56px; display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center;
    padding: 8px 10px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-tile-bg);
    color: var(--text); text-align: left; cursor: pointer; font-family: 'DM Sans', sans-serif;
  }
  /* Left edge in the colour of the row's street on the map (parkRowSwatch() in app.js). */
  .park-row--line { box-shadow: inset 5px 0 0 0 var(--park-line, var(--pk-unknown)); padding-left: 13px; }
  .park-row--free { --park-line: var(--pk-free); }
  .park-row--paid { --park-line: var(--pk-ctrl); }
  .park-row--unknown { --park-line: var(--pk-unknown); }
  .park-row:hover { background: var(--glass-tile-active); }
  .park-row:active { opacity: 0.75; }
  .park-walk { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
  .park-walk b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .park-walk span { font-size: 11px; color: var(--park-muted); }
  .park-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  /* The street name comes first: it wraps to a second line before it's cut, and the price column
     (a range can break after its dash) gives way to it. */
  .park-name { font-size: 14px; font-weight: 600; line-height: 1.25; overflow: hidden; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .park-zone, .park-fit { font-size: 12px; color: var(--park-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* With no stay chosen: how long you can stay. It's the answer, so it wraps rather than being cut. */
  .park-stay { font-size: 12px; line-height: 1.3; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
  .park-cost { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; max-width: 112px; text-align: right; }
  .park-price { display: inline-flex; align-items: flex-start; gap: 6px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .park-price .pk-dot { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; margin-top: 5px; }   /* centred on the first line */
  .park-amt { min-width: 0; white-space: normal; line-height: 1.2; }
  .park-from { font-size: 12px; font-weight: 600; color: var(--park-muted); }
  .park-price--none .park-amt { font-size: 13px; font-weight: 600; line-height: 18px; }
  .park-price--free { color: var(--park-free); }
  .park-price--unknown { color: var(--park-unknown); font-size: 13px; }
  .park-when { font-size: 11px; line-height: 1.3; color: var(--park-muted); }
  .park-foot { padding-top: 4px; }
  .park-empty { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--glass-tile-bg); border: 1px solid var(--glass-border); }
  .park-empty-title { font-size: 14px; font-weight: 700; color: var(--text); }
  /* The Congestion Charge, for a place inside the zone: a banner with the charge, a tip that makes
     it free and the row for parking just outside, in the zone's orange (CCZ_PALETTES in app.js:
     #ea580c light, #fb923c dark); or one quiet line when the trip isn't charged. */
  .park-panel { --ccz-accent: #fb923c; --ccz-ink: #fdba74; --ccz-bg: rgba(251,146,60,0.12); --ccz-border: rgba(251,146,60,0.45); }
  body.light .park-panel { --ccz-accent: #ea580c; --ccz-ink: #9a3412; --ccz-bg: rgba(249,115,22,0.10); --ccz-border: rgba(234,88,12,0.4); }
  .park-ccz {
    display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; flex-shrink: 0;
    border-radius: 12px; border: 1px solid var(--ccz-border); background: var(--ccz-bg);
    box-shadow: inset 4px 0 0 0 var(--ccz-accent); padding-left: 14px;
  }
  .park-ccz-main { font-size: 15px; font-weight: 700; color: var(--ccz-ink); font-variant-numeric: tabular-nums; }
  .park-ccz-why { font-size: 12px; line-height: 1.35; color: var(--park-muted); }
  .park-ccz-tip {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin-top: 4px; min-height: 44px;
    padding: 7px 34px 7px 11px; border-radius: 10px; border: 1px solid var(--ccz-border); background: var(--glass-tile-bg);
    color: var(--text); text-align: left; cursor: pointer; font-family: 'DM Sans', sans-serif; position: relative;
  }
  .park-ccz-tip::after { content: '\203A'; position: absolute; right: 12px; top: 50%; transform: translateY(-52%); font-size: 22px; color: var(--ccz-accent); }
  .park-ccz-tip:hover { background: var(--glass-tile-active); }
  .park-ccz-tip:active { opacity: 0.75; }
  .park-ccz-tip-main { font-size: 14px; font-weight: 700; }
  .park-ccz-tip-sub { font-size: 12px; color: var(--park-muted); }
  .park-ccz-list .park-row--ccz { border-color: var(--ccz-border); background: var(--ccz-bg); }
  .park-ccz-list .park-row--ccz:hover { background: var(--glass-tile-active); }
  .park-ccz-tag { font-size: 11px; font-weight: 700; color: var(--ccz-ink); line-height: 1.3; overflow-wrap: anywhere; }
  .park-ccz-quiet { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--park-muted); }
  .park-ccz-quiet::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--ccz-accent); }
  .park-ccz-quiet--on { color: var(--ccz-ink); font-weight: 600; }

  .park-detail { gap: 9px; }
  /* The time bar, first on the card: a Now (or arrival) badge on its start, each piece's word
     and until when inside. With up to 4 pieces each gets room for its words (--roomy). The badge
     sits above the bar so it never covers a short first piece. */
  .park-timeline { position: relative; padding-top: 20px; }
  .park-now {
    position: absolute; left: 2px; top: 0; z-index: 1; padding: 2px 7px; border-radius: 999px;
    background: var(--text); color: var(--bg, #fff); font-size: 10px; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap;
  }
  body.light .park-now { color: #fff; }
  body:not(.light) .park-now { color: #111; }
  .park-bar { display: flex; gap: 3px; height: 32px; }
  .park-bar--roomy { height: 40px; }
  .park-bar-seg {
    min-width: 6px; border-radius: 4px; border: 1.5px solid transparent; overflow: hidden; white-space: nowrap;
    display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15;
    font-size: 11px; color: var(--text);
  }
  .park-bar--roomy .park-bar-seg { min-width: 64px; }
  /* What ends a stay early, after the last piece: dashed and hatched in its colour. */
  .park-bar-end {
    flex: 0 0 auto; min-width: 58px; padding: 0 6px; border: 1.5px dashed; border-radius: 4px 9px 9px 4px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; font-size: 11px; white-space: nowrap;
  }
  .park-bar-end b { font-weight: 700; }
  .park-bar-end span { font-size: 10.5px; }
  .park-bar-seg b { font-weight: 700; }
  .park-bar-seg span { font-size: 10.5px; font-weight: 500; }
  .park-total { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text); }
  .park-total b { font-variant-numeric: tabular-nums; }
  .park-facts { display: flex; flex-wrap: wrap; gap: 6px; }
  .park-fact { padding: 5px 9px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass-tile-bg); font-size: 12px; color: var(--park-muted); }
  .park-fact b { color: var(--text); font-weight: 700; }
  .park-bar-seg:first-child { border-radius: 9px 4px 4px 9px; }
  .park-bar-seg:last-child { border-radius: 4px 9px 9px 4px; }
  .park-bar-seg:only-child { border-radius: 9px; }
  .park-cost-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .park-bands { list-style: none; margin: -2px 0 0; padding: 0; display: flex; flex-direction: column; }
  .park-band-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 12px; color: var(--text); }
  .park-band-row + .park-band-row { border-top: 1px solid var(--divider); }
  .park-band-label { min-width: 0; color: var(--park-muted); }
  .park-actions { display: flex; gap: 8px; margin-top: 4px; }
  .park-actions > * { flex: 1; }
  /* The card's where block, under the time bar: the zone's name and walk beside the map's dot;
     a tap shows the spot on the map. */
  .park-nav {
    display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 0 0; text-align: left;
    border: none; border-top: 1px solid var(--divider); border-radius: 0; background: none; color: var(--text); cursor: pointer;
    font: 13px/1.35 'DM Sans', sans-serif;
  }
  .park-nav-dot {
    flex-shrink: 0; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; box-sizing: border-box;
    background: #111827; border: 4px solid #fff; box-shadow: 0 0 0 1.5px #111827;
  }
  body:not(.light) .park-nav-dot { background: #fff; border-color: #111827; box-shadow: 0 0 0 1.5px #fff; }
  .park-nav-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .park-nav-title { font-size: 16px; font-weight: 700; line-height: 1.25; }
  .park-nav-walk b { font-weight: 700; }
  .park-nav-hint { font-size: 11px; color: var(--park-muted); }
  /* The spot on the map: a dark dot with a white ring and the Drive here bubble above it
     (inverted in dark mode). Only the bubble takes taps. */
  .park-dest { width: 22px; height: 22px; pointer-events: none; }
  .park-dest-dot {
    position: relative; width: 22px; height: 22px; border-radius: 50%; box-sizing: border-box;
    background: #111827; border: 3px solid #fff;
    box-shadow: 0 0 0 2px rgba(17,24,39,0.35), 0 2px 6px rgba(0,0,0,0.4);
  }
  .park-dest-dot::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px;
    border-radius: 50%; background: #fff;
  }
  .park-dest-bubble {
    position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
    display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; white-space: nowrap;
    border-radius: 16px; background: #111827; color: #fff; pointer-events: auto;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35); font: 700 13px 'DM Sans', sans-serif;
  }
  .park-dest-bubble::after {
    content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -7px;
    border: 7px solid transparent; border-bottom: 0; border-top-color: #111827;
  }
  .park-dest-label { margin-right: 2px; }
  .park-dest-app {
    display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 44px;
    color: inherit; text-decoration: none;
  }
  .park-dest-app:active { transform: scale(0.92); }
  .park-dest-ico { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; }
  .park-dest-ico::before { content: ''; background: currentColor; }
  .park-dest-name { font-size: 11px; font-weight: 600; line-height: 1; }
  .park-dest-app--google .park-dest-ico { background: #34a853; }
  .park-dest-app--apple .park-dest-ico { background: #fff; color: #111827; }
  .park-dest-app--waze .park-dest-ico { background: #33ccff; color: #0b3a4a; }
  .park-dest-app--google .park-dest-ico::before { width: 18px; height: 18px; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat; }
  .park-dest-app--apple .park-dest-ico::before { width: 16px; height: 16px; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11 21 3l-8 18-2-8z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11 21 3l-8 18-2-8z'/%3E%3C/svg%3E") center / contain no-repeat; }
  .park-dest-app--waze .park-dest-ico::before { width: 19px; height: 19px; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 11l1.6-4.2A2 2 0 0 1 8.5 5.5h7a2 2 0 0 1 1.9 1.3L19 11a1.5 1.5 0 0 1 1.5 1.5V17h-2v2h-2.5v-2h-8v2H5.5v-2h-2v-4.5A1.5 1.5 0 0 1 5 11zm2.2 0h9.6l-1-2.9a.8.8 0 0 0-.8-.6H9a.8.8 0 0 0-.8.6zM7 15a1.2 1.2 0 1 0 0-2.4A1.2 1.2 0 0 0 7 15zm10 0a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 11l1.6-4.2A2 2 0 0 1 8.5 5.5h7a2 2 0 0 1 1.9 1.3L19 11a1.5 1.5 0 0 1 1.5 1.5V17h-2v2h-2.5v-2h-8v2H5.5v-2h-2v-4.5A1.5 1.5 0 0 1 5 11zm2.2 0h9.6l-1-2.9a.8.8 0 0 0-.8-.6H9a.8.8 0 0 0-.8.6zM7 15a1.2 1.2 0 1 0 0-2.4A1.2 1.2 0 0 0 7 15zm10 0a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
  body:not(.light) .park-dest-dot { background: #fff; border-color: #111827; box-shadow: 0 0 0 2px rgba(255,255,255,0.4), 0 2px 6px rgba(0,0,0,0.6); }
  body:not(.light) .park-dest-dot::after { background: #111827; }
  body:not(.light) .park-dest-bubble { background: #fff; color: #111827; box-shadow: 0 4px 14px rgba(0,0,0,0.6); }
  body:not(.light) .park-dest-bubble::after { border-top-color: #fff; }
  body:not(.light) .park-dest-app--apple .park-dest-ico { background: #111827; color: #fff; }
  @media (max-width: 768px) {
    /* The sheet takes over from the place card while it is open. */
    body.park-open .postcode-chip,
    body.park-open .travel-card { opacity: 0 !important; pointer-events: none !important; }
    .park-panel .park-body { touch-action: pan-y; }
    .park-panel .travel-card-btn { width: 44px; height: 44px; }
    .park-panel .travel-card-btn svg { width: 18px; height: 18px; }
    .park-cta-title { font-size: 16px; }
    .park-chip, .park-edit, .park-seg-btn, .park-secondary { font-size: 14px; }
  }
  /* ===== END PARK NEAR HERE ===== */

  /* ===== Locate me ===== */
  /* Bottom right: beside the theme button on a computer; on a phone, above whichever card or
     sheet covers the corner (app.js sets `bottom`), and out of the way when a sheet is pulled up. */
  .locate-box {
    position: absolute; right: 66px; bottom: 16px; z-index: 1000;
    display: flex; align-items: center; gap: 8px;
    transition: bottom 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s;
  }
  .locate-box.is-tucked { opacity: 0; pointer-events: none; }
  .locate-fab {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 20px; padding: 0;
    background: var(--glass-fab-bg);
    backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 4px 16px rgba(0,0,0,0.12);
    color: #3b82f6; cursor: pointer;
    transition: transform 0.2s, background 0.3s;
  }
  body.light .locate-fab { color: #1d4ed8; }
  .locate-fab:active { transform: scale(0.94); }
  .locate-fab svg { width: 18px; height: 18px; }
  .locate-fab.is-busy svg { animation: locate-pulse 1s ease-in-out infinite; }
  @keyframes locate-pulse { 50% { opacity: 0.3; } }
  .locate-msg {
    max-width: 240px; padding: 7px 12px; border-radius: 14px;
    background: var(--glass-pill-bg);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    color: var(--text); font: 500 12px/1.35 'DM Sans', sans-serif;
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
  }
  .locate-msg.open { opacity: 1; }
  .locate-msg:empty { display: none; }
  .locate-dot {
    width: 16px; height: 16px; border-radius: 50%;
    background: #3b82f6; border: 3px solid #fff; box-sizing: border-box;
    box-shadow: 0 0 0 6px rgba(59,130,246,0.25), 0 1px 4px rgba(0,0,0,0.35);
    pointer-events: none;
  }
  @media (max-width: 768px) {
    .locate-box { right: 16px; bottom: 40px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .locate-box { transition: none; }
    .locate-fab.is-busy svg { animation: none; opacity: 0.5; }
  }
