:root {
  --screen-w: 402px;
  --screen-h: 874px;
  font-family: "Segoe UI", sans-serif;
  color: #163239;
  background: #e9eeeb;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 40px 36px; }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, .map-stop:focus-visible { outline: 3px solid var(--route-ink, #2259b9); outline-offset: 4px; }
button:active { transform: scale(.98); }
button:disabled { cursor: default; }
::selection { color: white; background: #2259b9; }
.review-head { max-width: 1250px; margin: 0 auto 36px; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.review-head h1 { font-size: 36px; letter-spacing: -.03em; margin: 0 0 12px; }
.review-head p { color: #506163; font-size: 14px; line-height: 1.5; margin: 0; }
.simulation { width: 350px; padding: 16px 20px; border: 1px solid #b8c9c2; border-radius: 12px; background: #f7faf9; flex: none; }
.simulation > label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.simulation output { font-variant-numeric: tabular-nums; }
.simulation > input { width: 100%; min-height: 32px; margin: 12px 0; accent-color: #2259b9; }
.simulation-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; }
.simulation-footer button { padding: 8px; min-height: 36px; background: transparent; border: 1px solid #c8d5cf; border-radius: 6px; color: #2259b9; }
.simulation-footer label { display: flex; align-items: center; gap: 6px; }
.simulation p { font-size: 12px; margin-top: 8px; }
.options { display: grid; grid-template-columns: repeat(2, var(--screen-w)); gap: 40px 32px; justify-content: center; }
.option { min-width: 0; }
.option-title { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 14px; }
.option-title h2 { font-size: 18px; margin: 0; letter-spacing: -.02em; }
.theme-caption { font-size: 12px; color: #506163; }
.option-caption { font-size: 13px; line-height: 1.5; margin: 14px 2px 0; color: #506163; }
.review-note { text-align: center; margin: 32px auto 0; color: #506163; font-size: 12px; line-height: 1.6; max-width: 760px; }
.screen {
  --ground: #f7faf9;
  --ink: #163239;
  --ink-2: #4b646a;
  --rule: #d5e0dc;
  --raised: #edf3ef;
  --map-ground: #eaf0ed;
  --map-road: #fff;
  --map-park: #d5e0d7;
  --map-building: #bacabf;
  --map-ink: #365657;
  --map-inactive: #93a8a1;
  --route-ink: #146b66;
  --route-solid: #146b66;
  --route-tint: #e0f0eb;
  --on-route: #fff;
  --wait-ground: #fbefd8;
  --wait-ink: #775014;
  width: var(--screen-w);
  height: var(--screen-h);
  border-radius: 28px;
  padding: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  container-type: size;
  font-variant-numeric: tabular-nums;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) var(--ground);
}
.screen[data-route="red"] { --route-ink: #2259b9; --route-solid: #2259b9; --route-tint: #e5ecfa; }
.screen[data-theme="dark"] {
  color-scheme: dark;
  --ground: #122024;
  --ink: #eef5f3;
  --ink-2: #b5c4c7;
  --rule: #3b5054;
  --raised: #1b2d31;
  --map-ground: #1a2b2e;
  --map-road: #324549;
  --map-park: #2e4140;
  --map-building: #4a5c55;
  --map-ink: #cee0dc;
  --map-inactive: #718884;
  --route-ink: #8bddcf;
  --route-solid: #8bddcf;
  --route-tint: #203e3d;
  --on-route: #122024;
  --wait-ground: #3b301e;
  --wait-ink: #edc783;
}
.screen[data-theme="dark"][data-route="red"] { --route-ink: #a5c4ff; --route-solid: #a5c4ff; --route-tint: #20374e; }
.screen > * { flex-shrink: 0; }
.screen-content { flex: 1; flex-shrink: 1; min-height: 0; padding: 20px 24px 14px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rule) var(--ground); }
.app-header { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 6px; font-size: 16px; letter-spacing: -.02em; }
.brand svg { width: 24px; height: 24px; margin-right: 3px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: transparent; }
.icon-button:hover { background: var(--raised); }
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.context-line { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; gap: 8px; }
.estimate { display: flex; align-items: center; gap: 5px; color: var(--ink-2); background: transparent; border: none; padding: 4px 0; min-height: 32px; font-size: 12px; }
.estimate svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.sample-clock { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.route-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border: 1px solid var(--rule); border-radius: 14px; margin: 16px 0 20px; background: var(--raised); }
.route-toggle button { min-height: 44px; border: none; border-radius: 9px; background: transparent; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 14px; }
.route-toggle button b { font-size: 14px; }
.route-toggle button[aria-pressed="true"] { background: var(--route-solid); color: var(--on-route); font-weight: 700; }
.route-toggle button:not([aria-pressed="true"]):hover { background: var(--ground); color: var(--ink); }
.stop-choice { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stop-choice > div { flex: 1; min-width: 0; }
.stop-choice label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 2px; }
.stop-choice select { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; min-height: 44px; width: 100%; padding: 4px 24px 4px 0; color: var(--ink); background: transparent; border: none; text-overflow: ellipsis; }
.stop-number { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: 10px; font-size: 20px; color: var(--route-ink); font-weight: 600; }
.stop-prompt { font-size: 12px; line-height: 1.5; color: var(--wait-ink); background: var(--wait-ground); border-radius: 8px; padding: 10px 12px; margin: 10px 0 0; }
.stop-prompt[hidden] { display: none; }
.selection-note { color: var(--route-ink); font-size: 12px; line-height: 1.5; margin: 6px 0 0; }
.selection-note[hidden] { display: none; }
.arrival-group { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 20px 0 16px; }
.arrival-label { color: var(--ink-2); font-size: 12px; }
.arrival-display { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 0; line-height: 1; color: var(--route-ink); }
.eta { font-size: 64px; font-weight: 750; letter-spacing: -.035em; line-height: 1.05; }
.eta-unit { font-size: 20px; color: var(--ink-2); }
.arrival-clock { text-align: right; padding-top: 12px; }
.arrival-clock > span { color: var(--ink-2); font-size: 12px; display: block; }
.arrival-clock > span b { font-weight: 400; }
.arrival-time { font-size: 24px; color: var(--ink); display: block; margin-top: 5px; letter-spacing: -.02em; }
.campus-map { background: var(--map-ground); border-radius: 16px; padding: 6px 8px 10px; height: 330px; display: flex; flex-direction: column; }
.campus-map > svg { display: block; height: 100%; width: 100%; min-height: 0; }
.park { fill: var(--map-park); opacity: .55; }
.buildings { fill: var(--map-building); opacity: .28; }
.roads { fill: none; stroke: var(--map-road); stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
.route-line { fill: none; stroke-linecap: round; stroke-linejoin: round; transition: opacity 180ms ease-out; }
.route-line.selected-route { stroke: var(--route-solid); stroke-width: 3.7; opacity: 1; }
.route-line.inactive-route { stroke: var(--map-inactive); stroke-width: 2; stroke-dasharray: 3 5; opacity: .3; }
.map-stop { pointer-events: none; }
.hit-area { fill: transparent; }
.stop-halo { fill: transparent; }
.stop-disc { fill: var(--map-ground); stroke: var(--map-ink); stroke-width: 1.5; }
.stop-digit { color: var(--map-ink); fill: currentColor; font-size: 12px; font-weight: 700; text-anchor: middle; }
.map-stop:not(.on-route) { opacity: .35; cursor: default; }
.map-stop.chosen-stop .stop-halo { fill: var(--route-solid); }
.map-stop.chosen-stop .stop-disc { fill: var(--route-solid); stroke: var(--on-route); stroke-width: 1.7; }
.map-stop.chosen-stop .stop-digit { color: var(--on-route); }
.map-labels { pointer-events: none; }
.map-labels text { font-size: 14px; color: var(--map-ink); fill: currentColor; font-weight: 600; }
.map-labels .dimmed { opacity: .35; }
.bus-marker { transition: transform 100ms linear; pointer-events: none; }
.marker-ground { fill: var(--route-solid); stroke: var(--ground); stroke-width: 2; }
.marker-window { fill: var(--on-route); }
.bus-marker path { stroke: var(--route-solid); stroke-width: 1.5; stroke-linecap: round; fill: none; }
.map-caption { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; padding: 6px 5px 0; color: var(--ink-2); }
.map-caption .route-name { font-weight: 600; color: var(--route-ink); }
.bus-status-panel { margin: 0 0 16px; display: flex; align-items: center; gap: 8px; padding: 0; background: transparent; color: var(--ink-2); border-radius: 0; }
.status-icon { flex: none; align-self: flex-start; padding-top: 2px; }
.status-icon svg { height: 20px; width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bus-status-panel > div { flex: 1; min-width: 0; }
.bus-status { font-size: 14px; line-height: 1.4; font-weight: 650; display: block; }
.bus-detail { font-size: 12px; line-height: 1.5; margin: 0; }
.bus-detail::before { content: '·'; margin-right: 8px; }
.status-countdown { white-space: nowrap; font-size: 14px; font-weight: 700; }
.screen:not([data-bus-state="waiting"]) .bus-status-panel { background: transparent; color: var(--ink); }
.screen[data-bus-state="moving"] .status-countdown { color: var(--route-ink); }
.next-stop { display: flex; align-items: center; gap: 10px; padding: 0 0 12px; font-size: 12px; color: var(--ink-2); }
.next-stop-name { color: var(--ink); font-weight: 600; }
.next-stop-time { margin-left: auto; color: var(--ink); font-weight: 600; }
.theme-setting { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-2); min-height: 44px; margin-top: auto; padding: 0 0 4px; }
.appearance-select { border: none; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink-2); padding: 6px 0 6px 8px; min-height: 36px; font-size: 12px; }
.bottom-nav { background: var(--ground); z-index: 4; border-top: 1px solid var(--rule); display: flex; justify-content: space-around; margin: 0; padding: 0 24px 6px; min-height: 58px; font-size: 12px; color: var(--ink-2); align-items: center; }
.bottom-nav span { min-width: 68px; text-align: center; padding: 16px 10px; }
.bottom-nav .active { color: var(--route-ink); font-weight: 700; }
.spatial .campus-map { height: 360px; margin-top: 16px; }
.spatial .arrival-group { margin: 16px 0 0; background: var(--route-tint); border-radius: 12px; padding: 12px 16px; }
.spatial .eta { font-size: 48px; }
.spatial .arrival-time { font-size: 24px; }
.spatial .bus-status-panel { background: transparent; border-radius: 0; padding: 0; margin-top: 16px; }
.spatial .next-stop { padding-bottom: 8px; }
.signal .bus-status-panel { margin-top: 0; margin-bottom: 16px; }
.signal .next-stop { margin-top: 12px; }
.appearance-menu { position: fixed; margin: 0; padding: 8px; border: 1px solid #b8c9c2; border-radius: 12px; background: #f7faf9; color: #163239; width: 164px; }
.appearance-menu p { font-size: 12px; font-weight: 600; margin: 8px 10px; }
.appearance-menu button { min-height: 44px; width: 100%; border: none; border-radius: 6px; background: transparent; color: inherit; padding: 8px 12px; text-align: left; font-size: 14px; }
.appearance-menu button[aria-pressed="true"] { background: #e0f0eb; font-weight: 700; }
.appearance-menu[data-theme="dark"] { color-scheme: dark; background: #1b2d31; color: #eef5f3; border-color: #3b5054; }
.appearance-menu[data-theme="dark"] button[aria-pressed="true"] { background: #203e3d; }
.reduce-motion .bus-marker, .reduce-motion .route-line { transition: none; }
dialog { max-width: 400px; width: calc(100vw - 32px); border: 1px solid #b8c9c2; padding: 24px; border-radius: 16px; background: #f7faf9; color: #163239; }
dialog::backdrop { background: #12202480; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.dialog-head h2 { font-size: 20px; margin: 0; letter-spacing: -.02em; }
.dialog-head button { min-width: 44px; height: 44px; border: none; border-radius: 50%; font-size: 24px; color: #163239; background: #e9eeeb; }
.dialog-head button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
dialog p { font-size: 14px; line-height: 1.6; color: #4b646a; }
dialog[data-theme="dark"] { background: #1b2d31; color: #eef5f3; border-color: #3b5054; color-scheme: dark; }
dialog[data-theme="dark"] p { color: #b5c4c7; }
dialog[data-theme="dark"] .dialog-head button { background: #324549; color: #eef5f3; }
.load-error { padding: 32px; background: #f7faf9; border-radius: 12px; font-size: 14px; }
.load-error button { min-height: 44px; padding: 8px 16px; }
@media (prefers-reduced-motion: reduce) { .bus-marker, .route-line { transition: none; } button:active { transform: none; } }
@container (max-height: 760px) {
  .screen .campus-map { height: 330px; }
  .screen .arrival-group { margin-top: 16px; }
  .screen .theme-setting { margin-top: 0; }
}
@media (max-width: 920px) { body { padding: 24px; } .review-head { display: block; } .simulation { margin-top: 24px; } .options { gap: 28px 24px; } }
@media (max-width: 700px) {
  body { padding: 24px 16px; }
  .review-head h1 { font-size: 28px; }
  .simulation { width: 100%; }
  .options { display: flex; flex-direction: column; align-items: center; }
  .option { width: 100%; max-width: 402px; }
  .screen { width: 100%; }
}
