/* BNI Weekly – schlicht, ruhig, BNI-Rot als Akzent. Systemschrift, nichts von außen. */
:root {
  --rot: #c8102e;
  --rot-dunkel: #a00d25;
  --text: #1d1d1f;
  --leise: #5c5c62;
  --linie: #dedee3;
  --flaeche: #f4f4f6;
  --karte: #ffffff;
  --ok: #1d6b3a;
  --fehler: #b00020;
  --radius: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--flaeche);
}
a { color: var(--rot-dunkel); }
code { font-size: .9em; background: var(--flaeche); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; margin: 0; }
h3 { font-size: 1rem; margin: 1.4em 0 .5em; }
:focus-visible { outline: 3px solid #1a5fd0; outline-offset: 2px; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: 980px; margin: 0 auto; padding: .7rem 1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.titel { display: flex; flex-direction: column; line-height: 1.2; }
.titel strong { font-size: 1.25rem; }
.marke { color: var(--rot); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.kopf-aktionen { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.status { font-size: .85rem; color: var(--leise); min-width: 7em; }
.status[data-art="ok"] { color: var(--ok); }
.status[data-art="fehler"] { color: var(--fehler); }
.abmelden { font-size: .9rem; color: var(--leise); }
.band { background: #fff4d6; color: #5a4300; padding: .5rem 1rem; text-align: center; font-size: .9rem; }

/* Inhalt */
.inhalt { max-width: 980px; margin: 0 auto; padding: 1rem 1rem 6rem; }
.karte { background: var(--karte); border-radius: var(--radius); margin: 0 0 .5rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.karte > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .8rem;
  padding: .85rem 1.1rem; border-radius: var(--radius);
}
.karte > summary::-webkit-details-marker { display: none; }
.karte > summary::before {
  content: ""; flex: 0 0 auto; width: .5rem; height: .5rem; margin-right: .1rem;
  border-right: 2px solid var(--leise); border-bottom: 2px solid var(--leise); transform: rotate(-45deg); transition: transform .15s;
}
.karte[open] > summary::before { transform: rotate(45deg); }
.karte > summary:hover { background: #fafafb; }
.karte-titel { font-weight: 700; font-size: 1.05rem; }
.stand { margin-left: auto; font-size: .88rem; color: var(--leise); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.stand.ok { color: var(--ok); }
.stand.ok::before { content: "✓ "; }
.stand.offen { color: #9a5b00; font-weight: 600; }
.karte-inhalt { padding: 0 1.25rem 1.25rem; }
.karte-inhalt > .unter:first-child { margin: 0 0 1rem; }
.leiste { display: flex; justify-content: flex-end; gap: .5rem; margin: 0 0 .6rem; }
.knopf.klein { font-size: .82rem; padding: .45em .9em; }
.unter { color: var(--leise); margin: .25rem 0 0; font-size: .92rem; }

.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem 1rem; }
.feld { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.feld.breit { grid-column: 1 / -1; }
.feld label { font-size: .85rem; font-weight: 600; color: #3a3a3f; }
.feld small { color: var(--leise); font-size: .8rem; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%;
  border: 1px solid #c4c4cc; border-radius: 8px; padding: .5rem .6rem; background: #fff;
}
textarea { resize: vertical; }
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--rot); }
input[type="file"] { border: 0; padding: .3rem 0; width: auto; max-width: 100%; }
.haken { display: inline-flex; gap: .4rem; align-items: center; font-size: .92rem; cursor: pointer; }

/* Knöpfe: brechen nie um */
.knopf {
  display: inline-block; white-space: nowrap; cursor: pointer; text-decoration: none;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  padding: .62em 1.05em; border-radius: 999px;
  border: 1px solid var(--rot); background: #fff; color: var(--rot-dunkel);
}
.knopf:hover { background: #fdf0f2; }
.knopf.haupt { background: var(--rot); color: #fff; }
.knopf.haupt:hover { background: var(--rot-dunkel); }
.knopf.leise { border-color: #c4c4cc; color: #3a3a3f; }
.knopf.leise:hover { background: var(--flaeche); }
.knopf[disabled] { opacity: .55; cursor: default; }
.mini {
  display: inline-block; white-space: nowrap; cursor: pointer; font: inherit; line-height: 1;
  width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid #c4c4cc; background: #fff; color: #3a3a3f;
}
.mini:hover { background: var(--flaeche); }
.zeile-knoepfe { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .8rem 0 0; }

/* Meldungen */
.meldung { margin: .6rem 0 0; font-size: .92rem; }
.meldung.ok { color: var(--ok); }
.meldung.fehler { color: var(--fehler); }
.warnungen { margin: .8rem 0 0; padding-left: 1.2rem; color: #6b4b00; font-size: .92rem; }

/* Eingabe per Bildschirmfoto */
.zone { margin-bottom: 1rem; }
.ablage {
  border: 2px dashed #c4c4cc; border-radius: var(--radius); padding: 1.1rem; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; gap: .2rem; background: #fafafb; margin-bottom: .6rem;
}
.ablage span { color: var(--leise); font-size: .9rem; }
.ablage:hover, .ablage.drueber, .ablage:focus-visible { border-color: var(--rot); background: #fdf0f2; }
.vorschau { display: flex; gap: .6rem; flex-wrap: wrap; }
.vorschau figure { margin: 0 0 .6rem; position: relative; }
.vorschau img { height: 88px; border-radius: 8px; border: 1px solid var(--linie); display: block; }
.vorschau .mini { position: absolute; top: -8px; right: -8px; width: 1.6rem; height: 1.6rem; }

.liste { display: flex; flex-direction: column; gap: .8rem; margin: 1rem 0; }
.eintrag { border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem; }

/* Motto */
.vorschlaege { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; margin: .8rem 0; }
.vorschlag {
  text-align: left; font: inherit; cursor: pointer; border: 1px solid var(--linie); border-radius: var(--radius);
  background: #fff; padding: .8rem; display: flex; flex-direction: column; gap: .2rem;
}
.vorschlag:hover { border-color: var(--rot); }
.vorschlag span { color: var(--rot-dunkel); font-size: .85rem; font-weight: 600; }
.vorschlag small { color: var(--leise); }
.bildbereich { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; align-items: start; }
.bildbox img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); display: block; }
.bild-leer {
  aspect-ratio: 3 / 2; border-radius: var(--radius); background: var(--flaeche); color: var(--leise);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; font-size: .9rem;
}

/* 60 Sekunden */
.mitglieder { list-style: none; margin: 1rem 0 0; padding: 0; }
.mitglieder li {
  display: grid; grid-template-columns: 1.2rem 1.8rem minmax(0, 1.4fr) minmax(7rem, .7fr) minmax(0, 1fr) auto;
  gap: .6rem; align-items: center; padding: .45rem .3rem; border-bottom: 1px solid var(--linie);
}
.mitglieder li.fehlt .name { color: var(--leise); text-decoration: line-through; }
.mitglieder li.zieht { opacity: .4; }
.mitglieder li.ziel { box-shadow: inset 0 2px 0 var(--rot); }
.mitglieder .griff { cursor: grab; color: #9a9aa2; user-select: none; }
.mitglieder .nr { color: var(--leise); font-variant-numeric: tabular-nums; text-align: right; }
.mitglieder .name { font-weight: 600; display: flex; flex-direction: column; min-width: 0; }
.mitglieder .name small { font-weight: 400; color: var(--leise); }
.mitglieder .feld label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mitglieder .feld { position: relative; }
.pfeile { display: flex; gap: .3rem; }

/* Pläne */
.plan { display: flex; flex-direction: column; gap: .6rem; }
.planzeile { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; padding-bottom: .6rem; border-bottom: 1px solid var(--linie); }
.planzeile .feld { flex: 1 1 150px; }
.planzeile .feld.breit { flex: 3 1 260px; }
.planzeile > .mini { flex: 0 0 auto; margin-bottom: .3rem; }
.plan > .knopf { align-self: flex-start; }

.archiv { padding-left: 1.2rem; }
.archiv li { margin: .25rem 0; }

/* Ergebnis */
.ergebnis {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 20; width: min(420px, calc(100vw - 2rem));
  background: #fff; border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: 0 8px 30px rgba(0,0,0,.18);
  border-top: 4px solid var(--rot);
}
.ergebnis-kopf { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }

/* Anmeldung */
body.anmelden { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.anmeldekarte { background: #fff; border-radius: var(--radius); padding: 2rem; width: min(380px, 100%); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.anmeldekarte h1 { margin: .2rem 0 1.2rem; }
.anmeldekarte form { display: flex; flex-direction: column; gap: .6rem; }
.anmeldekarte .knopf { align-self: flex-start; margin-top: .4rem; }
.fehler { color: var(--fehler); margin: 0; }
.hinweis { color: var(--leise); }

@media (max-width: 640px) {
  .karte-inhalt { padding: 0 1rem 1rem; }
  .karte > summary { flex-wrap: wrap; }
  .stand { max-width: 100%; margin-left: 1.3rem; text-align: left; }
  .bildbereich { grid-template-columns: 1fr; }
  .mitglieder li { grid-template-columns: 1.6rem minmax(0, 1fr) auto; grid-template-areas: "nr name pfeile" "nr status vertreter"; }
  .mitglieder .griff { display: none; }
  .mitglieder .nr { grid-area: nr; }
  .mitglieder .name { grid-area: name; }
  .mitglieder .pfeile { grid-area: pfeile; }
  .kopf-aktionen .status { display: none; }
}
.ergebnis .feld { margin-top: .6rem; }
.motto-ansicht { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.2rem; align-items: start; }
.motto-ansicht img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); display: block; }
.motto-ansicht p { margin: 0 0 .5rem; }
.motto-titel { font-size: 1.3rem; font-weight: 700; }
.spruch { margin: .8rem 0 0; padding: .8rem 1rem; background: var(--flaeche); border-radius: 10px; font-style: italic; }
.spruch small { display: block; font-style: normal; color: var(--leise); margin-top: .3rem; }
@media (max-width: 640px) { .motto-ansicht { grid-template-columns: 1fr; } }
.eingang { background: #fff; border: 2px solid var(--rot); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 0 0 1rem; }
.eingang h2 { margin: 0; }
.eingang .unter { margin: .25rem 0 .8rem; }
.zonen-meldung .meldung { white-space: pre-line; }
.zehnliste { list-style: none; margin: 0; padding: 0; }
.zehnliste li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--linie); }
.zehnliste li.diese { font-weight: 700; }
.zehnliste li small { color: var(--rot-dunkel); font-weight: 600; }
.zehnliste label { font-size: .92rem; }
@media (max-width: 640px) { .zehnliste li { grid-template-columns: 1fr auto; } .zehnliste select { grid-column: 1 / -1; grid-row: 2; } }
.neues-mitglied { display: grid; grid-template-columns: 90px 90px minmax(0, 1fr); gap: 1rem; align-items: start; }
.neues-mitglied > .knopf { grid-column: 3; justify-self: start; }
.mini-bild { width: 90px; height: 90px; object-fit: contain; border: 1px solid var(--linie); border-radius: 8px; background: #fff; }
.fehlt-bild { width: 90px; height: 90px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: .8rem; color: #9a5b00; background: var(--flaeche); border-radius: 8px; }
@media (max-width: 640px) { .neues-mitglied { grid-template-columns: 90px 90px; } .neues-mitglied .raster, .neues-mitglied > .knopf { grid-column: 1 / -1; } }
