:root {
  color-scheme: light;
  --ink: #22231c;
  --night: #141510;
  --night-raised: #23241c;
  --paper: #f5f2ea;
  --card: #fffdf8;
  --gold: #d6bd7f;
  --gold-ink: #745519;
  --gold-pale: #f1e6cb;
  --line: #d9d3c5;
  --muted: #646256;
  --bus: #185c56;
  --tram: #914327;
  --serif: Georgia, "Times New Roman", serif;
  --gutter: clamp(14px, 3.8vw, 58px);
  font-family: "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.usual-places { margin: 1rem 0 .65rem; }
.usual-places h3 { margin: 0 0 .5rem; }
#usual-list { border: 1px solid var(--gold); border-radius: .8rem; overflow: hidden; background: #fbf5e7; }
.usual-row { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: start; }
.usual-row + .usual-row { border-top: 1px solid #e4d6b9; }
.usual-choice { display: grid; gap: .18rem; min-width: 0; width: 100%; min-height: 48px; padding: .7rem .8rem;
  border: 0; border-radius: 0; text-align: left; color: var(--ink); background: transparent; overflow-wrap: anywhere; }
.usual-choice:hover, .usual-remove:hover { background: #eee1c4; }
.usual-choice small { color: var(--muted); }
.usual-choice .usual-hint { color: var(--gold-ink); font-size: .81rem; }
.usual-remove { display: grid; place-content: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--gold-ink); }
.usual-remove span { display: grid; place-content: center; width: 20px; height: 20px; border: 1px solid #b9a57a; border-radius: 50%; line-height: 1; }
.usual-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; color: var(--muted); font-size: .875rem; }
.usual-feedback:empty { display: none; }
.repeat-start { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; margin: 0 10px 8px; border: 1px solid #d1bb85; border-radius: 8px; background: #f8eecf; }
.repeat-choice { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; min-width: 0; padding: 6px 4px 6px 10px; border: 0; border-radius: 7px 0 0 7px; text-align: left; color: var(--ink); background: transparent; overflow-wrap: anywhere; }
.repeat-copy { min-width: 0; display: grid; gap: 1px; line-height: 1.2; }
.repeat-copy small { font-size: .78rem; color: #694c18; }
.repeat-copy .repeat-detail { margin-top: 2px; color: #625735; }
.repeat-copy strong { font-size: .95rem; }
.repeat-use { flex: none; padding: 4px 8px; border-radius: 5px; background: #f1dfad; color: #594016; font-size: .78rem; font-weight: 720; }
.repeat-choice:hover, .repeat-start .usual-remove:hover { background: #f1e0b4; }
.repeat-start .usual-remove { border-radius: 7px; }
.repeat-start :focus-visible { outline-offset: -3px; }
#repeat-feedback { margin: 0 10px 5px; color: #654e27; }
body {
  margin: 0; min-height: 100vh; padding-bottom: calc(80px + env(safe-area-inset-bottom));
  background: linear-gradient(90deg, var(--paper), transparent 62%) top right / 36rem 36rem no-repeat,
    linear-gradient(180deg, #f5f2ea77, #f5f2ea9e 45%, var(--paper)) top right / 36rem 36rem no-repeat,
    url("./brand/paper.webp") top right / 36rem auto no-repeat var(--paper);
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 3px solid #b47617; outline-offset: 3px; }
a { color: inherit; text-underline-offset: .15em; }
button, input, select, summary { touch-action: manipulation; }
.shell { max-width: 1512px; padding-inline: var(--gutter); margin-inline: auto; }
.topbar {
  color: var(--card); border-bottom: 1px solid #8a6939;
  background: linear-gradient(90deg, #141510 0%, #141510d9 33%, #15130dc2 60%, #15130d81 100%) center / cover no-repeat,
    url("./brand/golden-edge.webp") right 49% / clamp(30rem, 77vw, 76rem) auto no-repeat var(--night);
}
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--card); text-decoration: none; min-width: 0; }
.brand-symbol, .brand img { display: block; width: 37px; height: 37px; object-fit: contain; flex-shrink: 0; }
.brand-symbol { border: 1px solid #71603e; border-radius: 4px; overflow: hidden; background: #13130f; }
.brand-symbol img { width: 100%; height: 100%; }
.brand-wordmark { display: grid; gap: 1px; line-height: 1; }
.brand-wordmark small { font-size: 9px; font-weight: 700; letter-spacing: .21em; color: var(--gold); }
.brand-wordmark strong { font: 400 23px/1.02 var(--serif); letter-spacing: -.055em; }
.city, .map-status { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: .75rem; font-weight: 650; }
.city { color: #f7efd9; background: #20211a; border: 1px solid #514b38; min-height: 44px; border-radius: 999px; padding: 6px 14px; white-space: nowrap; }
.city i, .map-status i, .signal { width: 8px; height: 8px; border-radius: 50%; background: #64a189; flex-shrink: 0; }
.city[data-state="limited"] i, .city[data-state="offline"] i { background: #d6aa67; }
.city:hover { border-color: var(--gold); }
.city:focus-visible, .nav-inner :focus-visible, .hero-copy :focus-visible { outline-color: var(--gold); }
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding-block: 16px 12px; }
.journey-pane { display: contents; }
.journey-pane > :empty, .quick-places:empty, .trip-context:empty { display: none; }
.planner-hero { order: 0; overflow: hidden; background: var(--night); border: 1px solid #39382a; border-radius: 17px; color: var(--card); box-shadow: 0 4px 15px #352f1f10; }
.hero-copy {
  --planner-photo: url("./brand/tallinn-tram.webp");
  --planner-photo-position: center 58%;
  min-height: 103px;
  display: flex;
  align-items: center;
  padding: 26px 20px;
  background-color: #171a17;
  background-image: linear-gradient(90deg, #131817c4 0%, #1118165c 47%, #17140d08 100%), var(--planner-photo);
  background-size: 100% 100%, cover;
  background-position: center, var(--planner-photo-position);
  background-repeat: no-repeat;
}
.walk-cover .hero-copy { --planner-photo: url("./brand/tallinn-walk.webp"); --planner-photo-position: center 39%; }
.hero-copy h1, .places-screen h1 { font: 400 clamp(38px, 8.8vw, 54px)/.99 var(--serif); letter-spacing: -.055em; text-wrap: balance; }
.hero-copy h1 { color: #fff9e9; max-width: 86%; }
.planner-fields { margin: 0 13px 13px; display: grid; background: var(--card); border: 1px solid #dcd2b7; border-radius: 11px; box-shadow: 0 2px 8px #0003; }
.origin-field { min-width: 0; }
.trip-field { position: relative; display: grid; align-content: center; width: 100%; min-width: 0; min-height: 55px; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 7px 32px 8px 40px; gap: 3px; }
#origin-button { border-radius: 10px 10px 0 0; }
#destination-button { border-top: 1px solid #e6dfd0; border-radius: 0 0 10px 10px; }
#destination-button[data-selected] { background: #fff6de; box-shadow: inset 0 0 0 1px #b78d49, inset 0 0 18px #f3dda6; }
.trip-field::before { content: ""; position: absolute; left: 16px; top: calc(50% - 5px); width: 10px; height: 10px; border: 2px solid var(--gold-ink); border-radius: 50%; }
.trip-field#destination-button::before { border-radius: 50% 50% 50% 0; transform: translateY(-1px) rotate(-45deg); background: var(--gold-pale); width: 11px; height: 11px; }
#destination-button[data-selected]::before { background: #c79e49; }
.trip-field::after { content: ""; position: absolute; right: 16px; top: calc(50% - 3px); width: 7px; height: 7px; border-top: 1.5px solid #877f68; border-right: 1.5px solid #877f68; transform: rotate(45deg); }
.trip-field:hover { background: #f5efdf; }
.trip-field:focus-visible { z-index: 1; outline-offset: -3px; }
.field-label, .field-value { display: block; overflow-wrap: anywhere; }
.field-label { font-size: .78rem; font-weight: 720; color: var(--gold-ink); }
.field-value { font-size: .98rem; font-weight: 620; line-height: 1.16; }
.departure-trigger { display: inline-flex; align-items: center; justify-content: flex-start; gap: 9px; max-width: calc(100% - 24px); min-height: 44px; margin: -7px 12px 5px; padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: #ebd39a; font-size: .82rem; font-weight: 650; text-align: left; }
.departure-trigger::before { content: ""; flex: 0 0 15px; width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(currentColor,currentColor) 48% 32% / 1px 5px no-repeat, linear-gradient(36deg,transparent 40%,currentColor 42% 58%,transparent 60%) 74% 64% / 5px 4px no-repeat; }
.departure-trigger::after { content: ""; flex: 0 0 6px; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-1px) rotate(45deg); }
.departure-trigger:hover { background: #343324; }
.departure-trigger:focus-visible { outline-color: var(--gold); }
.quick-places { display: flex; gap: 7px; overflow-x: auto; margin: -4px 13px 10px; padding: 2px 1px; scrollbar-width: thin; scrollbar-color: #655738 transparent; }
.place-chip { flex: 0 0 auto; padding: 7px 13px; min-height: 44px; border-radius: 999px; border: 1px solid #625838; background: transparent; color: #f2e9d2; font-weight: 650; font-size: .82rem; }
.place-chip[aria-pressed="true"], .place-chip:hover { background: var(--gold); color: #272210; border-color: var(--gold); }
.place-chip[aria-pressed="true"] { box-shadow: 0 0 0 2px #e5c67744; }
.quick-places :focus-visible { outline-color: var(--gold); outline-offset: -3px; }

.primary, .outline-button, .text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-size: .825rem; font-weight: 680; }
.primary { padding: 8px 16px; border: 1px solid var(--night); border-radius: 9px; color: var(--card); background: var(--night); }
.primary:hover { background: #383727; }
.outline-button { padding: 7px 14px; border: 1px solid #b9af98; border-radius: 9px; color: var(--ink); background: var(--card); }
.outline-button:hover, .list-choice:hover, .stop-preview:hover, .route-option:hover { border-color: #86743e; background-color: #f9f4e8; }
.text-button { border: 0; padding: 7px 6px; background: transparent; color: var(--gold-ink); }
.text-button:hover, summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.section-heading, .action-header, .arrival-strip, .button-row, .origin-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-heading h2 { font: 400 1.8rem/1.12 var(--serif); letter-spacing: -.045em; }
#results { order: 2; min-width: 0; }
#service-alert { order: 3; }
.notice-button { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid #d9bd77; border-left: 3px solid #92661d; border-radius: 8px; background: #f9eed3; color: #563b12; font-size: .85rem; font-weight: 650; text-align: left; line-height: 1.45; overflow-wrap: anywhere; }
.notice-button::before { content: "!"; display: grid; place-items: center; flex: 0 0 17px; width: 17px; height: 17px; border: 1.5px solid; border-radius: 50%; font: 700 12px/1 system-ui, sans-serif; margin-top: 1px; }
.notice-button:hover { border-color: #9a7025; background: #f7e7bf; }
.trip-context { order: 3; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.journey { overflow: hidden; border: 1px solid #d3c7aa; border-radius: 14px; background: var(--card); }
.action-header, .action-instruction { background: #29291f; color: var(--card); }
.action-header { padding: 0 16px; }
.destination-label { color: #e9d496; font-weight: 680; font-size: .85rem; }
.action-header .text-button { color: #e7dfcd; font-size: .75rem; }
.action-instruction { padding: 0 16px 17px; }
.action-instruction h2 { font: 400 clamp(28px, 6.5vw, 37px)/1.04 var(--serif); letter-spacing: -.045em; overflow-wrap: anywhere; }
.action-instruction > p { margin-top: 6px; color: #f0eada; font-size: .9rem; }
.service-strip, .ride-status, .status-block, .nearby-rides, .search-hit, .trip-tools { display: flex; align-items: center; gap: 9px; }
.service-strip { margin-top: 13px; }
.service-strip strong, .service-strip small, .status-info strong, .status-info small { display: block; }
.service-strip strong, .status-info strong { font-size: .875rem; line-height: 1.35; }
.service-strip small, .ride-status small { color: #e4dfd0; font-size: .77rem; margin-top: 3px; }
.line-badge { display: inline-grid; flex-shrink: 0; place-items: center; min-width: 33px; min-height: 28px; padding: 2px 7px; border-radius: 6px; color: white; background: var(--bus); font: 750 .84rem/1.15 "Segoe UI", Roboto, system-ui, sans-serif; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line-badge.tram { background: var(--tram); }
.line-badge.trolleybus { background: #385677; }
.line-badge.train { background: #793850; }
.service-strip .line-badge, .ride-status .line-badge { box-shadow: inset 0 0 0 1px #fff6; }
.arrival-strip { flex-wrap: wrap; padding: 11px 16px; background: var(--gold-pale); }
.arrival-strip span { flex: 1; font-size: .875rem; font-weight: 650; }
.arrival-strip strong, .option-eta strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.arrival-strip strong { font-size: 1.52rem; line-height: 1; letter-spacing: -.045em; }
.arrival-strip small { font-size: .76rem; color: #54472a; }
.trip-tools { flex-wrap: wrap; padding-inline: 10px; }
.journey details { padding-inline: 16px; border-top: 1px solid var(--line); }
summary { min-height: 44px; padding-block: 12px; font-size: .85rem; font-weight: 680; cursor: pointer; }
.legs, .board-departures { list-style: none; padding: 0; margin: 0; }
.leg, .board-departure { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 9px; padding: 11px 0; border-top: 1px solid var(--line); }
.leg strong, .leg small, .leg time { display: block; }
.leg strong, .board-departures strong { font-size: .84rem; line-height: 1.35; overflow-wrap: anywhere; }
.leg small, .leg time, .board-departures small { font-size: .76rem; line-height: 1.45; color: var(--muted); }
.leg time { max-width: 65px; text-align: right; font-variant-numeric: tabular-nums; }
.leg .text-button { padding-left: 0; }
.walk-mark { display: grid; place-items: center; width: 32px; min-height: 29px; color: #705514; background: var(--gold-pale); border-radius: 6px; }
.alternative-routes { display: grid; gap: 6px; margin-top: 11px; }
.alternative-routes h3 { font-size: .82rem; font-weight: 680; margin: 0 0 2px; }
.route-option, .stop-preview { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 58px; text-align: left; gap: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; }
.route-option strong, .stop-preview-title strong, .board-departures strong, .route-option small, .stop-preview-title small, .board-departures small { display: block; }
.route-option strong, .stop-preview-title strong { font-size: .88rem; overflow-wrap: anywhere; }
.route-option small, .stop-preview small, .muted, .status-info small { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.option-eta, .board-time { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.option-eta strong { font-size: 1.03rem; }
.my-stops { order: 5; padding: 13px 15px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.my-stops .section-heading { margin-bottom: 4px; }
.my-stops .section-heading .text-button { white-space: nowrap; }
#pinned-stops { display: grid; gap: 7px; }
#pinned-stops > .muted { padding-block: 2px 3px; }
.stop-preview-title, .route-option > span:first-child { min-width: 0; }
.stop-preview-times { display: grid; gap: 4px; }
.departure-preview { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: .76rem; }
.departure-preview .line-badge { min-height: 20px; min-width: 23px; padding: 1px 4px; font-size: .67rem; }
.location-card { order: 6; }
.location-card:has(.origin-strip), .location-card:has(.nearby-rides) { order: 1; }
.origin-strip { flex-wrap: wrap; padding-inline: 8px; border-bottom: 1px solid var(--line); font-size: .83rem; }
.status-info { flex: 1; min-width: 0; }
.status-block { padding: 2px 4px; }
.status-block .signal { margin: 0 2px; }
.signal.searching { background: #ab7921; }
.ride-status { color: var(--card); background: var(--night-raised); padding: 11px 14px; border-radius: 12px; }
.ride-status small { color: #e4dfd0; }
.ride-status .text-button { color: #f0d99a; }
.location-prompt, .result-message { border: 1px solid var(--line); background: var(--card); padding: 15px 16px; border-radius: 12px; }
.location-prompt strong, .result-message strong { font-size: .95rem; }
.location-prompt p, .result-message p { color: var(--muted); line-height: 1.45; font-size: .84rem; margin-top: 4px; }
.location-prompt .primary { margin-top: 10px; }
.nearby-rides { flex-wrap: wrap; margin-top: 8px; }
.mode-switch, .walk-options { display: flex; gap: 2px; border: 1px solid #d7d0bf; background: #e9e5d9; padding: 3px; border-radius: 10px; }
.mode-switch { order: 7; }
.walk-options { order: 8; }
.mode-switch button, .walk-options button { flex: 1; padding: 6px 10px; min-height: 44px; font-weight: 680; font-size: .83rem; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.mode-switch button[aria-pressed="true"] { color: var(--card); background: var(--night); }
.walk-options button[aria-pressed="true"] { color: var(--ink); background: var(--card); }
#service-news { order: 10; align-self: start; justify-self: start; }
#map-home { min-width: 0; order: 4; }
.plan-grid:has(.stop-preview) .my-stops { order: 4; }
.plan-grid:has(.stop-preview) #map-home { order: 5; }
.map-panel { position: relative; isolation: isolate; overflow: hidden; min-width: 0; height: clamp(240px, 62vw, 370px); border: 1px solid #c9c5b5; border-radius: 15px; background: #e7e4d7; }
.map-panel canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.map-panel canvas:active { cursor: grabbing; }
.map-controls, .map-status, .map-credit, .map-legend { position: absolute; z-index: 3; }
.map-status { top: 12px; left: 12px; max-width: calc(100% - 82px); padding: 7px 11px; border-radius: 5px; background: var(--night); color: var(--card); font-size: .73rem; pointer-events: none; box-shadow: 0 1px 6px #2d2a2026; }
.map-status[data-feed="error"] i, .map-status[data-feed="idle"] i, .map-status[data-feed="offline"] i { background: #d6aa67; }
.map-status[data-demo="true"] i, body:has(.map-status[data-demo="true"]) .city i { background: var(--gold); }
.map-controls { top: 12px; right: 12px; display: grid; gap: 1px; overflow: hidden; border: 1px solid #bfb9a6; background: #ded8c8; border-radius: 8px; box-shadow: 0 2px 10px #2d2a2026; }
.map-controls button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: var(--card); font-size: 1.25rem; }
.map-controls button:hover { background: var(--gold-pale); }
.crosshair { width: 14px; height: 14px; border: 1.6px solid; border-radius: 50%; position: relative; }
.crosshair::after { position: absolute; content: ""; width: 5px; height: 5px; inset: 3px; background: var(--ink); border-radius: 50%; }
.map-credit { right: 0; bottom: 0; max-width: 100%; padding: 3px 6px; font-size: .6875rem; background: #fffdf4ed; color: #4b493e; }
.map-legend { bottom: 25px; left: 12px; display: flex; gap: 10px; padding: 5px 9px; background: #fffdf4ee; border: 1px solid #cbc5b1; border-radius: 5px; font-size: .68rem; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 14px; border-top: 3px solid #263e4a; border-radius: 1px; }
.map-legend span + span i { border-top-style: dotted; border-color: #926318; }
.map-wheel-hint { display: none; }
.expanded-wheel-hint { display: none; }
@media (any-hover: hover) and (any-pointer: fine) {
  .map-wheel-hint { display: block; position: absolute; z-index: 3; right: 12px; bottom: 25px; padding: 5px 8px; border: 1px solid #cbc5b1; border-radius: 5px; background: #fffdf4ee; color: #514530; font-size: .75rem; pointer-events: none; }
  #map-dialog .embedded-wheel-hint { display: none; }
  #map-dialog .expanded-wheel-hint { display: inline; }
}
@media (max-width: 380px) { .map-wheel-hint { bottom: 55px; } }
#map-dialog .fleet-popup { overscroll-behavior: contain; }

.bottom-bar { position: fixed; z-index: 5; inset: auto 0 0; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: #fcfaf3fa; }
.nav-inner, .nav-tabs { display: flex; align-items: center; }
.nav-inner { min-height: 61px; justify-content: space-between; gap: 5px; }
.nav-tabs { gap: 3px; }
.nav-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; padding: 8px 12px; min-height: 44px; border-radius: 8px; color: var(--muted); background: transparent; font-weight: 680; font-size: .83rem; line-height: 1.2; }
.nav-tabs button[aria-current] { background: var(--gold-pale); color: #453412; }
.nav-tabs button:hover { background: #ebe6d9; }
.nav-icon { position: relative; display: inline-block; width: 14px; height: 15px; }
.route-icon { width: 11px; height: 13px; border-bottom: 1.75px solid; border-right: 1.75px solid; border-radius: 0 0 7px 0; transform: rotate(-5deg); margin-inline: 1px; }
.route-icon::before, .route-icon::after { position: absolute; content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.route-icon::before { left: -2px; bottom: -3px; }
.route-icon::after { right: -3px; top: -2px; }
.bookmark-icon { width: 12px; border: 1.5px solid; border-bottom: 0; border-radius: 2px 2px 0 0; }
.bookmark-icon::after { content: ""; position: absolute; left: 1px; bottom: -1px; width: 7px; height: 7px; border-top: 1.5px solid; border-left: 1.5px solid; transform: rotate(45deg); }
#nav-map::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-top: -3px; border: 1.7px solid; border-radius: 50% 50% 50% 0; background: radial-gradient(circle, currentColor 1.4px, transparent 1.7px); transform: rotate(-45deg); }
.nav-action { font-size: .83rem; }
.places-screen { max-width: 720px; margin: 0 auto; padding-block: 28px 12px; }
.places-screen .heading { padding: clamp(18px, 4vw, 28px); border: 1px solid #51432b; border-radius: 16px; color: #fff7e6; background: linear-gradient(90deg, #1b1a13 22%, #1b1a13da 54%, #1b1a1350), url("./brand/layers.webp") right 49% / cover #1b1a13; }
.places-screen .heading p { max-width: 34ch; margin-top: 10px; color: #f1e5ca; font-size: .925rem; line-height: 1.5; }
#add-place { margin-block: 18px; gap: 16px; }
.saved-list { display: grid; gap: 9px; }
.saved-place { padding: 14px 15px 8px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; }
.saved-place > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.saved-place > p { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.saved-place .actions { margin-top: 4px; }
.saved-place .actions button:first-child { padding-left: 0; }
.default-tag { color: #5c4315; background: var(--gold-pale); padding: 3px 7px; border-radius: 4px; font-size: .69rem; font-weight: 650; }

dialog { width: min(510px, calc(100% - 24px)); max-width: calc(100% - 12px); max-height: min(90vh, 850px); max-height: min(90dvh, 850px); overscroll-behavior: contain; padding: 0; border: 1px solid #bfb7a2; border-radius: 15px; background: var(--card); color: var(--ink); box-shadow: 0 20px 65px #19170f44; }
dialog::backdrop { background: #1a191283; }
.dialog-body { padding: clamp(15px, 4vw, 24px); }
#guide-context { margin: 0; padding: 9px 18px; background: var(--gold-pale); color: #443519; font-size: .88rem; font-weight: 650; }
.replan-choices { display: grid; gap: 8px; margin-top: 15px; }
.replan-choices button { white-space: normal; }
#guide-location { display: block; margin: 0 auto 12px; }
#results { scroll-margin-top: 10px; }
#compare-destinations { margin: 0 14px 8px; color: var(--gold); min-height: 44px; }
#resume-trip { display: flex; align-items: center; gap: 5px; }
#resume-guide { flex: 1; }
#dismiss-guide { min-height: 44px; min-width: 44px; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; }
.dialog-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.dialog-title h2 { padding-top: 3px; font: 400 clamp(1.55rem, 1.15rem + 2vw, 1.85rem)/1.06 var(--serif); letter-spacing: -.045em; overflow-wrap: anywhere; }
.close { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); color: var(--ink); background: #f6f2e8; border-radius: 50%; font-size: 1.4rem; line-height: 1; }
.dialog-body p { color: var(--muted); font-size: .85rem; line-height: 1.5; }
#notice-list { display: grid; gap: 8px; margin-bottom: 14px; }
.notice-entry { padding: 11px 13px; border: 1px solid var(--line); border-left: 3px solid #bd9340; border-radius: 7px; background: #fbf7ec; overflow-wrap: anywhere; }
.notice-entry small { display: block; margin-bottom: 4px; color: var(--gold-ink); font-size: .75rem; font-weight: 700; line-height: 1.4; }
.notice-entry p { color: var(--ink); }
form { display: grid; gap: 7px; }
form label, #stop-search label, #stop-board label { display: block; font-size: .8rem; font-weight: 680; }
input:not([type="checkbox"]), select { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #bcb39d; background: #fffefa; color: var(--ink); padding: 9px 11px; border-radius: 7px; font-size: 1rem; }
.search-row, .button-row, .search-hit { display: flex; gap: 7px; }
.search-hit .list-choice { flex: 1; }
.search-row input { flex: 1; }
.button-row, .trip-tools { flex-wrap: wrap; }
.feedback:not(:empty), #offline-feedback:not(:empty) { margin-top: 9px; }
.dialog-list { display: grid; gap: 5px; margin-block: 8px; }
.dialog-list h3 { font-size: .82rem; margin-top: 7px; }
.start-options { display: grid; gap: 14px; margin-top: 15px; }
.start-options section { min-width: 0; }
.start-options h3 { font-size: .94rem; }
.start-options .list-choice small { overflow-wrap: anywhere; }
.start-rides-heading { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.start-options button.text-button { min-height: 44px; padding-inline: 5px; }
.start-options section:last-child { border-top: 1px solid var(--line); }
@media (min-width: 720px) {
  #stop-search { width: min(740px, calc(100% - 24px)); }
  .start-options { grid-template-columns: 1fr 1fr; align-items: start; gap: 20px; }
  .start-options section:last-child { border-top: 0; padding-left: 20px; border-left: 1px solid var(--line); }
  .start-options h3 { min-height: 44px; display: flex; align-items: center; }
}
.list-choice { display: flex; align-items: center; gap: 9px; min-height: 47px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); padding: 9px 11px; font-size: .86rem; text-align: left; overflow-wrap: anywhere; }
.list-choice strong, .list-choice small { display: block; }
.list-choice small { color: var(--muted); margin-top: 3px; font-size: .76rem; line-height: 1.4; }
.checkbox { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.checkbox input { flex: 0 0 18px; height: 18px; accent-color: var(--gold-ink); }
#walking-directions ol { padding-left: 25px; font-size: .86rem; line-height: 1.5; }
#walking-directions li { padding: 5px 0 5px 4px; border-bottom: 1px solid var(--line); }
.board-departures { margin-block: 6px 12px; max-height: 40vh; overflow-y: auto; }
.board-departure { width: 100%; align-items: center; text-align: left; color: var(--ink); background: transparent; }
.board-departure:hover, .board-departure:focus-visible { background: var(--paper); }
#save-stop-form, .sources { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
#connection-dialog .button-row, .sources p { margin-top: 10px; }
#windows-planner { margin: 9px 0 13px; text-decoration: none; }
#live-feed-note:not([hidden]) ~ #offline-state { margin-top: 8px; }
#demo-toggle { margin-top: 8px; }
.ride-actions { justify-content: flex-start; margin-top: 9px; }
#map-dialog { width: min(1080px, calc(100% - 14px)); }
#map-dialog .map-panel { height: 67vh; height: 67dvh; }
#map-dialog .dialog-body { padding: 12px; }

@media (max-width: 540px) {
  body { padding-bottom: calc(max(80px, 4.6rem) + env(safe-area-inset-bottom)); }
  .city { max-width: 42%; line-height: 1.15; white-space: normal; }
  .nav-inner { flex-wrap: wrap; gap: 0 7px; padding-inline: 10px; }
  .nav-tabs { flex: 2.6 1 8rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; }
  .nav-tabs button { display: grid; justify-items: center; align-content: center; gap: 5px; min-width: 0; min-height: 48px; padding: 5px 2px; font-size: .79rem; overflow-wrap: anywhere; }
  .nav-action { flex: 1 1 4.15rem; min-width: 0; padding-inline: 3px; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
}
@media (max-width: 899px) {
  #map-home canvas { touch-action: pan-y; }
  .journey-pane:has(.journey) .hero-copy { min-height: 0; padding-block: 10px; }
  .journey-pane:has(.journey) .hero-copy h1 { font-size: 1.5rem; }
  .journey-pane:has(.journey) .planner-fields { margin-bottom: 8px; }
  .journey-pane:has(.journey) .trip-field { min-height: 46px; }
}
@media (min-width: 370px) and (max-width: 899px) {
  .journey-pane:has(.journey) .planner-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey-pane:has(.journey) .trip-field { padding: 6px 14px 7px 25px; }
  .journey-pane:has(.journey) .trip-field::before { left: 9px; width: 8px; height: 8px; }
  .journey-pane:has(.journey) .trip-field::after { display: none; }
  .journey-pane:has(.journey) #origin-button { border-radius: 10px 0 0 10px; height: 100%; }
  .journey-pane:has(.journey) #destination-button { border-top: 0; border-left: 1px solid var(--line); border-radius: 0 10px 10px 0; }
}
@media (min-width: 900px) {
  body { padding-bottom: 24px; }
  .masthead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 75px; }
  .brand-symbol, .brand img { width: 41px; height: 41px; }
  .brand-symbol img { width: 100%; height: 100%; }
  .brand-wordmark small { font-size: .64rem; }
  .brand-wordmark strong { font-size: 1.65rem; }
  .plan-grid { grid-template-columns: minmax(360px, .69fr) minmax(0, 1.31fr); gap: clamp(18px, 2.3vw, 34px); align-items: start; padding-top: clamp(23px, 2.5vw, 36px); }
  .journey-pane { display: flex; flex-direction: column; gap: 15px; min-width: 0; }
  .planner-hero { border-radius: 18px; }
  .hero-copy { min-height: 128px; padding: 29px 24px; }
  .planner-fields { margin: 0 17px 16px; }
  .departure-trigger { margin-inline: 16px; }
  .trip-field { min-height: 58px; }
  .quick-places { margin: -3px 17px 13px; }
  #map-home { position: sticky; top: 16px; }
  .map-panel { height: clamp(490px, calc(100vh - 130px), 890px); border-radius: 18px; }
  .map-status, .map-legend { left: 16px; }
  .map-status, .map-controls { top: 16px; }
  .map-controls { right: 16px; }
  .bottom-bar { position: static; min-width: 0; border: 0; background: transparent; padding: 0; }
  .nav-inner { min-height: 75px; justify-content: center; flex-wrap: wrap; gap: 0 11px; padding: 4px 0; }
  .nav-tabs { flex-wrap: wrap; justify-content: center; gap: 3px; }
  .nav-tabs button { color: #d9d5c7; }
  .nav-tabs button[aria-current] { background: #313126; color: #f1dba1; }
  .nav-tabs button:hover { background: #3c3a2d; }
  .nav-action { color: #f2d79c; border-left: 1px solid #6a5536; border-radius: 0; padding-inline: 13px 3px; }
  .my-stops { padding: 15px 18px 18px; }
  .places-screen { padding-top: 45px; }
}
@media (max-width: 360px) {
  .masthead { min-height: 57px; }
  .city { padding-inline: 9px; }
  .brand { gap: 6px; }
  .hero-copy { padding: 16px; }
  .hero-copy h1 { font-size: 2.15rem; }
  .planner-fields { margin-inline: 9px; }
  .quick-places { margin-inline: 9px; }
  .route-option, .stop-preview { gap: 6px; padding-inline: 8px; }
  .stop-preview { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
