@font-face {
  font-family: 'Manrope';
  src: url('assets/manrope-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --nacht: #07111f;
  --mint: #25c990;
  --mint-hell: #5ee0b1;
  --mint-tief: #076046;
  --eis: #f4faf7;
  --schiefer: #46515e;
  --bg: var(--eis);
  --flaeche: #ffffff;
  --flaeche-2: #eaf5f0;
  --text: var(--nacht);
  --text-2: #4b5866;
  --linie: #d9e6e0;
  --warn-bg: #fff4e0;
  --warn-text: #7a4b00;
  --rot: #b42318;
  --schatten: 0 1px 2px rgba(7, 17, 31, .06), 0 8px 24px rgba(7, 17, 31, .06);
  --radius: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07111f;
    --flaeche: #0f1c2e;
    --flaeche-2: #13263b;
    --text: #e9f3ef;
    --text-2: #a9b7c4;
    --linie: #22364d;
    --warn-bg: #3a2a0c;
    --warn-text: #ffd48a;
    --rot: #ff8a80;
    --mint-tief: #5ee0b1;
    --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
  padding-bottom: env(safe-area-inset-bottom);
  min-height: 100vh;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

.kopf {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: var(--nacht);
  color: #fff;
}
.marke { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 18px; letter-spacing: -.01em; }
.marke img { border-radius: 9px; display: block; }
.marke strong { font-weight: 800; }
.kopf-knopf {
  border: 1px solid rgba(255, 255, 255, .25);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 600;
}
.menue {
  position: fixed;
  z-index: 20;
  right: 12px;
  top: calc(env(safe-area-inset-top) + 58px);
  display: grid;
  gap: 4px;
  min-width: 230px;
  padding: 10px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 16px;
  box-shadow: var(--schatten);
}
.menue button { text-align: left; border: 0; background: transparent; padding: 12px; border-radius: 10px; font-weight: 600; }
.menue button:hover { background: var(--flaeche-2); }
.menue-name { margin: 4px 12px 6px; color: var(--text-2); font-size: 14px; }

main { max-width: 720px; margin: 0 auto; padding: 16px; }

.anmeldung { display: grid; gap: 22px; padding-top: 12px; }
.kicker { margin: 0 0 6px; color: var(--mint-tief); font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.anmeldung h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.1; letter-spacing: -.02em; font-weight: 800; }
.anmeldung-text p { margin: 0; color: var(--text-2); }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); }
.anmelde-karte { padding: 20px; display: grid; gap: 14px; }
.anmelde-karte h2 { margin: 0; font-size: 20px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
input, textarea {
  width: 100%;
  border: 1px solid var(--linie);
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
}
textarea { resize: vertical; line-height: 1.45; }

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--linie);
  background: var(--flaeche);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.knopf.haupt { background: var(--mint); border-color: var(--mint); color: var(--nacht); }
.knopf.haupt:active { background: var(--mint-hell); }
.knopf.leise { background: transparent; }
.knopf[disabled] { opacity: .45; cursor: not-allowed; }
.link-knopf { border: 0; background: none; padding: 8px 0; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
.fehler { margin: 0; color: var(--rot); font-weight: 600; font-size: 15px; }
.klein { margin: 0; color: var(--text-2); font-size: 14px; }

.hinweis-box {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--warn-bg);
  color: var(--warn-text);
}
.hinweis-box.mint { background: var(--flaeche-2); color: var(--text); border: 1px solid var(--linie); }
.hinweis-box strong { display: block; font-size: 16px; margin-bottom: 4px; }
.hinweis-box p { margin: 0 0 12px; font-size: 15px; }
.hinweis-box p:last-child { margin-bottom: 0; }
.hinweis-box .knopf { width: 100%; }
.teilen { display: inline-block; vertical-align: -3px; }

.reiter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--flaeche-2);
  border-radius: 14px;
  margin-bottom: 10px;
}
.reiter button {
  border: 0;
  background: transparent;
  border-radius: 11px;
  padding: 10px 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-2);
}
.reiter button[aria-pressed='true'] { background: var(--flaeche); color: var(--text); box-shadow: var(--schatten); }
.zahl {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--linie);
  color: var(--text);
  font-size: 13px;
}
.reiter button[data-ansicht='neu'] .zahl.offen { background: var(--mint); color: var(--nacht); }

.bilanz { margin: 6px 2px 2px; font-size: 14px; color: var(--text-2); }
.stand { margin: 0 2px 10px; font-size: 13px; color: var(--text-2); min-height: 1em; }

.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.eintrag { padding: 16px; display: grid; gap: 10px; }
.eintrag-oben { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.zeit { color: var(--text-2); font-size: 14px; white-space: nowrap; }
.zeit.frisch { color: var(--mint-tief); font-weight: 700; }
.eintrag-name {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
}
.eintrag-info { margin: 0; color: var(--text-2); font-size: 15px; }
.eintrag-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eintrag-knoepfe .knopf { width: 100%; }
.eintrag-knoepfe .knopf:only-child { grid-column: span 2; }
.eintrag-status { font-size: 14px; color: var(--text-2); margin: 0; }

.quelle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: var(--flaeche-2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.quelle::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--q, var(--schiefer)); }
.quelle[data-q='instagram'] { --q: #e1306c; }
.quelle[data-q='tiktok'] { --q: #25f4ee; box-shadow: inset 0 0 0 1px rgba(254, 44, 85, .45); }
.quelle[data-q='youtube'] { --q: #ff0000; }
.quelle[data-q='facebook'] { --q: #1877f2; }
.quelle[data-q='google'] { --q: #4285f4; }
.quelle[data-q='linkedin'] { --q: #0a66c2; }
.quelle[data-q='website'] { --q: var(--mint); }
.quelle[data-q='ki'] { --q: #8b5cf6; }

.leer { text-align: center; padding: 36px 16px; color: var(--text-2); }
.leer-titel { font-size: 20px; font-weight: 800; color: var(--text); margin: 0 0 6px; }
.leer p { margin: 0; }

.blatt {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.blatt-kopf {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: var(--nacht);
  color: #fff;
}
.zurueck { border: 0; background: transparent; color: #fff; font-weight: 700; padding: 8px 4px; font-size: 16px; }
.zurueck::before { content: '‹'; font-size: 24px; line-height: 0; margin-right: 6px; position: relative; top: 2px; }
.status-pille { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 13px; font-weight: 700; }
.status-pille[data-status='neu'] { background: var(--mint); color: var(--nacht); }
.blatt-inhalt { max-width: 720px; margin: 0 auto; padding: 18px 16px 40px; outline: none; display: grid; gap: 12px; align-content: start; }
.blatt-inhalt h2 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.blatt-inhalt h3 { margin: 18px 0 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.herkunft-zeile { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }
.unterzeile { margin: 0; color: var(--text-2); }
.warnung { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-text); font-size: 15px; }
.aktionen-gross .knopf { width: 100%; min-height: 56px; font-size: 18px; }
.antwort-knoepfe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.knopf.antwort { flex-direction: column; gap: 2px; min-height: 64px; padding: 10px 6px; font-size: 15px; }
.knopf.antwort small { font-weight: 600; color: var(--text-2); font-size: 12px; }

.angaben { margin: 6px 0 0; display: grid; gap: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.angaben div { display: grid; gap: 2px; padding: 12px 16px; border-top: 1px solid var(--linie); }
.angaben div:first-child { border-top: 0; }
.angaben dt { font-size: 13px; color: var(--text-2); font-weight: 600; }
.angaben dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }
.angaben a { color: inherit; }

.notiz { display: grid; gap: 8px; }
.ergebnisse { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ergebnisse .knopf { min-height: 46px; font-size: 15px; }
.ergebnisse .knopf[aria-pressed='true'] { background: var(--mint); border-color: var(--mint); color: var(--nacht); }
.weitere { display: flex; flex-wrap: wrap; gap: 16px; }

.verlauf { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--linie); margin-left: 6px; }
.verlauf li { position: relative; padding: 4px 0 12px 16px; font-size: 15px; }
.verlauf li::before { content: ''; position: absolute; left: -7px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--flaeche); border: 2px solid var(--mint); }
.verlauf time { display: block; font-size: 13px; color: var(--text-2); }

.feld { font-weight: 600; }
.editor-knoepfe { display: grid; gap: 8px; }
.editor-knoepfe .knopf { width: 100%; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  transform: translateX(-50%);
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--nacht);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--schatten);
}
@media (prefers-color-scheme: dark) { .toast { background: var(--mint); color: var(--nacht); } }

@media (min-width: 720px) {
  .anmeldung { grid-template-columns: 1.1fr 1fr; align-items: center; padding-top: 48px; }
  .liste { grid-template-columns: 1fr 1fr; }
}
