:root {
  color-scheme: light;
  --bg: #f5f2e9;
  --ink: #17231d;
  --muted: #6f766f;
  --card: #fffdf7;
  --line: #dcd8cc;
  --accent: #ef6a3a;
  --green: #1d5a43;
  --shadow: 0 16px 40px rgba(35, 45, 38, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button { color: inherit; }
.shell { width: min(100%, 620px); margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 18px calc(48px + env(safe-area-inset-bottom)); }
.route-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(25px, 7vw, 36px); line-height: 1; letter-spacing: -.045em; }
h1 span { color: var(--accent); font-weight: 500; }
.location-button { border: 1px solid var(--line); background: rgba(255,255,255,.55); border-radius: 999px; padding: 10px 13px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 750; white-space: nowrap; }
.location-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px rgba(111,118,111,.12); }
.location-button.live .location-dot { background: #24a06b; box-shadow: 0 0 0 4px rgba(36,160,107,.14); }

.status-card { padding: 22px; border-radius: 26px; background: var(--ink); color: #f9f7ef; box-shadow: var(--shadow); }
.status-topline, .status-footer { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #b9c0bb; }
.distance-row { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 16px; }
.distance-row strong { font-size: clamp(54px, 18vw, 82px); letter-spacing: -.065em; line-height: .8; }
.distance-row span { color: #b9c0bb; }
.progress-track { height: 6px; background: #3b4740; border-radius: 999px; overflow: hidden; margin-bottom: 13px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); border-radius: inherit; transition: width .5s ease; }

.fuel-strip { margin: 14px 0 26px; display: flex; align-items: stretch; gap: 10px; }
.fuel-control, .range-copy { border: 1px solid var(--line); background: rgba(255,255,255,.54); border-radius: 18px; min-height: 66px; }
.fuel-control { flex: 1.35; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 13px; }
.fuel-label, .edit-label { font-size: 12px; font-weight: 800; }
.edit-label { color: var(--accent); }
.bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; height: 21px; }
.bar { border-radius: 3px; background: #d6d2c7; transform: skewX(-4deg); }
.bar.on { background: var(--green); }
.range-copy { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 12px 14px; }
.range-copy strong { font-size: 16px; }
.range-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }

.decision { background: var(--accent); color: #1d211d; padding: 20px; border-radius: 24px; box-shadow: var(--shadow); }
.decision .eyebrow { color: rgba(29,33,29,.62); }
.decision-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.decision h2 { margin-bottom: 4px; font-size: 25px; letter-spacing: -.04em; }
.decision-distance { font-weight: 850; font-size: 18px; white-space: nowrap; }
.decision-meta { color: rgba(29,33,29,.7); font-size: 13px; }
.decision-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.price-big { font-size: 20px; font-weight: 850; }
.navigate { border: 0; background: var(--ink); color: white; border-radius: 999px; padding: 12px 17px; font-weight: 800; }

.section-heading { margin: 34px 2px 13px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.section-heading span { font-size: 11px; color: var(--muted); }
.timeline { position: relative; display: grid; gap: 10px; }
.timeline::before { content: ""; position: absolute; left: 14px; top: 20px; bottom: 20px; width: 1px; background: var(--line); }
.station-card { position: relative; margin-left: 28px; padding: 17px 17px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 19px; transition: opacity .25s, filter .25s, transform .25s; }
.station-card::before { content: ""; position: absolute; left: -20px; top: 22px; width: 9px; height: 9px; border: 3px solid var(--bg); background: var(--green); border-radius: 50%; }
.station-card.passed { opacity: .34; filter: grayscale(1); }
.station-card.next { border-color: var(--accent); transform: translateX(2px); }
.station-card.next::before { background: var(--accent); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-top h3 { margin: 0 0 4px; font-size: 16px; }
.card-distance { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { padding: 5px 8px; border-radius: 999px; background: #eeece4; color: #5f675f; font-size: 10px; font-weight: 750; }
.tag.price { background: #e3efe8; color: var(--green); }
.tag.unknown { color: #8a8a82; }
.card-action { width: 100%; border: 0; background: transparent; padding: 13px 0 0; margin-top: 12px; border-top: 1px solid #ebe7dc; color: var(--green); text-align: left; font-weight: 800; font-size: 12px; }
footer { padding: 28px 10px 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }

.sheet { width: min(calc(100% - 20px), 520px); margin: auto auto 10px; padding: 0; border: 0; border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.sheet::backdrop { background: rgba(19,28,23,.48); backdrop-filter: blur(3px); }
.sheet form { padding: 10px 20px max(22px, env(safe-area-inset-bottom)); }
.sheet-handle { width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 18px; }
.sheet-title { display: flex; justify-content: space-between; align-items: flex-start; }
.sheet h2 { margin-bottom: 18px; font-size: 24px; letter-spacing: -.035em; }
.close { border: 0; background: #ebe8df; border-radius: 50%; width: 34px; height: 34px; font-size: 23px; line-height: 1; }
.fuel-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fuel-choice { border: 1px solid var(--line); background: white; border-radius: 15px; padding: 15px 5px; font-weight: 850; }
.fuel-choice.selected { background: var(--ink); color: white; border-color: var(--ink); }
.filled-button { width: 100%; margin-top: 10px; border: 0; border-radius: 15px; padding: 15px; background: var(--accent); font-weight: 850; }
details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
summary { color: var(--muted); font-size: 12px; font-weight: 750; }
details label { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 13px; }
details input, details select { width: 110px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.map-sheet h2 { margin-bottom: 20px; }
.map-option, .cancel-button { display: block; width: 100%; border: 0; border-radius: 16px; padding: 16px; margin-top: 8px; font-weight: 850; }
.map-option { background: var(--ink); color: white; }
.map-option.apple { background: var(--accent); color: var(--ink); }
.cancel-button { background: #ebe8df; }

@media (min-width: 560px) {
  .shell { padding-left: 28px; padding-right: 28px; }
  .sheet { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
