:root {
  --bg: #fff;
  --surface: #f5f5f7;
  --surface-2: #ebebef;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #a1a1a6;
  --line: rgba(0, 0, 0, .08);
  --you: #0a7cff;
  --today: #ff3b30;
  --danger: #d93a32;
  --note: #fff3b0;
  --note-ink: #3d3200;
  --note-accent: #9a7400;
  --card: #fff;
  --on-ink: #fff;
  --on-ink-2: rgba(255, 255, 255, .7);
  --ink-hover: #000;
  --header: rgba(255, 255, 255, .82);
  --hover: rgba(0, 0, 0, .04);
  --dash: #c7c7cc;
  --ok: #1f8a3b;
  --warn-bg: #fff4e5;
  --warn: #8a4b00;
  --on-ink-scheme: dark;
  color-scheme: light;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
:root[data-theme="dark"] {
  --bg: #0d0d0f;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;
  --ink-3: #6e6e73;
  --line: rgba(255, 255, 255, .1);
  --you: #3d9bff;
  --today: #ff453a;
  --danger: #ff6b61;
  --note: #463e1c;
  --note-ink: #f6ebc0;
  --note-accent: #e3c25a;
  --card: #252528;
  --on-ink: #000;
  --on-ink-2: rgba(0, 0, 0, .6);
  --ink-hover: #fff;
  --header: rgba(13, 13, 15, .78);
  --hover: rgba(255, 255, 255, .06);
  --dash: #48484a;
  --ok: #34c759;
  --warn-bg: #3a2a10;
  --warn: #ffcc80;
  --on-ink-scheme: light;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, p, figure { margin: 0; }
.i { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--you); outline-offset: 2px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  background: var(--surface); font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background .15s, transform .15s var(--ease);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.primary:hover { background: var(--ink-hover); }
.btn.danger { color: var(--danger); }
.btn[aria-current] { background: var(--ink); color: var(--on-ink); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--ink-2); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.link, .back { display: inline-flex; align-items: center; gap: 2px; color: var(--you); font-size: 15px; font-weight: 500; }
.link:hover, .back:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 60px; padding: 0 20px;
  border-bottom: 1px solid var(--line);
  view-transition-name: top;
}
/* Blur auf Pseudo-Element: backdrop-filter am Header selbst würde den fixen Button einfangen */
.top::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--header);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.brand img { border-radius: 7px; }
.top-right { display: flex; align-items: center; gap: 8px; }
.anon :is(.me, #logoutBtn, #createBtn) { display: none; }
#themeBtn .moon, [data-theme="dark"] #themeBtn .sun { display: block; }
#themeBtn .sun, [data-theme="dark"] #themeBtn .moon { display: none; }
.me { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px; font-size: 14px; font-weight: 500; }
.me .av { width: 26px; height: 26px; font-size: 11px; }

#offline { display: none; }
.offline #offline {
  display: block; position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 20;
  padding: 6px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

/* ---------- Layout ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 32px 20px 48px; }
.disclaimer { max-width: 640px; margin: 0 auto; padding: 0 20px 32px; font-size: 12px; line-height: 1.5; color: var(--ink-2); text-align: center; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.eyebrow { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
.sub { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.back { margin: 0 0 10px -5px; }

.av {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c, #8e8e93); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em;
}

.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.dots i.on { background: var(--ink-2); box-shadow: none; }
.dots i.me { background: var(--you); box-shadow: none; }
.dots.lg { gap: 4px; }
.dots.lg i { width: 10px; height: 10px; }

/* ---------- Woche ---------- */
.pager { display: flex; padding: 3px; border-radius: 12px; background: var(--surface); }
.pager a { display: grid; place-items: center; min-width: 36px; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s, box-shadow .2s; }
.pager a:hover { color: var(--ink); }
.pager a:first-child, .pager a:last-child { padding: 0; }
.pager a[aria-current] { background: var(--ink); color: var(--on-ink); }

.week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.day { display: flex; flex-direction: column; gap: 10px; min-height: 400px; padding: 10px; border-radius: 22px; background: var(--surface); }
.day.today { background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 14px 36px rgba(0, 0, 0, .07); }
.day-head { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 14px; transition: background .15s; }
.day-head:hover { background: var(--hover); }
.dn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; font-size: 26px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.today .dn { background: var(--today); color: #fff; font-size: 20px; letter-spacing: -.02em; }
.dl { display: grid; min-width: 0; line-height: 1.25; }
.dl b { font-size: 15px; font-weight: 600; }
.dl small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-2); }
.today .dl b { color: var(--today); }
.past .dn, .past .dl b { color: var(--ink-3); }
.past .ev { opacity: .6; }
.day-body { display: flex; flex: 1; flex-direction: column; gap: 8px; }
.day-body:empty { display: none; }

.ev {
  display: flex; flex-direction: column; gap: 1px;
  padding: 12px 12px 11px; border-radius: 15px; background: var(--card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 0 0 .5px rgba(0, 0, 0, .07);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.ev:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .09), 0 0 0 .5px rgba(0, 0, 0, .07); }
.ev:active { transform: scale(.98); }
.ev.mine { box-shadow: 0 0 0 1.5px var(--you), 0 4px 14px rgba(10, 124, 255, .12); }
.ev-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ev-time { font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ev-role { padding: 2px 7px; border-radius: 6px; background: rgba(10, 124, 255, .1); color: var(--you); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ev-dest { margin-top: 3px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.ev-driver { font-size: 13px; color: var(--ink-2); }
.ev-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.faces { display: flex; gap: 4px; }
.faces .av { width: 24px; height: 24px; font-size: 10px; }
.faces i { width: 24px; height: 24px; box-sizing: border-box; border-radius: 50%; border: 1.5px dashed var(--dash); background: var(--card); }
.ev-free { font-size: 12px; font-weight: 600; color: var(--ok); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-free.full { color: var(--ink-3); }

/* Gefahrene Fahrten (30 Min. nach Abfahrt): ausgegraut, nicht mehr buchbar */
.ev.done { opacity: .5; filter: grayscale(1); box-shadow: 0 0 0 .5px var(--line); }
.ev.done:hover { transform: none; }
.ev.done .ev-free { color: var(--ink-2); }
.done-tag { display: inline-block; margin-left: 10px; padding: 3px 8px; border-radius: 6px; background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; letter-spacing: 0; vertical-align: middle; }
.ride.done .ride-time, .ride.done h2 { color: var(--ink-3); }
.ride.done .stage { filter: grayscale(1); opacity: .55; }

.slot {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; border-radius: 14px; border: 1.5px dashed var(--dash);
  color: var(--ink-3); font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.slot .i { width: 16px; height: 16px; }
.slot:hover { border-color: transparent; background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.today .slot:hover { background: var(--surface); box-shadow: none; }
.slot.empty { flex: 1; flex-direction: column; height: auto; min-height: 96px; }
.slot.empty .i { width: 22px; height: 22px; }

/* Wochenwechsel: seitlich gleiten statt überblenden */
.week { view-transition-name: week; }
html[data-slide] .ev { view-transition-name: none !important; }
html[data-slide="next"]::view-transition-old(week) { animation: .28s var(--ease) both slide-to-left; }
html[data-slide="next"]::view-transition-new(week) { animation: .28s var(--ease) both slide-from-right; }
html[data-slide="prev"]::view-transition-old(week) { animation: .28s var(--ease) both slide-to-right; }
html[data-slide="prev"]::view-transition-new(week) { animation: .28s var(--ease) both slide-from-left; }
@keyframes slide-to-left { to { opacity: 0; transform: translateX(-48px); } }
@keyframes slide-from-right { from { opacity: 0; transform: translateX(48px); } }
@keyframes slide-to-right { to { opacity: 0; transform: translateX(48px); } }
@keyframes slide-from-left { from { opacity: 0; transform: translateX(-48px); } }

/* ---------- Tag & Fahrt ---------- */
.strip { display: flex; gap: 2px; }
.strip a { display: grid; justify-items: center; gap: 1px; width: 46px; padding: 6px 0; border-radius: 12px; transition: background .15s; }
.strip a:hover { background: var(--surface); }
.strip span { font-size: 12px; color: var(--ink-2); }
.strip b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.strip a.today b { color: var(--today); }
.strip a[aria-current] { background: var(--ink); }
.strip a[aria-current] span { color: var(--on-ink-2); }
.strip a[aria-current] b { color: var(--on-ink); }

.ride { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); gap: 24px 56px; padding: 32px 0; border-top: 1px solid var(--line); }
.ride-info { padding-top: 8px; }
.ride-time { font-size: 44px; font-weight: 600; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.ride-time span { margin-left: 10px; font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.ride h2 { margin: 12px 0 14px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.capacity { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.capacity b { color: var(--ink); font-weight: 600; }
.people { list-style: none; margin: 24px 0 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.people li:last-child { border-bottom: 1px solid var(--line); }
.pn { font-weight: 500; }
.tag { font-size: 13px; color: var(--ink-2); }
.tag.you { color: var(--you); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.more { display: flex; justify-content: center; padding-top: 8px; }
.blank { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 72px 16px; border-radius: 20px; background: var(--surface); color: var(--ink-2); text-align: center; }

/* ---------- Zettel ---------- */
.notes { margin-top: 28px; }
.notes h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.notes h3 .i { color: var(--note-accent); }
.notes h3 small { padding: 1px 7px; border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.notes ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 12px; margin: 0 0 16px; padding: 6px 0 0; list-style: none; }
.note {
  position: relative; padding: 12px 12px 14px; border-radius: 3px 3px 14px 3px;
  background: var(--note); color: var(--note-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 18px rgba(0, 0, 0, .07);
  transform: rotate(-.7deg);
}
.note:nth-child(even) { transform: rotate(.6deg); }
.note::before { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--today); box-shadow: 0 2px 3px rgba(0, 0, 0, .3), inset 0 -2px 0 rgba(0, 0, 0, .15); }
.note-head { display: flex; align-items: center; gap: 8px; min-height: 26px; font-size: 13px; }
.note-head .av { width: 22px; height: 22px; font-size: 9px; }
.note-head .icon-btn { width: 26px; height: 26px; margin-left: auto; color: inherit; opacity: .55; }
.note-head .icon-btn:hover { opacity: 1; background: rgba(0, 0, 0, .07); }
.note-head .icon-btn .i { width: 15px; height: 15px; }
.note p { margin: 8px 0 0; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.notes-empty { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.notes-hint { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.note-form { display: flex; gap: 8px; }
.note-form input { flex: 1; height: 42px; font-size: 15px; }
.ride.done .note { filter: grayscale(.7); opacity: .75; }
.ev-right { display: flex; align-items: center; gap: 8px; }
.ev-notes { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--note-accent); font-variant-numeric: tabular-nums; }
.ev-notes .i { width: 14px; height: 14px; }

/* ---------- Auto ---------- */
.stage { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 36px 24px 22px; border-radius: 28px; background: var(--surface); }
.stage figcaption { font-size: 14px; color: var(--ink-2); text-align: center; }
.car { position: relative; width: min(100%, 320px); aspect-ratio: 1 / 2; container-type: inline-size; }
.car > svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .14)) drop-shadow(0 3px 5px rgba(0, 0, 0, .08)); }

.seat {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqw;
  padding-bottom: 4.5cqw;
  border-radius: 5cqw 5cqw 3.5cqw 3.5cqw;
  background: linear-gradient(180deg, #54575e, #414449);
  box-shadow: 0 1.5cqw 3cqw rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .55); font-size: 3.6cqw; font-weight: 500;
  transition: transform .25s var(--ease), background .2s, box-shadow .25s var(--ease), color .2s;
}
.seat > * { position: relative; }
/* Rückenlehne */
.seat::before { content: ""; position: absolute; left: 7%; right: 7%; bottom: 5%; height: 22%; border-radius: 3cqw; background: rgba(0, 0, 0, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); }
/* Kopfstütze */
.seat::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -2.5cqw; height: 4.5cqw; border-radius: 2cqw; background: inherit; box-shadow: 0 1cqw 2cqw rgba(0, 0, 0, .3); }
.seat .i { width: 6cqw; height: 6cqw; }
.seat .av { width: 10cqw; height: 10cqw; font-size: 3.8cqw; box-shadow: 0 0 0 .6cqw rgba(255, 255, 255, .95); }
.seat .nm { max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.seat.driver { left: 22%; top: 45.25%; width: 23.5%; height: 13.5%; }
.seat.front { left: 54.5%; top: 45.25%; width: 23.5%; height: 13.5%; }
.seat.rearL, .seat.rearM, .seat.rearR { top: 63.1%; width: 19%; height: 15.4%; }
.seat.rearL { left: 21%; }
.seat.rearM { left: 40.5%; }
.seat.rearR { left: 60%; }

.seat.free { color: rgba(255, 255, 255, .8); }
.seat.free:hover { transform: translateY(-.8cqw); background: linear-gradient(180deg, #62666e, #4c4f55); color: #fff; box-shadow: 0 0 0 .7cqw rgba(255, 255, 255, .5), 0 3cqw 5cqw rgba(0, 0, 0, .45); }
.seat.taken { background: linear-gradient(180deg, #fbfbfc, #e3e3e8); color: var(--ink); }
.seat.taken::before { background: rgba(0, 0, 0, .07); }
.seat.me { background: linear-gradient(180deg, #3a95ff, #0a7cff); color: #fff; box-shadow: 0 0 0 .8cqw #fff, 0 2.5cqw 6cqw rgba(10, 124, 255, .45); }
.seat.me::before { background: rgba(0, 0, 0, .14); }
.seat .check {
  position: absolute; top: -2.2cqw; right: -2.2cqw; display: grid; place-items: center;
  width: 7cqw; height: 7cqw; border-radius: 50%; background: #fff; color: var(--you);
  box-shadow: 0 1cqw 2.5cqw rgba(0, 0, 0, .3);
}
.seat .check .i { width: 4.6cqw; height: 4.6cqw; stroke-width: 3.2; }
.seat.off { background: #26282c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); cursor: default; }
.seat.pop { animation: pop .45s var(--ease); }
.seat:active:not(:disabled) { transform: scale(.96); }
.seat:focus-visible { outline: .8cqw solid var(--you); outline-offset: 1cqw; border-radius: 5cqw 5cqw 3.5cqw 3.5cqw; }
@keyframes pop { 0% { transform: scale(.88); } 55% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ---------- Willkommen ---------- */
.welcome { max-width: 400px; margin: 12vh auto 0; }
.welcome .sub { margin: 10px 0 28px; line-height: 1.45; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.auth-brand img { border-radius: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .field { font-size: 14px; }
.auth-form .btn { height: 48px; font-size: 16px; }
.auth-form .btn:disabled { opacity: .6; cursor: progress; }
.question { font-size: 16px; font-weight: 600; color: var(--ink); }
.switch { margin-top: 20px; font-size: 15px; color: var(--ink-2); }
.switch .link { margin-left: 4px; }

/* ---------- Formular / Dialog ---------- */
dialog {
  width: min(440px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 20px;
  background: var(--card); color: var(--ink); box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
}
dialog[open] { animation: rise .32s var(--ease); }
dialog::backdrop { background: rgba(0, 0, 0, .28); animation: fade .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
dialog form { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px 24px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; }
.dlg-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
legend { padding: 0; margin-bottom: 6px; }
input:not([type="radio"]) {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent;
  background: var(--surface); font: inherit; font-size: 16px; color: var(--ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input:focus { outline: none; border-color: var(--you); background: var(--card); box-shadow: 0 0 0 3px rgba(10, 124, 255, .18); }
input:disabled { color: var(--ink-2); }
/* Auswahl-Kacheln: gewählt = schwarz, damit man auf einen Blick sieht, was eingestellt ist */
.day-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.time-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
:is(.day-pick, .segmented) label { position: relative; }
:is(.day-pick, .segmented) input { position: absolute; opacity: 0; pointer-events: none; }
:is(.day-pick, .segmented) span, .time-pick button {
  display: grid; place-items: center; border-radius: 10px; background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background .15s, color .15s, transform .15s var(--ease);
}
.segmented span, .time-pick button { height: 44px; }
.day-pick span { gap: 0; padding: 7px 0 6px; line-height: 1.2; }
.day-pick b { font-size: 17px; font-weight: 600; }
.day-pick small { font-size: 11px; font-weight: 500; color: var(--ink-2); }
:is(.day-pick, .segmented) span:hover, .time-pick button:hover { background: var(--surface-2); }
:is(.day-pick, .segmented) input:checked + span, .time-pick button[aria-pressed="true"], .time-pick input.custom {
  background: var(--ink); color: var(--on-ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.day-pick input:checked + span small { color: var(--on-ink-2); }
.day-pick input:disabled:not(:checked) + span { opacity: .35; cursor: default; background: var(--surface); }
.day-pick input:checked:disabled + span { cursor: default; }
:is(.day-pick, .segmented) span:active, .time-pick button:active { transform: scale(.96); }
:is(.day-pick, .segmented) input:focus-visible + span { outline: 2px solid var(--you); outline-offset: 2px; }
.dest-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.dest-pick:empty { display: none; }
.dest-pick button {
  height: 36px; padding: 0 12px; border-radius: 10px; background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 500; transition: background .15s, color .15s, transform .15s var(--ease);
}
.dest-pick button:hover { background: var(--surface-2); }
.dest-pick button:active { transform: scale(.96); }
.dest-pick button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }

/* Live-Zusammenfassung: was gleich erstellt wird */
.summary { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.summary b { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.summary span { font-size: 14px; color: var(--ink-2); }
.summary em { font-style: normal; color: var(--danger); }
.time-pick input { height: 44px; padding: 0 8px; text-align: center; font-size: 15px; }
.time-pick input.custom { border-color: transparent; color-scheme: var(--on-ink-scheme); }
.form-err { min-height: 18px; margin: -6px 0 -8px; color: var(--danger); font-size: 14px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100;
  max-width: min(440px, calc(100vw - 32px)); padding: 11px 16px; border-radius: 12px;
  background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 500; text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  transition: transform .3s var(--ease), opacity .2s;
  view-transition-name: toast;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast.err { background: var(--danger); }

/* ---------- Übergänge ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
::view-transition-group(*) { animation-duration: .32s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .week { grid-template-columns: 1fr; gap: 10px; }
  .day { min-height: 0; }
  .day-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
  .slot { grid-column: 1 / -1; }
  .slot.empty { flex-direction: row; min-height: 48px; }
  .ride { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  main { padding: 20px 16px 32px; }
  .disclaimer { padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 28px; }
  .top { padding: 0 16px; }
  .btn.fab {
    position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 30;
    width: 56px; height: 56px; padding: 0; border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  }
  .fab .i { width: 24px; height: 24px; }
  .fab span { display: none; }
  #toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .page-head { align-items: flex-start; flex-direction: column; }
  .strip { width: 100%; justify-content: space-between; }
  .strip a { flex: 1; }
  .ride-time { font-size: 38px; }
  .stage { padding: 28px 12px 18px; border-radius: 22px; }
  .car { width: min(100%, 300px); }
  dialog { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; }
  dialog[open] { animation-name: sheet; }
  @keyframes sheet { from { transform: translateY(100%); } }
  dialog form { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
