:root {
  --rot: #eb1923;
  --rot-dunkel: #ae1800;
  --grund: #f3f2f1;
  --karte: #ffffff;
  --text: #222020;
  --leise: #6b6766;
  --linie: #e4e1e0;
  --feld: #f3f2f1;
  --gruen: #2e8b57;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #161515;
    --karte: #232121;
    --text: #f1efee;
    --leise: #a8a3a1;
    --linie: #3a3736;
    --feld: #2d2a2a;
    --rot-dunkel: #ff6b6b;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--grund);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }

.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--karte); border-bottom: 1px solid var(--linie);
}
.marke { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.marke img { height: 40px; width: auto; }
.schloss { font-size: 13px; color: var(--gruen); display: flex; align-items: center; gap: 6px; }
.schloss::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gruen);
}

main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }
.karte {
  background: var(--karte); border: 1px solid var(--linie); border-radius: 16px;
  padding: 24px; margin-bottom: 16px;
}
.karte.mitte { text-align: center; }
h1 { font-size: 22px; line-height: 1.3; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.leise { color: var(--leise); }
.klein { font-size: 13px; margin: 16px 0 0; }
.fehlertext { color: var(--rot-dunkel); margin-top: 12px; }

.schritte { padding-left: 20px; margin: 16px 0; }
.schritte li { margin-bottom: 12px; }

.nachricht {
  background: var(--feld); border-radius: 10px; padding: 12px 14px; margin: 8px 0 16px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

button {
  font: inherit; font-weight: 700; color: var(--text); background: var(--karte);
  border: 1px solid #d9d6d5; border-radius: 999px; height: 38px; padding: 0 18px;
  cursor: pointer; white-space: nowrap;
}
button.haupt { color: var(--rot); border-color: var(--rot); border-width: 1.5px; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(235, 25, 35, .2); }

form { display: flex; gap: 10px; flex-wrap: wrap; }
input[type=password] {
  flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--feld);
  border: 1px solid transparent; border-radius: 10px; height: 42px; padding: 0 12px;
}

.leiste { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; flex-wrap: wrap; }
.liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.liste li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.liste .name { font-weight: 600; overflow-wrap: anywhere; }
.liste .info { grid-column: 1; color: var(--leise); font-size: 13px; }
.liste button { grid-row: 1 / span 2; grid-column: 2; }
.liste .balken { grid-column: 1 / -1; height: 4px; background: var(--feld); border-radius: 2px; overflow: hidden; }
.liste .balken > div { height: 100%; width: 0; background: var(--rot); transition: width .2s; }
.liste .fertig { color: var(--gruen); }

.kreisel {
  width: 28px; height: 28px; margin: 8px auto 12px; border-radius: 50%;
  border: 3px solid var(--linie); border-top-color: var(--rot); animation: dreh 0.9s linear infinite;
}
@keyframes dreh { to { transform: rotate(360deg); } }

.fuss {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  padding: 16px; font-size: 13px; color: var(--leise);
}
.fuss a { color: var(--leise); }

@media (max-width: 520px) {
  .karte { padding: 18px; border-radius: 14px; }
  h1 { font-size: 19px; }
  .schloss { font-size: 0; }
  .liste li { grid-template-columns: 1fr; }
  .liste button { grid-row: auto; grid-column: 1; justify-self: start; }
}

.liste li { grid-template-columns: auto 1fr auto; }
.liste li > .haken { grid-row: 1 / span 2; }
.liste li > .name { grid-column: 2; }
.liste li > .info { grid-column: 2; }
.liste li > button { grid-row: 1 / span 2; grid-column: 3; }
.liste .ordnerzeile { display: block; padding: 0; }
.ordnerkopf {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center;
  padding: 12px 0; cursor: pointer; border-radius: 6px;
}
.ordnerkopf:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(235, 25, 35, .2); }
.ordnerkopf > .haken { grid-row: 1 / span 2; }
.ordnerkopf .name { font-weight: 700; overflow-wrap: anywhere; }
.ordnerkopf .name::before {
  content: "▸"; display: inline-block; width: 18px; color: var(--leise); transition: transform .15s;
}
.ordnerzeile.offen > .ordnerkopf .name::before { transform: rotate(90deg); }
.ordnerkopf .info { grid-column: 2; color: var(--leise); font-size: 13px; padding-left: 18px; }
.ordnerzeile > .liste { margin-left: 26px; border-top: 1px solid var(--linie); }
.ordnerzeile > .liste > li:last-child { border-bottom: 0; }
.haken {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0;
  border: 1px solid #b9b4b2; border-radius: 50%; background: var(--karte); cursor: pointer;
  display: inline-grid; place-content: center; flex: none;
}
.haken:checked, .haken:indeterminate { background: var(--rot); border-color: var(--rot); }
.haken:checked::after {
  content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: translate(0, -1px) rotate(45deg);
}
.haken:indeterminate::after { content: ""; width: 8px; height: 2px; background: #fff; }
.haken:disabled { opacity: .35; cursor: default; }
.leiste .alle { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.leiste #summe { flex: 1; color: var(--leise); font-size: 13px; min-width: 140px; }
.leiste .knoepfe { display: flex; gap: 8px; }
.zipzeile { margin: 8px 0 12px; }
.zipzeile .balken { height: 4px; background: var(--feld); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.zipzeile .balken > div { height: 100%; width: 0; background: var(--rot); transition: width .2s; }
.zipzeile span { font-size: 13px; color: var(--leise); }
@media (max-width: 520px) {
  .liste li { grid-template-columns: auto 1fr; }
  .liste li > button { grid-row: auto; grid-column: 2; justify-self: start; }
  .ordnerzeile > .liste { margin-left: 14px; }
  .leiste .knoepfe { width: 100%; }
}

/* Datenschutzseite */
.text h2 { font-size: 17px; margin: 20px 0 8px; }
.text ul { padding-left: 20px; }
