/* Kerzenziehen Hottingen — Oberfläche
   Farben liegen alle in :root. Wer das Aussehen ändern will, ändert nur hier. */

:root {
  --papier: #f5f6f3;
  --papier-tief: #eceee9;
  --tinte: #172b2a;
  --tinte-leise: #5d6b69;
  --linie: #d4d9d3;
  --petrol: #10504c;
  --petrol-hell: #1d6f68;
  --docht: #c8871b;
  --voll: #9a3b25;
  --weiss: #ffffff;
  --radius: 10px;
  --spalte: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: Karla, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

h1 { font-size: 1.85rem; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }

p { margin: 0.5rem 0; }
a { color: var(--petrol); }

.huelle {
  max-width: var(--spalte);
  margin: 0 auto;
  padding: 1.25rem 1.1rem 6rem;
}

/* ---------------------------------------------------------- Kopfzeile */

.kopf {
  border-bottom: 1px solid var(--linie);
  background: var(--weiss);
}
.kopf .huelle { padding: 0.9rem 1.1rem; display: flex; align-items: baseline; gap: 0.6rem; }
.kopf a { color: var(--tinte); text-decoration: none; font-family: Fraunces, Georgia, serif; font-size: 1.05rem; }
.kopf .ort { color: var(--tinte-leise); font-size: 0.82rem; margin-left: auto; }

.einleitung { color: var(--tinte-leise); margin-bottom: 1.4rem; }
.einleitung ul { margin: 0.6rem 0 0; padding-left: 1.1rem; }
.einleitung li { margin: 0.15rem 0; }

/* ------------------------------------------------------------ Formular */

.karte {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1.4rem;
}

label { display: block; font-size: 0.88rem; margin-bottom: 0.2rem; color: var(--tinte-leise); }

input[type="text"], input[type="tel"], input[type="email"],
input[type="number"], input[type="password"], select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: var(--weiss);
  color: var(--tinte);
  font: inherit;
  font-size: 1rem;
}
input:focus-visible, select:focus-visible, button:focus-visible, .slot:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 2px;
}

.feld + .feld { margin-top: 0.75rem; }
.feld-paar { display: flex; gap: 0.75rem; }
.feld-paar > * { flex: 1; }

.hinweis { font-size: 0.82rem; color: var(--tinte-leise); margin-top: 0.35rem; }

button {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--petrol);
  background: var(--petrol);
  color: var(--weiss);
  padding: 0.6rem 1rem;
  cursor: pointer;
}
button:hover { background: var(--petrol-hell); border-color: var(--petrol-hell); }
button.leise { background: transparent; color: var(--petrol); }
button.leise:hover { background: var(--papier-tief); }
button.gefahr { background: transparent; color: var(--voll); border-color: var(--voll); }
button:disabled { opacity: 0.45; cursor: default; }

.knopfreihe { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }

/* -------------------------------------------------- Zeitfenster-Liste */

.tag {
  border-top: 1px solid var(--linie);
  padding-top: 0.7rem;
  margin-top: 1.1rem;
}
.tag h3 { display: flex; align-items: baseline; gap: 0.5rem; }
.tag h3 .rest { margin-left: auto; font-family: Karla, sans-serif; font-size: 0.78rem; font-weight: 400; color: var(--tinte-leise); }

.slot {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  text-align: left;
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  margin-top: 0.5rem;
  color: var(--tinte);
  cursor: pointer;
}
.slot:hover:not(:disabled) { border-color: var(--petrol); background: var(--weiss); }
.slot:disabled { cursor: default; background: var(--papier-tief); color: var(--tinte-leise); }

.slot .zeit { font-variant-numeric: tabular-nums; font-weight: 700; }
.slot .bezeichnung { font-size: 0.8rem; color: var(--tinte-leise); }
.slot .mitte { flex: 1; min-width: 0; }

/* Die Dochte: ein Punkt je Platz, gefüllte Punkte sind vergeben. */
.dochte { display: flex; gap: 3px; align-items: center; }
.docht {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--docht);
}
.docht.belegt { background: var(--docht); }
.dochte .zahl { font-size: 0.78rem; color: var(--tinte-leise); font-variant-numeric: tabular-nums; }

.slot[aria-pressed="true"] {
  border-color: var(--petrol);
  border-width: 2px;
  background: #eef4f2;
  padding: calc(0.7rem - 1px) calc(0.8rem - 1px);
}
.slot[aria-pressed="true"] .haken { color: var(--petrol); font-weight: 700; }
.slot .haken { width: 1rem; }

.voll-text { color: var(--voll); font-size: 0.8rem; }

/* ------------------------------------------------------------- Fusszeile */

.statusleiste {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--weiss);
  border-top: 1px solid var(--linie);
  padding: 0.7rem 1.1rem;
  font-size: 0.9rem;
}
.statusleiste .innen { max-width: var(--spalte); margin: 0 auto; display: flex; align-items: center; gap: 0.7rem; }
.statusleiste .meldung { flex: 1; }
.statusleiste[data-art="fehler"] { border-top-color: var(--voll); color: var(--voll); }
.statusleiste[data-art="ok"] { border-top-color: var(--petrol); }

.fuss { color: var(--tinte-leise); font-size: 0.82rem; margin-top: 2rem; }

/* --------------------------------------------------------- Organizer */

.tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--tinte-leise); border-color: var(--linie); }
.tabs button[aria-selected="true"] { background: var(--petrol); color: var(--weiss); border-color: var(--petrol); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-size: 0.78rem; color: var(--tinte-leise); font-weight: 600; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }

.weit { max-width: 60rem; }

.leerstand { color: var(--tinte-leise); padding: 1.5rem 0; }

@media print {
  .statusleiste, .tabs, .knopfreihe, .kopf { display: none; }
  body { background: var(--weiss); }
  .huelle { max-width: none; padding: 0; }
  .karte { border: none; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

a.slot { text-decoration: none; }
a.slot .zeit { font-weight: 600; }
