:root {
      color-scheme: light;
      --page: #edf3ef;
      --paper: #f7faf7;
      --surface: rgba(255, 255, 255, 0.88);
      --surface-solid: #ffffff;
      --ink: #15352f;
      --muted: #687b76;
      --faint: #8d9c97;
      --line: rgba(21, 53, 47, 0.11);
      --teal: #0d6758;
      --teal-dark: #084c42;
      --lake: #c8e4df;
      --green: #2c805f;
      --green-soft: #dcefe5;
      --amber: #a96d0a;
      --amber-soft: #f8e8bd;
      --orange: #c65331;
      --orange-soft: #f7ddd3;
      --shadow: 0 24px 65px rgba(34, 69, 61, 0.10);
      --shadow-soft: 0 12px 34px rgba(34, 69, 61, 0.08);
      --radius-lg: 32px;
      --radius-md: 24px;
      --radius-sm: 16px;
      --content: 1160px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      min-width: 320px;
      min-height: 100%;
      scroll-behavior: smooth;
      background: var(--page);
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
    }

    body {
      min-width: 320px;
      min-height: 100vh;
      margin: 0;
      overflow-x: hidden;
      color: var(--ink);
      background:
        radial-gradient(circle at 8% 4%, rgba(255, 255, 255, 0.98) 0, rgba(255, 255, 255, 0) 31rem),
        radial-gradient(circle at 92% 18%, rgba(192, 225, 216, 0.62) 0, rgba(192, 225, 216, 0) 32rem),
        var(--page);
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    button,
    input {
      font: inherit;
    }

    button,
    a {
      -webkit-tap-highlight-color: transparent;
    }

    button {
      color: inherit;
    }

    button:focus-visible,
    a:focus-visible {
      outline: 3px solid rgba(13, 103, 88, 0.28);
      outline-offset: 3px;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    .app-shell {
      width: min(100%, calc(var(--content) + 48px));
      margin: 0 auto;
      padding: max(20px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
    }

    .app-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      min-height: 56px;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 11px;
      min-width: 0;
      color: inherit;
      text-decoration: none;
    }

    .brand__mark {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      flex: 0 0 auto;
      color: #fff;
      border-radius: 14px;
      background: var(--teal);
      box-shadow: 0 10px 24px rgba(13, 103, 88, 0.22);
    }

    .brand__mark svg {
      width: 27px;
      height: 27px;
    }

    .brand__copy {
      display: grid;
      line-height: 1;
    }

    .brand__name {
      font-size: 24px;
      font-weight: 730;
      letter-spacing: -0.055em;
    }

    .brand__place {
      margin-top: 5px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 650;
      letter-spacing: 0.075em;
      text-transform: uppercase;
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .control-button {
      min-height: 44px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.72);
      box-shadow: 0 5px 20px rgba(36, 71, 64, 0.05);
      cursor: pointer;
      transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
    }

    .control-button:hover {
      transform: translateY(-1px);
      border-color: rgba(13, 103, 88, 0.2);
      background: #fff;
    }

    .control-button:active {
      transform: translateY(0);
    }

    .view-toggle {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      padding: 0 15px 0 12px;
      color: var(--teal-dark);
      font-size: 13px;
      font-weight: 700;
    }

    .view-toggle__icon {
      display: grid;
      place-items: center;
      width: 25px;
      height: 25px;
      border-radius: 50%;
      background: var(--green-soft);
    }

    .view-toggle svg,
    .all-times-button svg {
      width: 16px;
      height: 16px;
    }

    .all-times-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 0 14px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: end;
      gap: 24px;
      margin-top: clamp(58px, 8vw, 102px);
      margin-bottom: 34px;
    }

    .eyebrow {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 0 0 12px;
      color: var(--teal);
      font-size: 11px;
      font-weight: 760;
      letter-spacing: 0.105em;
      text-transform: uppercase;
    }

    .eyebrow::before {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #58a47e;
      box-shadow: 0 0 0 5px rgba(88, 164, 126, 0.13);
      content: "";
    }

    .hero h1 {
      max-width: 680px;
      margin: 0;
      font-size: clamp(40px, 6.5vw, 72px);
      font-weight: 670;
      letter-spacing: -0.065em;
      line-height: 0.94;
    }

    .hero__subhead {
      max-width: 560px;
      margin: 18px 0 0;
      color: var(--muted);
      font-size: clamp(14px, 2vw, 17px);
      line-height: 1.55;
    }

    .toronto-clock {
      min-width: 150px;
      padding: 14px 16px;
      border: 1px solid rgba(255, 255, 255, 0.75);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.48);
      text-align: right;
    }

    .toronto-clock span {
      display: block;
      color: var(--faint);
      font-size: 10px;
      font-weight: 730;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    .toronto-clock time {
      display: block;
      margin-top: 5px;
      font-size: 15px;
      font-weight: 710;
      letter-spacing: -0.02em;
      font-variant-numeric: tabular-nums;
    }

    .season-strip {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 18px;
      padding: 12px 15px;
      border: 1px solid rgba(13, 103, 88, 0.10);
      border-radius: 16px;
      background: rgba(221, 239, 232, 0.68);
      color: var(--teal-dark);
      font-size: 12px;
      font-weight: 620;
    }

    .season-strip__main,
    .season-strip__note {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .season-strip__main svg,
    .season-strip__note svg {
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
    }

    .season-strip__note {
      color: var(--muted);
      font-weight: 540;
    }

    .departures-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin: 0 2px 13px;
    }

    .departures-heading__copy {
      min-width: 0;
    }

    .departures-heading h2 {
      margin: 0;
      font-size: 15px;
      font-weight: 740;
      letter-spacing: -0.02em;
    }

    .departures-heading p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 12px;
    }

    .layout-toggle {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 3px;
      min-width: 142px;
      padding: 3px;
      flex: 0 0 auto;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.56);
      box-shadow: 0 7px 20px rgba(34, 69, 61, 0.05);
    }

    .layout-toggle__button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-width: 0;
      min-height: 44px;
      padding: 0 11px;
      color: var(--muted);
      border: 0;
      border-radius: 999px;
      background: transparent;
      font-size: 11px;
      font-weight: 720;
      cursor: pointer;
      transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
    }

    .layout-toggle__button svg {
      width: 15px;
      height: 15px;
      flex: 0 0 auto;
    }

    .layout-toggle__button[aria-pressed="true"] {
      color: var(--teal-dark);
      background: #fff;
      box-shadow: 0 4px 12px rgba(34, 69, 61, 0.10);
    }

    .list-view[hidden],
    .map-view[hidden] {
      display: none !important;
    }

    .return-heading {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: clamp(28px, 4vw, 42px) 2px 13px;
    }

    .return-heading__icon {
      display: grid;
      place-items: center;
      width: 40px;
      height: 40px;
      flex: 0 0 auto;
      color: var(--teal);
      border: 1px solid rgba(13, 103, 88, 0.11);
      border-radius: 13px;
      background: rgba(255, 255, 255, 0.62);
    }

    .return-heading__icon svg {
      width: 21px;
      height: 21px;
    }

    .return-heading__copy {
      display: grid;
      min-width: 0;
    }

    .return-heading__copy > span {
      color: var(--teal);
      font-size: 9px;
      font-weight: 790;
      letter-spacing: 0.09em;
      text-transform: uppercase;
    }

    .return-heading__copy strong {
      margin-top: 2px;
      font-size: 15px;
      letter-spacing: -0.025em;
    }

    .return-heading__copy small {
      margin-top: 3px;
      color: var(--muted);
      font-size: 11px;
    }

    .route-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 13px;
    }

    .route-card {
      --urgency: var(--green);
      --urgency-soft: var(--green-soft);
      position: relative;
      min-width: 0;
      min-height: 258px;
      padding: 19px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.84);
      border-radius: var(--radius-md);
      background: var(--surface);
      box-shadow: var(--shadow-soft);
      text-align: left;
      cursor: pointer;
      isolation: isolate;
      transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
    }

    .route-card::before {
      position: absolute;
      inset: 0 0 auto;
      z-index: -1;
      height: 5px;
      border-radius: inherit;
      background: var(--urgency);
      opacity: 0.92;
      content: "";
      transition: background 200ms ease;
    }

    .route-card::after {
      position: absolute;
      right: -55px;
      bottom: -80px;
      z-index: -1;
      width: 175px;
      height: 175px;
      border-radius: 50%;
      background: var(--urgency-soft);
      opacity: 0.45;
      content: "";
      transition: background 200ms ease;
    }

    .route-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 18px 40px rgba(34, 69, 61, 0.12);
    }

    .route-card[aria-pressed="true"] {
      border-color: color-mix(in srgb, var(--urgency) 35%, white);
      box-shadow: 0 18px 42px rgba(34, 69, 61, 0.13), inset 0 0 0 1px color-mix(in srgb, var(--urgency) 18%, transparent);
    }

    .route-card.urgency-soon {
      --urgency: var(--amber);
      --urgency-soft: var(--amber-soft);
    }

    .route-card.urgency-urgent {
      --urgency: var(--orange);
      --urgency-soft: var(--orange-soft);
    }

    .route-card.urgency-closed {
      --urgency: #7f8d89;
      --urgency-soft: #e7ebe9;
    }

    .route-card__top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .route-card__identity {
      display: flex;
      align-items: center;
      gap: 11px;
      min-width: 0;
    }

    .route-card__icon {
      display: grid;
      place-items: center;
      width: 43px;
      height: 43px;
      flex: 0 0 auto;
      color: var(--teal);
      border-radius: 15px;
      background: #edf6f2;
    }

    .route-card__icon svg {
      width: 29px;
      height: 29px;
    }

    .route-card__name {
      min-width: 0;
      line-height: 1.08;
    }

    .route-card__name strong,
    .route-card__name span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .route-card__name strong {
      font-size: 16px;
      font-weight: 730;
      letter-spacing: -0.035em;
    }

    .route-card__name span {
      margin-top: 3px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
    }

    .route-card__top-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
      flex: 0 0 auto;
    }

    .compact-travel-eta {
      display: flex;
      align-items: center;
      gap: 4px;
      color: var(--teal-dark);
      font-variant-numeric: tabular-nums;
    }

    .compact-travel-eta[hidden] {
      display: none;
    }

    .compact-travel-eta__mode {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 3px;
      min-height: 24px;
      padding: 0 6px;
      border: 1px solid rgba(13, 103, 88, 0.12);
      border-radius: 999px;
      background: rgba(237, 246, 242, 0.92);
      white-space: nowrap;
    }

    .compact-travel-eta__mode[data-source="approximate"] {
      color: #825d18;
      border-color: rgba(169, 109, 10, 0.15);
      background: rgba(248, 232, 189, 0.62);
    }

    .compact-travel-eta__mode svg {
      width: 13px;
      height: 13px;
      flex: 0 0 auto;
    }

    .compact-travel-eta__mode strong {
      font-size: 9px;
      font-weight: 780;
      letter-spacing: -0.02em;
      line-height: 1;
    }

    .route-card__chevron {
      display: grid;
      place-items: center;
      width: 28px;
      height: 28px;
      flex: 0 0 auto;
      color: var(--faint);
      border-radius: 50%;
      background: rgba(237, 243, 239, 0.8);
      transition: transform 200ms ease, color 200ms ease, background 200ms ease;
    }

    .route-card[aria-pressed="true"] .route-card__chevron {
      color: #fff;
      background: var(--teal);
      transform: rotate(90deg);
    }

    .route-card__chevron svg {
      width: 13px;
      height: 13px;
    }

    .route-card__readout {
      display: flex;
      align-items: flex-end;
      gap: 10px;
      min-height: 82px;
      margin-top: 22px;
      color: var(--urgency);
    }

    .route-card__value {
      font-size: clamp(48px, 6vw, 68px);
      font-weight: 680;
      letter-spacing: -0.075em;
      line-height: 0.88;
      font-variant-numeric: tabular-nums;
    }

    .route-card__unit {
      display: grid;
      gap: 2px;
      margin-bottom: 1px;
      line-height: 1;
    }

    .route-card__unit strong {
      font-size: 17px;
      font-weight: 760;
      letter-spacing: -0.03em;
    }

    .route-card__unit strong[data-card-duration-unit].has-hours {
      max-width: 62px;
      font-size: 14px;
      line-height: 1.05;
    }

    .route-card__unit span {
      max-width: 58px;
      color: var(--muted);
      font-size: 9px;
      font-weight: 650;
      letter-spacing: 0.03em;
      line-height: 1.15;
      text-transform: uppercase;
    }

    .route-card__readout--time {
      display: none;
    }

    .route-card__readout--time .route-card__value {
      font-size: clamp(37px, 5vw, 56px);
      letter-spacing: -0.065em;
    }

    .route-card__readout--time .route-card__unit strong {
      font-size: 13px;
      text-transform: uppercase;
    }

    body[data-view="times"] .route-card__readout--countdown,
    body[data-view="times"] .mode-countdown {
      display: none;
    }

    body[data-view="times"] .route-card__readout--time {
      display: flex;
    }

    body[data-view="times"] .mode-time {
      display: flex;
    }

    .mode-time {
      display: none;
    }

    .route-card__footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-top: 18px;
      padding-top: 13px;
      border-top: 1px solid var(--line);
      color: var(--muted);
      font-size: 11px;
    }

    .route-card__status {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      font-weight: 640;
    }

    .route-card__status::before {
      width: 7px;
      height: 7px;
      flex: 0 0 auto;
      border-radius: 50%;
      background: var(--urgency);
      content: "";
    }

    .route-card__status span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .route-card__exact {
      flex: 0 0 auto;
      color: var(--ink);
      font-weight: 710;
      font-variant-numeric: tabular-nums;
    }

    .map-view {
      margin-top: 8px;
    }

    .map-shell {
      position: relative;
      height: clamp(500px, 67dvh, 720px);
      min-height: 500px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.82);
      border-radius: var(--radius-lg);
      background: #cce9ed;
      box-shadow: var(--shadow);
      isolation: isolate;
    }

    .ferry-map {
      width: 100%;
      height: 100%;
      color: var(--ink);
      background:
        radial-gradient(ellipse at 75% 65%, rgba(169, 220, 185, 0.70) 0 12%, transparent 12.5%),
        radial-gradient(ellipse at 35% 82%, rgba(169, 220, 185, 0.64) 0 18%, transparent 18.5%),
        #cce9ed;
      font-family: inherit;
    }

    .map-title-card {
      position: absolute;
      top: 16px;
      left: 16px;
      z-index: 600;
      display: grid;
      min-width: 172px;
      padding: 12px 14px;
      pointer-events: none;
      border: 1px solid rgba(255, 255, 255, 0.74);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.90);
      box-shadow: 0 12px 30px rgba(34, 69, 61, 0.14);
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
      transition: opacity 180ms ease, transform 180ms ease;
    }

    .map-shell.has-popup .map-title-card {
      opacity: 0;
      transform: translateY(-6px);
    }

    .map-city-board {
      position: absolute;
      top: 16px;
      left: 16px;
      z-index: 700;
      width: 205px;
      padding: 12px;
      border: 1px solid rgba(255, 255, 255, 0.78);
      border-radius: 20px;
      background: rgba(250, 252, 250, 0.94);
      box-shadow: 0 18px 42px rgba(30, 65, 57, 0.18);
      -webkit-backdrop-filter: blur(14px);
      backdrop-filter: blur(14px);
      transition: opacity 180ms ease, transform 180ms ease;
    }

    .map-shell.has-popup .map-city-board {
      opacity: 0;
      pointer-events: none;
      transform: translateX(-8px);
    }

    .map-city-board__header {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 0 2px 10px;
    }

    .map-city-board__icon {
      display: grid;
      place-items: center;
      width: 34px;
      height: 34px;
      flex: 0 0 auto;
      color: var(--teal);
      border-radius: 11px;
      background: var(--green-soft);
    }

    .map-city-board__icon svg {
      width: 22px;
      height: 22px;
    }

    .map-city-board__header > span:last-child {
      display: grid;
      min-width: 0;
    }

    .map-city-board__header small {
      color: var(--teal);
      font-size: 8px;
      font-weight: 800;
      letter-spacing: 0.09em;
      text-transform: uppercase;
    }

    .map-city-board__header strong {
      margin-top: 2px;
      overflow: hidden;
      font-size: 12px;
      letter-spacing: -0.025em;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .map-city-board__routes {
      display: grid;
      gap: 6px;
    }

    .map-city-route {
      --urgency: var(--green);
      position: relative;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas: "name then" "primary then";
      align-items: end;
      gap: 2px 8px;
      min-height: 66px;
      padding: 9px 10px 9px 13px;
      overflow: hidden;
      color: var(--ink);
      border: 1px solid rgba(21, 53, 47, 0.08);
      border-radius: 14px;
      background: #fff;
      text-align: left;
      cursor: pointer;
      transition: transform 160ms ease, box-shadow 160ms ease;
    }

    .map-city-route::before {
      position: absolute;
      inset: 8px auto 8px 0;
      width: 3px;
      border-radius: 0 4px 4px 0;
      background: var(--urgency);
      content: "";
    }

    .map-city-route:hover {
      transform: translateX(2px);
      box-shadow: 0 8px 18px rgba(34, 69, 61, 0.10);
    }

    .map-city-route.urgency-soon { --urgency: var(--amber); }
    .map-city-route.urgency-urgent { --urgency: var(--orange); }
    .map-city-route.urgency-closed { --urgency: #7f8d89; }

    .map-city-route__name {
      grid-area: name;
      color: var(--muted);
      font-size: 8px;
      font-weight: 790;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .map-city-route__primary {
      grid-area: primary;
      color: var(--urgency);
      font-size: 23px;
      font-weight: 800;
      letter-spacing: -0.055em;
      line-height: 1;
      font-variant-numeric: tabular-nums;
    }

    .map-city-route__primary small {
      margin-left: 2px;
      font-size: 8px;
      font-weight: 780;
      letter-spacing: -0.01em;
      text-transform: uppercase;
    }

    .map-city-route__then {
      grid-area: then;
      max-width: 70px;
      color: var(--ink);
      font-size: 8px;
      font-weight: 720;
      line-height: 1.25;
      text-align: right;
      font-variant-numeric: tabular-nums;
    }

    .map-title-card span {
      color: var(--teal);
      font-size: 9px;
      font-weight: 790;
      letter-spacing: 0.09em;
      text-transform: uppercase;
    }

    .map-title-card strong {
      margin-top: 3px;
      font-size: 15px;
      letter-spacing: -0.03em;
    }

    .map-loading {
      position: absolute;
      inset: 0;
      display: grid;
      place-content: center;
      justify-items: center;
      gap: 7px;
      padding: 30px;
      color: var(--teal-dark);
      text-align: center;
    }

    .map-loading > span {
      width: 34px;
      height: 34px;
      margin-bottom: 3px;
      border: 3px solid rgba(13, 103, 88, 0.15);
      border-top-color: var(--teal);
      border-radius: 50%;
      animation: map-spin 800ms linear infinite;
    }

    .map-loading strong {
      font-size: 14px;
    }

    .map-loading small {
      color: var(--muted);
      font-size: 10px;
    }

    @keyframes map-spin {
      to { transform: rotate(360deg); }
    }

    .map-tile-notice {
      position: absolute;
      right: 16px;
      bottom: 24px;
      left: 50%;
      z-index: 650;
      width: max-content;
      max-width: calc(100% - 32px);
      padding: 9px 12px;
      color: #6c4b12;
      border: 1px solid rgba(169, 109, 10, 0.17);
      border-radius: 999px;
      background: rgba(255, 249, 235, 0.94);
      box-shadow: 0 8px 20px rgba(34, 69, 61, 0.10);
      font-size: 10px;
      font-weight: 650;
      text-align: center;
      transform: translateX(-50%);
    }

    .map-caption {
      margin: 10px 3px 0;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.45;
    }

    .map-caption a {
      color: var(--teal);
      font-weight: 680;
      text-decoration: none;
    }

    .ferry-map.leaflet-container {
      z-index: 1;
      background: #cce9ed;
      font-family: inherit;
    }

    .ferry-map .leaflet-control-zoom {
      overflow: hidden;
      border: 0;
      border-radius: 14px;
      box-shadow: 0 9px 24px rgba(34, 69, 61, 0.16);
    }

    .ferry-map .leaflet-control-zoom a {
      width: 38px;
      height: 38px;
      color: var(--teal-dark);
      border-color: var(--line);
      background: rgba(255, 255, 255, 0.94);
      font: 22px/38px -apple-system, BlinkMacSystemFont, sans-serif;
    }

    .ferry-map .leaflet-control-attribution {
      padding: 3px 6px;
      color: var(--muted);
      background: rgba(255, 255, 255, 0.82);
      font-size: 8px;
    }

    .ferry-map .leaflet-control-attribution a {
      color: var(--teal-dark);
    }

    .ferry-map-marker-wrap {
      border: 0 !important;
      background: transparent !important;
    }

    .map-marker {
      --marker: var(--green);
      --marker-soft: var(--green-soft);
      position: relative;
      display: grid;
      align-content: center;
      min-width: 138px;
      min-height: 72px;
      padding: 9px 11px 8px 42px;
      color: var(--ink);
      border: 2px solid #fff;
      border-radius: 17px;
      background: rgba(255, 255, 255, 0.95);
      box-shadow: 0 9px 24px rgba(34, 69, 61, 0.22);
      white-space: nowrap;
    }

    .map-marker::after {
      position: absolute;
      bottom: -7px;
      left: 61px;
      width: 12px;
      height: 12px;
      border-right: 2px solid #fff;
      border-bottom: 2px solid #fff;
      background: rgba(255, 255, 255, 0.95);
      content: "";
      transform: rotate(45deg);
    }

    .map-marker.urgency-soon {
      --marker: var(--amber);
      --marker-soft: var(--amber-soft);
    }

    .map-marker.urgency-urgent {
      --marker: var(--orange);
      --marker-soft: var(--orange-soft);
    }

    .map-marker.urgency-closed {
      --marker: #7f8d89;
      --marker-soft: #e7ebe9;
    }

    .map-marker__icon {
      position: absolute;
      top: 9px;
      left: 8px;
      display: grid;
      place-items: center;
      width: 30px;
      height: 48px;
      z-index: 1;
      color: var(--marker);
      border-radius: 10px;
      background: var(--marker-soft);
    }

    .map-marker__icon svg {
      width: 20px;
      height: 20px;
    }

    .map-marker__name,
    .map-marker__time,
    .map-marker__then {
      position: relative;
      z-index: 1;
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .map-marker__name {
      max-width: 92px;
      color: var(--muted);
      font-size: 8px;
      font-weight: 760;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .map-marker__time {
      margin-top: 2px;
      color: var(--marker);
      font-size: 14px;
      font-weight: 790;
      letter-spacing: -0.025em;
      font-variant-numeric: tabular-nums;
    }

    .map-marker__time small {
      margin-left: 2px;
      font-size: 8px;
      font-weight: 780;
      text-transform: uppercase;
    }

    .map-marker__then {
      margin-top: 3px;
      color: var(--ink);
      font-size: 8px;
      font-weight: 710;
      font-variant-numeric: tabular-nums;
    }

    .map-marker__travel-eta {
      position: absolute;
      top: 7px;
      right: 7px;
      z-index: 2;
      gap: 2px;
    }

    .map-marker__travel-eta .compact-travel-eta__mode {
      min-height: 17px;
      padding: 0 4px;
      border: 0;
      background: rgba(237, 246, 242, 0.96);
    }

    .map-marker__travel-eta .compact-travel-eta__mode svg {
      width: 10px;
      height: 10px;
    }

    .map-marker__travel-eta .compact-travel-eta__mode strong {
      font-size: 7px;
    }

    .map-marker.has-travel-eta .map-marker__name {
      max-width: 56px;
    }

    .map-marker--city {
      min-width: 108px;
      min-height: 52px;
      padding-left: 39px;
    }

    .map-marker--city .map-marker__icon {
      top: 8px;
      width: 27px;
      height: 34px;
    }

    .map-marker--city::after {
      left: 48px;
    }

    .ferry-map .leaflet-popup-content-wrapper {
      overflow: hidden;
      padding: 0;
      border-radius: 22px;
      background: rgba(250, 252, 250, 0.98);
      box-shadow: 0 20px 50px rgba(25, 57, 50, 0.24);
    }

    .ferry-map .leaflet-popup-content {
      width: 248px !important;
      margin: 0;
      font-family: inherit;
    }

    .ferry-map .leaflet-popup-tip {
      background: #fff;
    }

    .ferry-map .leaflet-popup-close-button {
      top: 9px;
      right: 9px;
      display: grid;
      place-items: center;
      width: 32px;
      height: 32px;
      z-index: 2;
      color: var(--muted);
      border-radius: 50%;
      background: rgba(237, 243, 239, 0.88);
      font: 20px/1 sans-serif;
    }

    .map-popup {
      padding: 16px;
      color: var(--ink);
    }

    .map-popup__eyebrow {
      color: var(--teal);
      font-size: 8px;
      font-weight: 790;
      letter-spacing: 0.09em;
      text-transform: uppercase;
    }

    .map-popup h3 {
      margin: 4px 36px 3px 0;
      font-size: 17px;
      letter-spacing: -0.035em;
    }

    .map-popup > p {
      margin: 0 0 12px;
      color: var(--muted);
      font-size: 9px;
    }

    .map-popup__departure {
      --urgency: var(--green);
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: end;
      gap: 10px;
      padding: 11px 12px;
      border: 1px solid rgba(21, 53, 47, 0.08);
      border-radius: 14px;
      background: #fff;
    }

    .map-popup__departure + .map-popup__departure {
      margin-top: 7px;
    }

    .map-popup__departure.urgency-soon { --urgency: var(--amber); }
    .map-popup__departure.urgency-urgent { --urgency: var(--orange); }
    .map-popup__departure.urgency-closed { --urgency: #7f8d89; }

    .map-popup__departure span,
    .map-popup__departure strong,
    .map-popup__departure small {
      display: block;
    }

    .map-popup__departure span {
      color: var(--muted);
      font-size: 8px;
      font-weight: 700;
    }

    .map-popup__departure strong {
      margin-top: 2px;
      color: var(--urgency);
      font-size: 20px;
      letter-spacing: -0.04em;
      font-variant-numeric: tabular-nums;
    }

    .map-popup__departure small {
      color: var(--ink);
      font-size: 9px;
      font-weight: 720;
      text-align: right;
      font-variant-numeric: tabular-nums;
    }

    .map-popup__actions {
      display: grid;
      justify-items: end;
      gap: 6px;
    }

    .map-popup__schedule {
      min-height: 38px;
      padding: 0 10px;
      color: var(--teal);
      border: 0;
      border-radius: 10px;
      background: var(--green-soft);
      font-size: 9px;
      font-weight: 760;
      cursor: pointer;
    }

    .map-popup__city-list {
      display: grid;
      gap: 7px;
    }

    .map-fallback {
      position: relative;
      width: 100%;
      height: 100%;
      overflow: hidden;
      background:
        radial-gradient(ellipse at 82% 42%, #b9dfc5 0 9%, transparent 9.5%),
        radial-gradient(ellipse at 52% 72%, #b9dfc5 0 19%, transparent 19.5%),
        linear-gradient(145deg, #bee4ea, #d7edf0);
    }

    .map-fallback::before {
      position: absolute;
      top: -12%;
      right: -8%;
      width: 80%;
      height: 35%;
      border-radius: 45%;
      background: #dfe8dc;
      content: "";
      transform: rotate(-6deg);
    }

    .map-fallback__message {
      position: absolute;
      right: 16px;
      bottom: 16px;
      left: 16px;
      z-index: 2;
      padding: 11px 13px;
      color: var(--muted);
      border: 1px solid rgba(255, 255, 255, 0.75);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.88);
      font-size: 10px;
      text-align: center;
    }

    .map-fallback__marker {
      position: absolute;
      z-index: 1;
      padding: 0;
      border: 0;
      background: transparent;
      cursor: pointer;
      transform: translate(-50%, -50%);
    }

    .map-fallback__marker--city { top: 19%; left: 48%; }
    .map-fallback__marker--wards { top: 47%; left: 79%; }
    .map-fallback__marker--centre { top: 72%; left: 43%; }
    .map-fallback__marker--hanlans { top: 58%; left: 18%; }

    .detail-panel {
      margin-top: 15px;
      padding: clamp(21px, 4vw, 38px);
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.84);
      border-radius: var(--radius-lg);
      background:
        radial-gradient(circle at 85% 12%, rgba(200, 228, 223, 0.50), transparent 18rem),
        rgba(255, 255, 255, 0.72);
      box-shadow: var(--shadow);
    }

    .detail-panel__header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
    }

    .detail-panel__kicker {
      margin: 0 0 7px;
      color: var(--teal);
      font-size: 10px;
      font-weight: 780;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    .detail-panel h2 {
      margin: 0;
      font-size: clamp(24px, 4vw, 36px);
      font-weight: 660;
      letter-spacing: -0.055em;
      line-height: 1.02;
    }

    .detail-panel__subtitle {
      margin: 9px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

    .schedule-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 44px;
      padding: 0 15px;
      flex: 0 0 auto;
      color: #fff;
      border: 0;
      border-radius: 999px;
      background: var(--teal);
      font-size: 12px;
      font-weight: 710;
      cursor: pointer;
      box-shadow: 0 10px 24px rgba(13, 103, 88, 0.18);
      transition: transform 180ms ease, background 180ms ease;
    }

    .schedule-link:hover {
      transform: translateY(-1px);
      background: var(--teal-dark);
    }

    .schedule-link svg {
      width: 15px;
      height: 15px;
    }

    .journey {
      max-width: 820px;
      margin: clamp(30px, 6vw, 55px) auto 8px;
    }

    .terminal-stop {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 13px;
      text-align: left;
    }

    .terminal-stop__icon {
      display: grid;
      place-items: center;
      width: 50px;
      height: 50px;
      flex: 0 0 auto;
      color: var(--teal);
      border: 1px solid rgba(13, 103, 88, 0.12);
      border-radius: 18px;
      background: #f4f9f6;
      box-shadow: 0 10px 28px rgba(34, 69, 61, 0.08);
    }

    .terminal-stop__icon svg {
      width: 32px;
      height: 32px;
    }

    .terminal-stop__copy span,
    .terminal-stop__copy strong {
      display: block;
    }

    .terminal-stop__copy span {
      margin-bottom: 3px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 740;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .terminal-stop__copy strong {
      font-size: 14px;
      font-weight: 710;
      letter-spacing: -0.025em;
    }

    .journey__middle {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
      align-items: center;
      gap: clamp(8px, 3vw, 30px);
      min-height: 250px;
      padding: 13px 0;
    }

    .route-track {
      position: relative;
      align-self: stretch;
      min-height: 220px;
    }

    .route-track::before {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 50%;
      width: 1px;
      background: linear-gradient(to bottom, transparent, rgba(13, 103, 88, 0.32) 13%, rgba(13, 103, 88, 0.32) 87%, transparent);
      content: "";
    }

    .route-track__arrows {
      position: absolute;
      top: 50%;
      left: 50%;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 5px;
      width: 47px;
      height: 92px;
      padding: 8px 7px;
      color: var(--teal);
      border: 1px solid rgba(13, 103, 88, 0.11);
      border-radius: 999px;
      background: #f7fbf9;
      box-shadow: 0 10px 24px rgba(34, 69, 61, 0.09);
      transform: translate(-50%, -50%);
    }

    .route-track__arrows svg {
      width: 100%;
      height: 100%;
    }

    .direction-readout {
      --urgency: var(--green);
      --urgency-soft: var(--green-soft);
      position: relative;
      min-width: 0;
      padding: 18px;
      border: 1px solid color-mix(in srgb, var(--urgency) 17%, transparent);
      border-radius: 21px;
      background: color-mix(in srgb, var(--urgency-soft) 55%, white);
    }

    .direction-readout.urgency-soon {
      --urgency: var(--amber);
      --urgency-soft: var(--amber-soft);
    }

    .direction-readout.urgency-urgent {
      --urgency: var(--orange);
      --urgency-soft: var(--orange-soft);
    }

    .direction-readout.urgency-closed {
      --urgency: #7f8d89;
      --urgency-soft: #e7ebe9;
    }

    .direction-readout__label {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 740;
      letter-spacing: 0.07em;
      text-transform: uppercase;
    }

    .direction-readout__label svg {
      width: 14px;
      height: 14px;
      color: var(--urgency);
    }

    .direction-readout__value {
      display: flex;
      align-items: baseline;
      gap: 7px;
      min-height: 54px;
      margin-top: 13px;
      color: var(--urgency);
    }

    .direction-readout__value strong {
      font-size: clamp(35px, 5vw, 52px);
      font-weight: 680;
      letter-spacing: -0.075em;
      line-height: 0.95;
      font-variant-numeric: tabular-nums;
    }

    .direction-readout__value span {
      font-size: 12px;
      font-weight: 760;
      text-transform: uppercase;
    }

    .direction-readout__value.mode-time {
      align-items: baseline;
    }

    .direction-readout__value.mode-time strong {
      font-size: clamp(29px, 4.2vw, 43px);
    }

    .direction-readout__meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-top: 11px;
      padding-top: 10px;
      border-top: 1px solid rgba(21, 53, 47, 0.09);
      color: var(--muted);
      font-size: 10px;
    }

    .direction-readout__meta span:last-child {
      color: var(--ink);
      font-weight: 680;
      font-variant-numeric: tabular-nums;
      text-align: right;
    }

    .direction-readout--outbound::after,
    .direction-readout--inbound::before {
      position: absolute;
      top: 50%;
      width: clamp(10px, 2.5vw, 28px);
      height: 1px;
      background: rgba(13, 103, 88, 0.20);
      content: "";
    }

    .direction-readout--outbound::after {
      left: 100%;
    }

    .direction-readout--inbound::before {
      right: 100%;
    }

    .service-note {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 13px;
      margin-top: 18px;
      padding: 15px 16px;
      border: 1px solid var(--line);
      border-radius: 19px;
      background: rgba(255, 255, 255, 0.56);
    }

    .service-note__icon {
      display: grid;
      place-items: center;
      width: 36px;
      height: 36px;
      color: var(--teal);
      border-radius: 12px;
      background: var(--green-soft);
    }

    .service-note__icon svg {
      width: 18px;
      height: 18px;
    }

    .service-note strong,
    .service-note span {
      display: block;
    }

    .service-note strong {
      margin-bottom: 3px;
      font-size: 12px;
    }

    .service-note span {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.4;
    }

    .service-note a {
      display: inline-flex;
      align-items: center;
      min-height: 44px;
      padding: 0 5px;
      color: var(--teal);
      font-size: 11px;
      font-weight: 710;
      text-decoration: none;
    }

    .app-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 24px 3px 0;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.5;
    }

    .app-footer p {
      margin: 0;
    }

    .app-footer a {
      color: var(--teal);
      font-weight: 680;
      text-decoration: none;
    }

    .schedule-dialog {
      width: min(720px, calc(100% - 30px));
      max-height: min(820px, calc(100dvh - 30px));
      margin: auto;
      padding: 0;
      overflow: hidden;
      color: var(--ink);
      border: 0;
      border-radius: 29px;
      background: #f8faf8;
      box-shadow: 0 34px 95px rgba(17, 48, 42, 0.28);
    }

    .schedule-dialog::backdrop {
      background: rgba(18, 43, 38, 0.48);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }

    .schedule-dialog[open] {
      animation: dialog-in 220ms ease both;
    }

    @keyframes dialog-in {
      from { opacity: 0; transform: translateY(12px) scale(0.985); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .schedule-dialog__shell {
      display: flex;
      flex-direction: column;
      max-height: min(820px, calc(100dvh - 30px));
    }

    .schedule-dialog__header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      padding: 23px 24px 18px;
      border-bottom: 1px solid var(--line);
      background: rgba(248, 250, 248, 0.96);
    }

    .schedule-dialog__header p {
      margin: 0 0 5px;
      color: var(--teal);
      font-size: 10px;
      font-weight: 760;
      letter-spacing: 0.09em;
      text-transform: uppercase;
    }

    .schedule-dialog__header h2 {
      margin: 0;
      font-size: 27px;
      font-weight: 670;
      letter-spacing: -0.05em;
    }

    .icon-button {
      display: grid;
      place-items: center;
      width: 44px;
      height: 44px;
      flex: 0 0 auto;
      color: var(--muted);
      border: 1px solid var(--line);
      border-radius: 50%;
      background: #fff;
      cursor: pointer;
    }

    .icon-button svg {
      width: 18px;
      height: 18px;
    }

    .schedule-dialog__controls {
      padding: 16px 24px 14px;
    }

    .schedule-tabs {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 5px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 15px;
      background: #edf2ef;
    }

    .schedule-tab {
      min-width: 0;
      min-height: 44px;
      padding: 0 8px;
      overflow: hidden;
      color: var(--muted);
      border: 0;
      border-radius: 11px;
      background: transparent;
      font-size: 12px;
      font-weight: 690;
      text-overflow: ellipsis;
      white-space: nowrap;
      cursor: pointer;
    }

    .schedule-tab[aria-selected="true"] {
      color: var(--teal-dark);
      background: #fff;
      box-shadow: 0 4px 12px rgba(34, 69, 61, 0.08);
    }

    .peak-control {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-top: 12px;
      padding: 12px 13px;
      border: 1px solid rgba(169, 109, 10, 0.13);
      border-radius: 15px;
      background: #fff9eb;
    }

    .peak-control strong,
    .peak-control span {
      display: block;
    }

    .peak-control strong {
      margin-bottom: 2px;
      color: #6e4a0d;
      font-size: 11px;
    }

    .peak-control span {
      color: #8a7145;
      font-size: 10px;
      line-height: 1.35;
    }

    .switch {
      position: relative;
      width: 50px;
      height: 44px;
      flex: 0 0 auto;
      padding: 0;
      border: 0;
      border-radius: 999px;
      background: transparent;
      cursor: pointer;
    }

    .switch::before {
      position: absolute;
      top: 8px;
      left: 1px;
      width: 48px;
      height: 28px;
      border-radius: 999px;
      background: #d9d9d2;
      content: "";
      transition: background 180ms ease;
    }

    .switch::after {
      position: absolute;
      top: 11px;
      left: 4px;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: #fff;
      box-shadow: 0 2px 6px rgba(38, 48, 44, 0.22);
      content: "";
      transition: transform 180ms ease;
    }

    .switch[aria-checked="true"] {
      background: transparent;
    }

    .switch[aria-checked="true"]::before {
      background: var(--amber);
    }

    .switch[aria-checked="true"]::after {
      transform: translateX(20px);
    }

    .schedule-dialog__body {
      overflow-y: auto;
      padding: 0 24px 24px;
      overscroll-behavior: contain;
    }

    .schedule-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 15px;
      margin: 3px 0 12px;
    }

    .schedule-title-row h3 {
      margin: 0;
      font-size: 17px;
      letter-spacing: -0.03em;
    }

    .schedule-title-row span {
      color: var(--muted);
      font-size: 10px;
    }

    .schedule-table-wrap {
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 17px;
      background: #fff;
    }

    .schedule-table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
    }

    .schedule-table th,
    .schedule-table td {
      width: 50%;
      padding: 11px 14px;
      text-align: left;
    }

    .schedule-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      color: var(--muted);
      border-bottom: 1px solid var(--line);
      background: #f5f8f6;
      font-size: 10px;
      font-weight: 720;
      letter-spacing: 0.055em;
      text-transform: uppercase;
    }

    .schedule-table th + th,
    .schedule-table td + td {
      border-left: 1px solid var(--line);
    }

    .schedule-table tr + tr td {
      border-top: 1px solid rgba(21, 53, 47, 0.07);
    }

    .schedule-table td {
      position: relative;
      color: var(--ink);
      font-size: 13px;
      font-weight: 610;
      font-variant-numeric: tabular-nums;
    }

    .schedule-table tr.is-peak td {
      background: #fffbf1;
    }

    .schedule-time {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 26px;
    }

    .schedule-time.is-next {
      padding: 0 8px;
      margin: 0 -8px;
      color: var(--teal-dark);
      border-radius: 999px;
      background: var(--green-soft);
      font-weight: 760;
    }

    .schedule-time.is-next::after {
      color: var(--green);
      font-size: 8px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      content: "Next";
    }

    .peak-badge {
      display: inline-flex;
      align-items: center;
      min-height: 20px;
      padding: 0 6px;
      color: #7d560e;
      border-radius: 999px;
      background: var(--amber-soft);
      font-size: 8px;
      font-weight: 780;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .schedule-disclaimer {
      margin: 14px 2px 0;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.5;
    }

    @media (max-width: 760px) {
      .app-shell {
        padding-right: 18px;
        padding-left: 18px;
      }

      .hero {
        grid-template-columns: 1fr;
        margin-top: 48px;
      }

      .toronto-clock {
        display: none;
      }

      .season-strip__note {
        display: none;
      }

      .route-card {
        min-height: 225px;
        padding: 15px;
      }

      .route-card__identity {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
      }

      .route-card__top-actions {
        position: absolute;
        top: 14px;
        right: 14px;
      }

      .route-card__chevron {
        position: static;
      }

      .route-card__readout {
        margin-top: 17px;
      }

      .journey__middle {
        grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
        gap: 8px;
      }

      .direction-readout {
        padding: 14px;
      }

      .direction-readout__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
      }

      .map-shell {
        height: clamp(500px, 68dvh, 650px);
      }
    }

    @media (max-width: 560px) {
      .app-shell {
        padding-right: 14px;
        padding-left: 14px;
      }

      .app-header {
        min-height: 44px;
      }

      .brand__mark {
        width: 38px;
        height: 38px;
        border-radius: 13px;
      }

      .brand__mark svg {
        width: 24px;
        height: 24px;
      }

      .brand__name {
        font-size: 22px;
      }

      .brand__place,
      .all-times-button span {
        display: none;
      }

      .all-times-button {
        width: 44px;
        padding: 0;
        justify-content: center;
      }

      .view-toggle {
        width: auto;
        padding: 0 12px 0 10px;
      }

      .view-toggle__icon {
        width: 23px;
        height: 23px;
      }

      .hero {
        margin-top: 30px;
        margin-bottom: 21px;
      }

      .hero h1 {
        max-width: 360px;
        font-size: clamp(35px, 11.8vw, 49px);
      }

      .hero__subhead {
        margin-top: 12px;
      }

      .season-strip {
        margin-right: 1px;
        margin-left: 1px;
      }

      .departures-heading {
        align-items: center;
        flex-direction: row;
        gap: 8px;
      }

      .departures-heading h2 {
        font-size: 14px;
      }

      .departures-heading p {
        margin-top: 3px;
        font-size: 10px;
        line-height: 1.25;
      }

      .layout-toggle {
        min-width: 126px;
      }

      .layout-toggle__button {
        gap: 4px;
        padding: 0 8px;
        font-size: 10px;
      }

      .return-heading {
        gap: 10px;
        margin-top: 25px;
      }

      .return-heading__icon {
        width: 36px;
        height: 36px;
      }

      .return-heading__copy strong {
        font-size: 14px;
      }

      .return-heading__copy small {
        font-size: 10px;
      }

      .route-grid {
        gap: 7px;
      }

      .route-card {
        min-height: 207px;
        padding: 12px 9px 11px;
        border-radius: 20px;
      }

      .route-card__identity {
        gap: 7px;
      }

      .route-card__icon {
        width: 36px;
        height: 36px;
        border-radius: 12px;
      }

      .route-card__icon svg {
        width: 24px;
        height: 24px;
      }

      .route-card__name strong {
        font-size: 13px;
      }

      .route-card__name span {
        font-size: 9px;
      }

      .route-card__chevron {
        width: 24px;
        height: 24px;
      }

      .route-card__top-actions {
        top: 11px;
        right: 8px;
        align-items: flex-end;
        flex-direction: column;
        gap: 3px;
      }

      .route-card__travel-eta {
        align-items: flex-end;
        flex-direction: column;
        gap: 2px;
      }

      .route-card__travel-eta .compact-travel-eta__mode {
        min-height: 18px;
        padding: 0 4px;
      }

      .route-card__travel-eta .compact-travel-eta__mode svg {
        width: 10px;
        height: 10px;
      }

      .route-card__travel-eta .compact-travel-eta__mode strong {
        font-size: 8px;
      }

      .route-card.has-travel-eta .route-card__chevron {
        display: none;
      }

      .route-card__readout {
        align-items: flex-end;
        gap: 5px;
        min-height: 59px;
        margin-top: 14px;
      }

      .route-card__value {
        font-size: clamp(32px, 11vw, 45px);
      }

      .route-card__unit {
        margin-bottom: 0;
      }

      .route-card__unit strong {
        font-size: 12px;
      }

      .route-card__unit strong[data-card-duration-unit].has-hours {
        max-width: 39px;
        font-size: 10px;
      }

      .route-card__unit span {
        max-width: 38px;
        font-size: 7px;
      }

      .route-card__readout--time .route-card__value {
        font-size: clamp(23px, 8vw, 34px);
      }

      .route-card__readout--time .route-card__unit strong {
        font-size: 9px;
      }

      .route-card__footer {
        display: block;
        margin-top: 11px;
        padding-top: 9px;
        font-size: 8px;
      }

      .route-card__exact {
        display: block;
        width: 100%;
        margin-top: 5px;
        font-size: 9px;
        text-align: right;
      }

      .map-shell {
        height: max(620px, 74dvh);
        min-height: 620px;
        border-radius: 25px;
      }

      .map-city-board {
        top: 12px;
        left: 12px;
        width: 150px;
        padding: 9px;
        border-radius: 17px;
      }

      .map-city-board__header {
        gap: 7px;
        padding-bottom: 8px;
      }

      .map-city-board__icon {
        width: 30px;
        height: 30px;
      }

      .map-city-board__header strong {
        font-size: 10px;
      }

      .map-city-route {
        grid-template-columns: minmax(0, 1fr) 48px;
        min-height: 58px;
        padding: 8px 7px 8px 11px;
      }

      .map-city-route__primary {
        font-size: 19px;
      }

      .map-city-route__primary small,
      .map-city-route__then,
      .map-city-route__name {
        font-size: 7px;
      }

      .map-marker {
        min-width: 120px;
        min-height: 66px;
        padding: 8px 8px 7px 38px;
      }

      .map-marker__icon {
        left: 7px;
        width: 27px;
        height: 44px;
      }

      .map-marker__name {
        max-width: 74px;
        font-size: 7px;
      }

      .map-marker__time {
        font-size: 13px;
      }

      .map-marker__then {
        font-size: 7px;
      }

      .map-marker::after {
        left: 52px;
      }

      .map-marker--city {
        min-width: 98px;
        min-height: 49px;
      }

      .map-marker--city .map-marker__icon {
        height: 31px;
      }

      .map-marker--city::after {
        left: 43px;
      }

      .ferry-map .leaflet-popup-content {
        width: min(238px, calc(100vw - 58px)) !important;
      }

      .detail-panel {
        padding: 20px 13px;
        border-radius: 25px;
      }

      .detail-panel__header {
        align-items: flex-start;
      }

      .schedule-link span {
        display: none;
      }

      .schedule-link {
        width: 44px;
        padding: 0;
      }

      .journey {
        margin-top: 32px;
      }

      .terminal-stop__icon {
        width: 44px;
        height: 44px;
        border-radius: 15px;
      }

      .terminal-stop__icon svg {
        width: 28px;
        height: 28px;
      }

      .terminal-stop__copy strong {
        font-size: 12px;
      }

      .journey__middle {
        grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
        min-height: 235px;
      }

      .route-track__arrows {
        width: 39px;
        height: 84px;
        padding: 8px 6px;
      }

      .direction-readout {
        padding: 11px 9px;
        border-radius: 17px;
      }

      .direction-readout__label {
        font-size: 8px;
      }

      .direction-readout__label svg {
        display: none;
      }

      .direction-readout__value {
        gap: 4px;
        min-height: 43px;
        margin-top: 9px;
      }

      .direction-readout__value strong {
        font-size: clamp(27px, 9.5vw, 38px);
      }

      .direction-readout__value span {
        font-size: 9px;
      }

      .direction-readout__value.mode-time strong {
        font-size: clamp(21px, 7.3vw, 30px);
      }

      .direction-readout__meta {
        font-size: 8px;
      }

      .service-note {
        grid-template-columns: auto minmax(0, 1fr);
      }

      .service-note a {
        display: none;
      }

      .app-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
      }

      .schedule-dialog {
        width: 100%;
        max-width: none;
        max-height: calc(100dvh - max(10px, env(safe-area-inset-top)));
        margin: auto 0 0;
        border-radius: 27px 27px 0 0;
      }

      .schedule-dialog__shell {
        max-height: calc(100dvh - max(10px, env(safe-area-inset-top)));
        padding-bottom: env(safe-area-inset-bottom);
      }

      .schedule-dialog__header {
        padding: 19px 17px 14px;
      }

      .schedule-dialog__controls,
      .schedule-dialog__body {
        padding-right: 17px;
        padding-left: 17px;
      }

      .schedule-tab {
        font-size: 11px;
      }

      .schedule-table th,
      .schedule-table td {
        padding-right: 10px;
        padding-left: 10px;
      }

      .schedule-table td {
        font-size: 12px;
      }

      .schedule-time {
        gap: 4px;
      }

      .schedule-time.is-next::after {
        display: none;
      }

      .peak-badge {
        font-size: 7px;
      }
    }

    @media (max-width: 360px) {
      .season-strip {
        padding-right: 10px;
        padding-left: 10px;
        font-size: 9.5px;
      }

      .season-strip__main {
        gap: 6px;
      }

      .route-card__readout--time {
        gap: 2px;
      }

      .route-card__readout--time .route-card__value {
        font-size: clamp(20px, 6.8vw, 25px);
      }

      .route-card__readout--time .route-card__unit strong {
        font-size: 7px;
      }

      .route-card__readout--time .route-card__unit span {
        display: none;
      }
    }

    @media (max-width: 420px) {
      .hero__subhead {
        display: none;
      }
    }

    /* Enhanced, consent-based travel estimates */
    .departures-tools {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex: 0 0 auto;
    }

    .location-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 50px;
      padding: 0 17px;
      color: #fff;
      border: 1px solid rgba(8, 76, 66, 0.14);
      border-radius: 999px;
      background: var(--teal);
      box-shadow: 0 10px 25px rgba(13, 103, 88, 0.22);
      font-size: 12px;
      font-weight: 760;
      cursor: pointer;
      transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
    }

    .location-button:hover {
      background: var(--teal-dark);
      box-shadow: 0 12px 29px rgba(13, 103, 88, 0.28);
      transform: translateY(-1px);
    }

    .location-button:disabled {
      color: var(--muted);
      border-color: var(--line);
      background: #e5ece8;
      box-shadow: none;
      cursor: not-allowed;
      transform: none;
    }

    .location-button svg,
    .map-action-button svg,
    .travel-dashboard__icon svg {
      width: 18px;
      height: 18px;
      flex: 0 0 auto;
    }

    .location-button[data-state="loading"] svg {
      animation: map-spin 800ms linear infinite;
    }

    .map-location-actions {
      position: absolute;
      top: 16px;
      right: 16px;
      z-index: 800;
      display: grid;
      gap: 8px;
    }

    .map-action-button {
      display: grid;
      place-items: center;
      width: 46px;
      height: 46px;
      padding: 0;
      color: var(--teal-dark);
      border: 1px solid rgba(255, 255, 255, 0.78);
      border-radius: 15px;
      background: rgba(255, 255, 255, 0.94);
      box-shadow: 0 10px 25px rgba(34, 69, 61, 0.17);
      cursor: pointer;
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
    }

    .map-action-button:hover {
      color: #fff;
      background: var(--teal);
    }

    .map-action-button:disabled {
      color: var(--faint);
      background: rgba(238, 243, 240, 0.92);
      cursor: not-allowed;
    }

    .travel-dashboard {
      margin-top: 13px;
      padding: 17px;
      border: 1px solid rgba(255, 255, 255, 0.82);
      border-radius: 25px;
      background: rgba(255, 255, 255, 0.72);
      box-shadow: var(--shadow-soft);
    }

    .travel-dashboard__header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 12px;
    }

    .travel-dashboard__title {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .travel-dashboard__icon {
      display: grid;
      place-items: center;
      width: 38px;
      height: 38px;
      flex: 0 0 auto;
      color: var(--teal);
      border-radius: 13px;
      background: var(--green-soft);
    }

    .travel-dashboard__copy {
      display: grid;
      min-width: 0;
    }

    .travel-dashboard__copy strong {
      font-size: 14px;
      letter-spacing: -0.025em;
    }

    .travel-dashboard__copy span {
      margin-top: 3px;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.35;
    }

    .travel-mode {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 3px;
      min-width: 152px;
      padding: 3px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--page);
    }

    .travel-mode__button {
      min-height: 42px;
      padding: 0 13px;
      color: var(--muted);
      border: 0;
      border-radius: 999px;
      background: transparent;
      font-size: 10px;
      font-weight: 750;
      cursor: pointer;
    }

    .travel-mode__button[aria-pressed="true"] {
      color: #fff;
      background: var(--teal);
      box-shadow: 0 5px 14px rgba(13, 103, 88, 0.2);
    }

    .travel-port-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 9px;
    }

    .travel-port {
      min-width: 0;
      padding: 13px;
      border: 1px solid rgba(21, 53, 47, 0.09);
      border-radius: 18px;
      background: #fff;
    }

    .travel-port__top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .travel-port__open {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-width: 0;
      min-height: 44px;
      padding: 0;
      color: var(--ink);
      border: 0;
      background: transparent;
      font-size: 12px;
      font-weight: 760;
      text-align: left;
      cursor: pointer;
    }

    .travel-port__open span:first-child {
      display: grid;
      place-items: center;
      width: 32px;
      height: 32px;
      flex: 0 0 auto;
      color: var(--teal);
      border-radius: 10px;
      background: var(--green-soft);
    }

    .travel-port__open svg {
      width: 21px;
      height: 21px;
    }

    .travel-port__schedule {
      min-height: 44px;
      padding: 0 10px;
      color: var(--teal);
      border: 0;
      border-radius: 11px;
      background: var(--green-soft);
      font-size: 9px;
      font-weight: 750;
      cursor: pointer;
    }

    .travel-port__modes {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
      margin-top: 9px;
    }

    .travel-estimate {
      display: grid;
      gap: 2px;
      min-width: 0;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--paper);
    }

    .travel-estimate[data-active="true"] {
      border-color: rgba(13, 103, 88, 0.3);
      background: #eef8f3;
    }

    .travel-estimate span {
      color: var(--muted);
      font-size: 8px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .travel-estimate strong {
      overflow: hidden;
      font-size: 11px;
      font-variant-numeric: tabular-nums;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .travel-port__note {
      min-height: 26px;
      margin: 8px 1px 0;
      color: var(--muted);
      font-size: 8.5px;
      line-height: 1.45;
    }

    .travel-port__note[data-kind="approximate"] {
      color: #7b5716;
    }

    .map-popup__travel {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
      margin: 0 0 9px;
    }

    .map-popup__travel span {
      display: grid;
      gap: 2px;
      padding: 8px;
      color: var(--muted);
      border: 1px solid var(--line);
      border-radius: 11px;
      background: #fff;
      font-size: 8px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .map-popup__travel strong {
      color: var(--ink);
      font-size: 11px;
      text-transform: none;
    }

    .map-popup__travel-note {
      margin: -3px 1px 10px !important;
      color: var(--muted);
      font-size: 8px !important;
      line-height: 1.4;
    }

    .user-location-marker {
      position: relative;
      width: 24px;
      height: 24px;
      border: 4px solid #fff;
      border-radius: 50%;
      background: #2176d2;
      box-shadow: 0 4px 14px rgba(18, 71, 130, 0.4);
    }

    .user-location-marker::after {
      position: absolute;
      inset: -8px;
      border: 2px solid rgba(33, 118, 210, 0.35);
      border-radius: 50%;
      content: "";
    }

    .location-dialog {
      width: min(520px, calc(100% - 28px));
      max-height: calc(100dvh - 28px);
      padding: 0;
      overflow: auto;
      color: var(--ink);
      border: 0;
      border-radius: 28px;
      background: #f9fbf9;
      box-shadow: 0 30px 85px rgba(17, 47, 41, 0.3);
    }

    .location-dialog::backdrop {
      background: rgba(10, 37, 32, 0.48);
      -webkit-backdrop-filter: blur(5px);
      backdrop-filter: blur(5px);
    }

    .location-dialog__body {
      padding: 24px;
    }

    .location-dialog__mark {
      display: grid;
      place-items: center;
      width: 52px;
      height: 52px;
      color: #fff;
      border-radius: 17px;
      background: var(--teal);
      box-shadow: 0 12px 27px rgba(13, 103, 88, 0.24);
    }

    .location-dialog__mark svg {
      width: 25px;
      height: 25px;
    }

    .location-dialog h2 {
      margin: 19px 0 8px;
      font-size: clamp(24px, 5vw, 34px);
      letter-spacing: -0.055em;
      line-height: 1;
    }

    .location-dialog p {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
    }

    .location-dialog__disclosure {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 10px;
      margin-top: 16px;
      padding: 13px;
      color: var(--teal-dark);
      border: 1px solid rgba(13, 103, 88, 0.12);
      border-radius: 15px;
      background: var(--green-soft);
      font-size: 11px;
      line-height: 1.45;
    }

    .location-dialog__disclosure svg {
      width: 18px;
      height: 18px;
    }

    .location-dialog__disclosure a {
      color: inherit;
      font-weight: 750;
    }

    .location-dialog__actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 20px;
    }

    .dialog-button {
      min-height: 46px;
      padding: 0 16px;
      border: 0;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 760;
      cursor: pointer;
    }

    .dialog-button--quiet {
      color: var(--muted);
      background: var(--page);
    }

    .dialog-button--primary {
      color: #fff;
      background: var(--teal);
      box-shadow: 0 9px 20px rgba(13, 103, 88, 0.2);
    }

    .location-inline-status {
      margin: -3px 2px 12px;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.45;
    }

    @media (max-width: 820px) {
      .departures-heading--toolbar {
        align-items: flex-start;
      }

      .departures-tools {
        flex-wrap: wrap;
      }

      .location-button {
        order: 2;
      }
    }

    @media (max-width: 650px) {
      .departures-heading--toolbar {
        align-items: stretch;
        flex-direction: column;
      }

      .departures-tools {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(126px, auto);
        width: 100%;
      }

      .location-button {
        order: 0;
        width: 100%;
        min-width: 0;
      }

      .travel-port-grid {
        grid-template-columns: 1fr;
      }

      .travel-dashboard__header {
        align-items: stretch;
        flex-direction: column;
      }

      .travel-mode {
        width: 100%;
      }
    }

    @media (max-width: 560px) {
      .map-location-actions {
        top: 12px;
        right: 12px;
      }

      .map-action-button {
        width: 44px;
        height: 44px;
        border-radius: 14px;
      }

      .travel-dashboard {
        padding: 13px;
        border-radius: 21px;
      }

      .map-marker {
        min-width: 132px;
        min-height: 78px;
      }

      .map-marker__travel-eta {
        align-items: flex-end;
        flex-direction: column;
        gap: 1px;
      }

      .location-dialog {
        width: 100%;
        max-width: none;
        max-height: calc(100dvh - max(10px, env(safe-area-inset-top)));
        margin: auto 0 0;
        border-radius: 27px 27px 0 0;
      }

      .location-dialog__body {
        padding: 22px 17px max(22px, env(safe-area-inset-bottom));
      }

      .location-dialog__actions {
        display: grid;
        grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
      }
    }

    @media (max-width: 360px) {
      .departures-tools {
        grid-template-columns: minmax(0, 1fr) 118px;
      }

      .location-button {
        padding: 0 11px;
        font-size: 10px;
      }

      .travel-port {
        padding: 11px;
      }

      .dialog-button {
        padding: 0 11px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }
