/* Fahrgefühl – Armaturen-Anmutung: kühles Asphaltgrau, Bernstein-Leuchte,
   Ampelfarben für Scores. Schriften Barlow / Barlow Semi Condensed. */

:root {
  --bg: #e9ecef;
  --bg-2: #dfe3e7;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --line: #cfd5db;
  --text: #1b1f24;
  --text-2: #56606b;
  --text-3: #7d8792;
  --amber: #e89a0c;
  --amber-soft: rgba(232, 154, 12, 0.16);
  --good: #2f9e44;
  --good-light: #8ce99a;
  --mid: #d9a400;
  --bad: #d6336c;
  --red: #d63a2f;
  --blue: #1c7ed6;
  --orange: #f08c00;
  --comfort: rgba(47, 158, 68, 0.12);
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 1px 2px rgba(20, 28, 36, 0.06), 0 6px 20px rgba(20, 28, 36, 0.06);
  --radius: 16px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-cond: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16191d;
    --bg-2: #1d2126;
    --surface: #22272d;
    --surface-2: #2a3037;
    --line: #353c44;
    --text: #eef1f4;
    --text-2: #a9b2bc;
    --text-3: #7f8994;
    --amber: #ffb02e;
    --amber-soft: rgba(255, 176, 46, 0.16);
    --good: #51cf66;
    --good-light: #b2f2bb;
    --mid: #fcc419;
    --bad: #ff6b8b;
    --red: #ff5f52;
    --blue: #4dabf7;
    --orange: #ffa94d;
    --comfort: rgba(81, 207, 102, 0.12);
    --glass: rgba(34, 39, 45, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.5 var(--font);
  min-height: 100dvh;
  padding-bottom: calc(76px + var(--safe-b));
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Kopf & Tabbar (translucent) ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
.brand { font: 700 1.05rem/1 var(--font-cond); letter-spacing: 0.04em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.lamp { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.ver { font: 600 0.75rem/1 var(--font-cond); letter-spacing: 0.02em; text-transform: none; color: var(--text-3); padding: 3px 6px; border: 1px solid var(--line); border-radius: 999px; }
.sync-pill { font: 600 0.78rem/1 var(--font-cond); letter-spacing: 0.03em; padding: 6px 10px; border-radius: 999px; background: var(--surface); color: var(--text-2); box-shadow: var(--shadow); }
.sync-pill.wait { color: var(--amber); }
.sync-pill.err { color: var(--bad); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 6px 8px calc(6px + var(--safe-b));
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--line);
}
.tab { border: 0; background: none; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 0.74rem/1.1 var(--font-cond); color: var(--text-3); letter-spacing: 0.02em; border-radius: 10px; }
.tab-ico { font-size: 1.15rem; line-height: 1; }
.tab[aria-current='page'] { color: var(--amber); }
.tab:active { background: var(--amber-soft); }
body.recording .tabbar { display: none; }
body.recording { padding-bottom: var(--safe-b); }

/* ---------- Layout ---------- */
main { max-width: 560px; margin: 0 auto; padding: 8px 16px 24px; }
.view { animation: viewIn 260ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.display { font: 700 2rem/1.05 var(--font-cond); letter-spacing: -0.01em; margin: 12px 0 6px; }
h2 { font: 700 1.15rem/1.2 var(--font-cond); letter-spacing: 0.01em; margin: 0 0 10px; }
h3 { font: 600 0.82rem/1.2 var(--font-cond); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; }
.lead { color: var(--text-2); margin: 0 0 16px; }
.fine { color: var(--text-3); font-size: 0.85rem; margin: 8px 0; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 12px 0; }

/* ---------- Buttons: Feedback beim Drücken, sofort ---------- */
.btn {
  display: block; width: 100%; border: 0; border-radius: 14px; padding: 13px 16px;
  font: 600 1rem/1.2 var(--font-cond); letter-spacing: 0.02em;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  transition: transform 100ms ease-out, opacity 150ms;
  touch-action: manipulation; cursor: pointer;
}
.btn:active, .pick:active, .chip:active, .trip:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; transform: none; cursor: default; }
.btn.primary { background: var(--amber); color: #1b1f24; }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--text-2); margin-top: 6px; }
.btn.big { padding: 17px 16px; font-size: 1.12rem; margin-top: 8px; }
.btn.small { display: inline-block; width: auto; padding: 8px 12px; font-size: 0.9rem; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.btn-row .btn { margin: 0; }

/* ---------- Fahrer/Auto-Auswahl ---------- */
.who { padding: 4px 0; }
.pick { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; width: 100%; border: 0; background: none; padding: 14px 16px; text-align: left; transition: transform 100ms ease-out; }
.pick + .pick { border-top: 1px solid var(--line); }
.pick-label { font: 600 0.8rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.pick-value { font: 600 1.15rem/1.2 var(--font-cond); }
.pick-value.empty { color: var(--amber); }
.chev { font-size: 1.4rem; color: var(--text-3); }
.mount-row { grid-template-columns: 70px 1fr; }
.seg-ctl { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 3px; }
.seg-ctl button { border: 0; background: none; border-radius: 9px; padding: 9px 6px; font: 600 0.95rem/1.1 var(--font-cond); color: var(--text-2); transition: transform 100ms ease-out, background 160ms; }
.seg-ctl button:active { transform: scale(0.96); }
.seg-ctl button[aria-checked='true'] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.mount-hint { margin: -4px 16px 10px; }
.pause { color: var(--amber); font-weight: 600; }

.checklist { list-style: none; padding: 0; margin: 14px 0; color: var(--text-2); font-size: 0.95rem; }
.checklist li { padding: 4px 0 4px 26px; position: relative; }
.checklist li::before { content: ''; position: absolute; left: 4px; top: 11px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--amber); }

.msg { color: var(--bad); font-weight: 500; margin: 8px 0; min-height: 0; }
.msg:empty { display: none; }

/* ---------- Live ---------- */
.bump { background: var(--red); color: #fff; font: 700 0.72rem/1 var(--font-cond); letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; opacity: 0; transform: scale(0.8); transition: opacity 120ms, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1.2); pointer-events: none; }
.bump.on { opacity: 1; transform: scale(1); }
.status { text-align: center; color: var(--text-3); font-size: 0.78rem; margin: 6px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.warn { text-align: center; color: var(--amber); font-weight: 600; font-size: 0.85rem; }
.warn:empty { display: none; }

/* Live: ausgelegt für den halben Handybildschirm (≈ 360 × 330 px). Werte nie umbrechen. */
body.recording header.top { display: none; }
body.recording main { padding-top: max(6px, var(--safe-t, 0px)); padding-bottom: 6px; }
.live { --bar-h: 34px; --bar-big: 48px; --gap: 8px; }
.lv-top { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; margin-bottom: var(--gap); }
.lv-comfort { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lv-comfort b { font: 700 2rem/1 var(--font-cond); font-variant-numeric: tabular-nums; min-width: 2ch; color: var(--text-3); }
.lv-comfort[data-tone="good"] b { color: var(--good); }
.lv-comfort[data-tone="mid"] b { color: var(--mid); }
.lv-comfort[data-tone="bad"] b { color: var(--bad); }
.lv-comfort span { display: flex; flex-direction: column; min-width: 0; }
.lv-comfort em { font: 700 1rem/1.1 var(--font-cond); font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-comfort small, .lv-speed small { font: 600 0.68rem/1.2 var(--font-cond); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); white-space: nowrap; }
.lv-speed { display: flex; align-items: baseline; gap: 3px; }
.lv-speed b { font: 700 1.7rem/1 var(--font-cond); font-variant-numeric: tabular-nums; }
.lv-trip { display: flex; flex-direction: column; align-items: flex-end; font: 600 0.82rem/1.25 var(--font-cond); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.meter { margin-bottom: var(--gap); }
.meter-h, .vibline { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; min-width: 0; }
.meter-l { font: 600 0.72rem/1.2 var(--font-cond); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.meter-g { font: 700 1rem/1.2 var(--font-cond); font-variant-numeric: tabular-nums; }
.meter.big .meter-g { font-size: 1.25rem; }
.meter-w { font: 700 0.95rem/1.2 var(--font-cond); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.meter-trend { margin-left: auto; font: 600 0.85rem/1.2 var(--font-cond); }
.meter[data-s="0"] .meter-w, .meter[data-s="1"] .meter-w, .meter-trend[data-s="0"], .meter-trend[data-s="1"] { color: var(--good); }
.meter[data-s="2"] .meter-w, .meter-trend[data-s="2"] { color: var(--orange); }
.meter[data-s="3"] .meter-w, .meter-trend[data-s="3"] { color: var(--red); }
.meter[data-mode="accel"] .meter-l { color: var(--good); }
.meter[data-mode="brake"] .meter-l { color: var(--orange); }

.meter-bar { position: relative; height: var(--bar-h); margin-top: 3px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.meter.big .meter-bar { height: var(--bar-big); }
.meter-zones { position: absolute; inset: 0; opacity: 0.22; }
.meter-side { position: absolute; top: 50%; transform: translateY(-50%); font: 700 0.7rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); opacity: 0.8; pointer-events: none; }
.meter-side.l { left: 8px; } .meter-side.r { right: 8px; }
.meter-fill { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; background: var(--good); transition: width 90ms linear, left 90ms linear, background-color 150ms ease; }
.meter[data-s="1"] .meter-fill { background: var(--good-light); }
.meter[data-s="2"] .meter-fill { background: var(--orange); }
.meter[data-s="3"] .meter-fill { background: var(--red); }
.meter:not([data-s]) .meter-fill { background: var(--text-3); opacity: 0.45; }
.meter-mid { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--text); opacity: 0.5; }
.meter-peak { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--text); display: none; }
.meter-ticks { position: relative; height: 12px; font: 600 0.62rem/12px var(--font-cond); color: var(--text-3); font-variant-numeric: tabular-nums; }
.meter-ticks span { position: absolute; transform: translateX(-50%); }
.meter-hint { min-height: 1.2em; font: 700 0.85rem/1.2 var(--font-cond); color: var(--text-2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vibline { align-items: center; margin-bottom: 2px; }
.vib-bar { position: relative; flex: 1; min-width: 35%; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.vib-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--good); transition: width 300ms ease; }
.vibline[data-s="1"] .vib-bar i { background: var(--good-light); }
.vibline[data-s="2"] .vib-bar i { background: var(--orange); }
.vibline[data-s="3"] .vib-bar i { background: var(--red); }
.vibline .meter-g { font-size: 0.85rem; }

.lv-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.lv-foot .live-who { flex: 1; min-width: 0; font: 600 0.78rem/1.2 var(--font-cond); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-foot .btn { width: auto; margin: 0; padding: 10px 16px; font-size: 0.95rem; }

/* Mehr Platz (ganzer Bildschirm): größer */
@media (min-height: 560px) {
  .live { --bar-h: 44px; --bar-big: 72px; --gap: 14px; }
  .lv-comfort b { font-size: 2.6rem; }
  .lv-speed b { font-size: 2.2rem; }
  .meter.big .meter-g { font-size: 1.6rem; }
  .meter-side { font-size: 0.8rem; }
  .lv-foot .btn { padding: 14px 18px; }
}
@media (min-height: 720px) {
  .live { --bar-h: 84px; --bar-big: 150px; --gap: 26px; }
  .lv-comfort b { font-size: 3.2rem; }
  .lv-comfort em { font-size: 1.2rem; }
  .meter.big .meter-g { font-size: 2rem; }
  .meter-g { font-size: 1.25rem; }
  .meter-w { font-size: 1.1rem; }
  .meter-ticks { height: 16px; font-size: 0.75rem; line-height: 16px; }
  .meter-hint { font-size: 1rem; }
  .vib-bar { height: 18px; }
  .vibline .meter-g { font-size: 1rem; }
}

/* ---------- Auswertung ---------- */
.hero { display: grid; grid-template-columns: 128px 1fr; gap: 16px; align-items: center; }
.ring { width: 128px; height: 128px; }
.ring text { font-family: var(--font-cond); }
.hero-label { font: 700 1.5rem/1.1 var(--font-cond); }
.hero-sub { display: flex; gap: 14px; margin-top: 8px; }
.hero-sub div { display: flex; flex-direction: column; }
.hero-sub b { font: 700 1.3rem/1.1 var(--font-cond); }
.hero-sub span { font: 600 0.7rem/1.2 var(--font-cond); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.meta { color: var(--text-2); font-size: 0.88rem; margin-top: 10px; }
.bar { margin: 12px 0; }
.bar-h { display: flex; justify-content: space-between; font: 600 1rem/1.2 var(--font-cond); }
.bar-track { height: 8px; border-radius: 4px; background: var(--surface-2); margin: 6px 0 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transform-origin: left; animation: grow 600ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes grow { from { transform: scaleX(0); } }
.bar-t { font-size: 0.86rem; color: var(--text-2); }
.good { color: var(--good); } .mid { color: var(--mid); } .bad { color: var(--bad); }
.bg-good { background: var(--good); } .bg-mid { background: var(--mid); } .bg-bad { background: var(--bad); }
.ride { margin: 16px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.ride-row { display: grid; grid-template-columns: 7.5rem 1fr 3rem; align-items: center; gap: 10px; margin: 8px 0; font-size: 0.92rem; }
.ride-row small { display: block; color: var(--text-3); font-size: 0.75rem; }
.ride-row b { text-align: right; font: 600 0.95rem/1 var(--font-cond); font-variant-numeric: tabular-nums; }
.ride-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.ride-track span { display: block; height: 100%; border-radius: 4px; background: var(--blue); }
.ride-tag { font: 700 0.75rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.ride-tag.k-firm { color: var(--orange); }
.ride-tag.k-soft { color: var(--blue); }
.mv { margin: 12px 0; }
.mv-stack { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); margin: 6px 0 4px; }
.mv-stack span { display: block; height: 100%; }
.soft { opacity: 0.55; }
.mv-list { margin: 0; padding: 0; list-style: none; }
.mv-list li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.mv-list li:first-child { border-top: 0; }
.mv-list small { color: var(--text-2); font-size: 0.84rem; }
.mv-t { float: right; color: var(--text-3); font: 600 0.8rem/1.4 var(--font-cond); }
.tips { margin: 0; padding-left: 20px; }
.tips li { margin: 4px 0; }
.notes { margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: 0.88rem; }
.notes li { padding: 3px 0 3px 22px; position: relative; }
.notes li::before { content: 'i'; position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface-2); font: 700 0.7rem/15px var(--font); text-align: center; color: var(--text-3); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
.scroll-x canvas { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: var(--text-2); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.scatter { width: min(100%, 320px); aspect-ratio: 1; display: block; margin: 0 auto; }
.sync-line { font-size: 0.88rem; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- Verlauf ---------- */
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
select, input[type='text'], input[type='url'], textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 12px; font-size: 1rem;
}
textarea { resize: vertical; min-height: 64px; }
.agg { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.agg th { text-align: left; font: 600 0.72rem/1.2 var(--font-cond); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); padding: 4px 0; }
.agg td { padding: 6px 0; border-top: 1px solid var(--line); }
.agg td.n, .agg th.n { text-align: right; font-variant-numeric: tabular-nums; }
.trip { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; width: 100%; border: 0; text-align: left; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; margin: 8px 0; transition: transform 100ms ease-out; }
.trip-score { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 700 1.25rem/1 var(--font-cond); border: 3px solid currentColor; }
.trip-main b { font: 600 1.02rem/1.2 var(--font-cond); display: block; }
.trip-main span { font-size: 0.84rem; color: var(--text-2); }
.trip-side { text-align: right; font-size: 0.8rem; color: var(--text-3); line-height: 1.5; }
.empty-state { text-align: center; color: var(--text-3); padding: 40px 0; }

/* ---------- Einstellungen / Listen ---------- */
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.list-item:first-child { border-top: 0; }
.list-item small { color: var(--text-3); display: block; }
.icon-btn { border: 0; background: var(--surface-2); border-radius: 10px; padding: 7px 10px; font-size: 0.85rem; color: var(--text-2); }
.icon-btn:active { transform: scale(0.95); }
.field { margin: 10px 0; }
.field label { display: block; font: 600 0.8rem/1.2 var(--font-cond); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin-bottom: 5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; word-break: break-all; color: var(--text-2); }

/* ---------- Sheet (modal, mit Scrim) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 20; opacity: 0; transition: opacity 260ms; }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain;
  max-width: 560px; margin: 0 auto;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(20px + var(--safe-b));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 340ms cubic-bezier(0.2, 0.9, 0.25, 1);
  touch-action: pan-y;
}
.sheet.on { transform: translateY(0); }
.sheet.dragging { transition: none; }
.grabber { position: relative; width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; touch-action: none; }
.grabber::after { content: ''; position: absolute; inset: -14px -60px; }
.sheet-head { touch-action: none; }
.option { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: var(--surface-2); border-radius: 12px; padding: 14px; margin: 6px 0; text-align: left; font: 600 1.05rem/1.2 var(--font-cond); transition: transform 100ms ease-out; }
.option:active { transform: scale(0.98); }
.option.sel { background: var(--amber-soft); box-shadow: inset 0 0 0 2px var(--amber); }
.option small { display: block; font: 400 0.82rem/1.3 var(--font); color: var(--text-3); }
.stars { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.star { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface-2); font: 700 1.3rem/1 var(--font-cond); transition: transform 100ms ease-out; }
.star:active { transform: scale(0.92); }
.star.sel { background: var(--amber); border-color: var(--amber); color: #1b1f24; }
.scale-hint { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-3); margin: -6px 6px 10px; }

.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; opacity: 0; pointer-events: none; transition: opacity 200ms, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1); z-index: 30; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .sheet { transition: opacity 200ms; transform: none; opacity: 0; }
  .sheet.on { opacity: 1; }
  .bump, .toast { transition: opacity 150ms; transform: none; }
  .toast.on { transform: translate(-50%, 0); }
  .toast { transform: translate(-50%, 0); }
}
@media (prefers-reduced-transparency: reduce) {
  .top, .tabbar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Live-Bremsanzeige: Last in g, Änderung (Pfeil), Stufe; Hinweis kurz vor dem Halt */
/* Fahrwerks-Tabelle (Frequenzen) */
.spec-wrap { overflow-x: auto; margin: 0 -2px; }
.agg.spec td small { display: block; font-size: 0.72rem; color: var(--text-3); line-height: 1.3; font-weight: 400; }
.agg.spec td em { font-style: normal; color: var(--text-2); font-weight: 600; }
.agg.spec td.n { min-width: 4.6em; vertical-align: top; padding-left: 8px; }
.agg.spec b.good { color: var(--good); }
.agg.spec b.bad { color: var(--orange); }
.agg.spec tr.spec-sep td { border-top: 2px solid var(--line); }
.remote-line span { font-size: 0.9rem; }

/* Rückmeldung nach dem Schalten (Schaltwagen) */
.shift-msg { margin: -2px 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--good); line-height: 1.35; }
.shift-msg[data-tone="warn"] { border-left-color: var(--orange); }
.shift-msg[data-tone="bad"] { border-left-color: var(--red); }
.shift-msg b { margin-right: 4px; }
.shift-msg[data-tone="warn"] b { color: var(--orange); }
.shift-msg[data-tone="bad"] b { color: var(--red); }
.shift-msg span { display: block; font-size: 0.9rem; color: var(--text-2); }
.shift-msg small { display: block; margin-top: 2px; font-size: 0.75rem; color: var(--text-3); }

/* Als App installieren */
.install { padding: 12px 16px; }
.install-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.install-state { color: var(--good); font-weight: 600; font-size: 0.9rem; }
.install .fine { margin: 6px 0 0; }
.install .btn { margin-top: 10px; }
