/* Kartbahn Schleswig – Design-System
   Neutrales Dunkel, eine Akzentfarbe (Rennrot), Inter als UI-Schrift. */
:root {
  --bg0: #0b0c0f;      /* Seite */
  --bg1: #121418;      /* Fläche */
  --bg2: #191c22;      /* erhöht / hover */
  --bg3: #21252d;      /* aktiv */
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #f2f3f5;
  --muted: #9ba1ab;
  --faint: #666c76;
  --red: #e5232e;
  --red-hover: #c91d27;
  --red-soft: rgba(229, 35, 46, .12);
  --ok: #3fb950;
  --ok-soft: rgba(63, 185, 80, .12);
  --warn: #d4a72c;
  --warn-soft: rgba(212, 167, 44, .12);
  --radius: 12px;
  --radius-s: 8px;
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-brand: 'Poppins', var(--font-ui);
  /* Alt-Aliase */
  --bg: var(--bg0); --bg-deep: var(--bg0); --card: var(--bg1); --card-2: var(--bg2);
  --orange: var(--warn); --crimson: var(--red-hover);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

::selection { background: var(--red); color: #fff; }

html { color-scheme: dark; }

body {
  font-family: var(--font-ui);
  font-size: 14px;
  background: var(--bg0);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.icon { width: 16px; height: 16px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; display: inline-block; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 12, 15, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: 1100px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-brand); font-weight: 700; font-size: .95rem; letter-spacing: .01em; }
.logo em { color: var(--red); font-style: normal; }
nav.main { display: flex; gap: 4px; }
nav.main a {
  padding: 7px 14px; border-radius: var(--radius-s); font-size: .82rem; font-weight: 500;
  color: var(--muted); transition: color .15s, background-color .15s;
}
nav.main a:hover { color: var(--text); background: var(--bg2); }

/* ---------- Portal ---------- */
.portal { padding: 48px 20px 64px; max-width: 760px; }
.portal-title { font-size: 1.65rem; font-weight: 650; letter-spacing: -.02em; }
.portal-title span { color: inherit; }
.portal-sub { color: var(--muted); margin: 8px 0 32px; font-size: .9rem; max-width: 56ch; }

.tabs {
  display: inline-flex; gap: 2px; margin-bottom: 20px; padding: 3px;
  background: var(--bg1); border: 1px solid var(--line); border-radius: 10px;
}
.tab {
  font-family: inherit; font-size: .84rem; font-weight: 500; cursor: pointer;
  background: none; border: 0; color: var(--muted); padding: 8px 16px;
  border-radius: 7px; transition: color .15s, background-color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--bg3); }

/* ---------- Karten / Formulare ---------- */
.card { background: var(--bg1); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.grid { display: grid; gap: 14px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

label { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); margin-bottom: 6px; letter-spacing: .01em; }
input, select, textarea {
  width: 100%; font-family: inherit; font-size: .88rem;
  background: var(--bg0); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: var(--radius-s); padding: 9px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); outline: none; }
input[type='date'], input[type='time'], input[type='number'] { font-variant-numeric: tabular-nums; }
.field { margin-bottom: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  padding: 9px 18px; border-radius: var(--radius-s); font-weight: 550; font-size: .86rem;
  background: var(--red); color: #fff; transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--red-hover); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn.ghost:hover { border-color: var(--faint); background: var(--bg2); }
.btn.orange { background: var(--red); }
.btn.orange:hover { background: var(--red-hover); }
.btn.warn { background: transparent; border-color: var(--line-strong); color: var(--warn); }
.btn.warn:hover { border-color: var(--warn); background: var(--warn-soft); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { padding: 5px 12px; font-size: .78rem; font-weight: 500; }

/* ---------- Wizard ---------- */
.wiz-steps { display: flex; gap: 0; list-style: none; margin-bottom: 28px; flex-wrap: wrap; }
.wiz-steps li {
  display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 500;
  color: var(--faint);
}
.wiz-steps li span {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: var(--bg2); border: 1px solid var(--line);
  font-size: .68rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.wiz-steps li.on { color: var(--text); }
.wiz-steps li.on span { background: var(--red); border-color: var(--red); color: #fff; }
.wiz-steps li.done { color: var(--muted); }
.wiz-steps li.done span { background: transparent; border-color: var(--ok); color: var(--ok); }
.wiz-steps li:not(:last-child)::after { content: ''; width: 26px; height: 1px; background: var(--line-strong); margin: 0 12px; }

.wiz-panel h3 { margin-bottom: 16px; }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- Fahrten-Auswahl ---------- */
.p-group-label {
  font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
  color: var(--faint); margin: 18px 0 8px;
}
.p-group-label:first-child { margin-top: 0; }
.p-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: transparent; margin-bottom: 6px; transition: border-color .15s, background-color .15s;
}
.p-row.picked { border-color: var(--line-strong); background: var(--bg2); }
.p-row .p-name { font-weight: 550; font-size: .86rem; }
.p-row .p-desc { color: var(--muted); font-size: .74rem; margin-top: 1px; }
.p-row .p-price { font-weight: 600; font-size: .86rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; }
.qty button {
  width: 32px; height: 32px; border: 0; background: transparent; color: var(--text);
  font-size: 1rem; font-weight: 500; cursor: pointer; transition: background-color .15s; line-height: 1;
}
.qty button:hover:not(:disabled) { background: var(--bg3); }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty .qty-val { min-width: 30px; text-align: center; font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; }

.cart-total {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px;
  padding: 12px 14px; border-radius: 10px; background: var(--bg2); font-size: .82rem; color: var(--muted);
}
.cart-total strong { color: var(--text); font-size: .95rem; font-variant-numeric: tabular-nums; }

/* ---------- Slots ---------- */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 7px; }
.slot {
  border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 8px 4px;
  text-align: center; cursor: pointer; background: transparent;
  transition: background-color .12s, border-color .12s;
}
.slot .t { font-weight: 600; font-size: .86rem; font-variant-numeric: tabular-nums; }
.slot .f { font-size: .64rem; color: var(--muted); margin-top: 1px; }
.slot:hover:not(.off):not(.selected) { background: var(--bg2); }
.slot.selected { border-color: var(--red); background: var(--red); }
.slot.selected .f { color: rgba(255,255,255,.75); }
.slot.off { opacity: .38; cursor: not-allowed; }

.slot-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .72rem; color: var(--muted); }
.slot-legend span { display: inline-flex; align-items: center; gap: 6px; }
.slot-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.slot-legend i.l-free { background: var(--ok); }
.slot-legend i.l-few { background: var(--warn); }
.slot-legend i.l-full { background: var(--faint); }
.slot-legend i.l-event { background: var(--red); }

/* ---------- Hinweise / Zusammenfassung ---------- */
.notice { background: var(--bg2); border: 1px solid var(--line); padding: 10px 14px; border-radius: var(--radius-s); font-size: .82rem; color: var(--muted); margin: 14px 0; }
.notice.ok { background: var(--ok-soft); border-color: transparent; color: #7ee294; }
.notice.err { background: var(--red-soft); border-color: transparent; color: #ff8b91; }

.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.summary-row:last-child { border-bottom: 0; }
.summary-row > span:first-child { color: var(--muted); }
.summary-row strong { font-variant-numeric: tabular-nums; }
.wiz-summary { margin-top: 18px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg0); }

.panel-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; font-size: 1rem; font-weight: 600; }
.panel-head .icon { width: 20px; height: 20px; }
.panel-head.ok { color: var(--ok); }
.panel-head.wait { color: var(--warn); }

.success-code {
  font-size: 1.5rem; font-weight: 650; letter-spacing: .14em; text-align: center;
  padding: 16px; border: 1px dashed var(--line-strong); border-radius: 10px; margin: 16px 0;
  background: var(--bg0); font-variant-numeric: tabular-nums;
}

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 24px 0; margin-top: 48px; }
footer .fine { color: var(--faint); font-size: .74rem; line-height: 1.8; }
