/* Gemeinwohlbau Projektraum – Farben aus dem Corporate Design der Gemeinwohlbau (wie Gemeinwohlbau Botschafter)
   Blau #1314c5, Violett #9f73fe, Gelb #fde000, Grün #54f48a, Rot #f97863, Hellblau #81c6fd */
:root {
  --blau: #1314c5;
  --blau-dunkel: #0e0fa3;
  --blau-hell: #e8e8fb;
  --violett: #9f73fe;
  --gelb-hell: #fff8cc;
  --gruen-hell: #dcfce7;
  --gruen-text: #11632f;
  --rot: #c2412d;
  --rot-hell: #fde4df;
  --text: #1b1b2f;
  --text-2: #5c5c74;
  --linie: #e2e2ec;
  --flaeche: #ffffff;
  --grund: #f6f6fb;
  --radius: 14px;
  --schatten: 0 1px 2px rgba(20, 20, 60, .06), 0 4px 16px rgba(20, 20, 60, .05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--grund); font-size: 16px; line-height: 1.5; display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--blau); }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; letter-spacing: -.015em; line-height: 1.25; }
h2 { font-size: 1.08rem; margin: 0 0 .6rem; line-height: 1.3; }
p { margin: 0 0 .75rem; }
[hidden] { display: none !important; }
.versteckt { display: none; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .65rem 1rem; padding-top: max(.65rem, env(safe-area-inset-top)); background: var(--blau); color: #fff; min-height: 56px; }
.marke { color: #fff; text-decoration: none; display: flex; align-items: center; font-size: 1.05rem; white-space: nowrap; }
.punkte { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; background: #fde000; box-shadow: 8px 0 0 #54f48a; margin-right: 18px; }
.kopf-knopf { background: transparent; color: #fff; border: 0; font: inherit; font-size: .9rem; padding: .35rem .65rem; border-radius: 8px; cursor: pointer; text-decoration: none; min-height: 0; }
.kopf-knopf:hover { background: rgba(255, 255, 255, .16); border-color: transparent; }

.inhalt { width: 100%; max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 2rem; flex: 1; }
body.breit .inhalt { max-width: 1100px; }

/* Bausteine */
.karte { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 1.1rem; }
.block { margin-bottom: 1rem; }
.leise { color: var(--text-2); }
.klein { font-size: .85rem; }
.leer { text-align: center; color: var(--text-2); padding: 2rem 1rem; }
.zeile { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.zeile.zwischen { justify-content: space-between; }

button, .knopf { font: inherit; font-size: .95rem; cursor: pointer; border: 1px solid var(--linie); background: #fff; color: var(--text);
  padding: .55rem .95rem; border-radius: 10px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 42px; }
button:hover, .knopf:hover { border-color: #c4c4d8; }
button:focus-visible, a:focus-visible, video:focus-visible { outline: 2px solid var(--violett); outline-offset: 2px; }
.primaer { background: var(--blau) !important; border-color: var(--blau) !important; color: #fff !important; font-weight: 600; }
.primaer:hover { background: var(--blau-dunkel) !important; }
.gefahr { color: var(--rot) !important; }
button:disabled { opacity: .45; cursor: default; }
.mini { min-height: 34px; padding: .3rem .7rem; font-size: .85rem; }
.ohne-rahmen { border-color: transparent; background: transparent; color: var(--blau); }
.gross-knopf { width: 100%; min-height: 52px; font-size: 1.05rem; }

label { display: block; font-size: .85rem; color: var(--text-2); margin-bottom: .3rem; font-weight: 500; }
input, textarea { font: inherit; font-size: 16px; width: 100%; padding: .6rem .7rem; border: 1px solid var(--linie); border-radius: 10px; background: #fff; color: var(--text); }
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus { outline: 2px solid var(--violett); border-color: var(--violett); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--blau); flex: none; margin: 1px 0 0; }
.feld { margin-bottom: 1rem; }
.raster { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

.hinweis { padding: .75rem .9rem; border-radius: 10px; background: var(--blau-hell); color: #10106e; margin-bottom: 1rem; font-size: .93rem; }
.hinweis.fehler { background: var(--rot-hell); color: #7a1f10; }
.hinweis.gut { background: var(--gruen-hell); color: var(--gruen-text); }
.hinweis.gelb { background: var(--gelb-hell); color: #5b4b00; }

/* Zugang */
.login { max-width: 440px; margin: 4vh auto 0; }
.login-marke { font-size: 1.1rem; color: var(--blau); display: flex; align-items: center; margin-bottom: .25rem; }
.login-marke b { font-size: 1.5rem; letter-spacing: -.02em; }
.login-projekt { color: var(--text-2); margin-bottom: 1.1rem; padding-left: 30px; }
.login h1 { font-size: 1.3rem; }
.haken-text { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .85rem; line-height: 1.45; margin-bottom: 1rem; cursor: pointer; }
.wechsel { text-align: center; margin: .75rem 0 0; }
.wechsel button { min-height: 36px; }

/* Projektseite */
.begruessung { max-width: 720px; margin: 0 auto 1rem; text-align: center; }
.begruessung p { color: var(--text-2); margin: 0; white-space: pre-line; }
.video-huelle { max-width: 720px; margin: 0 auto 1.5rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); background: #000; line-height: 0; }
.video-huelle video { width: 100%; aspect-ratio: 16 / 9; display: block; }

.abschnitte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.abschnitt { padding: 1rem 1.1rem; min-width: 0; }
.abschnitt .leise { font-size: .9rem; margin: 0; }
.dateien { list-style: none; margin: 0 -.5rem; padding: 0; }
.dateien a { display: flex; align-items: center; gap: .7rem; padding: .45rem .5rem; border-radius: 10px; text-decoration: none; color: inherit; }
.dateien a:hover { background: var(--blau-hell); }
.dateien .typ { flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--blau-hell); color: var(--blau); font-size: .66rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.dateien a:hover .typ { background: #fff; }
.dateien .rumpf { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dateien .titel { font-weight: 600; font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.dateien .unter { color: var(--text-2); font-size: .8rem; }
.dateien .pfeil { flex: none; color: var(--blau); font-weight: 700; font-size: 1.1rem; }

.talk-band { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); border-top: 4px solid var(--blau); padding: 1.25rem 1.1rem; text-align: center; }
.talk-band h2 { font-size: 1.3rem; margin-bottom: .15rem; }
.talk-band p { color: var(--text-2); margin-bottom: .9rem; }
.talk-band .gross-knopf { max-width: 420px; }
.talk-kasten { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border-radius: var(--radius); }
.talk-kasten.gebucht { background: var(--gruen-hell); }
.talk-kasten .titel { font-weight: 700; }
.talk-symbol { font-size: 1.8rem; }

.fuss { display: flex; justify-content: center; gap: 1.25rem; padding: .75rem 1rem 1.5rem; font-size: .85rem; }
.fuss a { color: var(--text-2); }

/* Dialog */
.schleier { position: fixed; inset: 0; background: rgba(15, 15, 40, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.dialog { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; border-radius: 18px 18px 0 0; }
.dialog-kopf { padding: 1rem 1.25rem .5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.dialog-kopf h2 { margin: 0; }
.dialog-rumpf { padding: .25rem 1.25rem 1.25rem; padding-bottom: max(1.25rem, env(safe-area-inset-bottom)); overflow-y: auto; flex: 1; }
@media (min-width: 720px) { .schleier { align-items: center; } .dialog { border-radius: 18px; } }
.tage { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .6rem; }
.tage .tag { flex: none; flex-direction: column; gap: 0; min-width: 66px; padding: .45rem .5rem; border-radius: 12px; line-height: 1.2; min-height: 0; }
.tage .tag .wt { font-size: .75rem; color: var(--text-2); }
.tage .tag .dt { font-weight: 700; }
.tage .tag.aktiv { background: var(--blau); border-color: var(--blau); color: #fff; }
.tage .tag.aktiv .wt { color: #e3e3ff; }
.zeiten { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .45rem; }
.zeiten .zeit { font-variant-numeric: tabular-nums; }
.zeiten .zeit.aktiv { background: var(--blau); border-color: var(--blau); color: #fff; font-weight: 600; }
.bestaetigen { margin-top: 1rem; border-top: 1px solid var(--linie); padding-top: 1rem; }
.zusammenfassung { background: var(--grund); border-radius: 10px; padding: .65rem .8rem; margin-bottom: 1rem; }
.erfolg { text-align: center; padding: .5rem 0; }
.erfolg .gross { font-size: 2.6rem; }

.meldung { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: var(--text); color: #fff; padding: .7rem 1rem; border-radius: 10px; max-width: calc(100% - 2rem); transition: .2s; z-index: 60; }
.meldung.sichtbar { opacity: 1; transform: translateX(-50%) translateY(0); }
.meldung.fehler { background: var(--rot); }

/* Verwaltung */
.reiter { display: flex; gap: .35rem; margin-bottom: 1rem; overflow-x: auto; padding-bottom: 2px; }
.reiter button { border-radius: 999px; min-height: 36px; padding: .3rem .9rem; font-size: .88rem; white-space: nowrap; }
.reiter button.aktiv { background: var(--blau-hell); border-color: var(--blau-hell); color: var(--blau); font-weight: 600; }
.verwaltungsliste { list-style: none; margin: 0 0 .75rem; padding: 0; }
.verwaltungsliste li { padding: .6rem 0; border-top: 1px solid var(--linie); }
.verwaltungsliste li:first-child { border-top: 0; padding-top: 0; }
.verwaltungsliste input { margin-bottom: .35rem; padding: .4rem .55rem; }
.tabelle-huelle { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--schatten); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--linie); vertical-align: middle; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); background: #fafafe; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.gesperrt td { opacity: .55; }
.aktionen-zelle { white-space: nowrap; }

@media (max-width: 620px) {
  h1 { font-size: 1.35rem; }
  .inhalt { padding-top: 1rem; }
  .abschnitte { grid-template-columns: minmax(0, 1fr); }
  .raster { grid-template-columns: 1fr; }
  .marke { font-size: .98rem; }
}

/* Anmeldung und Projektwahl */
.code-feld { font-size: 1.5rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.mittig { text-align: center; margin: .5rem 0 0; }
.projektwahl { display: flex; gap: .35rem; justify-content: center; margin-bottom: 1rem; overflow-x: auto; }
.projektwahl button { border-radius: 999px; min-height: 36px; padding: .3rem .9rem; font-size: .88rem; white-space: nowrap; }
.projektwahl button.aktiv { background: var(--blau-hell); border-color: var(--blau-hell); color: var(--blau); font-weight: 600; }
/* Ungerade Anzahl: Der letzte Abschnitt nimmt die volle Breite ein */
.abschnitte > .abschnitt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.test-adresse { flex: 1; min-width: 220px; }
