:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: #17374a;
  background: #f3f8fa;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: #006d95; text-underline-offset: 3px; }
a:hover { color: #004e70; }
:focus-visible { outline: 3px solid #f4a340; outline-offset: 3px; }
.shell { width: min(100% - 40px, 1120px); margin-inline: auto; }

.topbar { background: #08749a; color: #fff; }
.topbar-inner { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1rem; font-weight: 750; letter-spacing: -.02em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.city-time { font-size: .875rem; font-weight: 600; opacity: .96; text-align: right; }

.intro { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: 27px 0 21px; }
.eyebrow { margin: 0 0 10px; color: #08749a; font-weight: 750; font-size: .82rem; letter-spacing: .035em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; color: #102e40; font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -.055em; line-height: 1.1; }
h2 { margin-bottom: 4px; font-size: 1.22rem; letter-spacing: -.025em; line-height: 1.25; }
.intro-copy { max-width: 620px; margin-bottom: 0; color: #4f6a79; }
.schedule-note { min-width: 232px; border-left: 4px solid #0a83aa; padding: 11px 0 11px 17px; color: #355a6c; }
.schedule-note strong, .schedule-note span { display: block; }
.schedule-note strong { color: #153f53; font-size: .99rem; }
.schedule-note span { margin-top: 2px; font-size: .875rem; }

.search-panel, .schedule { background: #fff; border: 1px solid #dbe9ee; border-radius: 18px; box-shadow: 0 8px 26px rgba(13, 62, 82, .045); }
.search-panel { padding: 20px 24px; }
.panel-heading p { margin: 0 0 13px; color: #607782; font-size: .94rem; }
.search-fields { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto auto; align-items: end; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field span, .field label { font-size: .875rem; color: #365a6a; font-weight: 700; }
.field-home { position: relative; }
.field input, .field select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #bfcfd6; border-radius: 10px; background: #fff; color: #163a4c; outline: none; }
.field input::placeholder { color: #82949d; }
.field input:focus, .field select:focus { border-color: #08749a; box-shadow: 0 0 0 3px #caeaf4; }
.save-button { height: 48px; padding: 0 23px; border: 1px solid #08749a; border-radius: 10px; background: #08749a; color: #fff; font-weight: 700; }
.save-button:hover { background: #046385; }
.soft-button { height: 48px; padding: 0 13px; border: 1px solid #b5d3de; border-radius: 10px; background: #f2f9fb; color: #075e7e; font-size: .88rem; font-weight: 700; white-space: nowrap; }
.soft-button:hover { background: #e3f3f8; }
.soft-button:disabled { opacity: .62; cursor: wait; }
.address-suggestions { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; max-height: 300px; overflow-y: auto; padding: 5px; border: 1px solid #b5d3de; border-radius: 11px; background: #fff; box-shadow: 0 12px 26px rgba(13, 62, 82, .16); }
.address-suggestions button { display: block; width: 100%; border: 0; border-radius: 7px; padding: 9px 10px; background: transparent; color: #17374a; text-align: left; }
.address-suggestions button:hover, .address-suggestions button:focus-visible, .address-suggestions button.highlighted { background: #e6f5fa; }
.address-feedback { margin: 10px 0 0; color: #3f6677; font-size: .88rem; }
.privacy-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 11px; color: #6e858f; font-size: .82rem; }
.text-button { border: 0; background: none; color: #08749a; text-decoration: underline; white-space: nowrap; padding: 2px 0; }

.schedule { overflow: hidden; margin-top: 18px; }
.schedule-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 19px 24px 13px; }
.schedule-heading p { margin-bottom: 0; color: #597583; font-size: .9rem; }
.schedule-filters { display: grid; grid-template-columns: minmax(190px, 245px) minmax(220px, 1fr); gap: 12px; padding: 0 24px 16px; }
.date-tabs { display: flex; gap: 5px; flex: none; border: 1px solid #cbdce2; border-radius: 11px; padding: 4px; background: #f5fafb; }
.date-tabs button { border: 0; border-radius: 7px; background: transparent; color: #4a6878; font-size: .875rem; font-weight: 700; padding: 8px 13px; }
.date-tabs button.selected { background: #08749a; color: #fff; box-shadow: 0 1px 4px rgba(0, 60, 85, .15); }
.status-tabs { display: flex; gap: 8px; padding: 0 24px 13px; overflow-x: auto; }
.status-tabs button { flex: none; border: 1px solid #cbdce2; border-radius: 999px; background: #fff; color: #3b5e6d; padding: 8px 15px; font-size: .875rem; font-weight: 650; }
.status-tabs button.selected { border-color: #08749a; background: #e6f5fa; color: #055f80; }
.view-tabs { display: flex; gap: 20px; padding: 0 24px; border-bottom: 1px solid #dbe9ee; }
.view-tabs button { border: 0; border-bottom: 3px solid transparent; padding: 10px 2px; background: transparent; color: #5c7785; font-weight: 750; }
.view-tabs button.selected { border-bottom-color: #08749a; color: #075e7e; }
.list-head, .result-row { display: grid; grid-template-columns: 145px minmax(0, 1fr) 175px; gap: 16px; align-items: center; }
.list-head { padding: 12px 24px; background: #eef6f8; color: #557181; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.result-row { min-height: 62px; padding: 13px 24px; border-top: 1px solid #e9f0f2; }
.result-row:hover { background: #f9fcfd; }
.result-row.active { background: #eefaf5; box-shadow: inset 3px 0 #138253; }
.result-row.upcoming, .result-row.past { background: #fff5f5; box-shadow: inset 3px 0 #c63d45; }
.result-time { color: #183b4d; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-address { min-width: 0; overflow-wrap: anywhere; }
.result-distance { display: block; margin-top: 3px; color: #557583; font-size: .78rem; font-weight: 600; }
.result-map-button { display: inline-block; margin-top: 3px; border: 0; padding: 2px 0; background: none; color: #08749a; font-size: .78rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.result-status { justify-self: start; border-radius: 999px; padding: 5px 9px; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.result-status.active { color: #087551; background: #d9f3e8; }
.result-status.upcoming, .result-status.past { color: #a42f38; background: #fde4e6; }
.empty-state { padding: 34px 24px; color: #526e7c; text-align: center; }
.map-panel { padding: 14px 24px 24px; }
.map-feedback { margin: 0 0 6px; color: #526e7c; font-size: .87rem; }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 18px; margin-bottom: 11px; color: #355666; font-size: .8rem; font-weight: 700; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend small { color: #607782; font-size: .76rem; font-weight: 500; }
.map-legend-dot { display: inline-block; width: 12px; height: 12px; flex: none; border-radius: 50%; }
.map-legend-dot.open { background: #138253; }
.map-legend-dot.closed { background: #c63d45; }
.map-frame { height: 510px; border: 1px solid #d5e4e9; border-radius: 12px; background: #e9f3f5; overflow: hidden; }
.maplibregl-popup-content { color: #17374a; border-radius: 10px; line-height: 1.4; }
.map-popup-title { display: block; margin-bottom: 4px; font-weight: 750; }
.map-popup-line { display: block; font-size: .83rem; }
.extra-note { margin-top: 18px; padding: 19px 23px; border: 1px solid #cfe2e9; border-radius: 14px; background: #eaf5f8; }
.extra-note h2 { font-size: 1rem; }
.extra-note p { margin-bottom: 0; color: #486979; font-size: .92rem; }
.footer { padding-top: 28px; padding-bottom: 40px; color: #65808d; font-size: .81rem; }
.footer p { margin-bottom: 7px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 580px); }
  .topbar-inner { min-height: 56px; }
  .brand { font-size: .93rem; }
  .city-time { font-size: .76rem; }
  .intro { display: block; padding: 25px 0 20px; }
  .intro-copy { font-size: .94rem; }
  .schedule-note { min-width: 0; margin-top: 20px; padding-top: 5px; padding-bottom: 5px; }
  .search-panel { padding: 18px; }
  .panel-heading p { font-size: .88rem; }
  .search-fields { grid-template-columns: 1fr 1fr; gap: 10px; }
  .field-home { grid-column: 1 / -1; }
  .soft-button, .save-button { width: 100%; white-space: normal; }
  .save-button { grid-column: 1 / -1; }
  .schedule-heading { display: block; padding: 19px 18px 15px; }
  .schedule-filters { grid-template-columns: 1fr; padding: 0 18px 16px; }
  .date-tabs { width: fit-content; margin-top: 15px; }
  .status-tabs { padding: 0 18px 16px; }
  .status-tabs { flex-wrap: wrap; overflow-x: visible; }
  .status-tabs button { padding-inline: 12px; }
  .view-tabs { padding-inline: 18px; }
  .list-head { display: none; }
  .result-row { grid-template-columns: 1fr auto; gap: 7px 12px; align-items: start; padding: 14px 18px; }
  .result-time { grid-column: 1; grid-row: 1; }
  .result-address { grid-column: 1 / -1; grid-row: 2; }
  .result-status { grid-column: 2; grid-row: 1; }
  .map-panel { padding: 12px 14px 16px; }
  .map-frame { height: min(68vh, 480px); min-height: 350px; }
  .extra-note { padding: 17px 18px; }
}

@media (max-width: 380px) {
  .city-time { max-width: 120px; }
  .result-status { font-size: .7rem; padding: 4px 7px; }
  .date-tabs button { padding-inline: 9px; }
  .privacy-line { flex-wrap: wrap; }
  .search-fields .soft-button { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .15s, border-color .15s, color .15s; }
}
