/* womby – Design wie die Flutter-App: blauer Verlauf, farbige Kacheln, dunkles Panel unten */
:root {
  --radius: 22px;
  --panel: rgba(31, 31, 31, .78);
  --text: #fff;
  --gruen: #34c759;
  --rot: #ff3b30;
  font-family: "Aptos Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  background: linear-gradient(#7ea9f7, #fff) fixed;
  min-height: 100dvh;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
svg { width: 24px; height: 24px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* Kopf */
.kopf {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: calc(env(safe-area-inset-top) + 6px) 18px 6px;
}
.kopf h1 { margin: 0; text-align: center; font-size: 26px; font-weight: 700; letter-spacing: .5px; }
.symbol { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: rgba(255,255,255,.75); }
.symbol[aria-pressed="true"] { color: #fff; background: rgba(255,255,255,.18); }
.kopf .symbol { color: #fff; justify-self: end; }
.status { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); justify-self: start; margin-left: 6px; }
.status.ok { background: var(--gruen); box-shadow: 0 0 8px var(--gruen); }
.status.fehler { background: var(--rot); box-shadow: 0 0 8px var(--rot); }

/* Modus-Kacheln */
.raster {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  padding: 12px 18px calc(150px + env(safe-area-inset-bottom));
}
.raster.vier { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.modus {
  aspect-ratio: 1; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: background .18s, transform .1s;
}
.modus:active { transform: scale(.96); }
.modus svg { width: 38%; height: 38%; }
.modus span { font-size: clamp(13px, 4vw, 18px); }
.vier .modus span { font-size: clamp(11px, 3vw, 15px); }

/* Panel unten */
.panel {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--panel);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-radius: 26px 26px 0 0;
  padding: 0 18px calc(14px + env(safe-area-inset-bottom));
}
.panel:not(.offen) .zeiten { display: none; }
.griff { display: block; width: 100%; height: 26px; }
.griff span { display: block; width: 40px; height: 5px; margin: 0 auto; border-radius: 3px; background: rgba(255,255,255,.7); }
.zeile { display: flex; align-items: center; gap: 14px; }
.kachel { width: 64px; height: 64px; border-radius: 18px; flex: none; display: grid; place-items: center; transition: background .18s; }
.mikro { background: rgba(229, 231, 235, .18); }
.mikro svg { width: 32px; height: 32px; }
.mikro[aria-pressed="true"] { background: rgba(229, 231, 235, .68); }
.mikro.hoert { background: rgba(255, 90, 80, .85); box-shadow: 0 0 18px rgba(255, 90, 80, .8); }
.feld select { font-size: 15px; text-align: left; padding: 10px 12px; }
.regler { flex: 1; display: grid; gap: 12px; min-width: 0; }
.regler label { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.7); }
.regler svg { width: 20px; height: 20px; }

input[type=range] {
  -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 28px; margin: 0;
  background: transparent; --wert: 50%;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #fff var(--wert), rgba(255,255,255,.24) var(--wert));
}
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.24); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; }

.zeiten { display: flex; align-items: center; justify-content: center; gap: 6px; padding-top: 16px; }
select {
  font: inherit; font-size: 20px; color: #fff; background: rgba(255,255,255,.1);
  border: 0; border-radius: 12px; padding: 8px 10px; -webkit-appearance: none; appearance: none; text-align: center;
}
.zeiten .symbol + select { margin-left: 2px; }

/* Dialoge */
.dialog {
  width: min(92vw, 380px); border: 0; border-radius: 24px; padding: 20px;
  color: #fff; background: rgba(40, 40, 40, .82);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.dialog::backdrop { background: rgba(0,0,0,.35); }
.dialog form { display: grid; gap: 14px; }
.vorschau { height: 90px; border-radius: 18px; }
.feld { display: grid; gap: 6px; font-size: 14px; color: rgba(255,255,255,.75); }
.feld input:not([type=range]) {
  font: inherit; font-size: 17px; color: #fff; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 10px 12px;
}
input.farbton::-webkit-slider-runnable-track { height: 14px; border-radius: 7px;
  background: linear-gradient(90deg, red, #ff0, lime, cyan, blue, #f0f, red); }
input.saettigung::-webkit-slider-runnable-track { height: 14px; border-radius: 7px;
  background: linear-gradient(90deg, #fff, var(--voll, red)); }
input.farbton::-webkit-slider-thumb, input.saettigung::-webkit-slider-thumb { margin-top: -4px; }
.farben { display: flex; flex-wrap: wrap; gap: 8px; }
.farben:empty { display: none; }
.muster { width: 32px; height: 32px; border-radius: 10px; border: 2px solid rgba(255,255,255,.25); }
.schalter { display: flex; justify-content: space-between; align-items: center; }
.schalter input { width: 22px; height: 22px; accent-color: var(--gruen); }
.dialog button:not(.muster), .anmeldekarte button {
  padding: 12px; border-radius: 14px; background: rgba(255,255,255,.12);
}
.primaer { background: #fff !important; color: #111 !important; font-weight: 600; }
.klein { margin: 0; font-size: 13px; color: rgba(255,255,255,.75); }
.abmelden { text-align: center; color: rgba(255,255,255,.6); }

.meldung {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 60px); transform: translateX(-50%);
  max-width: 90vw; padding: 10px 16px; border-radius: 14px; background: rgba(31,31,31,.9); font-size: 14px;
}

/* Anmeldung (zugang.php) */
.anmeldung { display: grid; place-items: center; padding: 20px; }
.anmeldekarte {
  width: min(92vw, 340px); display: grid; gap: 12px; padding: 24px; border-radius: 24px;
  background: var(--panel); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); text-align: center;
}
.anmeldekarte img { margin: 0 auto; border-radius: 14px; }
.anmeldekarte h1 { margin: 0; font-size: 26px; }
.anmeldekarte input {
  font: inherit; font-size: 17px; color: #fff; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 10px 12px;
}
.fehler { margin: 0; color: #ffd0cc; }
