:root {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  --ink: #192b3c;
  --muted: #556579;
  --border: #dee5ed;
  --accent: #a20d2a;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f2f5f8; color: var(--ink); font: 16px/1.5 system-ui, sans-serif; }
main { max-width: 1140px; margin: 28px auto; padding: 0 24px; }
section { background: white; border: 1px solid var(--border); border-radius: 18px; padding: 28px; margin: 20px 0; }
section, #stop-controls { scroll-margin-top: 16px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 30px; line-height: 1.2; margin-bottom: 8px; overflow-wrap: anywhere; }
h2 { font-size: 20px; line-height: 1.35; margin-bottom: 0; }
a { color: #0e5b86; text-underline-offset: 3px; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #1673b8; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.notice { padding: 12px 14px; border: 1px solid #efd1a4; border-radius: 10px; background: #fff7e9; color: #744209; }
.stop-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.stop-header > div { min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.stop-direction { color: var(--muted); margin-bottom: 0; }
.line, .line-badge { display: inline-block; background: var(--accent); color: white; border-radius: 8px; font-size: 22px; font-weight: 750; text-align: center; line-height: 1.45; padding: 2px 6px; min-width: 48px; white-space: nowrap; }
.line { vertical-align: top; }
input, button, select { font: inherit; max-width: 100%; min-height: 44px; }
input, select { width: 100%; min-width: 0; border: 1px solid #a8b5c4; border-radius: 8px; padding: 9px 10px; background: white; color: var(--ink); }
input:disabled, select:disabled { color: #586879; background: #edf1f5; opacity: 1; }
label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; }
label input, label select { font-size: 16px; font-weight: 400; }
form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; border: 1px solid #b7c4d1; border-radius: 8px; background: white; color: #20445f; padding: 9px 14px; text-decoration: none; cursor: pointer; font-weight: 600; }
button:disabled { cursor: wait; opacity: .65; }
button:hover, .button:hover { background: #edf4f8; }
.primary-button { color: white; background: #164d70; border-color: #164d70; }
.primary-button:hover { background: #103e5c; }
.map-shortcut { flex: 0 0 auto; font-size: 14px; }
details { margin: 16px 0; min-width: 0; }
summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-size: 14px; font-weight: 600; }
details p { margin: 8px 0; overflow-wrap: anywhere; }
.departure-settings { background: #f7f9fb; border: 1px solid var(--border); border-radius: 10px; margin: 22px 0; }
.departure-settings > summary { padding: 11px 14px; }
.departure-settings > summary > span { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 12px; }
#stop-form { display: grid; grid-template-columns: .7fr .6fr 1fr 1.7fr 1fr auto; padding: 4px 14px 16px; }
.line-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.line-list span { background: #f1f4f8; border-radius: 5px; padding: 1px 7px; font-weight: 650; color: var(--ink); }
.board-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin: 14px 0; }
.board-updated { margin: 0; font-variant-numeric: tabular-nums; }
.table-scroll { min-width: 0; }
.departures-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0 0 20px; }
.departures-table th { color: var(--muted); background: #f7f9fb; font-size: 12px; font-weight: 650; padding: 10px 12px; text-align: left; }
.departures-table td { padding: 18px 12px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.departures-table th:nth-child(1) { width: 84px; }
.departures-table th:nth-child(2) { width: 92px; }
.departures-table th:nth-child(4) { width: 23%; }
.departures-table th:nth-child(5) { width: 25%; }
.departures-table th:nth-child(6) { width: 108px; text-align: right; }
.cell-label { display: none; }
.time-value { display: inline-block; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scheduled-cell .time-value { color: #41536a; font-size: 18px; font-weight: 550; }
.direction-name { display: block; font-size: 16px; font-weight: 650; line-height: 1.4; }
.row-subtext { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 3px; }
.vehicle-label { font-size: 13px; }
.delay { display: inline-block; margin: 3px 0 0 6px; padding: 2px 6px; border-radius: 5px; background: #edf2f6; color: #3f5467; font-size: 12px; font-weight: 650; white-space: nowrap; vertical-align: 2px; }
.delay.late { background: #fff1dc; color: #7c490b; }
.delay.early { background: #edf2ff; color: #375780; }
.countdown-cell { text-align: right; }
.countdown { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown-number { font-size: 28px; font-weight: 750; letter-spacing: -.04em; }
.countdown.long .countdown-number { font-size: 24px; }
.countdown-unit { font-size: 13px; margin-left: 4px; }
.countdown-now { font-size: 23px; font-weight: 750; }
.basis { display: inline-block; font-size: 11px; font-weight: 650; border-radius: 5px; padding: 2px 6px; margin-top: 6px; line-height: 1.4; }
.basis.estimated { color: #17604b; background: #e8f5ee; }
.basis.scheduled { color: #526373; background: #edf1f5; }
.prediction-explanation, .timetable-followups { margin: 0; font-size: 13px; color: var(--muted); }
.prediction-explanation summary, .timetable-followups summary { font-size: 13px; padding: 2px 0; min-height: 36px; font-weight: 500; }
.prediction-explanation summary { color: #4e6073; }
.timetable-followups summary { color: #0e5b86; }
.reading-guide, #raw-departures { border-top: 1px solid var(--border); margin: 0; font-size: 13px; color: var(--muted); }
.reading-guide summary, #raw-departures summary { font-size: 13px; }
.board-footer { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; align-items: center; }
.board-footer a { display: inline-block; padding: 10px 0; }
pre { max-width: 100%; overflow: auto; font-size: 12px; }
.map-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-bottom: 20px; }
.back-to-board { font-size: 13px; padding: 10px 0; }
#address-form { margin-bottom: 8px; }
#address-form label { flex: 1; }
#address-results { list-style: none; padding: 0; }
#address-results button { width: 100%; text-align: left; justify-content: flex-start; margin: 4px 0; font-size: 14px; }
#interactive-map { height: 440px; width: 100%; border-radius: 10px; background: #e5ecee; isolation: isolate; }
#interactive-map .leaflet-control button { cursor: pointer; }
.stop-number { background: #0b5577; color: white; border: 2px solid white; border-radius: 50%; box-shadow: 0 1px 4px #0008; text-align: center; font: bold 15px/30px system-ui; }
.stop-number.selected { background: #a33b00; }
.map-home { display: block; font: 24px/40px system-ui; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; }
.map-home svg { width: 24px; height: 24px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.5; }
.map-radius { background: white; padding: 5px 8px; border-radius: 4px; box-shadow: 0 1px 5px #0004; font-size: 12px; }
#interactive-map .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; }
#interactive-map .leaflet-popup-content { max-width: min(240px, 65vw); }
#interactive-map .leaflet-popup-content a { display: inline-block; padding: 10px 0; }
#coordinate-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.nearby-stops { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stop-list { list-style: none; padding: 0; columns: 2 260px; }
.stop-list li { break-inside: avoid; margin: 4px 0; }
.stop-list a { display: block; padding: 11px; border-radius: 8px; font-size: 14px; }
.stop-list .selected { background: #fff0c5; }
@media (max-width: 960px) {
  #stop-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .departures-table td, .departures-table th { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 900px) {
  main { margin: 12px auto; padding: 0 12px; }
  section { border-radius: 14px; padding: 16px; margin: 12px 0; }
  h1 { font-size: 26px; }
  h2 { font-size: 18px; }
  .stop-header { display: block; }
  .stop-direction { font-size: 14px; }
  .map-shortcut { margin-top: 14px; min-height: 44px; }
  .departure-settings { margin: 16px 0; }
  .departure-settings > summary > span { display: block; margin: 3px 0 0 18px; }
  .board-meta { align-items: baseline; margin-bottom: 12px; }
  .board-updated { font-size: 11px; }
  .line-list { font-size: 12px; }
  .departures-table, .departures-table tbody { display: block; width: 100%; }
  .departures-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .departures-table tbody { display: grid; gap: 12px; }
  .departures-table .departure-row {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) 86px;
    grid-template-areas: "line direction countdown" "scheduled prediction prediction" "vehicle vehicle vehicle";
    gap: 12px 10px; border: 1px solid #d7e0e9; border-radius: 12px; padding: 14px;
    background: #fff; box-shadow: 0 2px 5px #192b3c06;
  }
  .departures-table .departure-row.estimated { border-top: 3px solid #3d8a72; padding-top: 12px; }
  .departures-table td { display: block; border: 0; padding: 0; min-width: 0; }
  .line-cell { grid-area: line; }
  .scheduled-cell { grid-area: scheduled; }
  .direction-cell { grid-area: direction; align-self: center; }
  .vehicle-cell { grid-area: vehicle; }
  .prediction-cell { grid-area: prediction; }
  .countdown-cell { grid-area: countdown; align-self: start; }
  .cell-label { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-bottom: 3px; }
  .line-cell .cell-label, .direction-cell .cell-label, .countdown-cell .cell-label, .vehicle-cell .cell-label { display: none; }
  .line-badge { min-width: 52px; font-size: 22px; padding: 3px 6px; }
  .direction-name { font-size: 15px; }
  .countdown-number { font-size: 32px; }
  .time-value { font-size: 19px; }
  .departures-table .vehicle-cell { border-top: 1px solid #e5eaf0; padding-top: 8px; }
  .vehicle-label { font-size: 12px; }
  .row-subtext { font-size: 11px; margin-top: 2px; }
  .prediction-explanation summary, .timetable-followups summary { min-height: 44px; padding: 8px 0; }
  .prediction-explanation { margin-top: -7px; }
  .basis { font-size: 10px; }
  .reading-guide { margin-top: 6px; }
  #stop-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #stop-form label:has(select) { grid-column: 1 / -1; }
  #stop-form button { align-self: end; font-size: 14px; padding: 10px 8px; }
  #coordinate-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #coordinate-form button { font-size: 14px; }
  .map-heading { display: block; margin-bottom: 14px; }
  .back-to-board { display: inline-block; }
  #interactive-map { height: min(400px, 58svh); min-height: 280px; }
  #interactive-map .leaflet-bottom.leaflet-left { bottom: 36px; }
  .stop-list { columns: 1; }
}
@media (max-width: 359px) {
  main { padding: 0 8px; }
  section { padding: 12px; }
  .departures-table .departure-row { grid-template-columns: 60px minmax(0, 1fr) 74px; gap: 10px 8px; padding: 12px; }
  .line-badge { min-width: 46px; font-size: 20px; padding-left: 4px; padding-right: 4px; }
  .direction-name { font-size: 14px; }
  .countdown.long .countdown-number { font-size: 22px; }
  #address-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  #address-form button { padding: 10px; }
}

/* Ustawienia osobiste, wiele przystanków i stan danych. */
[hidden] { display: none !important; }
:root { --surface: #fff; --subtle: #f7f9fb; --page: #f2f5f8; }
body { background: var(--page); }
section { background: var(--surface); }
.toolbar-actions, .favorite-chips, .display-options, .walk-options {
  display: flex; flex-wrap: wrap; align-items: end; gap: 10px;
}
.toolbar-actions { margin-top: 22px; }
.toolbar-actions button { font-size: 13px; }
.favorite-chips { margin: 12px 0; }
.favorite-chips button { border-radius: 22px; background: var(--subtle); font-size: 14px; }
#board-message:empty { display: none; }
#board-message { margin-top: 12px; }
.personal-settings { margin-bottom: 0; }
.personal-settings > label { max-width: 420px; }
.display-options { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.display-options label { flex: 1 1 155px; }
.favorite-manager-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0; }
.favorite-manager-row span { flex: 1 1 180px; overflow-wrap: anywhere; }
.favorite-manager-row button { padding: 6px 10px; font-size: 12px; }
button[aria-pressed="true"] { background: #164d70; color: #fff; }
.check { display: flex; flex-direction: row; align-items: center; min-height: 44px; gap: 8px; }
.check input { width: 20px; height: 20px; min-height: 20px; padding: 0; accent-color: #164d70; flex: 0 0 auto; }
.walk-options { margin-top: 16px; }
.walk-options label { flex: 0 1 145px; }
.advanced-selection { margin: 0 14px 12px; border-top: 1px solid var(--border); }
.advanced-selection #stop-form { padding: 10px 0; }
.track-button { display: block; font-size: 12px; min-height: 36px; padding: 6px 8px; margin-top: 6px; }
.live-prediction { display: block; font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 650; }
.prediction-cell details { font-size: 12px; margin: 4px 0; color: var(--muted); }
.prediction-cell summary { font-size: 12px; padding: 6px 0; min-height: 36px; }
.countdown { font-size: 24px; font-weight: 750; white-space: normal; }
.departures-table th:nth-child(4), .departures-table th:nth-child(5) { width: 19%; }
.departures-table th:nth-child(6) { width: 18%; }
.leave-hint { display: block; font-size: 12px; line-height: 1.4; font-weight: 550; margin-top: 8px; }
.trip-note { display: inline-block; font-size: 11px; color: #7c490b; background: #fff1dc; border-radius: 4px; padding: 2px 5px; margin-top: 4px; }
.departure-row.expired .countdown { color: var(--muted); }
.departures-table .stop-group th { width: auto; padding: 12px; font-size: 15px; color: var(--ink); border-radius: 6px; }
#alerts-panel details { background: var(--subtle); padding: 0 14px 8px; border-radius: 8px; }
#alerts-panel details p { font-size: 14px; }
.alerts-empty { margin-top: 16px; }
#address-results { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 12px; }
#address-results > li:not(:has(button)) { grid-column: 1 / -1; font-weight: 650; }
.stop-choice { height: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; overflow-wrap: anywhere; }
.stop-choice strong { font-size: 14px; }
.stop-choice p { margin: 8px 0; line-height: 1.5; }
.stop-choice button { min-height: 44px; padding: 8px; font-size: 12px; margin: 4px 4px 0 0; }
#tracking-status:not(:empty) { padding: 12px 0; font-size: 14px; }
#stop-tracking { margin-bottom: 10px; }
body.large-text .direction-name, body.large-text .time-value { font-size: 22px; }
body.large-text .countdown { font-size: 30px; }
body.large-text .leave-hint { font-size: 15px; }
body.display-mode main { max-width: 1600px; }
body.display-mode .departure-settings, body.display-mode .personal-settings, body.display-mode #favorite-list,
body.display-mode .map-shortcut, body.display-mode .board-footer, body.display-mode #raw-departures,
body.display-mode .toolbar-actions > button:not(#toggle-display), body.display-mode .prediction-cell details,
body.display-mode .track-button { display: none; }
body.display-mode .countdown { font-size: 36px; }
body.display-mode .direction-name { font-size: 24px; }
body.display-mode .leave-hint { font-size: 16px; }
body.display-mode .line-badge { font-size: 30px; }
body[data-theme="dark"] { color-scheme: dark; --surface:#172532; --subtle:#203240; --page:#101b25;
  --ink:#ecf2f7; --muted:#b2c3d0; --border:#405563; }
@media (prefers-color-scheme: dark) {
  body[data-theme="system"] { color-scheme: dark; --surface:#172532; --subtle:#203240; --page:#101b25;
    --ink:#ecf2f7; --muted:#b2c3d0; --border:#405563; }
}
body .departure-settings, body .departures-table th { background: var(--subtle); }
body input, body select, body button, body .button { background: var(--surface); color: var(--ink); }
body button:hover, body .button:hover { background: var(--subtle); }
body button[aria-pressed="true"] { background: #164d70; color: #fff; }
body input:disabled, body select:disabled { background: var(--subtle); color: var(--muted); }
body .departures-table .departure-row { background: var(--surface); }
body .scheduled-cell .time-value, body .prediction-explanation summary { color: var(--muted); }
body[data-theme="dark"] a { color: #91cef4; }
@media (prefers-color-scheme: dark) { body[data-theme="system"] a { color: #91cef4; } }
body .leaflet-popup { color-scheme: light; color: #192b3c; }
body .leaflet-popup button { background: #fff; color: #192b3c; }
body .leaflet-popup .muted { color: #556579; }
body .map-radius { color: #192b3c; }
@media (max-width: 600px) {
  .toolbar-actions { gap: 8px; }
  .toolbar-actions button { flex: 1 1 42%; padding: 8px; }
  .walk-options { display: grid; grid-template-columns: 1fr 1fr; }
  .walk-options button { grid-column: 1 / -1; }
  .favorite-manager-row span { flex-basis: 100%; }
  .favorite-manager-row button { flex: 1; }
  body.large-text .departures-table .departure-row, body.display-mode .departures-table .departure-row {
    grid-template-columns: 82px minmax(0,1fr); grid-template-areas: "line direction" "countdown countdown" "scheduled prediction" "vehicle vehicle";
  }
  body.large-text .countdown-cell, body.display-mode .countdown-cell { text-align: left; }
  body.large-text .direction-name, body.display-mode .direction-name { font-size: 20px; }
  .track-button { min-height: 44px; }
}

/* Wybór przystanków i filtry: wspólne okna na desktopie, panele na telefonie. */
.modal-open { overflow: hidden; }
.enhanced-controls #departure-settings:not(.legacy-visible) { display: none; }
.primary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.primary-actions > button, .primary-actions > a { min-height: 48px; font-size: 14px; padding: 10px 14px; }
.primary-actions .map-shortcut { margin: 0; }
.primary-actions #open-filters { background: #164d70; border-color: #164d70; color: #fff; }
.stop-direction { font-size: 14px; margin-top: 8px; }
.sheet { padding: 0; border: 1px solid var(--border); border-radius: 18px; color: var(--ink); background: var(--surface);
  width: min(640px, calc(100% - 32px)); max-width: none; max-height: 90dvh; box-shadow: 0 18px 70px #0005; }
.sheet[open] { display: flex; flex-direction: column; }
.sheet::backdrop { background: #132a42a6; }
.sheet-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.sheet-header > div { min-width: 0; }
.sheet h2 { font-size: 23px; overflow-wrap: anywhere; }
.sheet-subtitle { margin: 6px 0 0; }
.sheet-subtitle:empty { display: none; }
.sheet .sheet-close { width: 48px; height: 48px; min-height: 48px; flex: 0 0 48px; padding: 0; font-size: 26px; font-weight: 400; }
.sheet-body { padding: 20px 24px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-footer { display: flex; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--border); padding: 16px 24px max(16px, env(safe-area-inset-bottom)); }
.sheet-footer > button { flex: 1; min-height: 48px; }
.sheet-footer > .primary-button { flex: 2; }
.sheet-footer .form-error { flex: 1 1 100%; margin: 0; color: #a20d2a; font-size: 14px; }
.sheet input, .sheet select { font-size: 16px; }
.sheet input:not([type=checkbox]):not([type=radio]), .sheet select, .sheet button { min-height: 48px; }
.sheet button:disabled { cursor: default; }
.sheet .primary-button { background: #164d70; border-color: #164d70; color: #fff; }
.sheet h3 { margin: 0 0 8px; font-size: 17px; overflow-wrap: anywhere; }
.sheet form { display: block; }
.sheet fieldset { min-width: 0; padding: 0; margin: 0 0 20px; border: 0; }
.sheet legend { font-size: 16px; font-weight: 650; margin-bottom: 10px; padding: 0; max-width: 100%; overflow-wrap: anywhere; }
.sheet .check { font-size: 16px; font-weight: 500; min-height: 48px; }
.sheet .check input { width: 20px; min-height: 20px; height: 20px; flex: 0 0 20px; }
.sheet .text-button { font-size: 14px; font-weight: 500; border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
#board-editor { padding: 0; }
.filter-source { border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.filter-source:last-child { margin-bottom: 0; }
.source-heading { display: flex; align-items: start; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.source-heading > div { min-width: 0; }
.source-heading > button { flex-shrink: 0; font-size: 14px; }
.source-heading p { margin: 4px 0 0; }
.filter-source:only-child .source-heading { display: none; }
.line-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.line-chips > .check { display: flex; gap: 8px; padding: 8px 12px; border: 1px solid #a8b5c4; border-radius: 10px; cursor: pointer; font-weight: 650; }
.line-chips > .check:has(input:checked) { background: var(--subtle); border-color: #164d70; outline: 1px solid #164d70; }
.line-chips + p { margin-top: 12px; }
[data-line-hint] { margin: 12px 0 0; }
.choice-options { display: grid; gap: 8px; }
.choice-options > .check { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; overflow-wrap: anywhere; }
.choice-options > .check:has(input:checked) { border-color: #1673b8; background: var(--subtle); }
.direction-options input[type=search] { margin-bottom: 12px; }
.single-direction { margin: 0; }
.walk-settings { border-top: 1px solid var(--border); margin-bottom: 0; }
.walk-options { margin: 4px 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#extra-filters { margin-bottom: 0; }
#extra-filters > label { margin: 4px 0 20px; }
.sheet summary { min-height: 48px; }
#favorite-name-form label { width: 100%; font-size: 16px; }
#more-dialog .toolbar-actions { margin: 0 0 24px; }
#more-dialog .personal-settings { margin: 20px 0; }
#more-dialog .recent-boards { display: grid; gap: 8px; margin-bottom: 20px; }
.recent-boards button { text-align: left; justify-content: start; overflow-wrap: anywhere; }
.favorite-manager-row { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.favorite-manager-row .favorite-name { flex: 1 1 100%; font-size: 16px; text-align: left; justify-content: start; overflow-wrap: anywhere; }
.favorite-chips button { max-width: 100%; overflow-wrap: anywhere; }
.managed-stop { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.managed-stop p { margin: 0 0 12px; }
.managed-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.managed-actions button { font-size: 14px; }
#undo-stop { display: block; margin-top: 12px; }
#address-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
#address-form > label { font-size: 14px; }
#address-form button { padding: 10px; }
.search-actions, .map-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.search-actions button, .map-actions button { font-size: 14px; }
.search-hint { margin: 0 0 20px; }
#address-results, .recent-stop-list { display: grid; grid-template-columns: 1fr; list-style: none; gap: 8px; margin: 12px 0 0; padding: 0; }
#address-results .stop-choice, .recent-stop-list .stop-choice { padding: 0; border: 0; }
#address-results .stop-pick, .recent-stop-list .stop-pick { display: flex; flex-direction: column; align-items: start; gap: 5px;
  width: 100%; text-align: left; justify-content: start; padding: 12px; margin: 0; border-color: var(--border); }
.stop-pick strong { font-size: 17px; }
.stop-directions { font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.stop-pick:disabled { opacity: 1; background: var(--subtle); color: var(--muted); }
#map-stop-details > button { width: 100%; margin-top: 10px; }
#map-stop-details > p { margin-bottom: 16px; }
.map-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; }
#map-title { font-size: 20px; }
.map-actions { margin-bottom: 4px; }
#interactive-map .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; }
#interactive-map .map-home { width: 44px; height: 44px; min-height: 44px; }
.stop-number { font-size: 16px; line-height: 40px; }
body.display-mode .primary-actions { display: none; }
body.display-mode #exit-display { display: inline-flex; margin-top: 16px; }
body.large-text .sheet { font-size: 18px; }
@media (max-width: 600px) {
  .sheet { position: fixed; inset: auto 0 0; width: 100%; margin: 0; max-height: 92dvh; border-radius: 18px 18px 0 0; }
  .sheet-header, .sheet-body, .sheet-footer { padding-left: 20px; padding-right: 20px; }
  .sheet h2 { font-size: 22px; }
  .primary-actions > button, .primary-actions > a { flex: 1 1 auto; padding: 8px 10px; }
  .primary-actions #change-stop { flex-grow: 2; }
  .primary-actions #open-more { flex: 0 0 auto; margin-left: auto; }
  .map-heading { align-items: start; }
  #map-title { font-size: 18px; }
  .back-to-board { padding: 6px 0; }
  .line-chips { gap: 8px; }
  .line-chips > .check { padding: 8px 10px; }
  .map-actions > button { min-height: 48px; }
}
.stop-direction, [data-source-summary], .managed-stop > .muted { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
