:root {
  color-scheme: light;
  --ink: #102f57;
  --muted: #6c7e95;
  --line: #d9e5ef;
  --wash: #f1f7fb;
  --teal: #1599a3;
  --teal-dark: #0d7280;
  --amber: #e58b1a;
  --white: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--white); color: var(--ink); }
button { font: inherit; }
.app-shell { max-width: 1440px; margin: 0 auto; padding: 52px 32px 40px; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid #c7d9e8; }
.top-tools { display: flex; align-items: stretch; gap: 18px; }
.top-advice, .top-updated { padding: 0 18px; border-left: 1px solid var(--line); }
.top-advice { min-width: 315px; }
.top-advice strong { display: block; font-size: 1.18rem; color: var(--teal-dark); }
.top-advice p { margin: 6px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.top-updated { min-width: 150px; }
.top-updated strong { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
h1 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.3rem); letter-spacing: -0.06em; line-height: .95; font-weight: 800; }
.page-header p { margin: 18px 0 0; color: var(--muted); font-size: 1rem; }
.page-header .user-greeting { margin-top: 8px; color: var(--teal-dark); font-weight: 750; }
.page-header .mode-note { margin-top: 10px; color: var(--amber); font-size: .82rem; font-weight: 750; letter-spacing: .04em; }
.refresh-button { border: 1px solid #b8ccdf; border-radius: 6px; background: white; color: var(--ink); padding: 10px 14px; font-size: .9rem; font-weight: 700; cursor: pointer; min-width: 112px; align-self: center; transition: background .2s, border-color .2s, transform .2s; }
.settings-link { align-self: center; color: var(--teal-dark); font-size: .9rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.refresh-button:hover { background: var(--wash); border-color: var(--teal); transform: translateY(-1px); }
.refresh-button:focus-visible { outline: 3px solid #78d3d4; outline-offset: 3px; }
.refresh-button:disabled { cursor: wait; opacity: .72; }
.refresh-button span { display: inline-block; margin-right: 6px; font-size: 1.2em; }
.loading span { animation: spin .8s linear infinite; }
.dashboard-grid { margin-top: 32px; }
.routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.route-panel, .side-panel { border: 1px solid var(--line); background: linear-gradient(180deg, #f8fbfd 0%, #fff 42%); }
.route-panel { min-height: 590px; padding: 16px; }
.route-head { display: flex; align-items: center; justify-content: space-between; color: white; background: var(--ink); padding: 12px 18px; }
.route-322 .route-head { background: var(--teal); }
.route-number { font-size: 4.2rem; line-height: .9; font-weight: 800; letter-spacing: -.05em; }
.route-status { display: flex; align-items: center; gap: 8px; font-size: 1.08rem; }
.status-dot { width: 11px; height: 11px; display: inline-block; border-radius: 50%; background: #56dcad; }
.status-dot.no-buses { background: var(--amber); }
.status-dot.unavailable { background: #9eabb9; }
.route-direction { margin: 0; padding: 18px 12px; color: var(--ink); background: var(--wash); font-size: 1.05rem; font-weight: 650; line-height: 1.5; }
.route-direction span { color: var(--muted); font-weight: 500; }
.bus-heading { display: flex; justify-content: space-between; margin: 26px 12px 8px; color: var(--muted); font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bus-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 10px; padding: 10px; border: 1px solid var(--line); background: #f8fbfd; }
.bus-row { min-height: 126px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px; background: white; border: 1px solid #e4edf3; }
.bus-rank { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #d5f1f0; color: var(--teal-dark); font-weight: 800; }
.bus-detail { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bus-detail strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.08rem; }
.bus-detail span { color: var(--muted); font-size: .8rem; }
.bus-eta { align-self: stretch; padding: 9px 10px; text-align: center; color: var(--amber); background: #fff7e9; font-size: 1rem; font-weight: 750; }
.empty-row { grid-column: 1 / -1; padding: 54px 12px; color: var(--muted); text-align: center; background: var(--wash); }
.route-foot { margin-top: 14px; color: var(--muted); font-size: .82rem; }
.advice-options { list-style: none; margin: 16px 0 0; padding: 0; }
.top-advice .advice-options { display: flex; gap: 14px; margin-top: 8px; }
.advice-options li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.top-advice .advice-options li { display: block; padding: 6px 0 0; border-top: 0; }
.advice-options li strong { color: var(--ink); font-size: 1rem; white-space: nowrap; }
.advice-options li span { color: var(--muted); font-size: .82rem; text-align: right; }
.side-block { padding: 0 0 28px; border-bottom: 1px solid var(--line); }
.side-label { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 12px; }
.side-block strong { font-size: 1.9rem; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.error { margin: 20px 0 0; padding: 14px 16px; background: #fff1ed; color: #b14b32; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1180px) { .top-tools { gap: 10px; } .top-advice { min-width: 260px; } .top-advice, .top-updated { padding: 0 10px; } }
@media (max-width: 980px) { .page-header { align-items: flex-start; flex-direction: column; } .top-tools { width: 100%; } }
@media (max-width: 680px) { .app-shell { padding: 28px 16px; } .top-tools { align-items: stretch; flex-direction: column; gap: 14px; } .top-advice, .top-updated { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; } .top-advice { min-width: 0; } .top-updated { min-width: 0; } .refresh-button { width: auto; align-self: flex-start; } .routes { grid-template-columns: 1fr; } .route-panel { min-height: unset; } .route-number { font-size: 3.2rem; } .route-direction { font-size: .94rem; } .bus-list { grid-template-columns: 1fr 1fr; margin-inline: 0; } .bus-detail strong { font-size: .98rem; } .bus-detail span { font-size: .74rem; } }
