/* Scootr. Donker + brom-geel (standaard) en een lichte versie. Alle kleuren via variabelen. */
:root[data-theme=donker] {
  color-scheme: dark;
  --bg: #121417; --card: #1C1F24; --line: #2F343B;
  --ink: #F5F5F2; --ink2: #A4A9B1;
  --accent: #F5C518; --accent2: #F5C518; --onAccent: #121417;
  --tab: #0E1013; --tabInk: #8D929A; --tabActive: #2A2E35; --tabActiveInk: #F5C518;
  --segOn: #F5C518; --segOnInk: #121417;
  --switchOn: #F5C518; --knobOn: #121417;
  --ring: #F5C518; --ringEdge: transparent;
  --rF: #E8564A; --rR: #F2F0EA; --rO: #FF9F1C;
  --marker: #F5C518; --markerEdge: #FFFFFF; --markerHalo: rgba(245, 197, 24, .2); --arrowFill: #FFFFFF; --signInk: #121417;
  --toastBg: #F5F5F2; --toastInk: #121417; --warnBg: rgba(255, 159, 28, .14); --warnLine: #FF9F1C; --warnInk: #FFB547; --rain: #6FB7FF;
  --chartLine: #F5C518; --chartFill: rgba(245, 197, 24, .12); --rec: #E8564A;
  --display: Inter, system-ui, sans-serif;
  --shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
/* Licht: geel blijft voor vlakken (knoppen, afslag-kaart); tekst, randen en schakelaars worden donker, want geel op wit lees je slecht */
:root[data-theme=licht] {
  color-scheme: light;
  --bg: #F3F3F1; --card: #FFFFFF; --line: #E2E1DD;
  --ink: #121417; --ink2: #5E636B;
  --accent: #F5C518; --accent2: #121417; --onAccent: #121417;
  --tab: #FFFFFF; --tabInk: #6B7078; --tabActive: #FFF1BF; --tabActiveInk: #121417;
  --segOn: #F5C518; --segOnInk: #121417;
  --switchOn: #121417; --knobOn: #F5C518;
  --ring: #F5C518; --ringEdge: #121417;
  --rF: #C8413A; --rR: #1F2329; --rO: #D98200;
  --marker: #F5C518; --markerEdge: #121417; --markerHalo: rgba(245, 197, 24, .3); --arrowFill: #121417; --signInk: #121417;
  --toastBg: #121417; --toastInk: #FFFFFF; --warnBg: #FFF4E0; --warnLine: #D98200; --warnInk: #8A5300; --rain: #2F6FBF;
  --chartLine: #A87900; --chartFill: rgba(168, 121, 0, .12); --rec: #C8413A;
  --display: Inter, system-ui, sans-serif;
  --shadow: 0 6px 20px rgba(18, 20, 23, .12);
}
:root { --tabsH: calc(68px + env(safe-area-inset-bottom)); --warn: #C81E4F; }

* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink);
  font: 16px/1.4 Inter, system-ui, -apple-system, sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }
a { color: inherit; }
[hidden] { display: none !important; }

#map { position: fixed; top: 0; left: 0; right: 0; bottom: var(--tabsH); }
.big { font: 700 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 8px; }

/* Panelen */
.panel { position: fixed; left: 12px; right: 12px; z-index: 5; max-width: 440px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
#planner { top: calc(env(safe-area-inset-top) + 12px); padding: 6px; }
.field { display: flex; align-items: center; gap: 8px; padding: 2px 4px 2px 12px; }
.field + .field { border-top: 1px solid var(--line); }
.field label { width: 42px; flex: none; font-size: 13px; font-weight: 600; color: var(--ink2); }
.field input { flex: 1; height: 46px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; outline: none; }
.field input::placeholder { color: var(--ink2); opacity: .85; }
.icon-btn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 14px; background: transparent; display: grid; place-items: center; color: var(--ink2); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.busy { margin: 4px 12px 8px; font-size: 13px; color: var(--ink2); }
#suggestions { list-style: none; margin: 4px 0 0; padding: 4px 0 0; border-top: 1px solid var(--line); max-height: 46vh; overflow-y: auto; }
#suggestions button { width: 100%; min-height: 52px; border: 0; background: transparent; text-align: left; padding: 8px 12px; border-radius: 14px; display: flex; flex-direction: column; gap: 2px; }
#suggestions button:hover, #suggestions button:focus-visible { background: var(--tabActive); }
#suggestions .l1 { font-weight: 600; }
#suggestions .l2 { font-size: 13px; color: var(--ink2); }

#summary { bottom: calc(var(--tabsH) + 12px); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sum-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mix { display: flex; gap: 3px; height: 10px; border-radius: 99px; overflow: hidden; }
.mix span { height: 100%; }
.mix-fiets, .sw-fiets { background: var(--rF); }
.mix-rijbaan, .sw-rijbaan { background: var(--rR); }
.mix-onbekend, .sw-onbekend { background: repeating-linear-gradient(90deg, var(--rO) 0 6px, transparent 6px 10px); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend b { color: var(--ink); font-weight: 600; }
.sw { width: 14px; height: 6px; border-radius: 3px; display: inline-block; }
.actions { display: flex; gap: 10px; }
.actions .btn { flex: 1; }
.fine { margin: 0; font-size: 12px; color: var(--ink2); }

/* Weer onderweg */
.wx { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.wx-top { display: flex; align-items: center; gap: 10px; }
.wx-ic { width: 30px; height: 30px; flex: none; color: var(--ink); }
.wx-ic svg { width: 30px; height: 30px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wx-ic .drop { stroke: var(--rain); }
.wx-main { flex: 1; font-weight: 600; font-size: 15px; line-height: 1.25; }
.wx-temp { font: 700 18px/1 var(--display); font-variant-numeric: tabular-nums; }
.wx-sub { font-size: 13px; color: var(--ink2); }
.wx-tip { font-size: 13px; font-weight: 600; color: var(--ink); }
.wx-warn { font-size: 13px; font-weight: 600; color: var(--warnInk); }
.wx-strip { display: flex; gap: 2px; height: 6px; border-radius: 99px; overflow: hidden; }
.wx-strip span { flex: 1; background: var(--line); }
.wx-strip span.r1 { background: var(--rain); opacity: .45; }
.wx-strip span.r2 { background: var(--rain); opacity: .75; }
.wx-strip span.r3 { background: var(--rain); }

.btn { min-height: 48px; padding: 0 18px; border-radius: 16px; font-weight: 600; font-size: 15px; border: 1.5px solid transparent; }
.btn.primary { background: var(--accent); color: var(--onAccent); }
.btn.ghost { background: transparent; border-color: var(--accent2); color: var(--ink); }
.plate { border-radius: 6px; padding: 2px 6px; font: 800 10px/1.4 Inter, sans-serif; letter-spacing: .06em; }
.plate.brom { background: #F5C518; color: #1A1030; }
.plate.snor { background: #1F5FD1; color: #FFFFFF; }

/* Navigatie-scherm */
.topleft { position: fixed; z-index: 5; top: calc(env(safe-area-inset-top) + 12px); left: 12px; max-width: min(250px, calc(100vw - 136px));
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.turn { background: var(--accent); color: var(--onAccent);
  border-radius: 20px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); }
.turn-ic svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; display: block; }
.turn-txt { display: flex; flex-direction: column; gap: 4px; }
.turn-txt .big { font-size: 28px; }
#turnText { font-size: 14px; opacity: .88; }
.signs { position: fixed; z-index: 5; top: calc(env(safe-area-inset-top) + 12px); right: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sign { width: 92px; height: 92px; border-radius: 50%; background: #FFFFFF; border: 7px solid var(--ring);
  display: grid; place-items: center; padding: 0; color: var(--signInk); box-shadow: 0 0 0 1.5px var(--ringEdge), var(--shadow); }
.sign svg { width: 50px; height: 50px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sign .q { font: 700 46px/1 var(--display); }
.sign.small { width: 64px; height: 64px; border-width: 6px; color: var(--signInk); font: 700 26px/1 var(--display); cursor: pointer; }
.sign.small.over { border-color: var(--warn); animation: pulse .7s ease-in-out infinite alternate; }
.pill { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.hud-bottom { position: fixed; z-index: 5; left: 12px; right: 12px; bottom: calc(var(--tabsH) + 14px); max-width: 440px; display: flex; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.speed { width: 86px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 0; transition: background .2s; }
.speed .big { font-size: 34px; }
.speed.over { background: var(--warn); border-color: var(--warn); color: #FFFFFF; }
.speed.over .muted { color: #FFE3EC; }
.eta { flex: 1; padding: 12px 12px 12px 16px; display: flex; align-items: center; gap: 10px; }
.eta-txt { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.recenter { position: fixed; z-index: 5; right: 12px; bottom: calc(var(--tabsH) + 120px); }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .sign.small.over, .chip.soon { animation: none; } }

/* Jij op de kaart: scooter met draaiend pijltje */
.me { width: 80px; height: 80px; position: relative; pointer-events: none; }
.me-halo { position: absolute; inset: 6px; border-radius: 50%; background: var(--markerHalo); }
.me-arrow { position: absolute; inset: 0; transition: transform .3s linear; }
.me-arrow svg { width: 100%; height: 100%; display: block; }
.me-arrow path { fill: var(--arrowFill); stroke: var(--marker); stroke-width: 2.5; }
.me-disc { position: absolute; left: 18px; top: 18px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--marker); color: var(--onAccent); border: 3px solid var(--markerEdge); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(10, 4, 25, .4); }
.me-disc svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dest { width: 34px; height: 44px; }
.dest svg { width: 100%; height: 100%; display: block; }
.dest path { fill: var(--marker); stroke: var(--markerEdge); }

/* Panelen die over de kaart schuiven */
.sheet { bottom: calc(var(--tabsH) + 12px); padding: 18px 16px; max-height: calc(100% - var(--tabsH) - 40px); overflow-y: auto; }
/* Net niet helemaal dicht: anders denkt Chrome dat een scrollend paneel de kaart erboven bedekt en tekent hij daar niks (leeg vlak). */
.sheet { background: color-mix(in srgb, var(--card) 99.6%, transparent); }
.sheet h2 { margin: 0 0 6px; font: 700 26px/1.1 var(--display); }
.sheet h3 { margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.sheet p { margin: 8px 0 0; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.seg button { min-height: 46px; border: 0; border-radius: 12px; background: transparent; color: var(--ink2); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.seg button[aria-pressed=true] { background: var(--segOn); color: var(--segOnInk); }
.dot { width: 14px; height: 14px; border-radius: 50%; }
.dot-donker { background: #121417; border: 3px solid #F5C518; }
.dot-licht { background: #FFFFFF; border: 3px solid #F5C518; box-shadow: 0 0 0 1px #121417; }
.list { border: 1px solid var(--line); border-radius: 18px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 14px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.switch { width: 60px; height: 44px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; }
.switch span { width: 52px; height: 30px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; transition: transform .2s; }
.switch[aria-checked=true] span { background: var(--switchOn); }
.switch[aria-checked=true] span::after { transform: translateX(22px); background: var(--knobOn); }

.attr { position: fixed; z-index: 4; left: 8px; bottom: calc(var(--tabsH) + 1px); margin: 0; font-size: 10px; color: var(--ink2); }
.attr a { text-decoration: none; }

/* Tabs */
#tabs { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; height: var(--tabsH);
  padding: 6px 4px env(safe-area-inset-bottom); background: var(--tab); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tab { border: 0; background: none; color: var(--tabInk); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; min-height: 54px; }
.tab .ic { padding: 4px 14px; border-radius: 14px; display: flex; }
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current=page] { color: var(--tabActiveInk); }
.tab[aria-current=page] .ic { background: var(--tabActive); }

#toast { position: fixed; z-index: 20; left: 50%; top: calc(env(safe-area-inset-top) + 140px); transform: translateX(-50%);
  max-width: min(400px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 16px; background: var(--toastBg); color: var(--toastInk);
  font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; }

@media (min-width: 700px) {
  .topleft { max-width: 300px; }
}

/* Wissel-chip onder het rondje */
.chip { display: flex; align-items: center; gap: 6px; background: var(--accent); color: var(--onAccent); border-radius: 999px;
  padding: 4px 10px 4px 6px; font: 700 13px/1 Inter, sans-serif; box-shadow: var(--shadow); }
.chip-ic { width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; color: var(--signInk); display: grid; place-items: center; }
.chip-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chip-ic .q { font: 700 13px/1 var(--display); }
.chip.soon { animation: pulse .6s ease-in-out infinite alternate; }

.warnbox { margin: 0; padding: 10px 12px; border-radius: 14px; font-size: 13px; background: var(--warnBg); border: 1px solid var(--warnLine); }

/* Uitleg, borden, meldingen */
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sheet-head .close { margin: -6px -6px 0 0; color: var(--ink); }
.icon-btn.close svg { stroke-width: 2.4; }
#info .actions { margin-top: 14px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices .btn { text-align: left; }
.flag { font: 800 10px/1 Inter, sans-serif; letter-spacing: .06em; padding: 3px 5px; border-radius: 5px; border: 1.5px solid currentColor; }
.list-row.link { width: 100%; border: 0; background: transparent; min-height: 52px; text-align: left; font-weight: 500; }
.list-row.col { flex-direction: column; align-items: stretch; gap: 6px; padding: 12px 14px; }
.row.between { justify-content: space-between; }
.chev { font-size: 22px; color: var(--ink2); padding-right: 8px; }
#reportText { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font: 12px/1.4 ui-monospace, Menlo, monospace; padding: 8px; resize: vertical; }

.borden { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.borden li { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); }
.borden .pic { width: 58px; flex: none; display: flex; justify-content: center; }
.borden .pic svg { width: 58px; height: auto; display: block; }
.borden .txt { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.borden .name { font-weight: 700; }
.borden .code { font: 700 11px/1 Inter, sans-serif; color: var(--ink2); letter-spacing: .05em; }
.borden .rule { display: flex; gap: 6px; align-items: baseline; }
.borden .rule .plate { flex: none; }
.seg button[aria-pressed=true] .plate.brom { box-shadow: 0 0 0 1.5px var(--segOnInk); }
.seg button[aria-pressed=true] .flag { border-color: var(--segOnInk); }

/* Regen-alarm tijdens het rijden */
.rain-chip { display: flex; align-items: center; gap: 6px; background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px 6px 8px; font: 700 13px/1 Inter, sans-serif; box-shadow: var(--shadow); }
.rain-chip .ic svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rain-chip .drop { stroke: var(--rain); }
.wx-src { font-size: 11px; color: var(--ink2); text-decoration: underline; text-underline-offset: 2px; align-self: flex-start; }

/* Ritten-logboek */
.rec-bar { display: flex; align-items: center; gap: 10px; margin: 4px 2px 2px; padding: 6px 6px 6px 12px; border-radius: 16px;
  background: var(--bg); border: 1px solid var(--line); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.rec-bar #recText { flex: 1; min-width: 0; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); flex: none; animation: recPulse 1.6s ease-in-out infinite; }
.eta .rec-dot { align-self: center; }
@keyframes recPulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn.wide { width: 100%; margin-top: 14px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stat .lbl { font-size: 12px; font-weight: 600; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .val { font-size: 20px; font-weight: 700; white-space: nowrap; }
.stat .val small { font-size: 12px; font-weight: 600; color: var(--ink2); margin-left: 4px; }
#rideWeek { margin-top: 8px; }
.empty { margin-top: 16px; padding: 16px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; }
.ride-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.ride-day { margin: 14px 0 2px !important; }
.ride-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 16px;
  background: transparent; color: var(--ink); text-align: left; min-height: 64px; }
.ride-row .chev { padding-right: 4px; }
.ride-thumb { width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--bg); }
.ride-thumb path { fill: none; stroke: var(--chartLine); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ride-thumb .t-start { fill: var(--bg); stroke: var(--ink2); stroke-width: 1.5; }
.ride-thumb .t-end { fill: var(--chartLine); stroke: var(--bg); stroke-width: 1.5; }
.ride-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ride-txt .l1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ride-txt .l2 { font-size: 13px; color: var(--ink2); display: flex; align-items: center; gap: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ride-txt .l2 .plate { margin-right: 6px; }
.sheet.rit { max-height: min(60%, calc(100% - var(--tabsH) - 40px)); }
.rit-head { min-width: 0; }
.rit-head h2 { overflow-wrap: anywhere; }
.rit-head p { margin-top: 2px !important; }
.chart { margin-top: 12px; padding: 10px 12px 6px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; font-size: 14px; }
.chart-head .muted { font-variant-numeric: tabular-nums; }
#ritChart { display: block; width: 100%; height: 130px; margin-top: 4px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { fill: var(--ink2); font: 500 10px Inter, sans-serif; font-variant-numeric: tabular-nums; }
.ch-lbl { paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.ch-area { fill: var(--chartFill); }
.ch-line { fill: none; stroke: var(--chartLine); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-max { stroke: var(--ink2); stroke-width: 1.25; stroke-dasharray: 4 3; }
.ch-cross { stroke: var(--ink2); stroke-width: 1; }
.ch-dot { fill: var(--chartLine); stroke: var(--bg); stroke-width: 2; }
#ritMixBox .mix { margin-bottom: 8px; }
.rit-reports { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.rit-reports li::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #FF9F1C; margin-right: 8px; }
#rit .actions { margin-top: 14px; }

/* Piep-schakelaar uit als de waarschuwing uit staat */
.list-row.disabled { opacity: .45; }
.switch:disabled { cursor: not-allowed; }

/* Op je beginscherm */
.inst-hero { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.inst-hero img { border-radius: 14px; flex: none; }
.inst-hero p { margin: 0 !important; }
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); font-weight: 500; }
.steps .num { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--accent); color: var(--onAccent); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.steps .ios-ic { width: 26px; height: 26px; flex: none; margin-left: auto; fill: none; stroke: #2F7DF6; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.linkbtn { border: 0; background: none; padding: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.tip { margin: 8px 0 0 !important; }
.warnbox.ok { background: var(--bg); border-color: var(--line); }

/* Als app op je beginscherm (iPhone): donkere band achter de klok, zodat die ook op de lichte kaart leesbaar is */
.standalone body::before { content: ""; position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: rgba(18, 20, 23, .55); pointer-events: none; }

/* Drie keuzes naast elkaar (thema) */
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.three button { gap: 6px; padding: 0 4px; }
.dot-systeem { background: linear-gradient(135deg, #121417 50%, #FFFFFF 50%); border: 3px solid #F5C518; box-shadow: 0 0 0 1px #121417; }
.seg-gap { margin-top: 8px; }

/* ---------- Logo (woordmerk): letters in de tekstkleur, de staart van de t loopt over in geel ---------- */
:root { --wmAcc: #F5C518; --wmEdge: transparent; }
:root[data-theme=licht] { --wmAcc: #E3A900; }
.wordmark { display: block; width: 100%; height: auto; overflow: visible; }
.wm-letters { fill: var(--ink); }
.wm-ink { stop-color: var(--ink); }
.wm-acc { stop-color: var(--wmAcc); }
.wm-arrow { fill: var(--wmAcc); stroke: var(--wmEdge); }
.about-logo { width: 132px; margin: 26px 0 0; }

/* ---------- Opstart-animatie ---------- */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg);
  transition: opacity .36s ease, visibility .36s; }
#splash.out { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo { width: min(68vw, 300px); margin-bottom: 6vh; }
#splash .wm-l { opacity: 0; transform: translateY(-260px); animation: wmRise .5s cubic-bezier(.2, .9, .3, 1.15) forwards; animation-delay: calc(.08s + var(--i) * .07s); }
#splash .wm-tail { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: wmDraw .78s cubic-bezier(.55, 0, .25, 1) .42s forwards; }
#splash .wm-arrow { opacity: 0; transform-box: fill-box; transform-origin: 20% 50%; transform: scale(.2) translateX(-120px);
  animation: wmPop .42s cubic-bezier(.2, 1.4, .4, 1) 1.12s forwards; }
#splash .splash-logo { animation: wmNudge .5s ease-in-out 1.5s; }
@keyframes wmRise { to { opacity: 1; transform: none; } }
@keyframes wmDraw { to { stroke-dashoffset: 0; } }
@keyframes wmPop { 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes wmNudge { 40% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
  #splash .wm-l, #splash .wm-tail, #splash .wm-arrow, #splash .splash-logo { animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
}

/* ---------- Welkom (eerste keer) ---------- */
.welcome { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--bg);
  padding: env(safe-area-inset-top) 0 0; transition: opacity .3s ease; }
.welcome.out { opacity: 0; }
.w-steps { flex: 1; overflow-y: auto; width: 100%; max-width: 460px; margin: 0 auto; padding: 28px 22px 12px; display: flex; flex-direction: column; }
.w-step { display: flex; flex-direction: column; gap: 14px; margin-block: auto; padding-bottom: 4vh; animation: wIn .35s ease both; }
@keyframes wIn { from { opacity: 0; transform: translateX(18px); } }
@media (prefers-reduced-motion: reduce) { .w-step { animation: none; } }
.welcome h2 { margin: 6px 0 0; font: 800 28px/1.12 var(--display); letter-spacing: -.01em; outline: none; }
.welcome h3 { margin: 10px 0 -4px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.welcome p { margin: 0; }
.w-logo { width: min(64vw, 250px); margin: 0 auto 18px; }
.w-step[data-step="0"] { text-align: center; }
.w-step[data-step="0"] .seg { margin-top: 12px; text-align: left; }
.w-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.w-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 14px; text-align: left;
  border-radius: 20px; background: var(--card); border: 2px solid var(--line); color: var(--ink); }
.w-card .plate { font-size: 12px; padding: 4px 9px; }
.w-card-t { font: 800 22px/1.1 var(--display); }
.w-card-s { font-size: 13px; color: var(--ink2); }
.w-card[aria-pressed=true], .w-theme[aria-pressed=true] { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2) inset; }
.w-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.w-theme { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 10px 12px; border-radius: 18px;
  background: var(--card); border: 2px solid var(--line); color: var(--ink); font-weight: 600; }
.w-prev { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.w-prev i { position: absolute; left: 10%; right: 10%; border-radius: 6px; }
.w-prev i:first-child { top: 9%; height: 15%; }
.w-prev i:last-child { bottom: 9%; height: 30%; }
.w-prev i:last-child::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 14%; height: 26%; border-radius: 4px; background: #F5C518; }
.prev-donker { background: #2A2E35; }
.prev-donker i { background: #1C1F24; }
.prev-licht { background: #E4E4E0; }
.prev-licht i { background: #FFFFFF; }
.prev-systeem { background: linear-gradient(90deg, #2A2E35 50%, #E4E4E0 50%); }
.prev-systeem i { background: linear-gradient(90deg, #1C1F24 50%, #FFFFFF 50%); }
.w-gps { width: 96px; height: 96px; margin: 0 auto 6px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.w-gps svg { width: 50px; height: 50px; fill: none; stroke: var(--onAccent); stroke-width: 1.8; stroke-linejoin: round; }
.w-step[data-step="4"] { text-align: center; }
.w-step[data-step="4"] .btn.wide { margin-top: 10px; }
.w-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 460px; margin: 0 auto;
  padding: 12px 22px calc(14px + env(safe-area-inset-bottom)); }
.w-nav .btn { min-width: 104px; }
.w-dots { display: flex; gap: 6px; }
.w-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .25s, background .25s; }
.w-dots i.on { width: 22px; background: var(--accent2); }

/* Max-snelheid in mph: getal met klein "mph" eronder, binnen het rondje */
.sign.small { align-content: center; }
.sign.small .num { display: block; }
.sign.small .unit { display: block; font: 800 10px/1 var(--display); letter-spacing: .02em; margin-top: 1px; }
.sign.small:has(.unit) .num { font-size: 22px; line-height: 1; }

/* ---------- Zoeken: rijen met icoon, snel zoeken in de buurt, Recent ---------- */
#suggestions button.row { flex-direction: row; align-items: center; gap: 12px; }
#suggestions .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
#suggestions .tx .l1, #suggestions .tx .l2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-ic { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink2); }
.s-ic svg, .chip-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.s-ic.fuel { background: #F5C518; border-color: #F5C518; color: #121417; }
.s-head { padding: 10px 12px 2px; font-size: 12px; font-weight: 700; color: var(--ink2); }
.s-chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 6px 8px; scrollbar-width: none; }
.s-chips::-webkit-scrollbar { display: none; }
#suggestions .chip-btn { flex: none; width: auto; display: inline-flex; flex-direction: row; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px 0 9px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; }
#suggestions .chip-btn:hover, #suggestions .chip-btn:focus-visible { background: var(--tabActive); }
/* Zoeklijst open: het route-overzicht onderaan even weg, anders valt het over de lijst */
body:has(#suggestions:not([hidden])) #summary { visibility: hidden; }
#suggestions .chip-btn.fuel svg { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: #F5C518; color: #121417; }

/* Tankstation op de kaart: naam + "Route hierheen" */
.scootr-pop .maplibregl-popup-content { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); font: inherit; }
.scootr-pop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .scootr-pop.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .scootr-pop.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--card); }
.scootr-pop.maplibregl-popup-anchor-top .maplibregl-popup-tip, .scootr-pop.maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .scootr-pop.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--card); }
.scootr-pop.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--card); }
.scootr-pop.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--card); }
.poi-pop { display: flex; flex-direction: column; gap: 3px; min-width: 170px; }
.poi-t { font-weight: 700; font-size: 15px; }
.poi-s { font-size: 13px; color: var(--ink2); }
.poi-pop .btn { margin-top: 9px; }

/* Kenteken-label nooit afbreken; in het kaartje onderaan tijdens het rijden schuift het onder de tijd als er geen plek is */
.plate { white-space: nowrap; }
#etaTime { white-space: nowrap; }
.eta-txt .row { flex-wrap: wrap; row-gap: 4px; }
