/* CHEX · Startseite und Fahrten: Begrüßung, nächste Fahrt, Datumsleiste, Fahrtkarten, Zeitleiste, Autos, Buchen. */
/* ---------- Hero ---------- */
.hero {
  position: relative; margin: 8px 0 32px; padding: 32px 24px 24px; border-radius: 28px;
  background: var(--bg-elev); box-shadow: var(--shadow-sm); border: 1px solid var(--card-border);
}
.hero h1 { font-size: 40px; line-height: 1.04; letter-spacing: -.04em; }
.hero p { color: var(--text-2); font-size: 17px; margin: 12px 0 0; max-width: 34ch; }
.hero-install { margin-top: 16px; font-size: 15px; }
@media (min-width: 760px) { .hero { padding: 48px 44px 40px; } .hero h1 { font-size: 56px; } .hero p { font-size: 19px; } }

/* ---------- „Deine nächste Fahrt“ (Bordkarte) ---------- */
.next {
  position: relative; isolation: isolate; overflow: hidden; display: block;
  margin: 8px 0 32px; padding: 24px 24px 20px; border-radius: 28px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #ff8f2e 0%, #f44a1f 48%, #de2c18 100%);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .28);
  transition: transform .2s var(--ease-out);
}
.next::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 90% 0%, rgba(255, 255, 255, .28), transparent 70%),
    radial-gradient(55% 60% at 0% 100%, rgba(255, 214, 10, .3), transparent 70%);
}
.next:active { transform: scale(.985); }
.next-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.next .eyebrow { color: rgba(255, 255, 255, .78); margin: 0; }
.next .badge.badge { background: rgba(255, 255, 255, .2); color: #fff; }
.next .count { font-size: 34px; margin: 8px 0 22px; color: #fff; }
.next-route { display: flex; align-items: center; gap: 14px; }
.next-route > div:not(.track) { display: flex; flex-direction: column; min-width: 0; }
.next-route b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.next-route span { font-size: 14px; color: rgba(255, 255, 255, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-route .end { align-items: flex-end; text-align: right; }
.track { flex: 1; min-width: 40px; position: relative; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .3); }
.track::before {
  content: ""; position: absolute; inset: -3px auto auto -1px; width: 8px; height: 8px; border-radius: 50%; background: #fff;
}
.track::after {
  content: ""; position: absolute; inset: -3px -1px auto auto; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 2px #fff;
}


/* ---------- Datumsleiste ---------- */
.datebar {
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top)); z-index: 20;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 6px -16px 18px; padding: 8px 16px 10px; /* oben Abstand zu den Filter-Knöpfen */
  background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--material-border);
}
.datebar::-webkit-scrollbar { display: none; }
.datebar button {
  position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 54px; height: 54px; border: 0; border-radius: 16px; background: transparent; color: var(--text); cursor: pointer;
  font: inherit; transition: background .25s var(--ease), color .25s, transform .35s var(--spring);
}
.datebar button:active { transform: scale(.9); }
.datebar small { font-size: 11px; font-weight: 600; color: var(--text-2); letter-spacing: 0; transition: color .25s; }
.datebar b { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.datebar button.active { background: var(--accent-bg); color: #fff; }
.datebar button.active small { color: rgba(255, 255, 255, .85); }
.datebar button.mine::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.datebar button.mine.active::after { background: #fff; }
@media (min-width: 900px) { .datebar { margin: 6px -32px 18px; padding: 8px 32px 10px; } }
.day { scroll-margin-top: calc(var(--bar-h) + env(safe-area-inset-top) + 86px); }

/* ---------- Feste Buchungsleiste ---------- */
.main:has(> .bookbar) { padding-bottom: 110px; }
.bookbar {
  position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 10px);
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 20px; border-radius: 26px;
  background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-md), inset 0 0 0 .5px var(--material-border);
}
.enter > .bookbar, .bookbar { animation: bar-in .7s var(--spring) both .25s; }
.bb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bb-info b { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bb-info span { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bookbar .btn { flex: none; min-width: 148px; }
@media (min-width: 760px) {
  .bookbar { left: 50%; right: auto; width: min(560px, calc(100vw - 48px)); translate: -50% 0; bottom: 24px; }
}
@keyframes bar-in { from { opacity: 0; transform: translateY(40px) scale(.96); } }

/* ---------- Action-Sheet ---------- */
.sheet-ask { text-align: center; padding-top: 4px; }
.sheet-ask h3 { font-size: 20px; margin-bottom: 6px; }
.sheet-ask p { color: var(--text-2); font-size: 15px; margin: 0 auto; max-width: 34ch; }
.sheet-actions { display: grid; gap: 10px; margin-top: 22px; }
.btn.danger-solid { background: #ff3b30; color: #fff; }
@media (hover: hover) { .btn.danger-solid:hover { background: #e5352b; } }

/* ---------- Tage & Fahrtkarten ---------- */
.day { margin-bottom: 30px; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 12px; }
.day-head .link-btn { color: var(--text-2); font-size: 14px; } /* steht an jedem Tag – leise, nicht in Akzentfarbe */
.day-head .link-btn:hover { color: var(--text); }
.day-list { display: grid; gap: 12px; }
@media (min-width: 860px) { .day-list { grid-template-columns: 1fr 1fr; } }

.ride-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 18px 18px 18px 20px; border-radius: var(--radius); color: var(--text);
  background: var(--bg-elev); box-shadow: var(--shadow-sm); border: 1px solid var(--card-border);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), opacity .3s;
}
@media (hover: hover) { .ride-card:hover { box-shadow: var(--shadow-md); } }
.ride-card:active { transform: scale(.975); transition-duration: .2s; }
.ride-card.cancelled, .ride-card.past { opacity: .5; }
.rc-time { display: flex; flex-direction: column; min-width: 62px; }
.rc-time b { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.rc-time span { margin-top: 7px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rc-stop {
  position: relative; padding-left: 18px; font-weight: 600; font-size: 16px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rc-stop::before {
  content: ""; position: absolute; left: 1px; top: calc(.7em - 4.5px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.rc-stop.to::before { background: transparent; box-shadow: inset 0 0 0 2px var(--text-3); }
.rc-stop.from::after {
  content: ""; position: absolute; left: 4.5px; top: calc(.7em + 7px); width: 2px; height: calc(.7em + 2px); border-radius: 1px; background: var(--fill-3);
}
.rc-meta {
  margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-price { margin-top: 4px; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.rc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.seats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; max-width: 58px; }
.seat { display: block; width: 9px; height: 11px; border-radius: 3.5px 3.5px 2px 2px; background: var(--green); }
.seat.taken { background: var(--fill-3); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 980px;
  font-size: 12px; font-weight: 600; letter-spacing: 0; line-height: 1.45; white-space: nowrap;
}
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.grey { background: var(--grey-soft); color: var(--grey); }

/* ---------- Route (Zeitleiste) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 56px 24px 1fr; align-items: start;
  animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms);
}
.timeline .t { font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.timeline .rail { position: relative; align-self: stretch; min-height: 30px; }
.timeline .rail::before {
  content: ""; position: absolute; z-index: 1; left: 5px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-elev); box-shadow: inset 0 0 0 3px var(--text-3); transition: box-shadow .35s var(--ease), background .35s;
}
.timeline li:not(:last-child) .rail::after {
  content: ""; position: absolute; left: 11px; top: 22px; bottom: -4px; width: 2px; border-radius: 1px;
  background: var(--fill-3); transform-origin: top; transition: background .35s;
  animation: grow .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 260ms);
}
.timeline li.sel .rail::before { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.timeline li.sel:has(+ li.sel) .rail::after { background: var(--green); }
.timeline b { font-weight: 600; }
.timeline .seg { color: var(--text-2); font-size: 13px; padding: 2px 0 16px; }

/* ---------- Auto & Sitzplätze ---------- */
.car-wrap { display: flex; align-items: center; gap: 24px; }
.car-info { min-width: 0; }
.car-info h3 { font-size: 20px; margin-bottom: 4px; }
.car-info p { color: var(--text-2); margin: 0; }
.car {
  position: relative; flex: none; display: grid; grid-template-columns: repeat(3, 24px); gap: 8px 7px;
  padding: 24px 12px 14px; border-radius: 30px 30px 16px 16px; background: var(--fill-2);
}
.car::before { content: ""; position: absolute; top: 9px; left: 24%; right: 24%; height: 4px; border-radius: 2px; background: var(--fill-3); }
.seat-lg {
  display: block; width: 24px; height: 28px; border-radius: 9px 9px 6px 6px;
  background: var(--green-soft); box-shadow: inset 0 0 0 2px var(--green);
  animation: pop .55s var(--spring) both; animation-delay: calc(var(--k, 0) * 60ms + 250ms);
}
.seat-lg.taken { background: var(--fill-3); box-shadow: none; }
.seat-lg.driver { display: grid; place-items: center; background: var(--text); box-shadow: none; color: var(--bg-elev); }
.seat-lg.driver svg { width: 17px; height: 17px; }
.seat-lg.mini { display: inline-block; width: 12px; height: 14px; border-radius: 4px 4px 3px 3px; box-shadow: inset 0 0 0 1.5px var(--green); animation: none; vertical-align: -2px; }
.seat-lg.mini.taken { box-shadow: none; background: #636366; }
.seat-lg.mini:not(.taken) { background: #34c759; box-shadow: none; }
/* Draufsicht der Autos */
.car-svg { flex: none; width: 116px; height: auto; overflow: visible; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .18)); }
.car-svg.white { width: 122px; }
.car-svg .cv-tire { fill: #1c1c1e; }
.car-svg.red .cv-body { fill: #c8102e; }
.car-svg.white .cv-body { fill: #f7f7f5; stroke: #c7c7cc; stroke-width: 1; }
.car-svg .cv-light { fill: #f2f2f7; }
.car-svg.white .cv-light { fill: #d8dde6; }
.car-svg .cv-tail { fill: #7a0012; }
.car-svg.white .cv-tail { fill: #d70015; }
.car-svg .cv-crease { fill: none; stroke: rgba(0, 0, 0, .14); stroke-width: 1.2; }
.car-svg .cv-grille { fill: #3a3a3c; }
.car-svg .cv-glass { fill: #2a3646; opacity: .85; }
.car-svg .cv-cabin { fill: #2c2c2e; }
.car-svg .cv-console { fill: #3a3a3c; }
.car-svg .cv-wheel { fill: none; stroke: #8e8e93; stroke-width: 2.5; }
.car-svg .cv-door { stroke: #c7c7cc; stroke-width: 2; stroke-dasharray: 3 3; }
.car-svg .sv { transform-box: fill-box; transform-origin: center; animation: pop .55s var(--spring) both; animation-delay: calc(var(--k, 0) * 60ms + 250ms); }
.car-svg .sv rect { fill: #34c759; }
.car-svg .sv .sv-back { fill: #248a3d; }
.car-svg .sv.taken rect { fill: #636366; }
.car-svg .sv.taken .sv-back { fill: #48484a; }
.car-svg .sv.driver rect { fill: #48484a; }
.car-svg .sv.driver .sv-back { fill: #3a3a3c; }
.car-svg .sv.off rect { fill: #3a3a3c; }
.car-svg .sv.off .sv-back { fill: #333336; }
.vdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.vdot.red { background: #c8102e; }
.vdot.white { background: #f7f7f5; box-shadow: inset 0 0 0 1px var(--fill-3); }
.legend { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Buchen ---------- */
.group { background: var(--fill-2); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.group-row {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 54px; margin: 0; padding: 6px 8px 6px 16px; font-size: 17px; font-weight: 400; color: var(--text);
}
.group-row + .group-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--sep); }
.group-row small { display: block; font-size: 13px; color: var(--text-2); margin-top: 1px; }
.group-row select {
  width: auto; max-width: 64%; min-height: 40px; padding: 6px 30px 6px 8px;
  background-color: transparent; color: var(--text-2); text-align: right; text-align-last: right;
}
.group-row select:focus { background-color: transparent; box-shadow: none; color: var(--accent); }
.group-row input[type=checkbox] { margin-right: 6px; }
.mybook-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mybook-head h3 { margin: 0; }
.redeem-inline { margin-top: 16px; }
/* „Neu bei CHEX“ auf der Startseite */
.news-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.news h3 { margin: 0; }
.news ul { margin: 8px 0 6px; padding-left: 18px; }
.news li { margin: 3px 0; }
/* Mehrere Fahrer: Fahrer an Fahrtkarte und Fahrt */
.rc-driver { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.rc-driver .av { width: 20px; height: 20px; font-size: 9px; }
.driver-line { display: flex; align-items: center; gap: 8px; margin: 6px 0 8px; font-size: 14px; }
