/* Hochzeits-App - Designsystem "Aquarell-Journal"
   Cremepapier, Blütenwaschungen, Goldhaarlinien. Fraunces für Überschriften,
   Karla für alles andere. Mobile zuerst, Tab-Leiste unten. */

:root {
  --papier: #fbf7f1;
  --papier-tief: #f3ebe0;
  --karte: #fffdfa;
  --karte-rand: rgba(197, 165, 114, 0.22);
  --tinte: #3a3330;
  --tinte-leise: #7d6f67;
  --tinte-zart: #6f635b;
  --tinte-tab: #5f544d;

  --rose: #d4848f;
  --rose-tief: #b06673;
  --rose-hell: #f7e3e5;
  --salbei: #86a17e;
  --salbei-hell: #e2ebdd;
  --gold: #c9a86a;
  --gold-hell: #f2e6cf;
  --himmel: #8aabcc;
  --himmel-hell: #e2ecf5;
  --lavendel: #a6a7cf;
  --lavendel-hell: #e9e9f4;
  --bernstein: #cf9a4e;
  --bernstein-hell: #f8e9d4;

  --schatten-weich: 0 1px 2px rgba(58, 51, 48, 0.04), 0 8px 24px -12px rgba(58, 51, 48, 0.16);
  --schatten-hoch: 0 2px 6px rgba(58, 51, 48, 0.06), 0 18px 40px -18px rgba(58, 51, 48, 0.28);

  --radius: 20px;
  --radius-klein: 12px;
  --spalte: min(680px, 100%);

  --titel: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --text: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --tab-hoehe: 62px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #1b1816;
    --papier-tief: #151311;
    --karte: #262120;
    --karte-rand: rgba(201, 168, 106, 0.2);
    --tinte: #f2eae2;
    --tinte-leise: #b3a49a;
    --tinte-zart: #a2948a;
    --tinte-tab: #c3b5aa;

    --rose: #e29aa4;
    --rose-tief: #f0b7bf;
    --rose-hell: #43302f;
    --salbei: #a3bd9a;
    --salbei-hell: #2c3729;
    --gold: #d9bb84;
    --gold-hell: #3b3323;
    --himmel: #a4c3e0;
    --himmel-hell: #26313b;
    --lavendel: #bcbde0;
    --lavendel-hell: #2d2c3a;
    --bernstein: #e0ac68;
    --bernstein-hell: #3d3122;

    --schatten-weich: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    --schatten-hoch: 0 2px 6px rgba(0, 0, 0, 0.35), 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  color: var(--tinte);
  background-color: var(--papier);
  background-image: url('/art/hintergrund-mobil.webp');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

@media (min-width: 700px) {
  body { background-image: url('/art/hintergrund.webp'); }
}

@media (prefers-color-scheme: dark) {
  /* Die Aquarellflächen sind für dunkle Oberflächen zu hell - nur als Hauch. */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--papier);
    opacity: 0.94;
    pointer-events: none;
    z-index: -1;
  }
}

h1, h2, h3, h4 {
  font-family: var(--titel);
  font-weight: 600;
  font-variation-settings: 'SOFT' 30, 'WONK' 1;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.4em;
  color: var(--tinte);
}

h1 { font-size: clamp(1.6rem, 5.5vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 0.8em; }
a { color: var(--rose-tief); text-decoration-color: var(--rose); text-underline-offset: 3px; }

/* ---------- Grundgerüst ---------- */

/* Unten so viel Luft, dass der schwebende Plus-Knopf (56 px über der Tab-Leiste)
   auch beim Ende der Liste nichts verdeckt. */
.huelle {
  width: var(--spalte);
  margin: 0 auto;
  padding-top: 0;
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: calc(var(--tab-hoehe) + env(safe-area-inset-bottom) + 96px);
  padding-left: max(16px, env(safe-area-inset-left));
}

.kopf {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--papier) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--karte-rand);
}

.kopf__logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 1px var(--karte-rand);
}

.kopf__titel {
  font-family: var(--titel);
  font-size: 1.12rem;
  font-weight: 600;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kopf__aktion {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--karte-rand);
  background: var(--karte);
  color: var(--tinte-leise);
  font-size: 1.05rem;
  cursor: pointer;
}

.kopf__aktion:active { transform: scale(0.94); }

/* ---------- Tab-Leiste ---------- */

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  background: color-mix(in srgb, var(--papier) 92%, transparent);
  backdrop-filter: saturate(1.5) blur(18px);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  border-top: 1px solid var(--karte-rand);
}

.tabs__eintrag {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: var(--tab-hoehe);
  border: 0;
  background: none;
  color: var(--tinte-tab);
  font-family: var(--text);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tabs__eintrag svg { width: 22px; height: 22px; }

.tabs__eintrag--aktiv { color: var(--rose-tief); }

.tabs__eintrag--aktiv::before {
  content: '';
  position: absolute;
  top: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rose-hell);
  z-index: -1;
}

/* ---------- Karten ---------- */

.karte {
  background: var(--karte);
  border: 1px solid var(--karte-rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten-weich);
  padding: 16px;
  margin-bottom: 12px;
}

.karte--flach { box-shadow: none; }
.karte--knapp { padding: 12px 14px; }

.karte__kopf {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.karte__titel {
  font-family: var(--titel);
  font-size: 1.02rem;
  font-weight: 600;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  margin: 0;
  flex: 1;
}

.karte__zeile {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--tinte-leise);
  font-size: 0.86rem;
}

a.karte, button.karte {
  display: block;
  width: 100%;
  text-align: left;
  color: inherit;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

a.karte:active, button.karte:active {
  transform: scale(0.988);
  box-shadow: var(--schatten-hoch);
}

/* ---------- Abschnittsüberschrift mit Goldlinie ---------- */

.abschnitt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 2px 10px;
}

.abschnitt h2 { margin: 0; font-size: 1.08rem; }

.abschnitt::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
  opacity: 0.6;
}

.abschnitt__zusatz {
  font-size: 0.8rem;
  color: var(--tinte-zart);
  white-space: nowrap;
}

/* ---------- Marken (Status, Priorität, Kategorie) ---------- */

.marke {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--papier-tief);
  color: var(--tinte-leise);
}

.marke--offen { background: var(--himmel-hell); color: color-mix(in srgb, var(--himmel) 70%, var(--tinte)); }
.marke--in_arbeit { background: var(--bernstein-hell); color: color-mix(in srgb, var(--bernstein) 65%, var(--tinte)); }
.marke--review { background: var(--lavendel-hell); color: color-mix(in srgb, var(--lavendel) 60%, var(--tinte)); }
.marke--erledigt { background: var(--salbei-hell); color: color-mix(in srgb, var(--salbei) 65%, var(--tinte)); }
.marke--zurueckgestellt { background: var(--papier-tief); color: var(--tinte-zart); }
.marke--verworfen { background: var(--papier-tief); color: var(--tinte-zart); text-decoration: line-through; }
.marke--hoch { background: var(--rose-hell); color: var(--rose-tief); }
.marke--mittel { background: var(--gold-hell); color: color-mix(in srgb, var(--gold) 65%, var(--tinte)); }
.marke--niedrig { background: var(--papier-tief); color: var(--tinte-zart); }
.marke--nr { font-family: var(--titel); font-variation-settings: 'WONK' 0; background: var(--gold-hell); color: color-mix(in srgb, var(--gold) 70%, var(--tinte)); }

/* ---------- Knöpfe ---------- */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--karte-rand);
  background: var(--karte);
  color: var(--tinte);
  font-family: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, filter 0.16s;
}

.knopf:active { transform: scale(0.96); }
.knopf:disabled { opacity: 0.5; cursor: default; }

.knopf--haupt {
  background: linear-gradient(160deg, var(--rose) 0%, var(--rose-tief) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px -8px var(--rose-tief);
}

.knopf--leise { background: transparent; border-color: transparent; color: var(--tinte-leise); }
.knopf--gefahr { color: var(--rose-tief); }
.knopf--breit { width: 100%; }
.knopf--klein { min-height: 40px; padding: 0 14px; font-size: 0.84rem; }

/* Schwebender Aktionsknopf */
.plus {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(var(--tab-hoehe) + env(safe-area-inset-bottom) + 16px);
  z-index: 35;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(160deg, var(--rose) 0%, var(--rose-tief) 100%);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  box-shadow: 0 10px 26px -10px var(--rose-tief);
  cursor: pointer;
  transition: transform 0.14s;
}

.plus:active { transform: scale(0.92) rotate(90deg); }

/* ---------- Formulare ---------- */

.feld { margin-bottom: 14px; }

.feld__marke {
  display: block;
  margin-bottom: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--tinte-leise);
}

input[type='text'], input[type='password'], input[type='number'], input[type='date'],
input[type='datetime-local'], input[type='email'], input[type='tel'], input[type='search'],
input[type='url'], textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--karte-rand);
  border-radius: var(--radius-klein);
  background: var(--karte);
  color: var(--tinte);
  font-family: var(--text);
  font-size: 16px; /* verhindert das Hineinzoomen auf dem iPhone */
  line-height: 1.4;
  appearance: none;
}

textarea { min-height: 92px; resize: vertical; }

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--tinte-leise) 50%),
                    linear-gradient(135deg, var(--tinte-leise) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid color-mix(in srgb, var(--rose) 60%, transparent);
  outline-offset: 1px;
  border-color: var(--rose);
}

.feld-reihe { display: flex; gap: 10px; }
.feld-reihe > * { flex: 1; min-width: 0; }

.schalter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--karte-rand);
}

.schalter:last-child { border-bottom: 0; }

/* Eigenes Kästchen statt des Systemhäkchens: nur so lässt sich die Trefferfläche
   auf 44 px bringen, ohne das Kästchen selbst aufzublähen. */
input[type='checkbox'].kasten {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 26px;
  height: 26px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: none;
  border: 1.5px solid color-mix(in srgb, var(--tinte-leise) 60%, transparent);
  border-radius: 8px;
  background: var(--karte);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}

/* Unsichtbarer Rand um das Kästchen - 26 px + 2 × 9 px ergeben 44 px zum Tippen. */
input[type='checkbox'].kasten::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 12px;
}

input[type='checkbox'].kasten:checked {
  background: var(--rose-tief);
  border-color: var(--rose-tief);
}

input[type='checkbox'].kasten:checked::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  width: 6px;
  height: 11px;
  border: solid var(--papier);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

input[type='checkbox'].kasten:disabled { opacity: 0.5; cursor: default; }

/* Filterreihe, horizontal scrollbar */
.filter {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 -2px;
  scrollbar-width: none;
}

.filter::-webkit-scrollbar { display: none; }

.filter__knopf {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--karte-rand);
  background: var(--karte);
  color: var(--tinte-leise);
  font-family: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.filter__knopf--aktiv {
  background: var(--rose-hell);
  border-color: color-mix(in srgb, var(--rose) 40%, transparent);
  color: var(--rose-tief);
}

/* ---------- Fortschritt ---------- */

.fortschritt {
  height: 9px;
  border-radius: 999px;
  background: var(--papier-tief);
  overflow: hidden;
}

.fortschritt__balken {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--salbei), var(--gold));
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fortschritt--budget .fortschritt__balken { background: linear-gradient(90deg, var(--himmel), var(--rose)); }
.fortschritt--warnung .fortschritt__balken { background: linear-gradient(90deg, var(--bernstein), var(--rose-tief)); }

/* ---------- Kennzahlen ---------- */

.zahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}

.zahl {
  background: var(--karte);
  border: 1px solid var(--karte-rand);
  border-radius: var(--radius-klein);
  padding: 11px 12px;
  text-align: center;
}

.zahl__wert {
  font-family: var(--titel);
  font-size: 1.35rem;
  font-weight: 600;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  display: block;
  line-height: 1.1;
}

.zahl__marke {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tinte-zart);
}

/* ---------- Countdown-Kopf ---------- */

.countdown {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--schatten-hoch);
  border: 1px solid var(--karte-rand);
  isolation: isolate;
}

.countdown__bild {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center 34%;
}

.countdown__blende {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(38, 30, 28, 0.72) 0%, rgba(38, 30, 28, 0.12) 55%, transparent 100%);
}

.countdown__text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 16px;
  color: #fff;
  text-shadow: 0 1px 12px rgba(30, 20, 18, 0.55);
}

.countdown__tage {
  font-family: var(--titel);
  font-size: 2.5rem;
  font-weight: 700;
  font-variation-settings: 'SOFT' 50, 'WONK' 1;
  line-height: 1;
  display: block;
}

.countdown__zusatz {
  font-size: 0.9rem;
  opacity: 0.94;
  letter-spacing: 0.02em;
}

/* ---------- Post-its ---------- */

.postits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.postit {
  position: relative;
  min-height: 132px;
  padding: 14px 12px 30px;
  border-radius: 3px 3px 14px 3px;
  font-size: 0.94rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #4a403a;
  box-shadow: var(--schatten-weich);
  cursor: pointer;
  border: 0;
  text-align: left;
  font-family: var(--text);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.postit:nth-child(3n) { transform: rotate(-1.1deg); }
.postit:nth-child(3n + 1) { transform: rotate(0.8deg); }
.postit:nth-child(4n) { transform: rotate(-0.4deg); }
.postit:active { transform: scale(0.97) rotate(0deg); box-shadow: var(--schatten-hoch); }

.postit--gelb { background: linear-gradient(165deg, #fdf3c8, #f8e9a8); }
.postit--rosa { background: linear-gradient(165deg, #fde2e4, #f8ccd1); }
.postit--gruen { background: linear-gradient(165deg, #e2f0d9, #cde3c2); }
.postit--blau { background: linear-gradient(165deg, #dceaf7, #c4dbee); }

.postit--erledigt { opacity: 0.55; }
.postit--erledigt .postit__text { text-decoration: line-through; }

.postit__fuss {
  position: absolute;
  left: 12px;
  bottom: 9px;
  font-size: 0.7rem;
  color: rgba(74, 64, 58, 0.6);
}

/* ---------- Moodboard ---------- */

.mosaik {
  columns: 2;
  column-gap: 10px;
}

@media (min-width: 560px) { .mosaik { columns: 3; } }

.mosaik__stueck {
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: var(--radius-klein);
  overflow: hidden;
  background: var(--karte);
  border: 1px solid var(--karte-rand);
  box-shadow: var(--schatten-weich);
}

.mosaik__bild { display: block; width: 100%; }

.mosaik__fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  font-size: 0.82rem;
}

/* Das Herz bleibt klein, die Fläche zum Tippen misst 44 px. Die negativen
   Ränder halten die Fußzeile dabei so flach wie zuvor. */
.herz {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: -8px -10px -8px 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  color: var(--tinte-zart);
  transition: transform 0.16s;
}

.herz--aktiv { color: var(--rose); }
.herz:active { transform: scale(1.3); }

/* ---------- Listen und Zeilen ---------- */

.liste { list-style: none; margin: 0; padding: 0; }

.zeile {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--karte-rand);
}

.zeile:last-child { border-bottom: 0; }
.zeile__inhalt { flex: 1; min-width: 0; }
.zeile__titel { font-weight: 600; }
.zeile__zusatz { font-size: 0.82rem; color: var(--tinte-zart); }
.zeile--erledigt .zeile__titel { text-decoration: line-through; color: var(--tinte-zart); font-weight: 400; }

/* ---------- Kommentare ---------- */

.blase {
  padding: 11px 13px;
  border-radius: 14px 14px 14px 4px;
  background: var(--papier-tief);
  margin-bottom: 9px;
}

.blase--eigen { background: var(--rose-hell); border-radius: 14px 14px 4px 14px; }
.blase--claude { background: var(--lavendel-hell); }

.blase__kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.blase__autor { font-weight: 700; font-size: 0.86rem; }
.blase__zeit { font-size: 0.72rem; color: var(--tinte-zart); }
.blase__text { overflow-wrap: anywhere; }
.blase__text .erwaehnung { color: var(--rose-tief); font-weight: 600; }
.blase__text p:last-child { margin-bottom: 0; }

.kommentar-liste {
  margin: 0 0 8px;
  padding-left: 20px;
}

.kommentar-liste li { margin-bottom: 3px; }

.kommentar-titel {
  display: block;
  font-family: var(--titel);
  font-size: 0.98rem;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  margin: 10px 0 4px;
}

.kommentar-code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.86em;
  padding: 1px 5px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--tinte) 8%, transparent);
}

/* ---------- Anhänge ---------- */

.anhaenge { display: flex; flex-wrap: wrap; gap: 8px; }

.anhang {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: var(--radius-klein);
  border: 1px solid var(--karte-rand);
  background: var(--papier-tief);
  font-size: 0.82rem;
  color: var(--tinte);
  text-decoration: none;
  max-width: 100%;
}

.anhang__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }

.anhang-bild {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius-klein);
  border: 1px solid var(--karte-rand);
}

/* ---------- Leerzustand mit Smila ---------- */

.leer {
  text-align: center;
  padding: 26px 18px 30px;
  color: var(--tinte-leise);
}

.leer img {
  width: 165px;
  max-width: 55%;
  opacity: 0.92;
  margin-bottom: 6px;
  mix-blend-mode: multiply;
}

@media (prefers-color-scheme: dark) {
  .leer img { mix-blend-mode: normal; opacity: 0.8; border-radius: 18px; }
}

.leer__titel { font-family: var(--titel); font-size: 1.1rem; color: var(--tinte); margin-bottom: 2px; }

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(40, 30, 28, 0.42);
  backdrop-filter: blur(3px);
  animation: einblenden 0.18s ease;
}

.modal__blatt {
  width: min(560px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: var(--papier);
  border-top: 3px solid var(--gold);
  box-shadow: var(--schatten-hoch);
  animation: hochschieben 0.26s cubic-bezier(0.2, 0.9, 0.25, 1);
}

@media (min-width: 620px) {
  .modal { align-items: center; }
  .modal__blatt { border-radius: 26px; border-top-width: 3px; }
}

.modal__kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.modal__kopf h2 { margin: 0; }

.modal__griff {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: var(--tinte-zart);
  opacity: 0.35;
  margin: -6px auto 12px;
}

/* ---------- Toast ---------- */

.toast-bereich {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-hoehe) + env(safe-area-inset-bottom) + 76px);
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100% - 32px));
  pointer-events: none;
}

.toast {
  padding: 11px 15px;
  border-radius: 14px;
  background: var(--tinte);
  color: var(--papier);
  font-size: 0.9rem;
  box-shadow: var(--schatten-hoch);
  animation: hochschieben 0.22s ease;
}

.toast--fehler { background: var(--rose-tief); color: #fff; }
.toast--erfolg { background: color-mix(in srgb, var(--salbei) 78%, var(--tinte)); color: #fff; }

/* ---------- Anmeldung ---------- */

.anmeldung {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 20px calc(26px + env(safe-area-inset-bottom));
  text-align: center;
}

.anmeldung__bild {
  width: min(280px, 72vw);
  border-radius: 50%;
  margin-bottom: 14px;
  box-shadow: 0 18px 44px -22px rgba(58, 51, 48, 0.55);
}

.anmeldung__titel {
  font-family: var(--titel);
  font-size: clamp(1.7rem, 7vw, 2.3rem);
  font-weight: 600;
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  margin: 0 0 2px;
}

.anmeldung__zusatz { color: var(--tinte-leise); margin-bottom: 22px; font-size: 0.95rem; }

.anmeldung form { width: min(340px, 100%); text-align: left; }

.anmeldung__fehler {
  color: var(--rose-tief);
  font-size: 0.9rem;
  min-height: 1.3em;
  text-align: center;
  margin-top: 10px;
}

/* ---------- Feier-Moment ---------- */

.feier {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(40, 30, 28, 0.35);
  backdrop-filter: blur(3px);
  animation: einblenden 0.2s ease;
  pointer-events: none;
}

.feier img {
  width: min(330px, 78vw);
  border-radius: 22px;
  box-shadow: var(--schatten-hoch);
  animation: hereinhuepfen 0.5s cubic-bezier(0.2, 1.3, 0.4, 1);
}

.feier__text {
  position: absolute;
  bottom: 18%;
  font-family: var(--titel);
  font-size: 1.3rem;
  color: #fff;
  text-shadow: 0 2px 14px rgba(40, 30, 28, 0.7);
}

/* ---------- Hilfsklassen und Animationen ---------- */

.leise { color: var(--tinte-leise); }
.zart { color: var(--tinte-zart); font-size: 0.84rem; }
.mitte { text-align: center; }
.rechts { text-align: right; }
.gedraengt { margin-bottom: 6px; }
.abstand { margin-top: 16px; }
.reihe { display: flex; align-items: center; gap: 8px; }
.reihe--verteilt { justify-content: space-between; }
.wachsen { flex: 1; min-width: 0; }
.umbruch { white-space: pre-wrap; overflow-wrap: anywhere; }
.versteckt { display: none !important; }

.geld { font-family: var(--titel); font-variation-settings: 'WONK' 0; font-weight: 600; }
.geld--minus { color: var(--rose-tief); }
.geld--plus { color: color-mix(in srgb, var(--salbei) 75%, var(--tinte)); }

.gestaffelt > * {
  animation: hereinschweben 0.42s cubic-bezier(0.2, 0.8, 0.25, 1) backwards;
}

.gestaffelt > *:nth-child(1) { animation-delay: 0.02s; }
.gestaffelt > *:nth-child(2) { animation-delay: 0.06s; }
.gestaffelt > *:nth-child(3) { animation-delay: 0.1s; }
.gestaffelt > *:nth-child(4) { animation-delay: 0.14s; }
.gestaffelt > *:nth-child(5) { animation-delay: 0.18s; }
.gestaffelt > *:nth-child(6) { animation-delay: 0.22s; }
.gestaffelt > *:nth-child(n + 7) { animation-delay: 0.26s; }

@keyframes hereinschweben {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

@keyframes hochschieben {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes einblenden {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hereinhuepfen {
  from { opacity: 0; transform: scale(0.82) rotate(-3deg); }
  to { opacity: 1; transform: none; }
}

.lade {
  display: block;
  width: 26px;
  height: 26px;
  margin: 34px auto;
  border: 2.5px solid var(--karte-rand);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: drehen 0.8s linear infinite;
}

@keyframes drehen { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
