/* Vereinsfarben aus ~/DgB/Corporate Design/Farben.txt */
:root {
  --rot: #8a1812; --blau: #29235c; --gruen: #076633; --hell: #e5e5e5; --grau: #7c7c7c;
  --grund: #f6f5f2; --karte: #fff; --text: #1e1d2b;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
main { max-width: 980px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.35rem; margin: 0 0 12px; color: var(--blau); }
h2 { font-size: 1.05rem; margin: 24px 0 8px; color: var(--blau); }

.kopf { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff;
  border-bottom: 4px solid var(--rot); position: sticky; top: 0; z-index: 5; }
.kopf-logo { height: 34px; }
.kopf-titel { font-weight: 700; color: var(--blau); font-size: 1.1rem; }
.kopf-ich { margin-left: auto; font-size: .85rem; color: var(--grau); }
.kopf-ich button { margin-left: 8px; }

.karte { background: var(--karte); border-radius: 10px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.schmal { max-width: 380px; margin: 40px auto; }
label { display: block; margin: 0 0 14px; font-weight: 600; font-size: .92rem; }
label.haken { display: flex; gap: 8px; align-items: center; font-weight: 400; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit;
  border: 1px solid #c9c8d0; border-radius: 8px; background: #fff; }
input[type=checkbox] { width: auto; margin: 0; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--hell); border-radius: 8px; margin: 0 0 14px; padding: 10px 12px 0; }
legend { font-weight: 600; font-size: .92rem; padding: 0 4px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--blau); margin-bottom: 10px; }
.zeile2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.termin { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.termin.einzeln { grid-template-columns: 1.4fr 1fr 1fr auto; }
.termin label { margin: 0; }

button { font: inherit; border-radius: 8px; padding: 10px 16px; cursor: pointer; border: 1px solid transparent; }
button.haupt { background: var(--blau); color: #fff; font-weight: 600; }
button.haupt:disabled { background: var(--grau); cursor: default; }
button.leise { background: transparent; border-color: #c9c8d0; color: var(--blau); }
button.weg { background: transparent; color: var(--rot); padding: 8px 10px; }
button.gross { width: 100%; padding: 16px; font-size: 1.1rem; }
.knoepfe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.klebend { position: sticky; bottom: 0; background: var(--grund); padding: 10px 0; }
.leiste { display: flex; align-items: center; gap: 8px 12px; margin-bottom: 8px; flex-wrap: wrap; }
.leiste h1 { margin: 0; flex: 1 1 100%; order: 3; }   /* Titel unter den Knöpfen — lange Titel schieben nichts heraus */
.leiste #b-angaben { margin-left: auto; }

.fehler { color: var(--rot); font-weight: 600; min-height: 1em; }
.hinweis { color: var(--grau); margin: 4px 0 12px; }
.quelle { font-size: .8rem; color: var(--grau); }
.status { background: #fff7d6; border-left: 4px solid #e0b100; padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }
.status.fehler-status { background: #fdecea; border-color: var(--rot); color: var(--rot); }
.status .dreher { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid #e0b100; border-top-color: transparent; border-radius: 50%; animation: dreh 1s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }

.liste { list-style: none; padding: 0; margin: 0; }
.liste li { background: #fff; border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer;
  display: flex; justify-content: space-between; gap: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.liste .klein { color: var(--grau); font-size: .85rem; }

/* 15 Fotos zur Auswahl */
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.foto { position: relative; border: 3px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer;
  background: var(--hell); aspect-ratio: 3 / 4; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto.gewaehlt { border-color: var(--rot); }
.foto.hochladen { display: grid; place-items: center; text-align: center; border: 2px dashed var(--grau);
  color: var(--blau); font-weight: 600; margin: 0; }
.foto.hochladen span { line-height: 1.3; }
.foto.hochladen.laedt { opacity: .6; }
.foto.eigen::after { content: "eigenes"; position: absolute; bottom: 6px; right: 6px; background: var(--blau);
  color: #fff; font-size: .7rem; padding: 2px 6px; border-radius: 4px; }
.foto.eigen img { object-fit: contain; }   /* ganz zeigen, damit man sieht, wie es steht */
.foto .drehen { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.9); color: var(--blau); font-size: 1.3rem; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.foto .nummer { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--rot); color: #fff; font-weight: 700; display: grid; place-items: center; }

/* Vorschläge */
.vorschlaege { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.vorschlag { background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.vorschlag img { width: 100%; display: block; border-radius: 4px; }
.vorschlag .meldung { color: var(--rot); font-size: .85rem; margin: 6px 0 0; }
.vorschlag .knoepfe { justify-content: space-between; }

@media (max-width: 520px) {
  main { padding: 12px; }
  .termin.einzeln { grid-template-columns: 1fr 1fr; }
  .raster { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

/* Fertig-Ansicht */
.fertig-raster { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 18px; align-items: start; }
.fertig-raster img#f-vorschau { width: 100%; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.15); }
.mailstatus { padding: 10px 12px; border-radius: 6px; background: #e8f3ec; border-left: 4px solid var(--gruen); margin-top: 0; }
.mailstatus.fehler-status { background: #fdecea; border-color: var(--rot); color: var(--rot); }
.mailstatus.aus { background: var(--hell); border-color: var(--grau); }
.downloads { list-style: none; padding: 0; margin: 0 0 16px; }
.downloads li { margin-bottom: 6px; }
.downloads a { display: block; background: #fff; padding: 10px 12px; border-radius: 8px; color: var(--blau);
  font-weight: 600; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.downloads a span { display: block; font-weight: 400; color: var(--grau); font-size: .85rem; }
.homepage-karte h2 { margin-top: 0; }
.plan { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: .92rem; }
.plan th { text-align: left; color: var(--grau); font-weight: 600; padding: 4px 8px 4px 0; vertical-align: top; width: 7.5em; }
.plan td { padding: 4px 0; }
.plan .warnung { color: var(--rot); }
.terminbild { width: 100%; max-width: 360px; border-radius: 6px; margin: 4px 0 12px; display: block; }
@media (max-width: 640px) { .fertig-raster { grid-template-columns: 1fr; } }
.gericht-eingabe { display: grid; grid-template-columns: 1fr 6.5em; gap: 8px; }
.suche { display: flex; gap: 8px; margin-bottom: 6px; }
.suche input { margin-top: 0; flex: 1; }
label .klein { font-weight: 400; color: var(--grau); font-size: .85em; }

button.gefahr { color: var(--rot); border-color: var(--rot); }
.liste .marke { font-size: .75rem; background: var(--hell); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }

/* Abstimmung (Link für die Öffentlichkeitsarbeit) */
.vorschlag.gewaehlt { outline: 4px solid var(--rot); }
.vorschlag .stimmen { font-weight: 700; color: var(--blau); }
.kommentare { padding-left: 1.2em; margin: 6px 0; }
.kommentare li { margin-bottom: 4px; }
p.klein { color: var(--grau); font-size: .88rem; }
.linkzeile { word-break: break-all; background: var(--grund); padding: 8px 10px; border-radius: 6px; font-size: .9rem; }
