:root {
  color-scheme: light;
  --canvas: #f3f5f4;
  --paper: #ffffff;
  --paper-soft: #f7f9f8;
  --ink: #142b40;
  --muted: #647486;
  --line: #dbe3e4;
  --navy: #142b40;
  --teal: #0d897d;
  --teal-soft: #e7f4f1;
  --amber: #f4e0ad;
  --amber-ink: #574019;
  --focus: #2460df;
  --shadow: 0 8px 22px rgba(21, 40, 57, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #091623;
  --paper: #132538;
  --paper-soft: #192d41;
  --ink: #eff4f7;
  --muted: #b1c0ce;
  --line: #34495d;
  --navy: #eaf2f8;
  --teal: #52c6b2;
  --teal-soft: #193c39;
  --amber: #493c25;
  --amber-ink: #f3d99a;
  --focus: #91b8ff;
  --shadow: 0 12px 34px rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); scroll-behavior: smooth; }
body { min-width: 280px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); font-size: 16px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: var(--teal); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.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(calc(100% - 32px), 1040px); min-height: 100vh; margin: 0 auto; padding: 14px 0 calc(104px + env(safe-area-inset-bottom)); }
.masthead { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.08rem; font-weight: 780; letter-spacing: -.035em; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: var(--teal); }
.brand-mark svg { width: 32px; height: 32px; }
.primary-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 8px max(12px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 94%, transparent); border-top: 1px solid var(--line); box-shadow: 0 -7px 20px rgba(20, 43, 64, .08); backdrop-filter: blur(18px); }
.nav-item { min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 5px 3px; color: var(--muted); background: transparent; border: 0; border-radius: 13px; font-size: .72rem; font-weight: 690; line-height: 1.1; text-align: center; text-decoration: none; }
.nav-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.is-active { color: var(--teal); background: var(--teal-soft); }
.more-mark { height: 20px; color: currentColor; font-size: 1rem; font-weight: 800; letter-spacing: .04em; line-height: 16px; }
.main-content { padding: 22px 0 20px; }
.home-view { display: grid; gap: 16px; }
.home-hero { position: relative; isolation: isolate; min-width: 0; display: grid; gap: 20px; overflow: hidden; padding: clamp(18px, 4vw, 32px); background: radial-gradient(ellipse at 100% 0%, var(--teal-soft), transparent 52%), var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.home-hero::after { position: absolute; z-index: -1; right: -86px; bottom: -160px; width: 300px; height: 300px; background: radial-gradient(circle, color-mix(in srgb, var(--teal) 10%, transparent), transparent 68%); border-radius: 50%; content: ""; pointer-events: none; }
.home-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--teal); font-size: .73rem; font-weight: 800; letter-spacing: .08em; }
.home-kicker-dot { width: 8px; height: 8px; flex: 0 0 8px; background: var(--teal); border-radius: 50%; }
.home-intro h1 { max-width: 14ch; margin: 0 0 10px; font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 790; letter-spacing: -.055em; line-height: 1.05; }
.home-intro-copy { max-width: 52ch; margin: 0 0 18px; color: var(--muted); font-size: .96rem; }
.eyebrow { margin: 0; color: var(--teal); font-size: .72rem; font-weight: 800; letter-spacing: .09em; }
.home-search { min-width: 0; min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 10px 0 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.home-search > svg { width: 21px; height: 21px; flex: 0 0 21px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.9; }
.home-search input, .search-form input { width: 100%; min-width: 0; min-height: 50px; color: var(--ink); background: transparent; border: 0; outline: 0; }
.home-search input::placeholder, .search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-submit { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; color: #fff; background: var(--teal); border: 0; border-radius: 12px; }
.search-submit svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.home-shortcuts { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: center; gap: 8px; margin: 0; }
.home-shortcut { min-width: 0; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 10px 7px; color: var(--ink); background: color-mix(in srgb, var(--paper) 72%, var(--paper-soft)); border: 1px solid var(--line); border-radius: 15px; text-align: center; text-decoration: none; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.home-shortcut:hover { transform: translateY(-1px); border-color: var(--teal); background: var(--paper); }
.home-shortcut-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); border-radius: 11px; }
.home-shortcut-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-shortcut strong { overflow-wrap: anywhere; font-size: .82rem; line-height: 1.2; }
.home-shortcut-arrow { display: none; }
.home-notice { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.home-notice--active { color: var(--amber-ink); background: var(--amber); border-color: color-mix(in srgb, var(--amber-ink) 18%, var(--line)); }
.home-notice-main { min-width: 0; display: flex; align-items: flex-start; gap: 13px; }
.home-notice-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); border-radius: 12px; }
.home-notice--active .home-notice-icon { color: var(--amber-ink); background: color-mix(in srgb, var(--amber-ink) 10%, var(--amber)); }
.home-notice-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.home-notice-copy { min-width: 0; }
.home-notice-copy h2 { margin: 0 0 3px; font-size: .94rem; font-weight: 780; }
.home-notice-message { margin: 0; font-weight: 730; }
.home-notice-date { display: inline-block; margin: 2px 0 0; font-size: .76rem; font-weight: 730; font-variant-numeric: tabular-nums; }
.home-notice-detail { margin: 4px 0 0; color: inherit; font-size: .84rem; opacity: .86; }
.home-notice-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; }
.home-notice-action { min-height: 40px; display: inline-flex; align-items: center; color: inherit; font-size: .82rem; font-weight: 740; }
.home-personal-grid { display: grid; gap: 14px; }
.home-section { min-width: 0; padding: 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.home-section h2, .result-section h2, .info-section h2 { margin: 0 0 10px; font-size: 1rem; font-weight: 760; letter-spacing: -.015em; }
.home-record-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.home-record { min-width: 0; display: flex; align-items: center; gap: 4px; padding: 4px 5px 4px 7px; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 14px; }
.home-record-link { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; padding: 4px; color: var(--ink); text-decoration: none; }
.home-record-link > span:nth-child(2) { min-width: 0; flex: 1; display: grid; }
.home-record-copy strong { overflow-wrap: anywhere; font-size: .9rem; }
.home-record-link:hover strong { color: var(--teal); }
.home-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-empty p { min-width: 0; margin: 0; color: var(--muted); font-size: .86rem; }
.home-empty-action { min-height: 40px; flex: 0 0 auto; display: inline-flex; align-items: center; padding: 0 12px; color: var(--teal); background: var(--teal-soft); border-radius: 11px; font-size: .82rem; font-weight: 740; text-decoration: none; }
.external-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; font-size: .84rem; font-weight: 740; }
.quiet-copy { margin: 0; color: var(--muted); font-size: .92rem; }
.page-heading { margin: 0 0 18px; }
.page-heading h1 { margin: 0; font-size: clamp(1.65rem, 5vw, 2.1rem); letter-spacing: -.045em; line-height: 1.15; }
.page-heading p { margin: 7px 0 0; color: var(--muted); }
.segmented-control { width: fit-content; display: flex; gap: 4px; margin: 0 0 14px; padding: 4px; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 13px; }
.segmented-control button { min-height: 40px; padding: 0 15px; color: var(--muted); background: transparent; border: 0; border-radius: 10px; font-size: .88rem; font-weight: 720; }
.segmented-control button[aria-pressed="true"] { color: #fff; background: var(--navy); }
.search-form { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 4px 5px 4px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.secondary-button, .primary-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: .88rem; font-weight: 730; text-decoration: none; }
.primary-button { color: #fff; background: var(--teal); border-color: var(--teal); }
.notice-box { margin: 14px 0; padding: 12px 14px; color: var(--muted); background: var(--paper-soft); border-left: 3px solid var(--teal); border-radius: 9px; font-size: .86rem; }
.notice-box--caution { color: var(--amber-ink); background: var(--amber); border-left-color: #b67a17; }
.loading-state { min-height: 74px; display: flex; align-items: center; gap: 12px; padding: 16px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.loading-spinner { width: 20px; height: 20px; flex: 0 0 20px; border: 2px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-section { margin-top: 22px; }
.result-list { display: grid; gap: 8px; }
.result-row { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 7px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.result-main { min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.result-main > span:nth-child(2) { min-width: 0; flex: 1; display: grid; }
.result-main strong { overflow-wrap: anywhere; font-size: .92rem; }
.result-meta { color: var(--muted); font-size: .78rem; }
.result-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); border-radius: 11px; }
.result-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.result-arrow { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-action { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; color: var(--muted); background: transparent; border: 0; border-radius: 12px; }
.icon-action[aria-pressed="true"] { color: #c34c6b; background: color-mix(in srgb, #c34c6b 10%, var(--paper)); }
.icon-action svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0; color: var(--muted); font-size: .84rem; }
.pagination-link { min-height: 42px; display: grid; place-items: center; padding: 0 10px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 11px; text-decoration: none; }
.pagination-link.is-disabled { opacity: .48; }
.info-section, .content-section { padding: 16px 0; border-top: 1px solid var(--line); scroll-margin-top: 18px; }
.info-section:first-of-type, .content-section:first-of-type { border-top: 0; }
.info-section > p, .content-section > p { color: var(--muted); }
.about-summary { padding-top: 0; border-top: 0; }
.about-summary p:first-child { color: var(--ink); font-size: 1.04rem; font-weight: 680; }
.info-jump-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.info-jump-links a { min-width: 0; min-height: 42px; flex: 1 1 90px; display: grid; place-items: center; padding: 0 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: .84rem; font-weight: 720; text-decoration: none; }
.info-jump-links a:hover { border-color: var(--teal); background: var(--paper-soft); }
.info-panel { padding: 16px; margin: 12px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; scroll-margin-top: 16px; }
.info-panel > h2 { margin: 0 0 10px; font-size: 1rem; }
.info-panel > h3 { margin: 14px 0 6px; font-size: .9rem; }
.info-lead { color: var(--ink) !important; font-size: 1.02rem; font-weight: 690; }
.info-contact { padding-top: 12px; margin-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.info-contact h3 { margin: 0 0 6px; font-size: .92rem; }
.info-contact p { margin: 6px 0; color: var(--muted); }
.info-contact .text-link { display: inline-block; margin: 3px 0; }
.info-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.info-settings-grid .preference-control { margin: 0; }
.info-details { padding-top: 8px; margin-top: 16px; border-top: 1px solid var(--line); }
.info-details summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; font-weight: 710; }
.info-details summary strong { color: var(--teal); }
.info-details[open] summary { margin-bottom: 8px; }
.anchor-alias { display: block; height: 0; scroll-margin-top: 16px; }
.info-section h3 { margin: 16px 0 8px; font-size: .93rem; }
.preference-control { margin-top: 14px; }
.form-select { width: 100%; min-height: 46px; margin-top: 6px; padding: 0 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.version-list { display: grid; gap: 0; margin: 0; }
.version-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.version-list dt { color: var(--muted); }
.version-list dd { margin: 0; font-weight: 720; text-align: right; }
.planned-section { padding: 14px; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 14px; }
.planned-section + .info-section { margin-top: 12px; }
.link-list { display: grid; gap: 3px; padding: 0; margin: 0; list-style: none; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-row { min-height: 48px; display: flex; align-items: center; color: var(--ink); text-decoration: none; }
.content-section h2 { margin: 18px 0 8px; font-size: 1rem; }
.content-list { display: grid; gap: 8px; padding-left: 1.2rem; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.route-list, .source-list, .notice-list, .coverage-list { display: grid; gap: 10px; margin: 14px 0; }
.content-card { min-width: 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.content-card > div:first-child { min-width: 0; flex: 1 1 220px; }
.content-card h2, .notice-entry h2, .coverage-row h2 { margin: 0 0 4px; font-size: .98rem; }
.content-card p, .notice-entry > p { margin: 0; color: var(--muted); font-size: .86rem; }
.source-card-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.map-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .55fr) auto; align-items: center; gap: 8px; margin: 0 0 14px; }
.map-filters input { min-width: 0; min-height: 46px; padding: 0 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.map-filters .form-select { min-width: 0; margin: 0; }
.stop-map-frame { height: clamp(320px, 43vh, 475px); overflow: hidden; margin: 12px 0 0; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 18px; isolation: isolate; }
.stop-map-svg { width: 100%; height: 100%; display: block; }
.stop-map-frame.leaflet-container { width: 100%; height: clamp(320px, 43vh, 475px); color: var(--ink); background: var(--paper-soft); font: inherit; }
.stop-map-frame .leaflet-control-attribution { padding: 2px 5px; color: #344b5c; background: rgba(255,255,255,.9); border-radius: 5px 0 0; font-size: 10px; }
.stop-map-frame .leaflet-control-attribution a { color: #155c7b; }
.stop-map-frame .leaflet-control-zoom a { color: #18364a; background: rgba(255,255,255,.96); }
.stop-map-frame .leaflet-control-zoom a:focus-visible, .stop-map-frame .leaflet-control-attribution a:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.map-background { fill: var(--paper-soft); }
.map-gridline { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 8; }
.map-point { cursor: pointer; }
.map-point circle { fill: var(--teal); stroke: var(--paper); stroke-width: 2.5; transition: r .16s ease, fill .16s ease; }
.map-point:hover circle, .map-point:focus-visible circle { fill: var(--navy); r: 9; }
.map-caption { margin: 8px 2px; color: var(--muted); font-size: .78rem; }
.stop-map-empty { display: grid; min-height: 170px; place-items: center; padding: 20px; color: var(--muted); background: var(--paper-soft); border: 1px dashed var(--line); border-radius: 16px; }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; margin: 10px 2px 0; color: var(--muted); font-size: .75rem; }
.map-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend-dot { width: 11px; height: 11px; flex: 0 0 11px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(30,53,70,.25); }
.map-legend-dot.is-confirmed { background: #167c95; }
.map-legend-dot.is-hinted { background: #b4761b; }
.map-legend-dot.is-unlinked { background: #64768a; }
:root[data-theme="dark"] .map-legend-dot.is-confirmed { background: #77d7e4; }
:root[data-theme="dark"] .map-legend-dot.is-hinted { background: #f2c76a; }
:root[data-theme="dark"] .map-legend-dot.is-unlinked { background: #a6b5c3; }
.station-map-popup { display: grid; gap: 7px; color: #19364b; }
.station-map-popup > strong { font-size: .95rem; }
.station-map-popup p { margin: 0; font-size: .78rem; line-height: 1.4; }
.station-map-popup-action { min-height: 40px; display: inline-flex; align-items: center; color: #167c95; font-size: .82rem; font-weight: 740; text-decoration: underline; }
.notice-entry { padding: 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.notice-entry > p { margin: 7px 0; }
.notice-entry .notice-date { margin: 0 0 6px; color: var(--teal); font-size: .76rem; font-weight: 760; }
.notice-entry .notice-effective { color: var(--ink); }
.coverage-row { padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.coverage-line { color: var(--ink); text-decoration: none; }
.coverage-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 0; margin: 11px 0 0; list-style: none; }
.coverage-day { min-width: 0; display: grid; gap: 2px; padding: 9px 10px; color: var(--muted); background: var(--paper-soft); border-radius: 10px; font-size: .74rem; }
.coverage-day strong { color: var(--ink); font-size: .72rem; }
.coverage-day[data-state="available"] { border-left: 3px solid var(--teal); }
.coverage-day[data-state="pending"] { border-left: 3px solid #b67a17; }
.coverage-day[data-state="empty"] { border-left: 3px solid var(--line); }
.changelog-list { padding-left: 1.2rem; }
.back-link, .text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 720; }
.detail-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: -8px 0 14px; }
.schedule-tabs { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; padding: 3px 2px 8px; margin: 4px 0 8px; scrollbar-width: thin; }
.schedule-tab { min-height: 42px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: 0 13px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: .84rem; font-weight: 710; text-decoration: none; }
.schedule-tab[aria-current="page"] { color: #fff; background: var(--teal); border-color: var(--teal); }
.direction-tabs .schedule-tab { min-height: 46px; white-space: normal; }
.data-provenance { margin: 2px 0 14px; color: var(--muted); font-size: .78rem; }
.detail-grid { display: grid; gap: 18px; }
.detail-section, .stop-service { min-width: 0; padding: 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.detail-section h2, .stop-service h2 { margin: 0; font-size: 1rem; }
.detail-section > .quiet-copy, .stop-service > .quiet-copy { margin: 5px 0 10px; }
.journey-list { display: grid; gap: 14px; margin-top: 14px; }
.pattern-card > h2 { margin-bottom: 4px; }
.pattern-card > h3 { margin: 16px 0 8px; font-size: .95rem; }
.pattern-stops { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.pattern-stops summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 680; }
.departure-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 7px; max-height: 420px; overflow: auto; padding: 0; margin: 12px 0 0; list-style: none; }
.departure-list li { min-height: 42px; display: grid; place-items: center; color: var(--ink); background: var(--paper-soft); border: 1px solid var(--line); border-radius: 10px; font-variant-numeric: tabular-nums; font-weight: 720; }
.route-stop-list { display: grid; gap: 6px; padding: 0; margin: 12px 0 0; list-style: none; }
.route-stop-list li { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: var(--paper-soft); border-radius: 11px; }
.stop-order { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); border-radius: 50%; font-size: .75rem; font-weight: 800; }
.route-stop-link, .service-line-link { min-width: 0; color: var(--ink); font-weight: 690; text-decoration: none; overflow-wrap: anywhere; }
.stop-service { margin-top: 12px; }
.stop-service-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.stop-service-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.source-actions { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 6px 0 18px; }
.recovery-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.more-sheet { position: fixed; inset: auto 0 0; width: min(100%, 640px); max-width: 100%; max-height: min(84vh, 720px); margin: 0 auto; padding: 12px 20px calc(18px + env(safe-area-inset-bottom)); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 22px 22px 0 0; box-shadow: 0 -14px 50px rgba(5, 20, 34, .25); }
.more-sheet::backdrop { background: rgba(7, 18, 28, .48); backdrop-filter: blur(3px); }
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 10px; background: var(--line); border-radius: 999px; }
.sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.sheet-heading h2 { margin: 0; font-size: 1.22rem; }
.close-button { width: 44px; height: 44px; color: var(--muted); background: var(--paper-soft); border: 1px solid var(--line); border-radius: 13px; font-size: 1.35rem; }
.more-menu { display: grid; gap: 12px; max-height: calc(min(84vh, 720px) - 112px); overflow-y: auto; overscroll-behavior: contain; }
.more-group { display: grid; gap: 2px; }
.more-group-title { padding: 0 12px; margin: 4px 0 2px; color: var(--muted); font-size: .72rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.more-link { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 12px; color: var(--ink); border-radius: 12px; text-decoration: none; }
.more-link:hover { background-color: var(--paper-soft); }
#more-title:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.planned-item { display: grid; gap: 2px; padding: 10px 12px; color: var(--muted); }
.planned-item small { font-size: .74rem; }
.toast { position: fixed; z-index: 50; right: 14px; bottom: calc(88px + env(safe-area-inset-bottom)); left: 14px; max-width: 440px; margin: 0 auto; padding: 13px 16px; color: #fff; background: var(--navy); border-radius: 13px; box-shadow: var(--shadow); font-size: .9rem; }

@media (min-width: 701px) {
  .app-shell { width: min(calc(100% - 48px), 1040px); padding-top: 22px; }
  .home-hero { grid-template-columns: minmax(0, 1.25fr) minmax(235px, .75fr); align-items: center; gap: clamp(20px, 4vw, 38px); }
  .home-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-shortcut:last-child { grid-column: 1 / -1; }
  .home-shortcut { min-height: 70px; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px; text-align: left; }
  .home-shortcut strong { flex: 1; }
  .home-shortcut-arrow { width: 16px; height: 16px; flex: 0 0 16px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .home-personal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
  .main-content { padding-top: 28px; }
  .coverage-days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .primary-nav { right: 24px; left: 24px; border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; }
  .nav-item { min-height: 56px; font-size: .78rem; }
  .more-sheet { bottom: 16px; border-radius: 22px; }
}
@media (min-width: 960px) {
  .app-shell { padding-bottom: 32px; }
  .masthead { min-height: 52px; }
  .primary-nav { position: static; width: fit-content; display: flex; gap: 6px; margin: 18px 0 0 auto; padding: 4px; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; }
  .nav-item { min-width: 110px; min-height: 44px; flex-direction: row; gap: 8px; padding: 0 12px; font-size: .86rem; }
  .nav-item svg, .more-mark { width: 19px; height: 19px; }
  .main-content { padding-top: 24px; }
  .home-view { max-width: 1040px; margin: 16px auto 0; gap: 18px; }
  .home-hero { padding: clamp(26px, 4vw, 42px); }
  .home-intro h1 { font-size: clamp(2.5rem, 4vw, 3.45rem); }
  .home-shortcuts { gap: 10px; }
  .home-shortcut { min-height: 76px; }
  .home-personal-grid { gap: 22px; }
  .more-sheet { inset: 176px max(24px, calc((100vw - 1040px) / 2)) auto auto; width: min(calc(100vw - 48px), 420px); max-height: min(70vh, 640px); margin: 0; border-radius: 22px; }
  .detail-grid { grid-template-columns: 1.2fr .8fr; align-items: start; }
}
@media (min-width: 560px) and (max-width: 700px) and (orientation: landscape) {
  .home-hero { grid-template-columns: minmax(0, 1.1fr) minmax(190px, .9fr); align-items: center; gap: 16px; padding: 16px; }
  .home-intro h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 5vw, 2.25rem); }
  .home-intro-copy { margin-bottom: 12px; font-size: .86rem; }
  .home-shortcuts { grid-template-columns: 1fr; gap: 6px; }
  .home-shortcut, .home-shortcut:last-child { min-height: 46px; grid-column: auto; flex-direction: row; justify-content: flex-start; text-align: left; }
  .home-shortcut-icon { width: 30px; height: 30px; flex: 0 0 30px; }
  .home-shortcut strong { flex: 1; }
  .home-shortcut-arrow { width: 16px; height: 16px; display: block; }
  .home-notice { gap: 10px; padding: 12px 14px; }
}
@media (max-width: 700px) {
  .home-notice { align-items: flex-start; flex-direction: column; }
  .home-notice-actions { justify-content: flex-start; }
}
@media (max-width: 320px) {
  .app-shell { width: calc(100% - 24px); }
  .primary-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .nav-item { min-height: 44px; flex-direction: row; font-size: .76rem; }
  .home-search { gap: 8px; padding-left: 11px; }
  .home-hero { padding: 15px; border-radius: 20px; }
  .home-kicker { font-size: .66rem; letter-spacing: .045em; }
  .home-intro h1 { font-size: 1.85rem; }
  .home-intro-copy { font-size: .88rem; }
  .secondary-button { padding: 0 9px; }
  .map-filters { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .home-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-shortcut:last-child { grid-column: 1 / -1; }
  .home-shortcut, .home-shortcut:last-child { min-height: 52px; flex-direction: row; justify-content: flex-start; gap: 9px; padding-inline: 10px; text-align: left; }
  .home-shortcut strong { flex: 1; }
  .home-shortcut-arrow { width: 16px; height: 16px; display: block; }
  .home-notice { align-items: flex-start; flex-direction: column; }
  .home-notice-actions { justify-content: flex-start; }
  .home-empty { align-items: flex-start; flex-direction: column; }
}
@media (min-width: 321px) and (max-width: 520px) {
  .map-filters { grid-template-columns: minmax(0, 1fr) 118px; }
  .map-filters input { grid-column: 1 / -1; }
  .map-filters button { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
