:root {
  --grund: #f6f5f2;
  --karte: #ffffff;
  --text: #1d1d1b;
  --leise: #6b6a66;
  --linie: #e4e2dc;
  --akzent: #1f3a5f;
  --akzent-text: #ffffff;
  --ok: #1e7a46;
  --ok-grund: #e6f4ec;
  --warn: #9a6200;
  --warn-grund: #fdf3df;
  --gefahr: #b42318;
  --gefahr-grund: #fdecea;
  --radius: 8px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #151513;
    --karte: #1f1f1c;
    --text: #ecebe6;
    --leise: #a3a19a;
    --linie: #34332f;
    --akzent: #8fb3e0;
    --akzent-text: #10141a;
    --ok: #6fcf97;
    --ok-grund: #173323;
    --warn: #f2c26b;
    --warn-grund: #3a2e14;
    --gefahr: #f28b82;
    --gefahr-grund: #3d1c1a;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }
body { margin: 0; font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--grund); color: var(--text); }
a { color: var(--akzent); }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .8rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--leise); margin: 1.4rem 0 .4rem; }
code { background: var(--grund); padding: 0 .3em; border-radius: 4px; }

.kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1.25rem; background: var(--karte); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 5; }
.kopf .marke { font-weight: 700; text-decoration: none; color: var(--text); }
.kopf nav { display: flex; align-items: center; gap: 1rem; }
.wer { color: var(--leise); }
.inhalt { max-width: 1100px; margin: 0 auto; padding: 1.25rem 16px 4rem; }
.schmal .karte, .schmal-karte { max-width: 460px; margin: 3rem auto; }

.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.leer { text-align: center; padding: 2.5rem; }
.leise { color: var(--leise); }
.klein { font-size: .8rem; }
.rechts { text-align: right; }
.zeile-titel { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.stapel { display: flex; flex-direction: column; gap: .8rem; }
.stapel-klein { display: flex; flex-direction: column; gap: .4rem; margin-top: .4rem; }
.inline { display: inline; }
.unsichtbar { position: absolute; left: -9999px; }

label { display: flex; flex-direction: column; gap: .25rem; font-weight: 500; }
label.haken { flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; }
input, select, textarea { font: inherit; padding: .45rem .55rem; border: 1px solid var(--linie); border-radius: 6px; background: var(--karte); color: var(--text); width: 100%; }
input[type=checkbox] { width: auto; }
input[type=file] { padding: .3rem; }
textarea { resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }

.knopf { display: inline-block; font: inherit; font-weight: 500; padding: .5rem 1rem; border-radius: 6px; border: 1px solid var(--linie); background: var(--karte); color: var(--text); cursor: pointer; text-decoration: none; }
.knopf:hover { border-color: var(--akzent); }
.knopf.primaer { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.knopf.gefahr { color: var(--gefahr); border-color: var(--gefahr); }
.knopf.klein { padding: .25rem .65rem; font-size: .85rem; }
.knopf[disabled] { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--akzent); cursor: pointer; font: inherit; text-decoration: underline; text-align: left; }
.link.gefahr, .gefahr { color: var(--gefahr); }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.verkauft { display: flex; gap: .4rem; align-items: center; }
.verkauft select { width: auto; }

.meldung { padding: .7rem 1rem; border-radius: 6px; margin-bottom: 1rem; border: 1px solid transparent; }
.meldungen { position: fixed; top: 4rem; right: 16px; left: 16px; max-width: 520px; margin-left: auto; z-index: 20; }
.meldungen .meldung { display: flex; justify-content: space-between; gap: 1rem; box-shadow: 0 4px 16px rgba(0,0,0,.12); border-color: var(--linie); }
.schliessen { background: none; border: 0; font-size: 1.2rem; line-height: 1; cursor: pointer; color: inherit; }
.meldung.ok { background: var(--ok-grund); color: var(--ok); }
.meldung.fehler { background: var(--gefahr-grund); color: var(--gefahr); }
.hinweis-box { background: var(--warn-grund); color: var(--text); }
.hinweis-box ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.marke-ok { color: var(--ok); font-weight: 500; }
.marke-warn { color: var(--warn); font-weight: 500; }

.status { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; background: var(--grund); border: 1px solid var(--linie); margin-right: .3rem; }
.status.gross { font-size: .95rem; padding: .25rem .8rem; }
.s-online, .s-freigegeben { background: var(--ok-grund); color: var(--ok); border-color: transparent; }
.s-reserviert { background: var(--warn-grund); color: var(--warn); border-color: transparent; }
.s-verkauft, .s-offline { color: var(--leise); }
.s-fehler { background: var(--gefahr-grund); color: var(--gefahr); }

.tabelle { width: 100%; border-collapse: collapse; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.tabelle th, .tabelle td { padding: .6rem .8rem; border-bottom: 1px solid var(--linie); text-align: left; }
.tabelle th { font-size: .8rem; color: var(--leise); font-weight: 500; }

.schritte { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.schritte a { padding: .3rem .8rem; border-radius: 999px; background: var(--karte); border: 1px solid var(--linie); text-decoration: none; color: var(--text); font-size: .9rem; }

.upload-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.upload-feld { border: 1px dashed var(--linie); border-radius: 6px; padding: .6rem; display: flex; flex-direction: column; gap: .4rem; font-weight: 500; }
.pflicht { color: var(--gefahr); font-weight: 600; font-size: .75rem; }

.foto-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.foto { margin: 0; border: 1px solid var(--linie); border-radius: 6px; overflow: hidden; background: var(--grund); }
.foto img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.foto figcaption { padding: .45rem .55rem; font-size: .8rem; display: flex; flex-direction: column; gap: .2rem; }
.foto.gesperrt { border-color: var(--warn); }
.foto:target { outline: 3px solid var(--akzent); }
.anleitung { padding-left: 1.2rem; margin: .4rem 0 1rem; font-size: .9rem; }
details > summary { cursor: pointer; color: var(--akzent); margin-bottom: .6rem; }
.nachtrag summary { cursor: pointer; color: var(--akzent); margin-bottom: .6rem; }
.erkennung { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--linie); }

.legende .sicherheit { margin-right: .2rem; }
.felder { border: 1px solid var(--linie); border-radius: 6px; }
.feld { display: grid; grid-template-columns: 190px 1fr 280px; gap: .4rem 1rem; padding: .6rem .8rem; border-bottom: 1px solid var(--linie); border-left: 4px solid transparent; }
.feld:last-child { border-bottom: 0; }
.feld:target { background: var(--grund); }
.feld.s-unsicher { border-left-color: var(--gefahr); background: color-mix(in srgb, var(--gefahr-grund) 45%, transparent); }
.feld.s-wahrscheinlich { border-left-color: var(--warn); }
.feld.s-sicher { border-left-color: var(--akzent); }
.feld.frei { border-left-color: var(--ok); }
.feld.ohne-wert .feld-wert strong { color: var(--leise); font-weight: 400; }
.feld-name { font-weight: 500; }
.quelle { font-size: .75rem; color: var(--leise); border: 1px solid var(--linie); border-radius: 4px; padding: 0 .35rem; margin-left: .3rem; }
.sicherheit { font-size: .75rem; border-radius: 4px; padding: 0 .4rem; margin-left: .2rem; }
.sicherheit.s-sicher { background: var(--grund); color: var(--akzent); }
.sicherheit.s-wahrscheinlich { background: var(--warn-grund); color: var(--warn); }
.sicherheit.s-unsicher { background: var(--gefahr-grund); color: var(--gefahr); }
.status-feld { font-size: .8rem; color: var(--ok); margin-left: .3rem; }
.hinweis { font-size: .82rem; color: var(--leise); margin-top: .15rem; }
.belege { font-size: .78rem; color: var(--leise); }
.feld-aktion { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.alternativen { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.aendern summary { cursor: pointer; color: var(--akzent); font-size: .85rem; }
.freigabe-fuss { margin-top: 1.2rem; }
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

body.wartet { cursor: progress; }
.warte-hinweis { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 50; }
.warte-hinweis div { background: var(--karte); padding: 1.2rem 1.6rem; border-radius: var(--radius); max-width: 90vw; }

@media (max-width: 760px) {
  .feld { grid-template-columns: 1fr; }
  .zwei-spalten { grid-template-columns: 1fr; }
  .kopf { padding: .6rem 16px; }
  .kopf .wer { display: none; }
  .knopf { white-space: nowrap; }
  .tabelle th:nth-child(4), .tabelle td:nth-child(4) { display: none; }
}
