:root {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #243c37; background: #dce3da; font-synthesis: none;
  --green: #183e38; --muted: #66766d; --line: #dbe0d5; --blue: #247691; --orange: #c75b35;
}
* { box-sizing: border-box; }
body { margin: 0; }
.app-shell { width: min(100%, 430px); min-height: 100dvh; margin: 0 auto; background: #f4f3ed; padding-bottom: env(safe-area-inset-bottom); }
button, select { font: inherit; font-size: 14px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fffefa; color: var(--green); padding: 8px 12px; touch-action: manipulation; }
select { font-size: 16px; }
button { cursor: pointer; font-weight: 600; transition: background .14s, border-color .14s; }
button:hover:not(:disabled) { background: #e9eee3; border-color: #99ad9c; }
button:active:not(:disabled) { background: #dce8d6; }
button:disabled, select:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid #a7b939; outline-offset: 2px; }
button.primary { background: var(--green); color: white; border-color: var(--green); }
button.primary:hover:not(:disabled) { background: #2b574c; }
button.text-button { background: none; border: none; font-size: 12px; }
h1, h2, p { margin: 0; }
h1 { font-size: 19px; font-weight: 600; letter-spacing: -.5px; }
h2 { font-size: 14px; }
p { font-size: 13px; line-height: 1.5; }
a { color: var(--green); }
.eyebrow { display: block; font-size: 9px; font-weight: 700; letter-spacing: .6px; color: var(--muted); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 56px; padding: env(safe-area-inset-top) 12px 0; background: var(--green); color: #f8f9ec; }
.brand { display: flex; align-items: center; gap: 7px; color: inherit; text-decoration: none; font-size: 14px; font-weight: 750; letter-spacing: .7px; }
.header-actions { display: flex; gap: 4px; }
.header-actions button { min-width: 44px; color: inherit; border-color: #ffffff30; background: transparent; padding: 8px; }
.header-actions button:hover { background: #ffffff20; }
main { padding: 0 12px; }
.session-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 62px; }
.scoreboard { display: flex; align-items: center; gap: 10px; }
.score { display: flex; align-items: center; gap: 4px; font-size: 0; }
.score b { font-size: 25px; font-weight: 600; }
.score-target { font-size: 9px; color: var(--muted); line-height: 1.3; }
.team-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.team-dot.orange { background: var(--orange); }
.panel { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.board-panel { background: #edf1e7; }
.clock-bar { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; min-height: 52px; background: #fffefa; border-bottom: 1px solid var(--line); }
.clock-bar strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.clock-bar button { min-width: 80px; }
.clock-bar button:disabled { opacity: 1; color: var(--muted); background: #edf1e7; border-color: transparent; }
#map { display: block; width: 100%; }
#map text { font-family: inherit; pointer-events: none; }
.map-node { cursor: pointer; outline: none; touch-action: manipulation; }
.map-node .node-hit { fill: transparent; r: 50; }
.map-node .node-core { fill: #fffefa; stroke: #829389; stroke-width: 2; }
.map-node:hover .node-core, .map-node:focus-visible .node-core { stroke: var(--green); stroke-width: 5; }
.map-node.selected .node-halo { fill: #bdcfa269; stroke: #758f5f; stroke-width: 2; stroke-dasharray: 3 4; }
.map-node .node-label { font-size: 23px; font-weight: 600; fill: #365044; paint-order: stroke; stroke: #edf1e7; stroke-width: 5px; }
.map-node .node-sub { font-size: 15px; fill: #617566; paint-order: stroke; stroke: #edf1e7; stroke-width: 3px; }
.token { transition: transform .4s linear; pointer-events: none; }
.token text { fill: white; font-size: 16px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 2px 9px 6px; font-size: 10px; color: var(--muted); }
.map-legend span { display: flex; align-items: center; gap: 4px; }
.map-legend i { width: 12px; border-top: 2px solid #97a99b; }
.map-legend .shuttle-key { border-color: #b7963c; }
.map-legend .bus-key { border-top: 3px dashed #7185a9; }
#flag-status { margin-left: auto; color: #735f1a; }
.service-notice { padding: 6px 9px; min-height: 38px; font-size: 10px; line-height: 1.4; background: #f6f1df; color: #77622b; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; }
.crews { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.crew { width: 100%; padding: 7px; text-align: left; min-height: 76px; }
.crew.selected { background: #eef5f4; border-color: var(--blue); box-shadow: inset 0 3px var(--blue); }
.crew.orange.selected { background: #fcf0e9; border-color: var(--orange); box-shadow: inset 0 3px var(--orange); }
.crew-number { float: right; width: 21px; height: 21px; border-radius: 50%; background: var(--blue); color: white; display: grid; place-items: center; font-size: 11px; }
.crew.orange .crew-number { background: var(--orange); }
.crew strong { display: block; font-size: 12px; margin: 2px 0 5px; }
.crew small { display: block; clear: both; font-size: 10px; line-height: 1.35; color: var(--muted); font-weight: 450; }
.destination-row { display: flex; align-items: center; gap: 9px; margin: 8px 0; }
.destination-row label { font-size: 12px; }
.destination-row select { flex: 1; min-width: 0; }
.order-buttons { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.order-buttons button { padding: 8px 4px; font-size: 13px; }
#order-feedback { color: var(--blue); font-size: 11px; margin-top: 4px; }
.secondary { border-top: 1px solid var(--line); margin-top: 8px; font-size: 12px; }
.secondary summary { cursor: pointer; min-height: 44px; padding: 13px 2px; }
#route-preview { padding: 0 4px 12px; }
#route-preview p { font-size: 11px; color: var(--muted); }
.route-title { display: flex; justify-content: space-between; margin-bottom: 8px; }
.route-title strong { font-size: 16px; }
.route-leg { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; padding: 5px 0; }
.route-leg i { margin-top: 4px; width: 7px; height: 7px; border-radius: 50%; background: #b7963c; }
.route-leg.walk i { background: #849788; }
.route-leg.bus i { background: #7185a9; }
.route-leg small { display: block; color: var(--muted); line-height: 1.5; }
.event-log { list-style: none; padding: 0 4px; margin: 0; max-height: 180px; overflow: auto; }
.event-log li { font-size: 12px; line-height: 1.5; padding: 8px 0; border-bottom: 1px solid var(--line); }
.event-log time { display: block; font-size: 10px; color: var(--muted); }
footer { padding: 12px 0 20px; color: var(--muted); }
footer p, .session-status { font-size: 10px; }
.project-links { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin-top: 8px; }
.project-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
.project-links span { margin-left: auto; }
.session-status { display: flex; justify-content: space-between; gap: 8px; }
.footer-actions { display: flex; justify-content: space-between; }
.team-switch { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; margin-top: 8px; }
.error, .winner { padding: 10px; border-radius: 8px; margin-bottom: 8px; font-size: 13px; }
.error { color: #8b2d1e; background: #fbe4dd; }
.winner { background: #e7f29c; font-weight: 600; }
dialog { width: min(406px,calc(100vw - 24px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 14px; padding: 24px 20px; background: #fffefa; color: var(--green); }
dialog::backdrop { background: #153b3677; }
dialog h2 { font-size: 23px; padding-right: 32px; margin-bottom: 14px; }
dialog p { margin: 12px 0; }
dialog label { display: block; margin: 20px 0; font-size: 13px; }
dialog select { width: 100%; margin-top: 6px; }
.dialog-close { position: absolute; top: 8px; right: 8px; width: 44px; border: none; background: transparent; font-size: 24px; }
.mode-card { display: block; width: 100%; text-align: left; padding: 16px; margin-top: 10px; }
.mode-card small { display: block; font-size: 12px; line-height: 1.5; font-weight: 400; color: var(--muted); margin-top: 6px; }
.help-steps { padding-left: 20px; font-size: 13px; line-height: 1.5; }
.help-steps li { margin: 12px 0; }
pre { background: #edf1e7; padding: 12px; border-radius: 8px; font-size: 11px; line-height: 1.5; overflow: auto; }
.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; }
[hidden] { display: none!important; }
@media(prefers-reduced-motion:reduce) { * { transition: none!important; scroll-behavior: auto!important; } }
