/* LSHDrivingGroups – Richtung „Linienplan“, siehe DESIGN.md.
   Marke wie im LSH-Portal: Weinrot + Gold aus dem Wappen, Sand, Instrument Sans. */
@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-display: swap;
  src: url(/fonts/instrument-sans-latin-f587e727.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-display: swap;
  src: url(/fonts/instrument-sans-latin-ext-40fe78bf.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #fbf4e8; --sunk: #f3e8d6; --surface: #fffaf2; --line: #e3d4bd;
  --ink: #22181a; --muted: #6b5852;
  --wine: #8c1d2b; --wine-ink: #ffffff; --wine-soft: #f4e0de;
  --gold: #e9a92a;
  --ok: #2f7a4f; --warn: #a8500d; --leaf: #2a8f54;
  --r-ctl: 6px; --r-surface: 10px; --r-bar: 14px;
  --font: "Instrument Sans", system-ui, sans-serif;
  --shadow-bar: 0 -6px 20px -12px rgb(34 24 26 / 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1415; --sunk: #241a1c; --surface: #211819; --line: #3b2c2f;
    --ink: #f4ebe3; --muted: #bba7a0;
    --wine: #d65a69; --wine-ink: #1b1415; --wine-soft: #3a2226;
    --gold: #e9a92a; --ok: #63c08b; --warn: #f0a062; --leaf: #63c08b;
    --shadow-bar: 0 -6px 20px -12px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1415; --sunk: #241a1c; --surface: #211819; --line: #3b2c2f;
  --ink: #f4ebe3; --muted: #bba7a0;
  --wine: #d65a69; --wine-ink: #1b1415; --wine-soft: #3a2226;
  --gold: #e9a92a; --ok: #63c08b; --warn: #f0a062; --leaf: #63c08b;
  --shadow-bar: 0 -6px 20px -12px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.5 var(--font); min-height: 100vh; min-height: 100dvh;
  overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; font-weight: 650; text-wrap: balance; }
h1 { font-size: 24px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--wine); }
time, .num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Kopf ---------- */
.bar { background: var(--wine); color: #fff; padding-top: env(safe-area-inset-top, 0px); }
.bar-in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  padding-block: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.logo { flex: none; }
.bar-text { display: grid; line-height: 1.25; }
.bar-text b { font-size: 16px; }
.bar-text span { font-size: 14px; opacity: .85; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bar { background: #5e1420; } }
:root[data-theme="dark"] .bar { background: #5e1420; }

/* ---------- Reiter: unten am Handy, oben am Laptop ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow-bar);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.tabs button { min-height: 48px; font: inherit; font-weight: 650; font-size: 15px; color: var(--muted); background: none; border: 0; border-radius: var(--r-ctl); cursor: pointer; }
.tabs button[aria-current="page"] { color: var(--wine); background: var(--wine-soft); }
@media (min-width: 720px) {
  .tabs { position: sticky; top: 0; bottom: auto; max-width: 640px; margin: 16px auto 0; border: 1px solid var(--line); border-radius: var(--r-bar); box-shadow: none; padding: 4px; }
}

main { max-width: 640px; margin: 0 auto; padding-block: 24px 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { main { padding-bottom: 48px; } }

/* ---------- Grundbausteine ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
  font: inherit; font-weight: 650; font-size: 15px; border-radius: var(--r-ctl); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; transition: background-color .15s ease-out; }
.btn:hover { background: var(--sunk); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--wine); border-color: var(--wine); color: var(--wine-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { border-color: transparent; background: none; color: var(--wine); padding: 0 8px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.error { color: var(--warn); font-weight: 650; }
.fine { color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 12px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 32px 0 12px; }
.section-title:first-child { margin-top: 0; }
.note { background: var(--sunk); border-radius: var(--r-surface); padding: 14px 16px; display: grid; gap: 10px; justify-items: start; }

/* Laden: Platzhalter in der Form des Inhalts */
.skeleton { display: grid; gap: 14px; padding-top: 8px; }
.skeleton span { display: block; height: 18px; border-radius: var(--r-ctl); background: var(--sunk); }
.skeleton span:first-child { height: 28px; width: 60%; }
.skeleton .short { width: 40%; }

/* ---------- Startseite ---------- */
#view-login { display: grid; gap: 16px; justify-items: start; }
.lead { font-size: 30px; max-width: 18ch; }
.intro { max-width: 60ch; color: var(--ink); }
.sample { margin: 24px 0 0; width: 100%; max-width: 420px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); }
.sample figcaption { font-size: 14px; color: var(--muted); margin-bottom: 14px; }

/* ---------- Das mutige Element: Fahrtverlauf wie im Linienplan ---------- */
.route { list-style: none; margin: 0; padding: 0; }
.route li { display: grid; grid-template-columns: 3.6em 20px 1fr; align-items: start; column-gap: 10px; position: relative; padding-bottom: 14px; }
.route li:last-child { padding-bottom: 0; }
.route time { font-size: 18px; font-weight: 650; line-height: 1.3; }
.route li > div { grid-column: 3; display: grid; min-width: 0; }
.route li > div span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.route li > div a { font-size: 14px; }
/* Haltepunkt + Linie */
.route li::before { content: ""; grid-column: 2; grid-row: 1; width: 12px; height: 12px; margin: 6px 4px 0; border-radius: 50%; background: var(--surface); border: 3px solid var(--wine); position: relative; z-index: 1; }
.route li::after { content: ""; position: absolute; left: calc(3.6em + 10px + 9px); top: 16px; bottom: -2px; width: 3px; background: var(--wine); }
.route li:last-child::after { display: none; }
.route li.end::before, .route li.start::before { background: var(--wine); }
.route time { grid-column: 1; grid-row: 1; }

/* ---------- Fahrten ---------- */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.weeknav h1 { font-size: 20px; text-align: center; }
.weeknav .btn { min-width: 44px; padding: 0; font-size: 20px; }
.day { padding: 20px 0; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.day:first-of-type { border-top: 0; }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.day-head h2 { font-size: 18px; }
.day-head h2 small { font-weight: 500; color: var(--muted); font-size: 14px; margin-left: 6px; }
.today-mark { display: inline-block; font-size: 12px; font-weight: 650; letter-spacing: .04em; color: #22181a; background: var(--gold); border-radius: 4px; padding: 1px 6px; margin-left: 8px; vertical-align: 2px; }
/* Mitfahren ja/nein */
.yesno { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; background: var(--surface); }
.yesno button { min-height: 44px; min-width: 76px; font: inherit; font-weight: 650; font-size: 15px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.yesno button + button { border-left: 1px solid var(--line); }
.yesno button[aria-pressed="true"] { background: var(--wine); color: var(--wine-ink); }
.yesno button[aria-pressed="true"].no { background: var(--ink); color: var(--bg); }
.hint { font-size: 14px; color: var(--muted); }
.hint .btn { min-height: 36px; font-size: 14px; }
.trip { display: grid; gap: 10px; }
.trip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.trip-head h3 { font-size: 15px; color: var(--muted); font-weight: 650; }
.drive-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 16px; display: grid; gap: 16px; }
.ride { display: grid; grid-template-columns: 3.6em 1fr; column-gap: 10px; align-items: baseline; }
.ride time { font-size: 18px; font-weight: 650; }
.ride span { color: var(--muted); font-size: 14px; }
.warn { color: var(--warn); font-size: 14px; font-weight: 650; }
.others { font-size: 14px; color: var(--muted); }

/* Umwelt: was die Gruppe diese Woche einspart */
.eco { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; background: var(--sunk); border-radius: var(--r-surface); padding: 14px 16px; margin: 4px 0 8px; }
.eco svg { grid-row: 1 / 3; width: 36px; height: 36px; color: var(--leaf); }
.eco b { font-size: 18px; font-weight: 650; line-height: 1.25; }
.eco .fine { font-size: 13px; }

/* ---------- Gruppe ---------- */
.people { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.people li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.people li b { font-weight: 650; }
.people li .car { font-size: 14px; color: var(--muted); text-align: right; }
.people li .where { grid-column: 1 / -1; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- Formulare ---------- */
form.block { display: grid; gap: 4px; padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
label.f { font-weight: 650; font-size: 14px; margin-top: 12px; }
.f-help { font-size: 13px; color: var(--muted); }
input[type=text], input[type=tel], input[type=number], input[type=time], select {
  width: 100%; min-height: 44px; font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); }
input:hover, select:hover { border-color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid2 > div { display: grid; gap: 4px; min-width: 0; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; margin-top: 8px; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--wine); flex: none; }
.days-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.days-pick label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); font-weight: 650; cursor: pointer; }
.days-pick input { accent-color: var(--wine); width: 18px; height: 18px; }
.form-end { display: flex; justify-content: flex-end; margin-top: 16px; }
.tt { display: grid; gap: 8px; margin-top: 8px; }
.tt-row { display: grid; grid-template-columns: 2.6em 1fr 1fr; gap: 8px; align-items: center; }
.tt-row b { font-weight: 650; }
.tt-row .when { grid-column: 2 / 4; font-size: 13px; color: var(--muted); margin-top: -4px; }

.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100% - 32px); z-index: 20;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-surface); font-weight: 650; box-shadow: var(--shadow-bar); }
@media (min-width: 720px) { .toast { bottom: 24px; } }
