:root {
  --yellow: #f6c744;
  --yellow-soft: #fff4c7;
  --ink: #151515;
  --muted: #696969;
  --line: #dedbd2;
  --paper: #f3f1eb;
  --white: #fff;
  --green: #087e5b;
  --red: #be2f2f;
  --shadow: 0 16px 50px rgba(24, 24, 20, 0.09);
  font-family: Inter, "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, var(--yellow) 0 13.5rem, var(--paper) 13.5rem); }
.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; }
button, input, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(8, 126, 91, 0.38); outline-offset: 2px; }
.site-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 48px; }
.topbar { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border: 2px solid var(--ink); border-radius: 13px; background: rgba(255,255,255,.38); transform: rotate(-2deg); }
.brand-mark svg { width: 29px; height: 29px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { display: block; font-size: 1.22rem; letter-spacing: .08em; line-height: 1.1; }
.brand small { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; font-weight: 700; letter-spacing: .12em; margin-top: 4px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.auto-refresh-control { height: 44px; padding: 0 7px 0 11px; display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.58); border: 1px solid rgba(21,21,21,.16); border-radius: 12px; font-size: .72rem; font-weight: 750; }
.auto-refresh-control > span { color: var(--muted); }
.auto-refresh-control select { min-width: 62px; padding: 5px 20px 5px 5px; border: 0; border-radius: 7px; background-color: rgba(255,255,255,.72); color: var(--ink); font-size: .75rem; font-weight: 800; cursor: pointer; }
.icon-button, .refresh-button, .add-button, .primary-button, .secondary-button, .nearest-route-button, .close-button, .text-button { border: 0; cursor: pointer; }
.icon-button, .refresh-button { height: 44px; background: rgba(255,255,255,.58); border: 1px solid rgba(21,21,21,.16); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 750; }
.icon-button { width: 44px; }
.refresh-button { padding: 0 15px; }
.icon-button svg, .refresh-button svg, .add-button svg, .primary-button svg, .nearest-route-button svg { width: 20px; height: 20px; fill: currentColor; }
.refresh-button.is-spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(310px, .75fr); gap: 18px; align-items: start; }
.board, .side-panel { background: rgba(255,255,255,.96); border: 1px solid rgba(21,21,21,.12); box-shadow: var(--shadow); border-radius: 24px; }
.board { padding: 30px; min-height: 570px; }
.side-panel { padding: 24px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(1.85rem, 4vw, 2.65rem); letter-spacing: -.04em; line-height: 1.05; }
.settings-toggle { width: 100%; margin: 0; padding: 2px 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.settings-toggle .eyebrow { display: block; }
.settings-toggle strong { display: block; font-size: 1.4rem; letter-spacing: -.03em; }
.settings-toggle-meta { display: inline-flex; align-items: center; gap: 9px; }
.settings-count { min-width: max-content; padding: 5px 9px; border-radius: 999px; background: var(--yellow-soft); color: #73570a; font-size: .72rem; font-weight: 800; }
.settings-toggle svg { width: 22px; height: 22px; fill: currentColor; transition: transform .18s ease; }
.settings-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.settings-content[hidden] { display: none; }
.settings-actions { padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .78rem; font-weight: 750; }
.settings-action-buttons { display: inline-flex; align-items: center; gap: 6px; }
.group-add-button { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); cursor: pointer; font-size: .76rem; font-weight: 800; }
.group-add-button:hover { border-color: var(--ink); }
.live-status { margin-top: 8px; min-width: max-content; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(8,126,91,.1); }
.add-button { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; background: var(--ink); color: white; font-weight: 750; }
.add-button svg { width: 17px; height: 17px; }
.quick-search { padding: 18px; border: 1px solid #e7d58f; border-radius: 18px; background: linear-gradient(135deg, #fff9df, #fff 72%); }
.quick-search-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.quick-search-heading h2 { margin: 0; font-size: 1rem; letter-spacing: -.01em; }
.quick-search-heading p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.quick-search-form { min-height: 48px; display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 4px 4px 4px 13px; border: 1px solid #c9c6bd; border-radius: 13px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.quick-search-form:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(8,126,91,.1); }
.quick-search-icon { display: grid; place-items: center; color: var(--muted); }
.quick-search-icon svg { width: 20px; height: 20px; fill: currentColor; }
.quick-search-form input { min-width: 0; height: 40px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1rem; font-weight: 750; text-transform: uppercase; }
.quick-search-form input::placeholder { color: #99968d; font-weight: 500; text-transform: none; }
.quick-search-form button { height: 40px; min-width: 72px; padding: 0 15px; border: 0; border-radius: 9px; background: var(--ink); color: #fff; cursor: pointer; font-weight: 800; }
.quick-search-form button:disabled { cursor: wait; opacity: .65; }
.quick-search-results { margin-top: 16px; padding-top: 16px; border-top: 1px solid #eadca6; }
.quick-search-results[hidden] { display: none; }
.quick-result-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quick-search-summary { min-width: 0; display: flex; align-items: center; gap: 10px; }
.quick-search-summary > span:last-child { min-width: 0; }
.quick-search-summary strong, .quick-search-summary small { display: block; }
.quick-search-summary strong { font-size: .92rem; line-height: 1.35; }
.quick-search-summary small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.quick-route-badge { min-width: 54px; padding: 10px 8px; border-radius: 10px; background: var(--ink); color: var(--yellow); text-align: center; font: 900 1rem/1 ui-monospace, monospace; }
.quick-close-button { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 9px; background: #f0eee8; cursor: pointer; }
.quick-close-button svg { width: 18px; height: 18px; fill: currentColor; }
.quick-search-directions { display: flex; gap: 7px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; scrollbar-width: thin; }
.quick-direction-button { min-height: 44px; padding: 7px 11px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.quick-direction-button strong { font-size: .78rem; }
.quick-direction-button small { margin-top: 2px; color: var(--muted); font-size: .66rem; }
.quick-direction-button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.quick-direction-button[aria-pressed="true"] small { color: rgba(255,255,255,.68); }
.quick-search-status { margin: 9px 2px 7px; color: var(--muted); font-size: .72rem; }
.quick-stop-list { max-height: 520px; overflow-y: auto; display: grid; gap: 6px; padding-right: 3px; overscroll-behavior: contain; }
.quick-stop-row { min-height: 64px; display: grid; grid-template-columns: 34px minmax(0,1fr) minmax(205px,.85fr); align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #e6e3da; border-radius: 11px; background: #fff; }
.quick-stop-seq { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow-soft); color: #73570a; font: 850 .74rem/1 ui-monospace, monospace; }
.quick-stop-name { min-width: 0; }
.quick-stop-name strong, .quick-stop-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-stop-name strong { font-size: .84rem; }
.quick-stop-name small { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.quick-stop-etas { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); align-items: center; gap: 5px; }
.quick-eta { min-width: 0; padding-left: 7px; border-left: 2px solid var(--line); }
.quick-eta.is-next { border-left-color: var(--yellow); }
.quick-eta strong, .quick-eta small { display: block; white-space: nowrap; }
.quick-eta strong { font: 800 .78rem/1.15 ui-monospace, monospace; }
.quick-eta small { margin-top: 3px; color: var(--muted); font-size: .62rem; }
.quick-no-eta { grid-column: 1 / -1; color: var(--muted); font-size: .76rem; text-align: right; }
.quick-search-error { padding: 24px 14px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); text-align: center; font-size: .82rem; }
.quick-loading { display: grid; gap: 7px; }
.quick-loading span { height: 58px; border-radius: 11px; background: linear-gradient(90deg, #eee 25%, #f8f8f8 40%, #eee 65%); background-size: 400% 100%; animation: shimmer 1.2s infinite; }
.eta-list { display: grid; gap: 13px; margin-top: 28px; }
.eta-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 7px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.eta-tab { min-height: 42px; padding: 0 12px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); cursor: pointer; font-size: .84rem; font-weight: 800; white-space: nowrap; }
.eta-tab:hover { border-color: var(--ink); color: var(--ink); }
.eta-tab[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.eta-tab-count { min-width: 22px; padding: 3px 6px; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: .68rem; line-height: 1; text-align: center; }
.eta-tab[aria-selected="true"] .eta-tab-count { background: var(--yellow); color: var(--ink); }
.eta-tab-panel { display: grid; gap: 13px; }
.eta-tab-panel[hidden] { display: none; }
.eta-group-display-options { display: flex; justify-content: flex-end; padding: 1px 2px; }
.eta-show-all { min-height: 40px; padding: 7px 11px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; background: #fffdf7; cursor: pointer; }
.eta-show-all input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--ink); cursor: pointer; }
.eta-show-all span, .eta-show-all strong, .eta-show-all small { display: block; }
.eta-show-all strong { font-size: .84rem; }
.eta-show-all small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.eta-tab-empty { padding: 34px 18px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; font-size: .84rem; }
.eta-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: transform .18s ease, box-shadow .18s ease; }
.eta-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(22,22,19,.08); }
.eta-card-main { display: grid; grid-template-columns: 102px minmax(0, 1fr) minmax(300px, 1.12fr); min-height: 126px; }
.route-badge { display: grid; place-items: center; align-content: center; background: var(--ink); color: var(--yellow); padding: 18px 10px; text-align: center; }
.route-badge strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(1.65rem, 4vw, 2.25rem); letter-spacing: -.08em; line-height: 1; }
.route-badge small { margin-top: 8px; color: rgba(255,255,255,.66); font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.route-info { min-width: 0; padding: 21px 22px; display: flex; flex-direction: column; justify-content: center; border-right: 1px dashed var(--line); }
.route-info .nickname { color: var(--green); font-size: .8rem; font-weight: 850; letter-spacing: .07em; line-height: 1.3; margin: 0 0 5px; }
.route-info h3 { margin: 0; font-size: 1.16rem; line-height: 1.35; }
.route-info p { margin: 6px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.eta-times { padding: 17px 24px 17px 20px; display: grid; grid-template-columns: minmax(88px, 1.2fr) repeat(2, minmax(0,1fr)); align-items: center; gap: 8px; }
.eta-time { min-width: 0; padding-left: 10px; border-left: 2px solid var(--line); }
.eta-time:first-child { border-left-color: var(--yellow); }
.eta-time strong { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.25rem; line-height: 1.05; white-space: nowrap; }
.eta-time:first-child strong { font-size: 1.25rem; }
.eta-time small { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; white-space: nowrap; }
.eta-card-note { padding: 9px 16px; background: var(--yellow-soft); color: #73570a; border-top: 1px solid #f2dc8c; font-size: .76rem; }
.eta-error { color: var(--muted); grid-column: 1 / -1; text-align: center; font-size: .84rem; }
.skeleton { height: 18px; border-radius: 5px; background: linear-gradient(90deg, #eee 25%, #f7f7f7 40%, #eee 65%); background-size: 400% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -100% 0; } }
.empty-state { min-height: 420px; padding: 50px 20px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-state[hidden] { display: none; }
.empty-sign { width: 106px; border-radius: 13px; overflow: hidden; background: var(--yellow); box-shadow: 7px 7px 0 var(--ink); transform: rotate(-2deg); }
.empty-sign span { display: block; padding: 6px; background: var(--ink); color: white; font-size: .78rem; font-weight: 800; letter-spacing: .12em; }
.empty-sign strong { display: block; padding: 12px 10px 15px; font: 900 2.5rem/1 ui-monospace, monospace; }
.empty-state h2 { margin: 28px 0 8px; font-size: 1.4rem; }
.empty-state p { max-width: 420px; margin: 0 0 22px; color: var(--muted); line-height: 1.7; }
.primary-button { min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; background: var(--yellow); color: var(--ink); border: 1px solid #dfad20; font-weight: 850; box-shadow: 0 5px 0 #c99409; }
.primary-button:active { transform: translateY(3px); box-shadow: 0 2px 0 #c99409; }
.primary-button.full { width: 100%; margin-top: 8px; }
.primary-button:disabled { cursor: wait; opacity: .6; }
.saved-list { display: grid; gap: 10px; margin: 12px 0 10px; }
.manage-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #faf9f6; }
.manage-group-header { min-height: 46px; padding: 8px 9px 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--yellow-soft); border-bottom: 1px solid #ecdda5; }
.manage-group-title { min-width: 0; display: flex; align-items: center; gap: 7px; }
.manage-group-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.manage-group-title small { min-width: max-content; color: #73570a; font-size: .68rem; font-weight: 800; }
.manage-actions { display: inline-flex; align-items: center; gap: 1px; }
.group-bus-list { display: grid; gap: 7px; padding: 8px; }
.group-empty { margin: 0; padding: 12px; color: var(--muted); text-align: center; font-size: .76rem; }
.group-add-route-button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px dashed #b8aa78; border-radius: 9px; background: #fffdf5; color: var(--ink); cursor: pointer; font-size: .76rem; font-weight: 800; }
.group-add-route-button:hover { border-style: solid; border-color: var(--ink); background: var(--yellow-soft); }
.group-add-route-button svg { width: 16px; height: 16px; fill: currentColor; }
.storage-status { margin: 0 0 20px; padding: 10px 11px; display: flex; align-items: flex-start; gap: 8px; border-radius: 10px; background: var(--yellow-soft); color: #73570a; font-size: .72rem; line-height: 1.45; }
.storage-status svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; fill: currentColor; }
.storage-status.is-error { background: #fde9e9; color: #8b2424; }
.saved-empty { margin: 0; padding: 14px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; text-align: center; font-size: .84rem; }
.saved-item { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 8px 10px; align-items: center; padding: 8px; border-radius: 10px; background: white; border: 1px solid #ece9e0; }
.saved-route { min-height: 42px; display: grid; place-items: center; background: var(--ink); color: var(--yellow); border-radius: 9px; font: 850 .88rem/1 ui-monospace, monospace; }
.saved-copy { min-width: 0; }
.saved-copy strong, .saved-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-copy strong { font-size: .84rem; }
.saved-copy small { margin-top: 4px; color: var(--muted); font-size: .72rem; }
.saved-copy .saved-display-time { color: var(--green); font-size: .68rem; font-weight: 750; }
.saved-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 5px; border-top: 1px solid #f0eee7; }
.text-button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 8px; cursor: pointer; }
.text-button:hover { background: #f3f1eb; }
.text-button.danger:hover { color: var(--red); }
.text-button:disabled { color: #bbb8af; cursor: not-allowed; }
.text-button svg { width: 17px; height: 17px; fill: currentColor; }
.nearby-panel { margin-top: 20px; padding-top: 22px; border-top: 1px solid var(--line); }
.nearby-heading { display: flex; gap: 12px; align-items: flex-start; }
.location-icon { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--yellow-soft); color: #906c00; }
.location-icon svg { width: 20px; height: 20px; fill: currentColor; }
.nearby-heading h3 { margin: 0; font-size: 1rem; }
.nearby-heading p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.secondary-button, .nearest-route-button { width: 100%; min-height: 42px; margin-top: 14px; border: 1px solid var(--ink); border-radius: 10px; background: white; font-weight: 750; }
.secondary-button:hover, .nearest-route-button:hover { background: var(--ink); color: white; }
.nearby-list { display: grid; gap: 7px; margin-top: 12px; }
.nearby-stop { width: 100%; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); background: white; border-radius: 10px; cursor: pointer; text-align: left; }
.nearby-stop:hover { border-color: var(--ink); }
.nearby-stop strong { display: block; font-size: .8rem; }
.nearby-stop small { color: var(--muted); font-size: .7rem; }
.nearby-stop > span:last-child { font-weight: 900; }
.route-chips { padding: 4px 2px 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.route-chip { border: 0; border-radius: 7px; padding: 7px 9px; background: var(--ink); color: var(--yellow); font: 800 .74rem/1 ui-monospace, monospace; cursor: pointer; }
.data-note { margin: 22px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.55; }
.data-note a { color: inherit; font-weight: 750; }
.route-dialog { width: min(510px, calc(100% - 28px)); max-height: min(760px, calc(100vh - 28px)); margin: auto; padding: 0; border: 0; border-radius: 22px; box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.route-dialog::backdrop { background: rgba(18,18,16,.58); backdrop-filter: blur(5px); }
.route-dialog form { padding: 26px; }
.group-dialog { width: min(430px, calc(100% - 28px)); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.dialog-header h2 { margin: 0; font-size: 1.55rem; letter-spacing: -.035em; }
.close-button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #f1f0eb; }
.close-button svg { width: 20px; height: 20px; fill: currentColor; }
.field { display: block; margin-top: 15px; }
.field > span { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 7px; font-size: .84rem; font-weight: 800; }
.field > span small { color: var(--muted); font-weight: 500; }
.field input, .field select { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid #c9c6bd; border-radius: 11px; background: white; color: var(--ink); font-size: 1rem; }
.field input:focus, .field select:focus { border-color: var(--green); }
.field input:disabled, .field select:disabled { background: #efeee9; color: #8a8882; }
.field > small { display: block; margin: 6px 3px 0; color: var(--muted); font-size: .72rem; }
.time-window-field { min-width: 0; margin: 15px 0 0; padding: 0; border: 0; }
.time-window-field legend { margin: 0 2px 7px; padding: 0; font-size: .84rem; font-weight: 800; }
.time-window-inputs { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.time-window-inputs label { min-width: 0; }
.time-window-inputs label > span { display: block; margin: 0 2px 5px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.time-window-inputs input { width: 100%; min-height: 48px; padding: 0 11px; border: 1px solid #c9c6bd; border-radius: 11px; background: white; color: var(--ink); font-size: 1rem; }
.time-window-inputs input:focus { border-color: var(--green); }
.time-window-field > small { display: block; margin: 7px 3px 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.nearest-route-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-color: var(--line); color: var(--green); font-size: .8rem; }
.nearest-route-button:disabled { color: #999; cursor: not-allowed; }
.nearest-route-button svg { width: 17px; height: 17px; }
.form-error { margin: 14px 0 0; padding: 10px 12px; background: #fde9e9; color: #8b2424; border-radius: 9px; font-size: .8rem; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: 10px; background: var(--ink); color: white; font-size: .84rem; opacity: 0; pointer-events: none; transition: .22s ease; box-shadow: 0 9px 30px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.site-footer { padding: 24px 0 0; color: var(--muted); text-align: center; font-size: .76rem; letter-spacing: .04em; }
.site-footer strong { color: var(--ink); font-weight: 800; }
@media (max-width: 900px) {
  body { background: linear-gradient(180deg, var(--yellow) 0 11.8rem, var(--paper) 11.8rem); }
  .site-shell { width: min(720px, calc(100% - 28px)); }
  .layout { grid-template-columns: 1fr; }
  .board { min-height: 480px; }
  .quick-stop-row { grid-template-columns: 34px minmax(0,1fr); }
  .quick-stop-etas { grid-column: 2; }
  .eta-card-main { grid-template-columns: 92px minmax(0, 1fr); }
  .route-info { border-right: 0; }
  .eta-times { grid-column: 1 / -1; border-top: 1px dashed var(--line); }
}
@media (max-width: 560px) {
  body { background: linear-gradient(180deg, var(--yellow) 0 9.7rem, var(--paper) 9.7rem); }
  .site-shell { width: calc(100% - 18px); padding-bottom: 24px; }
  .topbar { min-height: 0; padding: 12px 0; flex-wrap: wrap; gap: 10px; }
  .header-actions { width: 100%; justify-content: flex-end; }
  .brand-mark { width: 40px; height: 40px; border-radius: 11px; }
  .brand strong { font-size: 1.05rem; }
  .brand small { font-size: .62rem; }
  .refresh-button { width: 44px; padding: 0; }
  .refresh-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .auto-refresh-control { height: 40px; }
  .layout { gap: 10px; }
  .board, .side-panel { border-radius: 18px; }
  .board { padding: 20px 15px; min-height: 430px; }
  .side-panel { padding: 20px 15px; }
  .settings-actions { align-items: flex-start; flex-direction: column; }
  .settings-action-buttons { width: 100%; }
  .settings-action-buttons .group-add-button { flex: 1; justify-content: center; }
  .manage-group-header { align-items: flex-start; }
  .manage-actions .text-button { width: 29px; height: 29px; }
  .section-heading { align-items: flex-end; }
  h1 { font-size: 1.8rem; }
  .live-status { font-size: .7rem; }
  .quick-search { padding: 14px; border-radius: 14px; }
  .quick-search-heading p { font-size: .74rem; }
  .quick-search-form { grid-template-columns: 20px minmax(0,1fr) auto; padding-left: 10px; }
  .quick-search-form button { min-width: 60px; padding: 0 11px; }
  .quick-route-badge { min-width: 48px; }
  .quick-stop-list { max-height: 60vh; }
  .quick-stop-row { gap: 7px 9px; padding: 9px 8px; }
  .quick-stop-name strong { font-size: .8rem; }
  .quick-stop-etas { grid-template-columns: repeat(3, minmax(72px,1fr)); overflow-x: auto; padding-bottom: 2px; }
  .quick-no-eta { text-align: left; }
  .eta-list { margin-top: 20px; }
  .eta-group-display-options { justify-content: stretch; }
  .eta-show-all { width: 100%; }
  .eta-card-main { grid-template-columns: 78px minmax(0,1fr); }
  .route-badge { padding: 15px 7px; }
  .route-badge strong { font-size: 1.45rem; }
  .route-info { padding: 16px 14px; }
  .route-info h3 { font-size: 1rem; }
  .eta-times { padding: 14px 11px; gap: 5px; }
  .eta-time { padding-left: 8px; }
  .eta-time strong { font-size: 1.02rem; }
  .eta-time:first-child strong { font-size: 1.15rem; }
  .eta-time small { font-size: .62rem; }
  .empty-state { min-height: 340px; padding-top: 35px; }
  .route-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); border-radius: 18px; }
  .route-dialog form { padding: 21px 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
