:root {
  color-scheme: light dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: #f5f6fa;
  --surface: #ffffff;
  --text: #20232e;
  --muted: #626979;
  --accent: #3953ba;
  --border: #d8dde8;
  background: var(--background);
  color: var(--text);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; }
main { max-width: 36rem; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
header { margin-bottom: 1.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--accent); font-size: 1.25rem; font-weight: 800; letter-spacing: .04em; }
.brand img { width: 2.5rem; height: 2.5rem; border-radius: .6rem; }
h1 { font-size: 1.6rem; font-weight: 600; line-height: 1.3; margin: .75rem 0; }
h1 time { display: block; font-size: clamp(3.5rem, 18vw, 5.5rem); font-weight: 750; font-variant-numeric: tabular-nums; }
h2 { font-size: 1.25rem; margin: 0 0 1rem; }
p { overflow-wrap: anywhere; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem; padding: 1.25rem; margin-top: 1.5rem; }
.distance { font-size: 1.35rem; font-weight: 650; margin-bottom: .5rem; }
.muted { color: var(--muted); font-size: .9rem; }
.notice { border-left: .25rem solid var(--muted); padding-left: .75rem; }
progress { display: block; width: 100%; height: .65rem; border: 0; border-radius: 1rem; overflow: hidden; background: var(--border); accent-color: var(--accent); }
progress::-webkit-progress-bar { background: var(--border); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 1rem; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
button, .directions { font: inherit; font-weight: 650; min-height: 2.75rem; border-radius: .75rem; }
button { flex: 1 0 3rem; padding: .6rem .4rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
button[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.advice { font-size: 1.65rem; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; margin-bottom: 0; }
.uncertain, .uncertain .advice { color: var(--muted); }
.uncertain button[aria-pressed="true"] { background: var(--muted); border-color: var(--muted); }
#map { height: 15rem; border-radius: .75rem; background: var(--border); overflow: hidden; }
.meeting-pin { width: 1.6rem; height: 1.6rem; border: .25rem solid #fff; border-radius: 50% 50% 50% 0; background: #3953ba; box-shadow: 0 2px 5px #0006; }
.directions { display: flex; width: 100%; align-items: center; justify-content: center; padding: .8rem 1rem; color: #fff; background: var(--accent); border-color: var(--accent); text-decoration: none; }
.nav-apps { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.nav-apps p { grid-column: 1 / -1; margin: 0; }
.nav-app { display: flex; align-items: center; justify-content: center; min-height: 3rem; padding: .6rem; border: 1px solid var(--border); border-radius: .75rem; color: var(--text); background: var(--surface); font-weight: 650; text-decoration: none; }
.maplibregl-ctrl button { min-height: 2.75rem; min-width: 2.75rem; }
.maplibregl-ctrl-attrib { color-scheme: light; }

@media (prefers-color-scheme: dark) {
  :root {
    --background: #11141c;
    --surface: #1b202b;
    --text: #f2f4fa;
    --muted: #a3adbf;
    --accent: #506cdb;
    --border: #353e50;
  }
  .brand { color: #a7b8ff; }
  .uncertain button[aria-pressed="true"] { color: #11141c; }
}
