/* Cera – Design „Atelier“: hell, reduziert, große Zahlen. Handy zuerst, ab 1024 px Seitenleiste. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin.e35fad09c70b.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #F2F2F4;
  --surface: #FFFFFF;
  --ink: #111113;
  --ink-soft: #3A3A40;
  --muted: #62626A;
  --line: #E4E4E8;
  --track: #E9E9EC;
  --border: #D9D9DE;
  --primary-bg: #111113;
  --primary-fg: #FFFFFF;
  --warn: #D98200;
  --warn-ink: #8A4B00;
  --warn-bg: #FFF1D6;
  --danger: #D92D20;
  --danger-ink: #B42318;
  --danger-bg: #FDE7E4;
  --ok: #1F7A4D;
  --scrim: rgba(17, 17, 19, 0.32);
  --shadow-drawer: 0 20px 60px rgba(17, 17, 19, 0.18);
  --radius-card: 24px;
  --radius-group: 20px;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dunkelmodus folgt dem System, damit die App nachts nicht blendet. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0B0B0D;
    --surface: #1A1A1E;
    --ink: #F4F4F5;
    --ink-soft: #D4D4D8;
    --muted: #A1A1AA;
    --line: #2A2A30;
    --track: #2C2C33;
    --border: #3A3A42;
    --primary-bg: #F4F4F5;
    --primary-fg: #111113;
    --warn: #F5A524;
    --warn-ink: #FFC766;
    --warn-bg: #3A2A0A;
    --danger: #F04438;
    --danger-ink: #FF8A80;
    --danger-bg: #3D1512;
    --ok: #4ADE80;
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow-drawer: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Ladebildschirm ---------- */
/* Das Kettenglied läuft selbst als Ladeanzeige: ein Abschnitt wandert um den Rahmen wie Kette übers Kettenblatt. */
.splash { display: none; }
.splash-on .splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.3s ease, transform 0.3s ease;
  /* Notbremse, falls app.js nicht lädt – sonst bliebe die App dauerhaft verdeckt. */
  animation: splash-gone 0.3s 4s forwards;
}
.splash.is-leaving { opacity: 0; transform: scale(1.04); pointer-events: none; }
@keyframes splash-gone { to { opacity: 0; visibility: hidden; } }

.splash__tile {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: var(--primary-bg);
  color: var(--primary-fg);
}
.splash__logo { width: 64px; height: 64px; overflow: visible; }
.splash__track { opacity: 0.28; }
.splash__run { stroke-dasharray: 34 66; animation: splash-run 1.1s linear infinite; }
.splash__bolt { transform-box: fill-box; transform-origin: center; animation: splash-bolt 1.1s ease-in-out infinite; }
.splash__bolt--b { animation-delay: 0.55s; }
.splash__word {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(4px);
  animation: splash-word 0.5s 0.2s ease-out forwards;
}
@keyframes splash-run { to { stroke-dashoffset: -100; } }
@keyframes splash-bolt { 50% { transform: scale(0.72); } }
@keyframes splash-word { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .splash-on .splash { transition: none; }
  .splash__run, .splash__bolt { animation: none; }
  .splash__run { stroke-dasharray: none; }
  .splash__word { animation: none; opacity: 1; transform: none; }
}

.icon { flex-shrink: 0; display: block; }
.d-none { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Grundgerüst ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: max(12px, env(safe-area-inset-top)) 16px 4px;
  background: var(--bg);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
/* Das Kettenglied füllt nur die Mitte seiner Box; so steht es optisch auf Höhe der Kleinbuchstaben. */
.logo-mark { width: 1.2em; height: 1.2em; flex-shrink: 0; }

.icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn--filled { background: var(--bg); }

.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 4px 20px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Platz für die feste Aktionsleiste unten, sonst verdeckt sie die letzten Einträge. */
.has-action-bar .page { padding-bottom: calc(180px + env(safe-area-inset-bottom)); }

.app-footer {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.powered-by { display: inline-flex; padding: 8px 0; }
.powered-by img { display: block; height: 16px; width: auto; }
.legal-links { display: flex; justify-content: center; gap: 20px; }
.legal-links a { padding: 8px 0; }

/* ---------- Menü (Handy: Schublade, PC: feste Seitenleiste) ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  width: min(292px, 86vw);
  padding: max(16px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: 0 28px 28px 0;
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
  overflow-y: auto;
}

.menu-open { overflow: hidden; }
.menu-open .scrim { opacity: 1; pointer-events: auto; }
.menu-open .sidebar {
  transform: none;
  visibility: visible;
  transition: transform 0.25s ease;
}

/* Beim Wischen setzt JS die Position direkt; eine Transition würde dem Finger hinterherhinken. */
.menu-dragging .sidebar { visibility: visible; transition: none; }
.menu-dragging .scrim { transition: none; }
/* Die zur Seite geschobene Seite soll keinen horizontalen Scrollbalken erzeugen. */
.page-dragging { overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
  .sidebar, .scrim { transition: none; }
}

.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
}
.sidebar__head .wordmark { padding-left: 10px; justify-content: flex-start; }

.nav-item {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.nav-item.is-active { background: var(--bg); font-weight: 600; }
.nav-item form { display: contents; }

.sidebar__spacer { flex-grow: 1; }

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.user-row--plain { padding: 0; border-top: 0; }
.user-row__text { display: flex; flex-direction: column; min-width: 0; }
.user-row__name { font-size: 15px; font-weight: 600; }
.user-row__meta { font-size: 13px; color: var(--muted); }

/* ---------- Typografie ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 4px 4px;
}
.page-title { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.page-sub { margin-top: 2px; font-size: 15px; color: var(--muted); }
.page-head__actions { display: flex; align-items: center; gap: 8px; }

.back-link {
  align-self: flex-start;
  min-height: 44px;
  margin-left: -8px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
  font-weight: 500;
}

.section-label {
  margin: 12px 4px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:active:not(:disabled) { opacity: 0.8; }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: 17px; font-weight: 600; }
.btn--pill { min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.btn--sm { min-height: 44px; border-radius: 12px; font-size: 15px; }

.btn--primary { background: var(--primary-bg); color: var(--primary-fg); }
.btn--secondary { background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn--danger { background: var(--surface); border-color: var(--border); color: var(--danger-ink); }
.btn--ghost { background: transparent; color: var(--ink); }

.link-btn {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.link-btn--danger { color: var(--danger-ink); }

/* ---------- Karten & Listen ---------- */
.card {
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-card);
}
.card > * + * { margin-top: 16px; }

.list {
  background: var(--surface);
  border-radius: var(--radius-group);
  overflow: hidden;
}
.list__item {
  position: relative;
  min-height: 52px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.list__item--action { padding-top: 4px; padding-bottom: 4px; padding-right: 8px; }
.list__item[hidden] { display: none; }
.show-all { display: block; margin: 4px auto 0; }
.show-more { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.danger-zone { margin-top: 24px; }
.danger-zone > * + * { margin-top: 8px; }
.danger-zone .field__help { margin-left: 4px; margin-right: 4px; }
.sheet__extra { margin-top: 12px; }
.list__item + .list__item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: var(--line);
}
.list__main { display: flex; flex-direction: column; min-width: 0; }
.list__title { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__main .list__meta { white-space: nowrap; }
.list__meta { font-size: 13px; color: var(--muted); }
/* Strava verlangt „View on Strava“ fett oder unterstrichen; das Padding vergrößert die Tippfläche. */
.strava-link {
  padding: 6px 0;
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.list__value { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list__empty { color: var(--muted); }

/* ---------- Hinweise & Meldungen ---------- */
.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  background: var(--surface);
  border-radius: 16px;
  font-size: 15px;
  color: var(--ink-soft);
}
.notice > .icon { color: var(--muted); }
.notice__text { flex-grow: 1; }
.notice--warn { background: var(--warn-bg); color: var(--warn-ink); padding: 14px 16px; }

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 16px;
  background: var(--surface);
  border-radius: 16px;
  font-size: 15px;
}
.toast__dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--muted); }
.toast--success .toast__dot { background: var(--ok); }
.toast--warning .toast__dot { background: var(--warn); }
.toast--error .toast__dot { background: var(--danger); }
.toast__text { flex-grow: 1; padding: 8px 0; }
.toast .icon-btn { color: var(--muted); }

/* ---------- Räder ---------- */
.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.pill--warning { background: var(--warn-bg); color: var(--warn-ink); }
.pill--danger { background: var(--danger-bg); color: var(--danger-ink); }
.pill--setup { background: var(--bg); color: var(--ink); }

.bar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar__fill { height: 100%; border-radius: inherit; background: var(--ink); }
.status-warning .bar__fill { background: var(--warn); }
.status-danger .bar__fill { background: var(--danger); }
.is-over { color: var(--danger-ink); font-weight: 500; }

.big {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 8px;
  font-variant-numeric: tabular-nums;
}
.big__num { font-size: 76px; font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.big__unit { font-size: 22px; font-weight: 500; color: var(--muted); }
/* Vierstellige Werte („1.240 / 1.200 km“) an die Kartenbreite anpassen statt umzubrechen. */
.bike-card, .stat-card { container-type: inline-size; }
.big--long { flex-wrap: nowrap; white-space: nowrap; }
.big--long .big__num { font-size: min(76px, 20cqi); }
.big--long .big__unit { font-size: min(22px, 6.5cqi); }

.stat-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bike-grid { display: flex; flex-direction: column; gap: 12px; }

.bike-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-card);
}
.bike-card__head { display: flex; align-items: center; gap: 8px; }
.bike-card__name { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bike-card__end { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.bike-card .big { margin-top: 28px; }
.bike-card .bar { margin-top: 24px; }
.bike-card .stat-foot { margin-top: 10px; }
.bike-card__small { display: none; }
.bike-card__setup { margin-top: 12px; font-size: 15px; color: var(--muted); }
.bike-card__hint { margin-top: 2px; font-size: 13px; color: var(--muted); }

/* Weitere Räder auf dem Handy: kompakte, einzeln stehende Karten. Die Gruppe bleibt als Container fürs Sortieren. */
.bike-group { display: flex; flex-direction: column; gap: 12px; }
.bike-card--compact {
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--radius-group);
}
.bike-card--compact .big,
.bike-card--compact .stat-foot,
.bike-card--compact .bike-card__end .icon { display: none; }
.bike-card--compact .bike-card__small {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bike-card--compact .bar { height: 4px; margin-top: 0; }
.bike-card--compact .bike-card__setup { margin-top: 0; font-size: 14px; }

/* Sortieren per langem Drücken. Ohne Callout und Textauswahl, sonst öffnet iOS beim Halten die Link-Vorschau. */
[data-bike-id] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
body:not(.is-reordering) .reorder-on,
.is-reordering .reorder-off { display: none; }
/* Wie auf dem iPhone-Home-Bildschirm wackeln die Karten; rotate statt transform, damit sich das
   nicht mit dem Verschieben per translate beißt. Versetzt, damit nicht alle im Gleichtakt wackeln. */
.is-reordering [data-bike-id] { animation: wiggle 0.26s ease-in-out infinite alternate; cursor: grab; }
.is-reordering [data-bike-id]:nth-child(2n) { animation-delay: -0.13s; }
.is-reordering [data-bike-id]:nth-child(3n) { animation-duration: 0.3s; }
.bike-card.is-lifted { z-index: 2; scale: 1.03; box-shadow: var(--shadow-drawer); animation: none; cursor: grabbing; }
.bike-card.is-settling { z-index: 1; }
@keyframes wiggle {
  from { rotate: -0.5deg; }
  to { rotate: 0.5deg; }
}
@media (prefers-reduced-motion: reduce) {
  .is-reordering [data-bike-id] { animation: none; }
}

/* ---------- Rad-Detail ---------- */
.detail-head { margin: 0 4px; }
.detail-head .page-title { font-size: 34px; letter-spacing: -0.03em; }

.stat-card { padding: 22px 24px; }
.stat-card .bar { margin-top: 20px; }
.stat-card .stat-foot { margin-top: 10px; }

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 14px 20px max(30px, calc(14px + env(safe-area-inset-bottom)));
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.action-bar__inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.action-bar form { display: contents; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 15px; font-weight: 600; }
.field__help { font-size: 14px; color: var(--muted); }
.field__error { font-size: 14px; color: var(--danger-ink); }

.input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  font-size: 17px; /* ab 16 px zoomt iOS beim Antippen nicht */
  font-variant-numeric: tabular-nums;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus { outline: none; border-color: var(--ink); }
.input--invalid { border-color: var(--danger); }
.input--lg { min-height: 60px; font-size: 22px; font-weight: 600; }

.fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.fieldset legend { padding: 0; margin-bottom: 8px; }

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  font-size: 16px;
  cursor: pointer;
}
.option:has(input:checked) { border-color: var(--ink); background: var(--surface); }
.option input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--primary-bg);
}

.form-stack { display: flex; flex-direction: column; gap: 24px; }

/* Einstellungen im Blatt, das von unten hereinfährt (auf dem PC als Dialog in der Mitte). */
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  margin: auto auto 0;
  padding: 10px 24px max(28px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  color: var(--ink);
}
.sheet::backdrop { background: var(--scrim); }
.sheet__grabber { width: 36px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: var(--border); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.sheet__title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Einstellungen ---------- */
.settings-card { display: flex; flex-direction: column; gap: 14px; }
.settings-card > * + * { margin-top: 0; }
.status-line { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.status-line .icon { color: var(--muted); }
.hint {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg);
  font-size: 14px;
  color: var(--ink-soft);
}
.hint__steps { margin: 10px 0 8px; padding-left: 20px; }
.hint__steps li + li { margin-top: 6px; }
.hint__key { font-weight: 600; color: var(--ink); white-space: nowrap; }
.hint__key .icon { display: inline-block; width: 17px; height: 17px; vertical-align: -3px; }
.hint__note { display: block; color: var(--muted); }

/* ---------- Anmeldung ---------- */
.auth {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth .wordmark { margin-top: 8px; align-self: center; }
.auth__hero { margin: auto 4px 20px; }
.auth__title { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.auth__lead { margin-top: 12px; font-size: 17px; color: var(--muted); }
.auth .card > * + * { margin-top: 0; }
.strava-connect {
  align-self: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  cursor: pointer;
}
.strava-connect img { display: block; }
.auth .app-footer { margin-top: auto; padding-top: 24px; }
.auth__existing { margin-top: 12px; text-align: center; font-size: 15px; color: var(--muted); }
.card-title { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.text-link { text-decoration: underline; text-underline-offset: 2px; }
/* Honeypot der Warteliste: aus dem Bild geschoben statt display:none, weil manche Bots versteckte Felder auslassen. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Impressum & Datenschutz ---------- */
.legal { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.legal h2 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; color: var(--ink); }
.legal h2:first-child { margin-top: 0; }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 10px; }
.legal ul { margin: 0; padding-left: 20px; }
.legal li + li { margin-top: 4px; }
.legal__date { margin-top: 28px; font-size: 13px; color: var(--muted); }

/* ---------- Hilfsklassen ---------- */
.only-wide { display: none; }

/* ---------- PC ---------- */
@media (min-width: 1024px) {
  .app-shell {
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    min-height: 100vh;
  }
  .topbar, .scrim, .sidebar__close, .nav-item--mobile { display: none; }

  .sidebar {
    position: sticky;
    top: 0;
    width: auto;
    height: 100vh;
    padding: 28px 16px;
    border-radius: 0;
    border-right: 1px solid var(--line);
    box-shadow: none;
    transform: none;
    visibility: visible;
    transition: none;
  }
  .sidebar__head { padding: 0 0 28px; }
  .sidebar__head .wordmark { padding-left: 14px; font-size: 24px; }
  .nav-item { min-height: 48px; font-size: 15px; border-radius: 12px; gap: 12px; }
  .menu-open { overflow: visible; }

  .page {
    max-width: 1120px;
    margin: 0;
    padding: 48px 56px;
    gap: 16px;
  }
  .has-action-bar .page { padding-bottom: 48px; }
  .page--narrow { max-width: 760px; }

  .page-title { font-size: 36px; letter-spacing: -0.03em; }
  .page-head { margin: 0 0 8px; }
  .only-wide { display: revert; }
  .only-narrow { display: none; }
  .app-footer { margin-top: auto; padding-top: 24px; text-align: left; }
  .app-footer .legal-links { justify-content: flex-start; }

  .notice { padding: 14px 14px 14px 20px; }

  .bike-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .bike-group { display: contents; }
  .bike-card,
  .bike-card--compact {
    gap: 0;
    padding: 28px;
    background: var(--surface);
    border-radius: var(--radius-card);
  }
  .bike-card .big, .bike-card--compact .big { display: flex; margin-top: 40px; }
  .bike-card .stat-foot, .bike-card--compact .stat-foot { display: flex; }
  .bike-card__small, .bike-card--compact .bike-card__small { display: none; }
  .bike-card .bar, .bike-card--compact .bar { height: 6px; margin-top: 24px; }
  .bike-card__end .icon { display: none; }
  .bike-card__name { font-size: 18px; }
  .big__num { font-size: 64px; }
  .big__unit { font-size: 20px; }
  .big--long .big__num { font-size: min(64px, 20cqi); }
  .big--long .big__unit { font-size: min(20px, 6.5cqi); }
  .bike-card__setup, .bike-card--compact .bike-card__setup { margin-top: 40px; font-size: 15px; }
  .detail .big__num { font-size: 88px; }
  .detail .big--long .big__num { font-size: min(88px, 20cqi); }

  .action-bar {
    position: static;
    padding: 0;
    background: transparent;
    border: 0;
  }
  .action-bar__inner { max-width: none; margin: 0; flex-direction: row; }
  .action-bar .btn { width: auto; padding: 0 28px; }

  .sheet {
    width: 440px;
    margin: auto;
    padding: 24px 28px 28px;
    border-radius: 24px;
  }
  .sheet__grabber { display: none; }

  .auth { justify-content: center; }
  .auth__hero { margin: 48px 4px 20px; }
  .auth__title { font-size: 42px; }
}
