/* ============================================================
   Urlaubsplan – Web-Version
   Grundlage ist 1:1 das Stylesheet der Finance-Tracker-Web-App
   (Cupertino-Look, Hell/Dunkel, Akzentfarben, 48px-Trefferflächen).
   Die Urlaubsplan-Ergänzungen stehen gesammelt am Ende.
   ============================================================ */

/* ---------------------------------------------------------------
   Farbsystem

   Je Akzent gibt es drei Rollen, weil ein kräftiger Ton selten alles
   gleichzeitig kann:
     --a1/--a2/--a3  kräftiger Verlauf für große Flächen
     --a-solid       Flächenfarbe, auf der weiße Schrift 4,5:1 erreicht
     --a-text        Schrift-/Linkfarbe auf dem Seitenhintergrund

   Die Werte sind nicht geschätzt, sondern ausgerechnet (siehe README).
   --------------------------------------------------------------- */
:root {
  --green: #34C759;
  --red:   #FF3B30;
  --orange:#FF9500;

  /* Hell */
  --bg:      #F2F2F7;
  --card:    #FFFFFF;
  --text:    #1C1C1E;
  --text-2:  #6A6A6F;
  --text-3:  #76767B;
  --sep:     rgba(60,60,67,.16);
  --fill:    rgba(120,120,128,.16);
  --tabbg:   rgba(251,251,253,.94);

  --radius:  20;
  --gutter:  16px;
  --tabbar:  calc(56px + env(safe-area-inset-bottom));

  /* Voreinstellung: Ocean. Die zehn Akzente selbst stehen in accents.css,
     erzeugt aus derselben Quelle wie das Dart-Gegenstück. */
  --a1: #064e6d; --a2: #086891; --a3: #0a7aa8;
  --a-solid-l: #0a74a0; --a-text-l: #086d97; --a-text-d: #38b6e5;
  --a-solid: var(--a-solid-l);
  --a-text:  var(--a-text-l);
}


/* Dunkel: einmal automatisch (Systemeinstellung) und einmal per Schalter.
   `:not([data-theme="light"])` sorgt dafür, dass die ausdrückliche Wahl
   „hell" die Systemeinstellung schlägt. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg:     #000000;
    --card:   #1C1C1E;
    --text:   #F5F5F7;
    --text-2: #AEAEB2;
    --text-3: #9A9AA0;
    --sep:    rgba(84,84,88,.5);
    --fill:   rgba(120,120,128,.26);
    --tabbg:  rgba(18,18,20,.94);
    --a-solid: var(--a1);
    --a-text:  var(--a-text-d);
    color-scheme: dark;
  }
}
html[data-theme="dark"] {
  --bg:     #000000;
  --card:   #1C1C1E;
  --text:   #F5F5F7;
  --text-2: #AEAEB2;
  --text-3: #9A9AA0;
  --sep:    rgba(84,84,88,.5);
  --fill:   rgba(120,120,128,.26);
  --tabbg:  rgba(18,18,20,.94);
  --a-solid: var(--a1);
  --a-text:  var(--a-text-d);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Muss vor allen Klassen stehen und !important tragen: Das `hidden`-Attribut
   kommt aus dem Browser-Stylesheet und verliert sonst gegen jede eigene Regel
   mit `display`. Genau das ist hier passiert – der ausgeblendete Blattdialog
   lag als unsichtbare Fläche über der gesamten Seite. */
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  /* Aus dem Home-Bildschirm gestartet reicht die Seite bis unter die
     Statusleiste. Ohne diesen Abstand klebt die Überschrift an der Uhrzeit. */
  padding-top: env(safe-area-inset-top);
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Mindestmaß für Trefferflächen – wie in der App. */
button, .row, .chip { min-height: 48px; }

.view {
  padding: 0 0 calc(var(--tabbar) + 24px);
  max-width: 560px; margin: 0 auto;
}

/* ---------- Hinweisleiste ---------- */
.preview-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px var(--gutter);
  background: var(--a-solid); color: #fff; font-size: 13.5px;
}
.preview-bar__close { color: #fff; font-size: 24px; line-height: 1; padding: 0 6px; min-height: 0; }

/* Leiste für eine bereitliegende neue Fassung. Bewusst kein Schließen-Kreuz:
   Wer sie wegtippt, bliebe auf dem alten Stand sitzen, ohne zu wissen warum. */
.update-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--gutter);
  background: var(--green); color: #fff; font-size: 13.5px;
}
.update-bar span { flex: 1; }
.update-bar__go {
  color: #fff; font-weight: 600; font-size: 13.5px;
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 999px;
  padding: 5px 14px; min-height: 0; white-space: nowrap;
}

/* ---------- Kopf ---------- */
.head {
  padding: 14px var(--gutter) 4px;
  display: flex; align-items: flex-end; gap: 10px;
}
.head h1 { font-size: 32px; font-weight: 800; letter-spacing: -.9px; margin: 0; flex: 1; }
.head__actions { display: flex; gap: 4px; }
.iconbtn {
  width: 48px; height: 48px; display: grid; place-items: center;
  color: var(--a-text); border-radius: 50%;
}
.iconbtn:disabled { color: var(--text-3); }

/* ---------- Karten ---------- */
.card {
  background: var(--card); border-radius: calc(var(--radius) * 1px);
  margin: 0 var(--gutter) 12px; padding: var(--gutter);
}
.card--flush { padding: 0; overflow: hidden; }

.section-head {
  padding: 14px calc(var(--gutter) + 4px) 4px;
  display: flex; align-items: center; gap: 8px;
}
.section-head h2 {
  flex: 1; margin: 0; font-size: 13px; font-weight: 600;
  letter-spacing: .4px; text-transform: uppercase; color: var(--text-2);
}
.section-head button { font-size: 15px; color: var(--a-text); padding: 0 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  margin: 10px var(--gutter) 12px; padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--a1) 0%, var(--a2) 55%, var(--a3) 100%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--a1) 38%, transparent);
}
/* Kein Abdunkler mehr: Die Verlaufsstufen sind so gewählt, dass weiße Schrift
   auf jeder von ihnen 4,5:1 erreicht. Eine schwarze Lage darüber hätte nur die
   Farbe stumpf gemacht, ohne das Problem an der Wurzel zu lösen. */
.hero::after {
  /* Dezenter Lichtfleck für Tiefe. Bewusst schwach: Er liegt hinter der
     zentrierten Monatsangabe, und ein heller Fleck macht weiße Schrift
     darüber unlesbar. */
  /* pointer-events: none ist Pflicht. Der Fleck liegt oben rechts genau über
     dem Pfeil zum nächsten Monat und wird als letztes Element über ihm
     gemalt – ohne diese Zeile fing er jeden Tipp ab. Man kam in einen
     Vormonat, aber nicht mehr zurück. */
  pointer-events: none;
  content: ""; position: absolute; right: -40px; top: -52px;
  width: 168px; height: 168px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%,
    rgba(255,255,255,.17) 0%, rgba(255,255,255,.07) 65%, transparent 100%);
}
.hero > * { position: relative; }
.hero__nav { display: flex; align-items: center; gap: 4px; }
.hero__nav button { color: #fff; width: 48px; height: 48px; display: grid; place-items: center; }
.hero__nav button[disabled] { opacity: .35; }
.hero__month {
  flex: 1; text-align: center; font-size: 12.5px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
}
.hero__label { font-size: 13px; margin-top: 8px; }
.hero__amount {
  font-size: 42px; font-weight: 800; letter-spacing: -1.4px;
  font-variant-numeric: tabular-nums; margin: 2px 0 0;
  white-space: nowrap;
}
.hero__pill {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  padding: 4px 9px; border-radius: 30px; background: rgba(255,255,255,.18);
  font-size: 12.5px; font-weight: 600;
}
.hero__metrics { display: flex; gap: 10px; margin-top: 18px; }
.hero__metric { flex: 1; min-width: 0; }
/* Wird von fitMetrics() in app.js gesetzt, wenn die Beträge selbst bei
   kleinster Schrift nicht mehr nebeneinander passen (lange Währungskürzel
   auf schmalen Geräten). Zwei pro Zeile statt drei. */
.hero__metrics.is-wrapped { flex-wrap: wrap; row-gap: 12px; }
.hero__metrics.is-wrapped .hero__metric { flex: 1 1 42%; }
.hero__metric span { display: block; font-size: 11.5px; }
/* Die Schriftgröße hier ist nur der Ausgangswert: fitText() in app.js misst
   nach dem Aufbau und verkleinert, falls der Betrag sonst nicht hineinpasst
   (siehe dort – "91.591,05 CHF" ist deutlich breiter als mit €-Zeichen). */
.hero__metric strong {
  display: block; font-size: 16px; font-weight: 700;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.hero__note { font-size: 12.5px; margin-top: 12px; }

/* ---------- Zeilen ---------- */
.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px var(--gutter); text-align: left;
  border-bottom: .5px solid var(--sep);
}
.row:last-child { border-bottom: 0; }
.row__badge {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center; color: #fff;
}
.row__body { flex: 1; min-width: 0; }
/* Kürzen statt überlaufen: Wird der Platz neben einem langen Wert eng,
   soll die Beschriftung Auslassungspunkte bekommen und nicht sichtbar aus
   ihrem Kasten herauslaufen. */
.row__title {
  display: block; font-size: 17px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row__sub {
  display: block; font-size: 13px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row__value { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row__value--income { color: var(--green); }
.row__chevron { color: var(--text-3); flex: none; }

/* ---------- Diagramme ---------- */
.donut-wrap { display: flex; align-items: center; gap: var(--gutter); }
/* minmax(0, 1fr) statt der voreingestellten Spaltenbreite: Eine Rasterspalte
   schrumpft sonst nicht unter den Inhalt ihrer Zeilen. Auf einem 320px
   breiten Gerät schob der längste Betrag dadurch die ganze Übersicht 40px
   nach rechts aus dem Bild. */
.legend { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.legend__item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.legend__dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Wird der Platz knapp, kürzt der Name (oben per Auslassungspunkten) - der
   Betrag bleibt vollständig. Eine halbe Zahl ist schlimmer als ein halbes
   Wort. */
.legend__value { flex: none; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.bars__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.bars__bar { width: 100%; border-radius: 6px 6px 0 0; background: var(--a-solid); opacity: .35; transition: opacity .2s; }
.bars__col.is-active .bars__bar { opacity: 1; }
.bars__label { font-size: 11px; color: var(--text-2); }
.bars__col.is-active .bars__label { color: var(--text); font-weight: 600; }

.progress { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.progress__fill { height: 100%; border-radius: 4px; transition: width .4s ease; }

/* ---------- Leerer Zustand ---------- */
.empty { text-align: center; padding: 40px 24px; }
.empty__icon { color: var(--text-3); margin-bottom: 12px; }
.empty h3 { margin: 0 0 6px; font-size: 19px; }
.empty p { margin: 0 0 18px; font-size: 15px; color: var(--text-2); }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 14px; font-weight: 600;
  background: var(--a-solid); color: #fff; width: 100%;
}
.btn--ghost { background: var(--fill); color: var(--a-text); }
.btn--danger { background: none; color: var(--red); }

/* ---------- Blattdialog ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  background: var(--bg);
}
.sheet__bar {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  padding-top: calc(6px + env(safe-area-inset-top));
  border-bottom: .5px solid var(--sep); background: var(--card);
}
.sheet__bar button { color: var(--a-text); padding: 0 12px; }
.sheet__bar h2 { flex: 1; text-align: center; font-size: 17px; font-weight: 600; margin: 0; }
.sheet__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
/* Blätter stapeln sich: die Kategorieauswahl legt sich über die angefangene
   Buchung. Die Ebene darunter bleibt stehen und kommt beim Zurück wieder zum
   Vorschein – mitsamt eingetipptem Betrag. */
.sheet__layer { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet__layer[hidden] { display: none; }
.sheet__layer > * { flex: 1; min-height: 0; }

.seg { display: flex; gap: 2px; margin: 12px var(--gutter); padding: 2px; background: var(--fill); border-radius: 10px; }
.seg button { flex: 1; padding: 12px; border-radius: 8px; font-size: 15px; }
.seg button.is-active { background: var(--card); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.amount-display {
  text-align: center; font-size: 46px; font-weight: 800; letter-spacing: -1.6px;
  font-variant-numeric: tabular-nums; padding: 18px 16px 6px;
  white-space: nowrap;
}
.amount-display.is-zero { color: var(--text-3); }

.keypad { padding: 10px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--card); border-top: .5px solid var(--sep); }
.keypad__row { display: flex; }
.keypad__key { flex: 1; padding: 12px 0; font-size: 25px; display: grid; place-items: center; border-radius: 10px; }
.keypad__key:active { background: var(--fill); }

.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: var(--gutter);
}
.grid__item {
  background: var(--card); border-radius: 16px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 104px;
  justify-content: center;
}
.grid__badge { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.grid__name { font-size: 12.5px; text-align: center; line-height: 1.2; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--gutter) 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 0 12px; border-radius: 19px; background: var(--card);
  border: .5px solid var(--sep); font-size: 14px; min-height: 38px;
}
.chip.is-active { border-width: 1.5px; font-weight: 600; }

.field {
  width: 100%; padding: 14px var(--gutter); border: 0; background: none;
  font: inherit; color: inherit;
}
.field::placeholder { color: var(--text-3); }

.hint { padding: 8px calc(var(--gutter) + 4px) 0; font-size: 13px; color: var(--text-2); line-height: 1.35; }

.banner {
  display: flex; align-items: center; gap: 10px; margin: 0 var(--gutter) 12px;
  padding: 14px var(--gutter); border-radius: 16px; font-size: 14px; line-height: 1.35;
}
.banner--warn { background: color-mix(in srgb, var(--orange) 14%, transparent); }
.banner--info { background: color-mix(in srgb, var(--a1) 14%, transparent); }
.banner button { color: var(--a-text); font-weight: 600; font-size: 14px; min-height: 0; flex: none; }

/* ---------- Tab-Leiste ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  /* --tabbg statt fester Farbe: Der Wert wird für hell und dunkel gepflegt,
     stand hier aber fest auf dem hellen Ton - die Leiste leuchtete im
     Dunkelmodus weiß unter der schwarzen Seite. */
  display: flex; background: var(--tabbg);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--sep);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 0 5px; font-size: 10px; color: var(--text-2);
}
.tab.is-active { color: var(--a-text); }

/* ---------- Kurzmeldung ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 16px); transform: translateX(-50%);
  z-index: 50; background: rgba(28,28,30,.94); color: #fff;
  padding: 12px 18px; border-radius: 14px; font-size: 14.5px; max-width: 88vw;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Farbwahl ---------- */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 44px; height: 44px; min-height: 44px; border-radius: 15px;
  background: var(--sw); display: grid; place-items: center;
  transition: transform .16s, box-shadow .16s;
}
.swatch.is-active {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--sw);
}


/* ============================================================
   Urlaubsplan-Ergänzungen
   ============================================================ */

/* Lesbares Grün/Rot für Beträge (die Systemfarben erreichen auf Weiß
   keine 4,5:1). */
:root { --green-t: #1d7a36; --red-t: #d70015; }
html[data-theme="dark"] { --green-t: #30d158; --red-t: #ff453a; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) { --green-t: #30d158; --red-t: #ff453a; }
}

/* ---------- Leisten ---------- */
.sync-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px var(--gutter); font-size: 13.5px;
  background: color-mix(in srgb, var(--orange) 24%, var(--card)); color: var(--text);
}
.sync-bar span { flex: 1; }
.sync-bar button { color: var(--a-text); font-weight: 600; font-size: 13.5px; min-height: 0; padding: 4px 8px; }

/* ---------- Formulare ---------- */
.sheet__inner { display: flex; flex-direction: column; height: 100%; }
.frow {
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--gutter); min-height: 50px;
  border-bottom: .5px solid var(--sep);
}
.frow:last-child { border-bottom: 0; }
.frow--stack { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
.frow__label {
  flex: none; width: 38%; max-width: 150px; font-size: 15px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.frow--stack .frow__label { width: auto; max-width: none; font-size: 13px; }
.frow:focus-within .frow__label { color: var(--a-text); }
.frow__input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font: inherit; color: inherit; padding: 13px 0; text-align: right;
}
.frow__input::placeholder { color: var(--text-3); }
.frow--stack .frow__input { text-align: left; padding: 6px 0 12px; resize: vertical; min-height: 84px; line-height: 1.4; }
.frow__input[type="date"], .frow__input[type="time"] { -webkit-appearance: none; appearance: none; min-height: 48px; }
.frow__input--big { font-size: 26px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
select.frow__input { -webkit-appearance: none; appearance: none; text-align-last: right; cursor: pointer; }

/* ---------- Zeilen mit Haken ---------- */
.rowlink {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  text-align: left; padding: 0; min-height: 48px;
}
.checkbtn {
  width: 48px; height: 48px; min-height: 48px; flex: none;
  display: grid; place-items: center; margin: -8px -6px -8px -12px;
}
.check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--text-3);
  display: grid; place-items: center; color: #fff; transition: background .15s, border-color .15s;
}
.check.is-on { background: var(--green); border-color: var(--green); }
.check--radio.is-on { background: var(--a-solid); border-color: var(--a-solid); }
.row.is-done .row__title { color: var(--text-3); text-decoration: line-through; }
.row--danger .row__title { color: var(--red-t); }
.row__time {
  flex: none; width: 50px; font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--a-text);
}
.row__value--pos { color: var(--green-t); }
.row__value--neg { color: var(--red-t); }
.row__tick { color: var(--a-text); flex: none; }

.mini {
  width: 40px; height: 40px; min-height: 40px; flex: none;
  display: grid; place-items: center; border-radius: 50%; color: var(--a-text);
}
.mini:disabled { color: var(--text-3); opacity: .45; }
.pillbtn {
  flex: none; min-height: 36px; padding: 0 12px; border-radius: 18px;
  background: var(--fill); color: var(--a-text); font-size: 14px; font-weight: 600;
}

/* ---------- Tagesleiste ---------- */
.days {
  display: flex; gap: 8px; overflow-x: auto; padding: 6px var(--gutter) 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.days::-webkit-scrollbar { display: none; }
.day {
  position: relative; flex: none; width: 62px; min-height: 76px; border-radius: 16px;
  background: var(--card); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; font-size: 11.5px; color: var(--text-2);
}
.day strong { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.15; }
.day.is-active { background: var(--a-solid); color: #fff; }
.day.is-active strong { color: #fff; }
.day.has-items::after {
  content: ""; position: absolute; bottom: 6px; width: 5px; height: 5px;
  border-radius: 50%; background: currentColor; opacity: .8;
}

/* ---------- Ideen ---------- */
.vote {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 0 12px; min-height: 40px; border-radius: 20px;
  background: var(--fill); color: var(--a-text);
  font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.vote.is-on { background: var(--a-solid); color: #fff; }
.tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 7px;
  font-size: 11.5px; font-weight: 700; vertical-align: 2px;
  background: color-mix(in srgb, var(--a-solid) 16%, transparent); color: var(--a-text);
}
.tag--fav { background: color-mix(in srgb, var(--orange) 24%, transparent); color: #8a4b00; }
html[data-theme="dark"] .tag--fav { color: #ffb340; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .tag--fav { color: #ffb340; } }

/* ---------- Chips & Punkte ---------- */
.chips--wrap { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
.chip__icon { display: grid; place-items: center; }
.chip.is-active { border-color: var(--a-solid); color: var(--a-text); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ---------- Hero-Ergänzungen ---------- */
.hero__btn {
  margin-top: 14px; color: #fff; font-weight: 600; font-size: 14px;
  min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid rgba(255,255,255,.7);
}
.hero .progress { margin-top: 12px; background: rgba(255,255,255,.28); }
.hero .progress__fill { background: #fff; }
.hero__amount--text { white-space: normal; line-height: 1.1; }

.packhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.packhead strong { font-size: 17px; }
.packhead span { font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Willkommen ---------- */
.welcome {
  min-height: 100vh; min-height: 100dvh; max-width: 460px; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center; text-align: center;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
}
.welcome__logo {
  width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 22px; overflow: hidden;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--a1) 30%, transparent);
}
.welcome__logo img { width: 100%; height: 100%; display: block; }
.welcome h1 { font-size: 30px; font-weight: 800; letter-spacing: -.8px; line-height: 1.15; margin: 0 0 12px; }
.welcome p { color: var(--text-2); font-size: 16px; line-height: 1.45; margin: 0 0 26px; }
.welcome .btn + .btn { margin-top: 10px; }
.welcome .welcome__note { font-size: 13px; margin: 22px 0 0; }
.welcome .seg { margin: 18px auto 0; width: 100%; max-width: 220px; }

.btn--plain { background: none; color: var(--a-text); }
.btn:disabled { opacity: .55; }
.btnstack { padding: 4px var(--gutter) 0; display: grid; gap: 10px; }

/* ---------- Einladung ---------- */
.qr { background: #fff; border-radius: 18px; padding: 10px; width: min(250px, 76vw); margin: 8px auto 14px; }
.qr svg { display: block; width: 100%; height: auto; }
.code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px; font-weight: 700; letter-spacing: 1.5px; text-align: center;
  overflow-wrap: anywhere; margin: 4px 0 6px;
}
.center { text-align: center; }
.muted { color: var(--text-2); }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.45; margin: 0; }
