/* Brücke Kalender — für das Handy gemacht: große Knöpfe, eine Spalte. */
:root {
  --marke: #1e5bb8;
  --marke-dunkel: #174a96;
  --marke-hell: #e8f0fd;
  --text: #0f172a;
  --leise: #475569;
  --rand: #cbd5e1;
  --flaeche: #ffffff;
  --grund: #f1f5f9;
  --rot: #b91c1c;
  --rot-hell: #fef2f2;
  --gruen: #15803d;
  --gruen-hell: #f0fdf4;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --marke: #8ab4f8;
    --marke-dunkel: #aecbfa;
    --marke-hell: #1e3a5f;
    --text: #f1f5f9;
    --leise: #94a3b8;
    --rand: #334155;
    --flaeche: #1e293b;
    --grund: #0f172a;
    --rot: #f87171;
    --rot-hell: #450a0a;
    --gruen: #4ade80;
    --gruen-hell: #052e16;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 17px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--grund);
  padding-bottom: env(safe-area-inset-bottom);
}
main { max-width: 34rem; margin: 0 auto; padding: 0 1rem 7rem; }

header.kopf {
  position: sticky; top: 0; z-index: 3;
  margin: 0 -1rem .75rem; padding: calc(env(safe-area-inset-top) + .6rem) 1rem 0;
  background: var(--marke); color: #fff;
}
@media (prefers-color-scheme: dark) { header.kopf { background: #1e3a5f; } }
.kopf-zeile { display: flex; align-items: center; gap: .5rem; }
.kopf-zeile h1 { margin: 0; font-size: 1.2rem; flex: 1; }
.kopf-zeile button { min-height: 2.6rem; padding: .3rem .7rem; background: rgba(255,255,255,.15); color: #fff; }
header.kopf .wer { font-size: .85rem; opacity: .85; }

nav.reiter { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .25rem; margin-top: .5rem; }
nav.reiter button {
  border: 0; border-radius: .6rem .6rem 0 0; padding: .55rem; font: inherit; font-weight: 600; min-height: 0;
  background: rgba(255,255,255,.15); color: #fff;
}
nav.reiter button[aria-selected='true'] { background: var(--grund); color: var(--text); }

h2 { font-size: 1.1rem; margin: 1.1rem 0 .4rem; }
p { margin: .4rem 0; }
.leise { color: var(--leise); font-size: .9rem; }
.laedt { padding: 3rem 0; text-align: center; color: var(--leise); }

button, .knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 3rem; padding: .7rem 1.1rem; border-radius: .75rem; border: 0;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.haupt { background: var(--marke); color: #fff; }
@media (prefers-color-scheme: dark) { .haupt { color: #0b1d3a; } }
.zweit { background: var(--flaeche); color: var(--marke-dunkel); box-shadow: inset 0 0 0 2px var(--marke); }
.still { background: transparent; color: var(--leise); }
.gefahr { background: var(--rot); color: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; }
.breit { width: 100%; }
.reihe { display: flex; gap: .5rem; flex-wrap: wrap; }
.reihe > * { flex: 1 1 8rem; }

.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 1rem; padding: 1rem; margin: .75rem 0; }

/* Terminliste */
.tag-kopf { display: flex; align-items: baseline; gap: .5rem; margin: 1rem 0 .35rem; font-weight: 700; }
.tag-kopf .leise { font-weight: 400; }
.tag-kopf.heute { color: var(--marke-dunkel); }
.feiertag { color: var(--rot); font-size: .85rem; font-weight: 600; }
ul.termine { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
button.termin {
  width: 100%; min-height: 0; display: grid; grid-template-columns: .35rem 4.6rem 1fr; gap: .6rem; align-items: start;
  padding: .55rem .7rem .55rem .5rem; text-align: left; font-weight: 400;
  background: var(--flaeche); color: var(--text); border: 1px solid var(--rand);
}
button.termin .farbe { align-self: stretch; border-radius: .2rem; }
button.termin .zeit { font-size: .85rem; color: var(--leise); line-height: 1.3; }
button.termin .titel { font-weight: 600; display: block; }
button.termin .ort { font-size: .85rem; color: var(--leise); display: block; }
.abwesend { font-size: .9rem; color: var(--leise); padding: .2rem .5rem; }
.leer { color: var(--leise); padding: 1rem 0; text-align: center; }

/* Monat */
.monat-kopf { display: flex; align-items: center; justify-content: space-between; margin: .25rem 0 .5rem; }
.monat-kopf h2 { margin: 0; }
.monat-kopf button { min-height: 2.6rem; width: 2.8rem; padding: 0; font-size: 1.4rem; }
.raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.raster .wt { font-size: .75rem; color: var(--leise); padding: .2rem 0; }
.raster button.tag {
  min-height: 3.2rem; padding: .25rem 0; border-radius: .6rem; display: flex; flex-direction: column; align-items: center; gap: .15rem;
  background: var(--flaeche); color: var(--text); font-weight: 500;
}
.raster button.tag.fremd { opacity: .45; }
.raster button.tag.rot { color: var(--rot); }
.raster button.tag.heute .nr { background: var(--marke); color: #fff; border-radius: 1rem; padding: 0 .4rem; }
.raster button.tag[aria-pressed='true'] { box-shadow: inset 0 0 0 2px var(--marke); }
.punkte { display: flex; gap: 2px; height: .45rem; }
.punkte span { width: .45rem; height: .45rem; border-radius: 50%; }

/* Termin ansehen */
.detail h2 { font-size: 1.35rem; margin-top: .5rem; }
.detail p { display: flex; gap: .6rem; align-items: baseline; }
.detail .zeichen { width: 1.4rem; flex: none; text-align: center; color: var(--leise); }
.beschreibung { white-space: pre-wrap; background: var(--grund); border-radius: .6rem; padding: .7rem; }
.punkt { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; }

/* Formular */
label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }
input[type='text'], input[type='password'], input[type='date'], input[type='time'], input[type='number'], select, textarea {
  width: 100%; min-height: 3rem; padding: .6rem .75rem; border-radius: .6rem;
  border: 1px solid var(--rand); background: var(--flaeche); color: var(--text); font: inherit;
}
textarea { min-height: 5rem; }
.zwei { display: grid; grid-template-columns: 1.4fr 1fr; gap: .5rem; }
.hinweis { font-size: .85rem; color: var(--leise); margin: .2rem 0 0; }
.haken { display: flex; gap: .7rem; align-items: center; font-weight: 500; margin: .6rem 0; }
.haken input { width: 1.4rem; height: 1.4rem; flex: none; }
fieldset { border: 1px solid var(--rand); border-radius: .75rem; margin: .75rem 0; padding: .25rem .75rem .75rem; }
fieldset legend { font-weight: 600; padding: 0 .3rem; }
.inline { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.inline input[type='number'] { width: 5rem; }
.inline select { width: auto; flex: 1; }
.inline input[type='date'] { width: auto; flex: 1; }
.wochentage { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.wochentage button { min-height: 2.6rem; width: 2.6rem; padding: 0; border-radius: 50%; background: var(--grund); color: var(--text); box-shadow: inset 0 0 0 1px var(--rand); }
.wochentage button[aria-pressed='true'] { background: var(--marke); color: #fff; box-shadow: none; }
.wer-liste { max-height: 14rem; overflow-y: auto; border: 1px solid var(--rand); border-radius: .6rem; padding: 0 .7rem; }
.wer-liste .haken { margin: .45rem 0; }
.regel-text { font-weight: 600; color: var(--marke-dunkel); margin-top: .6rem; }

.meldung { padding: .8rem 1rem; border-radius: .75rem; margin: .75rem 0; }
.meldung.fehler { background: var(--rot-hell); color: var(--rot); }
.meldung.erfolg { background: var(--gruen-hell); color: var(--gruen); }

/* „+“ unten rechts, wie bei Google */
.plus {
  position: fixed; right: max(1rem, calc(50vw - 16rem)); bottom: calc(1.2rem + env(safe-area-inset-bottom)); z-index: 4;
  width: 3.8rem; height: 3.8rem; border-radius: 1.2rem; font-size: 2rem; font-weight: 400;
  background: var(--marke); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
@media (prefers-color-scheme: dark) { .plus { color: #0b1d3a; } }
.unten { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: var(--grund); border-top: 1px solid var(--rand); }
.unten > div { max-width: 34rem; margin: 0 auto; }

/* Frage „Dieser / folgende / alle“ */
.schleier { position: fixed; inset: 0; z-index: 10; background: rgba(15,23,42,.35); display: flex; align-items: flex-end; justify-content: center; }
.frage { width: 100%; max-width: 34rem; background: var(--flaeche); border-radius: 1rem 1rem 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
.frage h2 { margin-top: 0; }
.frage label { display: flex; align-items: center; gap: .7rem; font-weight: 500; padding: .55rem 0; margin: 0; }
.frage input { width: 1.3rem; height: 1.3rem; }

.zahl { width: 5rem !important; }
.reihe.oben { margin-top: .75rem; }
.ohne-abstand { margin-top: 0; }
