
.mobile-network-reader[hidden] {
  display: none;
}

@media (max-width: 760px), (max-width: 980px) and (orientation: portrait), (max-width: 980px) and (max-height: 599px) {
  html body.is-map-active .mobile-map-control-rail .reach-isochrone-control {
    top: calc(100% + 7px);
  }

  html body.is-map-active .mobile-map-control-rail .reach-isochrone-copy strong {
    font-size: 0.7rem;
  }

  html body.is-map-active .mobile-map-control-rail .reach-isochrone-copy small {
    font-size: 0.55rem;
  }
}

@media (max-width: 760px), (max-width: 980px) and (orientation: portrait), (max-width: 980px) and (max-height: 599px) {
  body {
    --mobile-experience-edge: 10px;
    --mobile-experience-radius: 10px;
    --mobile-experience-border: rgba(22, 20, 15, 0.24);
    --mobile-experience-paper: rgba(255, 253, 247, 0.96);
    --mobile-experience-shadow: 0 8px 22px rgba(35, 29, 20, 0.12);
  }

  body.is-mobile-network-reader-open {
    overflow: hidden;
  }

  /* The launch card plus the 52px mode rail and its 2px gap, so Find a Home
     and Data are reachable before a station is chosen. */
  body.is-map-active.is-reach-mode:not(.has-origin) {
    --mobile-sheet-peek: calc(clamp(166px, 21dvh, 178px) + 54px);
    --mobile-map-bottom-clearance: calc(env(safe-area-inset-bottom) + var(--mobile-sheet-peek) + 10px);
  }

  html body.is-map-active.is-reach-mode:not(.has-origin) #mobileMapSearchForm.mobile-map-search-form {
    position: absolute;
    top: calc(env(safe-area-inset-top) + var(--mobile-experience-edge));
    right: calc(env(safe-area-inset-right) + var(--mobile-experience-edge));
    left: calc(env(safe-area-inset-left) + var(--mobile-experience-edge));
    z-index: 32;
    display: grid;
    width: auto;
    max-width: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  html body.is-map-active #mobileMapSearchForm .mobile-map-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 0;
    min-height: 46px;
    height: 46px;
    padding: 2px;
    overflow: hidden;
    border: 1px solid var(--mobile-experience-border);
    border-radius: 18px;
    background: var(--mobile-experience-paper);
    box-shadow: var(--mobile-experience-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  html body.is-map-active #mobileMapSearchForm #mobileMapStationSearch {
    height: 40px;
    min-height: 40px;
    padding: 0 32px 0 11px;
    border: 0;
    border-radius: 15px 0 0 15px;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 560;
    letter-spacing: 0;
    box-shadow: none;
  }

  html body.is-map-active #mobileMapSearchForm #mobileMapLocateButton {
    position: relative;
    inset: auto;
    display: grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    clip: auto;
    overflow: hidden;
    border: 0;
    border-left: 1px solid rgba(22, 20, 15, 0.13);
    border-radius: 0 15px 15px 0;
    background: transparent;
    color: transparent;
    font-size: 0;
    box-shadow: none;
  }

  html body.is-map-active #mobileMapSearchForm .origin-search-clear {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
  }

  html body.is-map-active #mobileMapSearchForm #mobileMapLocateButton::before {
    content: "";
    display: block;
    width: 17px;
    height: 17px;
    border: 1.7px solid var(--ink);
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent) 0 2px, transparent 2.5px);
  }

  html body.is-map-active #mobileMapSearchForm #mobileMapLocateButton::after,
  html body.is-map-active #mobileMapSearchForm #mobileMapLocateButton > span {
    content: none;
    display: none;
  }

  html body.is-map-active #mobileMapSearchForm .mobile-map-search-results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 40;
    width: auto;
    max-height: min(46dvh, 320px);
    overflow: auto;
    transform: none;
    border-radius: var(--mobile-experience-radius);
    box-shadow: 0 12px 30px rgba(35, 29, 20, 0.18);
  }

  body.is-map-active.is-reach-mode:not(.has-origin) .map-frame .map-state-pill,
  body.is-map-active.is-reach-mode:not(.has-origin) .map-surface-rail,
  body.is-map-active.is-reach-mode:not(.has-origin) #mobileAdjustMap,
  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheetShareButton,
  body.is-map-active.is-reach-mode:not(.has-origin) .mobile-map-control-rail {
    display: none;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet.mobile-sheet[data-snap="collapsed"] {
    gap: 0;
    padding: 4px 11px calc(max(10px, env(safe-area-inset-bottom)) + 2px);
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    background:
      var(--paper-panel-background),
      linear-gradient(180deg, rgba(255, 253, 247, 0.995), rgba(248, 245, 236, 0.985));
    background-size: var(--paper-grain-size), var(--paper-formation-size), auto;
    box-shadow: 0 -4px 12px rgba(61, 47, 28, 0.08);
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="collapsed"] > :not(.mobile-sheet-handle):not(#mobilePrimarySummary):not(.mobile-collapsed-control-bar) {
    display: none;
  }

  /* Below the launch card (order 2-3 in mobile-sheet.css), where the rail sits
     once a station is chosen. */
  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="collapsed"] > .mobile-collapsed-control-bar {
    order: 10;
    margin-top: 2px;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="collapsed"] > .mobile-sheet-handle {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    display: grid;
    justify-self: center;
    width: 64px;
    min-width: 64px;
    height: 18px;
    min-height: 18px;
    margin: 0 auto 1px;
    padding: 0;
    transform: none;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="collapsed"] > .mobile-sheet-handle::before {
    width: 36px;
    height: 3px;
    border: 0;
    border-radius: 99px;
    background: rgba(22, 20, 15, 0.26);
    box-shadow: none;
    transform: translateX(-50%);
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="collapsed"] > .mobile-sheet-handle::after {
    content: none;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="collapsed"] > #mobilePrimarySummary {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .mobile-launch-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-launch-kicker {
    padding-left: 3px;
    color: var(--accent);
    font: 760 0.59rem/1 var(--font-main);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .mobile-launch-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    align-items: start;
    min-width: 0;
  }

  .mobile-launch-copy > strong {
    display: block;
    max-width: 24ch;
    color: var(--ink);
    font: 660 clamp(1.13rem, 5.2vw, 1.34rem)/1.05 var(--font-serif);
    letter-spacing: -0.018em;
    text-wrap: balance;
    white-space: normal;
  }

  .mobile-launch-copy > p {
    max-width: 48ch;
    min-width: 0;
    margin: 0;
    color: rgba(22, 20, 15, 0.67);
    font: 520 0.72rem/1.24 var(--font-main);
    letter-spacing: 0;
  }

  .mobile-launch-actions {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    margin-top: 2px;
  }

  .mobile-launch-actions nav {
    display: flex;
    flex: 1 1 0;
    gap: 4px;
    min-width: 0;
  }

  .mobile-launch-actions nav button,
  .mobile-network-story-button {
    min-height: 36px;
    height: 36px;
    margin: 0;
    border: 1px solid rgba(22, 20, 15, 0.18);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.69rem;
    font-weight: 680;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .mobile-launch-actions nav button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 6px;
    background: rgba(255, 253, 247, 0.72);
    color: var(--ink);
    white-space: normal;
    overflow-wrap: normal;
    line-height: 1.15;
  }

  .mobile-network-story-button {
    flex: 0 0 auto;
    max-width: 88px;
    white-space: normal;
    line-height: 1.15;
    padding: 0 7px;
    border-color: transparent;
    background: transparent;
    color: rgba(22, 20, 15, 0.7);
  }

  .mobile-network-story-button::after {
    content: " →";
    color: var(--accent);
  }

  /* Collapsed sheet: the three starting stations take the whole row so each
   * name fits on two lines. The generic slip padding and origin ring would
   * otherwise leave about 50px for "Embarcadero". The survey link returns
   * once the sheet is raised. */
  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="collapsed"] .mobile-network-story-button {
    display: none;
  }

  html[data-material-prototype] body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="collapsed"] .mobile-launch-actions nav [data-atlas-control="slip"][data-atlas-control] {
    height: auto;
    min-height: 44px;
    padding: 5px 8px;
    font-size: 12.5px;
    line-height: 1.15;
    text-align: center;
    overflow: visible;
  }

  html[data-material-prototype] body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="collapsed"] .mobile-launch-actions nav [data-atlas-control="slip"]::before {
    display: none;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet:is([data-snap="half"], [data-snap="full"]) .mobile-launch-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet:is([data-snap="half"], [data-snap="full"]) .mobile-launch-actions nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet:is([data-snap="half"], [data-snap="full"]) .mobile-launch-actions nav button {
    box-sizing: border-box;
    width: 100%;
    padding-inline: 6px;
    overflow: hidden;
    text-overflow: clip;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet:is([data-snap="half"], [data-snap="full"]) .mobile-network-story-button {
    justify-self: start;
    height: 32px;
    min-height: 32px;
    padding-inline: 1px;
  }

  .mobile-launch-dossier {
    display: none;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="full"] > .mobile-sheet-head {
    display: none;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="full"] .mobile-launch-card {
    gap: 10px;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="full"] .mobile-launch-dossier {
    display: grid;
    gap: 12px;
    margin-top: 3px;
    padding-top: 13px;
    border-top: 1px solid rgba(22, 20, 15, 0.2);
  }

  .mobile-launch-dossier-intro {
    display: grid;
    gap: 4px;
  }

  .mobile-launch-dossier-intro > span,
  .mobile-launch-lenses > span {
    color: var(--accent);
    font: 760 0.59rem/1 var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .mobile-launch-dossier-intro h3 {
    max-width: 22ch;
    margin: 0;
    color: var(--ink);
    font: 680 1.16rem/1.05 var(--font-serif);
    letter-spacing: -0.018em;
    text-wrap: balance;
  }

  .mobile-launch-dossier-intro p {
    max-width: 48ch;
    margin: 0;
    color: rgba(22, 20, 15, 0.68);
    font: 520 0.75rem/1.42 var(--font-main);
    text-wrap: pretty;
  }

  .mobile-launch-network {
    display: grid;
    grid-template-columns: minmax(100px, 0.78fr) minmax(0, 1.22fr);
    gap: 11px;
    align-items: center;
    padding: 9px;
    border: 1px solid rgba(22, 20, 15, 0.2);
    border-radius: 2px;
    background: rgba(255, 253, 247, 0.44);
    box-shadow: inset 0 0 0 2px rgba(244, 236, 220, 0.72);
  }

  .mobile-launch-network figure {
    display: grid;
    gap: 4px;
    margin: 0;
  }

  .mobile-launch-network .network-plate {
    width: min(112px, 100%);
  }

  .mobile-launch-network figcaption {
    color: rgba(22, 20, 15, 0.56);
    font: 620 0.52rem/1.2 var(--font-mono);
  }

  .mobile-launch-network dl {
    display: grid;
    gap: 8px;
    min-width: 0;
    margin: 0;
  }

  .mobile-launch-network dl > div {
    display: grid;
    gap: 1px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(22, 20, 15, 0.14);
  }

  .mobile-launch-network dl > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .mobile-launch-network dd,
  .mobile-launch-network dt {
    margin: 0;
  }

  .mobile-launch-network dd {
    order: -1;
    overflow-wrap: anywhere;
    color: var(--ink);
    font: 720 1rem/1 var(--font-mono);
  }

  .mobile-launch-network dt {
    color: rgba(22, 20, 15, 0.58);
    font: 650 0.56rem/1.15 var(--font-main);
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .mobile-launch-lenses {
    display: grid;
    gap: 5px;
  }

  .mobile-launch-lenses ol {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-launch-lenses li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 8px 0;
    border-top: 1px solid rgba(22, 20, 15, 0.14);
  }

  .mobile-launch-lenses li > b {
    color: var(--accent);
    font: 760 0.62rem/1.25 var(--font-mono);
  }

  .mobile-launch-lenses li > span {
    display: grid;
    gap: 2px;
  }

  .mobile-launch-lenses strong {
    color: var(--ink);
    font: 720 0.75rem/1.15 var(--font-main);
  }

  .mobile-launch-lenses small {
    color: rgba(22, 20, 15, 0.64);
    font: 520 0.68rem/1.32 var(--font-main);
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="full"] > .mobile-sheet-context-rail {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    order: 2;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="full"] .mobile-sheet-time-control,
  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="full"] .mobile-spatial-view-guide {
    display: none;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="full"] > #mobilePrimarySummary {
    display: block;
    order: 3;
  }

  body.is-map-active.is-reach-mode:not(.has-origin) #mobileSheet[data-snap="full"] > .mobile-mode-control {
    order: 4;
  }

  html body.is-map-active.is-reach-mode:not(.has-origin):is(.is-mobile-sheet-expanded, .is-mobile-sheet-full) #mobileMapSearchForm.mobile-map-search-form {
    display: none;
  }

  body.is-map-active #mobileSheet[data-snap="full"] .mobile-sheet-context-rail .search-results {
    position: relative;
    inset: auto;
    width: 100%;
    max-height: min(42dvh, 300px);
    overflow: auto;
    transform: none;
  }

  html body.is-map-active.is-reach-mode.has-origin:not(.is-mobile-sheet-expanded):not(.is-mobile-sheet-full) .mobile-map-control-rail,
  html body.is-time-rings-view.is-map-active.is-reach-mode.has-origin:not(.is-mobile-sheet-expanded):not(.is-mobile-sheet-full) .mobile-map-control-rail {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 62px);
    right: auto;
    left: calc(env(safe-area-inset-left) + var(--mobile-experience-edge));
    z-index: 10;
    display: flex;
    width: min(214px, calc(100% - 126px));
    height: 46px;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  html body.is-map-active .mobile-map-control-rail .mobile-map-spatial-view-guide,
  html body.is-map-active .mobile-map-control-rail .mobile-map-spatial-view-toggle {
    display: block;
    width: 100%;
    min-width: 0;
    height: 46px;
    min-height: 46px;
  }

  html body.is-map-active .mobile-map-control-rail .mobile-map-spatial-view-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    padding: 1px;
    overflow: hidden;
    border: 1px solid var(--mobile-experience-border);
    border-radius: var(--mobile-experience-radius);
    background: var(--mobile-experience-paper);
    box-shadow: 0 5px 16px rgba(35, 29, 20, 0.09);
  }

  html body.is-map-active .mobile-map-control-rail .spatial-view-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0 5px;
    overflow: visible;
    border: 0;
    border-radius: 7px;
    font-family: var(--font-main);
    font-size: 0.66rem;
    font-weight: 720;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
  }

  html body.is-map-active .mobile-map-control-rail .spatial-view-icon,
  html body.is-map-active .mobile-map-control-rail .spatial-view-button em {
    display: none;
  }

  html body.is-map-active .mobile-map-control-rail .spatial-view-copy,
  html body.is-map-active .mobile-map-control-rail .spatial-view-text {
    display: block;
    min-width: 0;
    overflow: visible;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-overflow: clip;
    white-space: nowrap;
  }

  :is(.mobile-map-spatial-view-guide, .mobile-spatial-view-guide) .spatial-view-text[data-compact-en] {
    color: inherit;
    font: inherit;
  }

  :is(.mobile-map-spatial-view-guide, .mobile-spatial-view-guide) .spatial-view-text[data-compact-en]::after {
    content: none;
    display: none;
  }

  html body.is-map-active.is-reach-mode.has-origin .mobile-map-time-instrument {
    position: fixed;
    right: calc(env(safe-area-inset-right) + 14px);
    bottom: calc(env(safe-area-inset-bottom) + var(--mobile-sheet-peek) + 10px);
    left: calc(env(safe-area-inset-left) + 14px);
    z-index: 12;
    display: block;
    min-height: 46px;
    overflow: hidden;
    border: 1px solid rgba(22, 20, 15, 0.2);
    border-radius: var(--mobile-experience-radius);
    background: rgba(255, 253, 247, 0.94);
    box-shadow: 0 7px 20px rgba(35, 29, 20, 0.1);
    pointer-events: auto;
  }

  html body.is-map-active.is-reach-mode.has-origin .mobile-map-time-instrument > .map-zoom-controls,
  html body.is-map-active.is-reach-mode.has-origin #mobileReachTimeControl > .mobile-time-step-button{
    display: none;
  }

  html body.is-map-active.is-reach-mode.has-origin .mobile-map-time-instrument #mobileReachTimeControl.mobile-reach-time-control {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
  }

  html body.is-map-active.is-reach-mode.has-origin #mobileReachTimeControl .mobile-time-range-label {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    grid-template-rows: 28px 12px;
    grid-template-areas: "label rail value" ". scale .";
    gap: 0 6px;
    align-content: center;
    align-items: center;
    width: 100%;
    min-height: 42px;
    height: 42px;
    margin: 0;
    padding: 0 8px;
    overflow: visible;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
  }

  html body.is-map-active.is-reach-mode.has-origin #mobileReachTimeControl .mobile-time-range-label > span {
    grid-area: label;
    display: block;
    min-width: 0;
    overflow: visible;
    color: rgba(22, 20, 15, 0.62);
    font: 650 0.61rem/1 var(--font-main);
    letter-spacing: 0;
    text-overflow: clip;
    text-transform: none;
    white-space: nowrap;
  }

  html body.is-map-active.is-reach-mode.has-origin #mobileReachTimeControl .mobile-time-range-label > span::after {
    content: none;
  }

  html body.is-map-active.is-reach-mode.has-origin #mobileReachTimeControl .mobile-time-range-label input {
    grid-area: rail;
    width: 100%;
    min-width: 0;
    height: 26px;
    margin: 0;
    padding: 0;
    pointer-events: auto;
  }

  .mobile-map-time-scale {
    grid-area: scale;
    position: relative;
    display: block;
    height: 10px;
    margin: 0 8px;
    color: rgba(22, 20, 15, 0.54);
    font: 700 0.48rem/1 var(--font-atlas-mono);
  }

  .mobile-map-time-scale span {
    position: absolute;
    left: var(--mark);
    transform: translateX(var(--shift, -50%));
  }

  /* Preserve the endpoint while removing the only crowded intermediate mark
   * on short phone rails. The range input and accessible value remain intact. */
  @media (max-width: 380px) {
    .mobile-map-time-scale span:nth-child(5) {
      display: none;
    }
  }

  html body.is-map-active.is-reach-mode.has-origin #mobileReachTimeControl .mobile-time-range-label strong {
    grid-area: value;
    justify-self: end;
    margin: 0;
  }

  html body.is-map-active .map-frame .distance-legend,
  html body.is-map-active.is-reach-mode.has-origin:not(.is-time-rings-view) .map-frame .distance-legend,
  html body.is-time-rings-view.is-map-active.is-reach-mode.has-origin .map-frame .distance-legend {
    top: auto;
    right: auto;
    bottom: calc(env(safe-area-inset-bottom) + var(--mobile-sheet-peek) + 70px);
    left: calc(env(safe-area-inset-left) + 14px);
    z-index: 7;
    display: grid;
    grid-template-rows: auto auto;
    align-content: start;
    gap: 3px;
    box-sizing: border-box;
    width: 86px;
    height: auto;
    min-width: 0;
    max-width: 86px;
    min-height: 38px;
    padding: 7px 9px 8px;
    overflow: hidden;
    border: 1px solid var(--mobile-experience-border);
    border-radius: var(--mobile-experience-radius);
    background: var(--mobile-experience-paper);
    box-shadow: 0 5px 16px rgba(35, 29, 20, 0.11);
    color: rgba(22, 20, 15, 0.72);
    font: 650 0.61rem/1 var(--font-main);
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  html body.is-map-active .map-frame .distance-legend > span {
    font: inherit;
    letter-spacing: inherit;
  }

  html body.is-map-active .map-frame .distance-legend > div {
    height: 6px;
    border: 0;
    border-bottom: 1.5px solid currentColor;
    background:
      linear-gradient(currentColor, currentColor) left bottom / 1.5px 5px no-repeat,
      linear-gradient(currentColor, currentColor) right bottom / 1.5px 5px no-repeat;
    box-shadow: none;
  }

  /* Station Data keeps its compact legend directly below the scale. Matching
   * surfaces make the two independent controls read as one bottom-left map key. */
  html body.is-map-active.is-index-mode .mobile-index-map-legend > summary {
    border-color: var(--mobile-experience-border);
    border-radius: var(--mobile-experience-radius);
    background: var(--mobile-experience-paper);
    box-shadow: 0 5px 16px rgba(35, 29, 20, 0.11);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  html body.is-map-active .map-frame .distance-legend > div::before,
  html body.is-map-active .map-frame .distance-legend::before,
  html body.is-map-active .map-frame .distance-legend::after {
    content: none;
    display: none;
  }

  html body.is-map-active.is-reach-mode:not(.has-origin) .map-frame .distance-legend {
    top: auto;
    bottom: calc(env(safe-area-inset-bottom) + var(--mobile-sheet-peek) + 14px);
    height: auto;
  }

  html body.is-time-rings-view.is-map-active.is-reach-mode.has-origin .map-frame .distance-legend {
    display: none;
  }

  .map-loading {
    background:
      linear-gradient(180deg, rgba(247, 243, 233, 0.94), rgba(247, 243, 233, 0.8));
    color: var(--ink);
  }

  .map-loading-title {
    color: var(--ink);
    font-size: clamp(1.65rem, 8vw, 2.2rem);
  }

  .map-loading-kicker,
  .map-loading-subtitle {
    color: rgba(22, 20, 15, 0.68);
  }

  .map-loading-ticker {
    color: rgba(22, 20, 15, 0.76);
    font: 620 0.78rem/1.35 var(--font-main);
    font-style: normal;
    letter-spacing: 0.01em;
  }

  .mobile-network-reader {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: contain;
    background: #f7f3e9;
    color: var(--ink);
    outline: none;
  }

  .mobile-network-reader-head {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: calc(64px + env(safe-area-inset-top));
    padding: calc(env(safe-area-inset-top) + 8px) 10px 8px;
    border-bottom: 1px solid rgba(22, 20, 15, 0.18);
    background: rgba(255, 253, 247, 0.97);
    box-shadow: 0 5px 15px rgba(35, 29, 20, 0.07);
  }

  .mobile-network-reader-back {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: 650 0.68rem/1 var(--font-main);
  }

  .mobile-network-reader-back > span:first-child {
    color: var(--accent);
    font-size: 1rem;
  }

  .mobile-network-reader-title {
    display: grid;
    gap: 2px;
    min-width: 0;
    text-align: center;
  }

  .mobile-network-reader-title > span {
    color: var(--accent);
    font: 760 0.52rem/1 var(--font-main);
    letter-spacing: 0.11em;
    text-transform: uppercase;
  }

  .mobile-network-reader-title > strong {
    overflow: visible;
    color: var(--ink);
    font: 650 clamp(0.82rem, 3.5vw, 1rem)/1.08 var(--font-serif);
    letter-spacing: -0.012em;
    text-overflow: clip;
    text-wrap: balance;
    white-space: normal;
  }

  .mobile-network-reader-language {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 2px;
    padding: 2px;
    border: 1px solid rgba(22, 20, 15, 0.16);
    border-radius: 8px;
    background: rgba(247, 243, 233, 0.76);
  }

  .mobile-network-reader-body {
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    scroll-behavior: smooth;
  }

  .mobile-network-reader-body .network-colophon {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 100%;
    margin: 0;
  }

  .mobile-network-reader-body .network-colophon-masthead {
    display: none;
  }
}

@media (min-width: 600px) and (max-width: 980px) and (max-height: 599px) and (orientation: landscape) {
  body.is-map-active.is-reach-mode:not(.has-origin) {
    --mobile-sheet-peek: 112px;
    --mobile-map-bottom-clearance: calc(env(safe-area-inset-bottom) + var(--mobile-sheet-peek) + 10px);
  }
}

@media (max-width: 480px), (max-width: 980px) and (orientation: portrait) {
  body.is-map-active.is-reach-mode.has-origin {
    --mobile-sheet-peek: clamp(140px, 18dvh, 152px);
    --mobile-map-bottom-clearance: calc(env(safe-area-inset-bottom) + var(--mobile-sheet-peek) + 10px);
  }

  body.is-map-active.has-origin #mobileSheet[data-snap="collapsed"] > .mobile-collapsed-control-bar {
    display: none;
  }

  body.is-map-active.has-origin #mobileSheet[data-snap="collapsed"] > .mobile-sheet-handle {
    height: 24px;
    min-height: 24px;
    margin: 0 auto -1px;
  }
}

@media (max-width: 360px) {
  .mobile-launch-copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .mobile-launch-copy > strong {
    white-space: normal;
  }

  .mobile-launch-actions nav button:nth-child(n + 3) {
    display: none;
  }

  .mobile-network-story-button {
    font-size: 0.59rem;
  }

  .mobile-network-reader-back > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* The mounted record reader already supplies a semantic contents rail. On
   mobile, turn it into a compact sticky chapter/progress strip instead of
   hiding it, so a long read always retains orientation. */
@media (max-width: 760px), (max-width: 980px) and (orientation: portrait), (max-width: 980px) and (max-height: 599px) {
  .mobile-network-reader-body .network-colophon {
    overflow: visible;
  }

  .mobile-network-reader-body .network-colophon-line {
    position: sticky;
    top: 0;
    left: auto;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 4px 6px;
    overflow: hidden;
    border-bottom: 1px solid rgba(22, 20, 15, 0.16);
    background:
      linear-gradient(180deg, rgba(255, 253, 247, 0.985), rgba(247, 243, 233, 0.96));
    box-shadow: 0 5px 13px rgba(35, 29, 20, 0.07);
    pointer-events: auto;
  }

  .mobile-network-reader-body .network-colophon-line::before {
    content: "";
    position: absolute;
    top: 14px;
    right: 13px;
    left: 13px;
    height: 1px;
    background: rgba(22, 20, 15, 0.18);
    pointer-events: none;
  }

  .mobile-network-reader-body .network-colophon-line-progress {
    position: absolute;
    top: 14px;
    left: 13px;
    z-index: 0;
    width: var(--line-progress, 0%);
    max-width: calc(100% - 26px);
    height: 2px;
    background: var(--colophon-vermilion);
    transition: width 120ms linear;
  }

  .mobile-network-reader-body .network-colophon.is-reading .network-colophon-line-progress::after {
    right: -3px;
    bottom: -2px;
    left: auto;
  }

  .mobile-network-reader-body .network-colophon-stop {
    position: relative;
    top: auto;
    left: auto;
    z-index: 1;
    display: grid;
    grid-template-rows: 18px 18px;
    gap: 2px;
    align-items: center;
    justify-items: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 2px;
    overflow: hidden;
    transform: none;
  }

  .mobile-network-reader-body .network-colophon-stop > i {
    width: 8px;
    height: 8px;
    margin: 5px 0 0;
    background: #fffdf7;
  }

  .mobile-network-reader-body .network-colophon-stop > span,
  .mobile-network-reader-body .network-colophon-stop:hover > span,
  .mobile-network-reader-body .network-colophon-stop:focus-visible > span,
  .mobile-network-reader-body .network-colophon-stop.is-current:hover > span,
  .mobile-network-reader-body .network-colophon-stop.is-current:focus-visible > span {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    opacity: 0.62;
    background: transparent;
    font: 700 0.48rem/1.1 var(--font-main);
    letter-spacing: 0;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-network-reader-body .network-colophon-stop.is-current > span {
    opacity: 1;
    color: var(--colophon-vermilion);
  }
}

/* Short-landscape map chrome uses the wide axis deliberately: the origin
   field stops short of Settings, overlay toggles share one compact row, and
   the time instrument becomes a right-aligned tray. */
@media (min-width: 600px) and (max-width: 980px) and (max-height: 599px) and (orientation: landscape) {
  html body.is-map-active.is-reach-mode.has-origin:not(.is-mobile-sheet-expanded):not(.is-mobile-sheet-full) #mobileMapSearchForm.mobile-map-search-form {
    right: auto;
    width: min(360px, calc(100vw - 132px));
    max-width: calc(100vw - 132px);
  }

  html body.is-map-active .mobile-map-control-rail .reach-isochrone-control {
    top: 0;
    left: calc(100% + 8px);
  }

  html body.is-map-active.is-reach-mode.has-origin .mobile-map-time-instrument {
    right: calc(env(safe-area-inset-right) + 14px);
    left: auto;
    width: min(440px, calc(100vw - 28px));
    min-height: 46px;
  }

  html body.is-map-active.is-reach-mode.has-origin .mobile-map-time-instrument #mobileReachTimeControl.mobile-reach-time-control {
    min-height: 44px;
    height: 44px;
  }

  .mobile-network-reader-head {
    min-height: calc(56px + env(safe-area-inset-top));
    padding-block: calc(env(safe-area-inset-top) + 6px) 6px;
  }
}
