:root {
  --bg: #f6f3ee;
  --card: #ffffff;
  --text: #1f2a2e;
  --muted: #66727a;
  --line: #e4ded4;
  --accent: #2f6f62;
  --accent-ink: #ffffff;
  --accent-soft: #e3efeb;
  --danger: #b4443a;
  --ok-bg: #e3efeb;
  --err-bg: #f8e4e1;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a1c;
    --card: #1d2528;
    --text: #e8eceb;
    --muted: #97a3a6;
    --line: #2e393c;
    --accent: #6cbfa9;
    --accent-ink: #0f1a17;
    --accent-soft: #23332f;
    --danger: #e0786d;
    --ok-bg: #23332f;
    --err-bg: #3a2522;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .75rem; }
.card h2:first-child { margin-top: 0; }

.shell { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

/* Fortschritt */
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; counter-reset: s; }
.steps li {
  flex: 1; counter-increment: s; font-size: .85rem; color: var(--muted);
  border-top: 3px solid var(--line); padding-top: 6px;
}
.steps li::before { content: counter(s) ". "; }
.steps li.active { color: var(--text); border-color: var(--accent); font-weight: 600; }
.steps li.done { border-color: var(--accent); }

/* Buttons */
button { font: inherit; cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  border-radius: 10px; padding: 12px 18px; font-weight: 600; text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 6px 10px; font-size: .85rem; }
.link { background: none; border: 0; color: var(--accent); padding: 0; margin-bottom: 12px; }
.icon {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 1.2rem;
}
.icon:disabled { opacity: .35; cursor: default; }

/* Leistungen */
.services { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.service {
  text-align: left; padding: 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); display: flex; flex-direction: column; gap: 4px;
}
.service:hover { border-color: var(--accent); background: var(--accent-soft); }
.s-name { font-weight: 600; font-size: 1.05rem; }
.s-meta { color: var(--muted); font-size: .9rem; }

/* Kalender */
.picker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 12px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd span { text-align: center; font-size: .75rem; color: var(--muted); padding-bottom: 4px; }
.day {
  aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--accent-soft);
  color: var(--text); font-weight: 600;
}
.day:hover:not(:disabled) { outline: 2px solid var(--accent); }
.day:disabled { background: transparent; color: var(--muted); opacity: .5; font-weight: 400; cursor: default; }
.day.loading { opacity: .3; }
.day.today { text-decoration: underline; }
.day.selected { background: var(--accent); color: var(--accent-ink); }
.span7 { grid-column: 1 / -1; }

.slots-title { font-weight: 600; margin: 6px 0 12px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.slot {
  padding: 10px 0; border-radius: 10px; border: 1px solid var(--accent);
  background: transparent; color: var(--accent); font-weight: 600;
}
.slot:hover { background: var(--accent); color: var(--accent-ink); }

/* Formulare */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-size: .9rem; font-weight: 500; }
input, textarea {
  font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.summary { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); }
.notice.ok { background: var(--ok-bg); }
.notice.err { background: var(--err-bg); color: var(--danger); }

/* Bestätigung */
.done-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 1.8rem; margin-bottom: 12px;
}
.cal-buttons { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* Admin */
.admin-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.day-head { font-size: .95rem; margin: 20px 0 8px; color: var(--muted); }
.booking {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: start;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.booking .time { font-weight: 700; }
.booking.is-block { opacity: .7; }
.copy { font-size: .8rem; }

@media (max-width: 720px) {
  .picker, .admin-grid { grid-template-columns: 1fr; }
  .booking { grid-template-columns: 1fr; gap: 4px; }
  .card { padding: 18px; }
  .steps li { font-size: .75rem; }
}
