:root {
  color-scheme: light;
  --bg: #f4f4f1;
  --karte: #ffffff;
  --ink: #141414;
  --ink2: #57564f;
  --ink3: #8b8a83;
  --linie: #e6e5df;
  --flaeche: #efeee9;
  --verkauf: #2a78d6;
  --einkauf: #eb6834;
  --auszahlung: #6250d6;
  --plus: #127a4c;
  --minus: #b3372f;
  --r: 18px;
  --unten: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1;
  padding-bottom: calc(96px + var(--unten));
  min-height: 100vh;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }

/* Kopf */
.kopf {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.marke { display: flex; align-items: center; gap: 10px; min-width: 0; }
.marke h1 { font-size: 17px; }
.marke p { margin: 0; font-size: 12px; color: var(--ink3); }
.logo {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
}
.logo.gross { width: 56px; height: 56px; border-radius: 16px; font-size: 19px; margin: 0 auto 12px; }
.jahrwahl select {
  appearance: none; -webkit-appearance: none;
  border: 0; border-radius: 999px; background: var(--karte);
  padding: 8px 30px 8px 14px; font-weight: 600; font-size: 14px;
  box-shadow: 0 0 0 1px var(--linie);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2357564f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 12px;
}

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

/* Karten */
.karte {
  background: var(--karte); border-radius: var(--r);
  padding: 16px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04);
}
.karte h3 { font-size: 15px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.karte h3 small { font-weight: 500; color: var(--ink3); font-size: 12px; }
.abschnitt { font-size: 13px; font-weight: 600; color: var(--ink2); margin: 20px 4px 8px; }

.held .label { font-size: 13px; color: var(--ink2); }
.held .zahl { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin: 4px 0 2px; }
.held .zahl.neg { color: var(--minus); }
.held .unter { font-size: 13px; color: var(--ink3); }
.dreier { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.dreier div { background: var(--flaeche); border-radius: 12px; padding: 10px; min-width: 0; }
.dreier span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink2); }
.dreier b { display: block; font-size: 15px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.punkt { width: 8px; height: 8px; border-radius: 3px; flex: none; display: inline-block; }
.punkt.verkauf { background: var(--verkauf); }
.punkt.einkauf { background: var(--einkauf); }
.punkt.auszahlung { background: var(--auszahlung); }

.steuerkarte { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; text-align: left; }
.steuerkarte .links { flex: 1; min-width: 0; }
.steuerkarte .betrag { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.steuerkarte .klein { font-size: 12px; color: var(--ink3); }
.pfeil { color: var(--ink3); font-size: 20px; }

/* Personen */
.person { padding: 12px 0; border-top: 1px solid var(--linie); }
.person:first-of-type { border-top: 0; padding-top: 0; }
.personkopf { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 650;
  background: var(--flaeche); color: var(--ink);
}
.personkopf .name { font-weight: 600; flex: 1; }
.personkopf .ergebnis { font-weight: 650; }
.pos { color: var(--plus); }
.neg { color: var(--minus); }
.personwerte { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 12px; color: var(--ink2); }
.personwerte b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.balken { display: flex; gap: 2px; height: 6px; margin: 0 0 10px; border-radius: 4px; overflow: hidden; background: var(--flaeche); }
.balken i { display: block; height: 100%; }
.balken .verkauf { background: var(--verkauf); }
.balken .einkauf { background: var(--einkauf); }

/* Diagramm */
.legende { display: flex; gap: 14px; font-size: 12px; color: var(--ink2); margin: -4px 0 8px; }
.legende span { display: flex; align-items: center; gap: 6px; }
.diagramm { position: relative; }
.diagramm svg { display: block; width: 100%; height: auto; overflow: visible; }
.diagramm .gitter { stroke: var(--linie); stroke-width: 1; }
.diagramm text { fill: var(--ink3); font-size: 10px; }
.diagramm .treffer { fill: transparent; }
.diagramm .treffer.an { fill: rgba(20, 20, 20, 0.05); }
.tipp {
  position: absolute; pointer-events: none; z-index: 2;
  background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 10px;
  font-size: 12px; line-height: 1.5; white-space: nowrap; transform: translate(-50%, -100%);
}
.tipp b { font-weight: 650; }
.tipp .z { display: flex; align-items: center; gap: 6px; }

/* Plattformen */
.plattformen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plattformen div { background: var(--flaeche); border-radius: 12px; padding: 10px; }
.plattformen span { font-size: 12px; color: var(--ink2); }
.plattformen b { display: block; font-size: 15px; }
.plattformen small { color: var(--ink3); font-size: 11px; }

/* Listen */
.liste { background: var(--karte); border-radius: var(--r); overflow: hidden; margin-bottom: 12px; }
.eintrag {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 16px; border: 0; background: none; text-align: left;
  border-top: 1px solid var(--linie);
}
.eintrag:first-child { border-top: 0; }
.eintrag:active { background: var(--flaeche); }
.symbol {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  display: grid; place-items: center; font-size: 15px; font-weight: 700; color: #fff;
}
.symbol.verkauf { background: var(--verkauf); }
.symbol.einkauf { background: var(--einkauf); }
.symbol.auszahlung { background: var(--auszahlung); }
.eintrag .mitte { flex: 1; min-width: 0; }
.eintrag .titel, .eintrag .meta { display: block; }
.eintrag .titel { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eintrag .meta { font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eintrag .wert { font-weight: 650; white-space: nowrap; }
.monat { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink2); margin: 18px 4px 8px; }
.monat small { font-weight: 500; color: var(--ink3); }
.leer { text-align: center; color: var(--ink3); padding: 28px 16px; }
.leer b { display: block; color: var(--ink); margin-bottom: 4px; }

/* Filter */
.suche {
  width: 100%; border: 0; border-radius: 12px; background: var(--karte);
  padding: 11px 14px; box-shadow: 0 0 0 1px var(--linie); margin-bottom: 10px; font-size: 16px;
}
.filterzeile { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 0 -16px 4px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.filterzeile::-webkit-scrollbar { display: none; }
.filterzeile button {
  flex: none; border: 0; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 550;
  background: var(--karte); box-shadow: 0 0 0 1px var(--linie); color: var(--ink2);
}
.filterzeile button.an { background: var(--ink); color: #fff; box-shadow: none; }
.trenner { width: 1px; background: var(--linie); flex: none; margin: 4px 2px; }

/* Auszahlungen */
.dreikarten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.dreikarten .karte { margin: 0; padding: 12px; }
.dreikarten span { font-size: 12px; color: var(--ink2); }
.dreikarten b { display: block; font-size: 16px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.knopf {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 0; border-radius: 14px; padding: 13px; font-weight: 600;
  background: var(--karte); box-shadow: 0 0 0 1px var(--linie); margin-bottom: 12px;
}

/* Steuer */
.zeilen { display: grid; gap: 0; }
.zeile { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--linie); font-size: 14px; }
.zeile:first-child { border-top: 0; padding-top: 0; }
.zeile span { color: var(--ink2); }
.zeile b { font-weight: 600; white-space: nowrap; }
.zeile.summe { font-size: 16px; }
.zeile.summe span { color: var(--ink); font-weight: 600; }
.zeile.summe b { font-weight: 700; }
.hinweis { font-size: 12px; color: var(--ink3); margin: 10px 2px 0; }
.einst label { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--linie); font-size: 14px; }
.einst label:first-of-type { border-top: 0; padding-top: 0; }
.einst label > span { flex: 1; }
.einst label small { display: block; color: var(--ink3); font-size: 12px; }
.einst input[type="text"], .einst select {
  width: 120px; border: 0; border-radius: 10px; background: var(--flaeche); padding: 8px 10px; text-align: right; font-size: 16px;
}
.schalter { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--linie); position: relative; flex: none; transition: background .2s; margin: 0; }
.schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.schalter:checked { background: var(--plus); }
.schalter:checked::after { transform: translateX(18px); }
.textlink { display: block; text-align: center; color: var(--ink2); font-size: 13px; padding: 8px; text-decoration: underline; text-underline-offset: 3px; }

/* Untere Leiste */
.leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px 6px calc(6px + var(--unten));
  background: color-mix(in srgb, var(--karte) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--linie);
}
.leiste button {
  border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; font-weight: 550; color: var(--ink3); padding: 6px 0;
}
.leiste button svg { width: 24px; height: 24px; fill: currentColor; }
.leiste button.aktiv { color: var(--ink); }
.leiste .plus { align-self: center; }
.leiste .plus svg {
  width: 52px; height: 52px; padding: 13px; border-radius: 17px;
  background: var(--ink); fill: #fff; box-shadow: 0 6px 16px rgba(20, 20, 20, 0.22);
}
.leiste .plus:active svg { transform: scale(0.95); }

/* Eingabeblatt */
.schleier { position: fixed; inset: 0; background: rgba(20, 20, 20, 0.35); z-index: 30; animation: ein .2s ease; }
.blatt {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;
  max-width: 640px; margin: 0 auto; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(16px + var(--unten));
  animation: hoch .26s cubic-bezier(.2, .8, .2, 1);
}
.griff { width: 40px; height: 5px; border-radius: 3px; background: var(--linie); margin: 0 auto 10px; }
.blattkopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.blattkopf h2 { font-size: 19px; }
.schliessen { border: 0; background: var(--flaeche); width: 32px; height: 32px; border-radius: 50%; color: var(--ink2); }
.segment { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--flaeche); border-radius: 12px; padding: 3px; margin-bottom: 14px; }
.segment button { border: 0; background: none; border-radius: 10px; padding: 9px 0; font-weight: 600; font-size: 14px; color: var(--ink2); }
.segment button.an { background: var(--karte); color: var(--ink); box-shadow: 0 1px 3px rgba(20,20,20,.1); }
.betragfeld { display: block; background: var(--karte); border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; }
.betragfeld span { font-size: 12px; color: var(--ink2); }
.betragfeld div { display: flex; align-items: baseline; gap: 6px; }
.betragfeld input { border: 0; outline: 0; background: none; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; width: 100%; padding: 0; }
.betragfeld b { font-size: 24px; color: var(--ink3); font-weight: 600; }
.feld { display: block; margin-bottom: 12px; }
.feld > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin: 0 2px 6px; }
.feld em { font-style: normal; font-weight: 400; color: var(--ink3); }
.feld input {
  width: 100%; border: 0; border-radius: 12px; background: var(--karte); padding: 12px 14px; font-size: 16px;
  box-shadow: 0 0 0 1px var(--linie); min-height: 46px;
}
.feld input:focus, .betragfeld:focus-within, .suche:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chips button {
  border: 0; border-radius: 12px; padding: 12px 0; font-weight: 600; background: var(--karte);
  box-shadow: 0 0 0 1px var(--linie); color: var(--ink2);
}
.chips button.an { background: var(--ink); color: #fff; box-shadow: none; }
.trackzeile { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.trackzeile select {
  appearance: none; -webkit-appearance: none; border: 0; border-radius: 12px; background: var(--karte);
  box-shadow: 0 0 0 1px var(--linie); padding: 0 30px 0 12px; font-size: 15px; min-height: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2357564f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 12px;
}
.trackstatus { background: var(--karte); border-radius: 12px; padding: 12px 14px; margin-top: 8px; font-size: 13px; box-shadow: 0 0 0 1px var(--linie); }
.trackstatus .stand { font-weight: 600; color: var(--ink); }
.trackstatus .wann { color: var(--ink3); font-size: 12px; margin-top: 2px; }
.trackstatus .stufen { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin: 10px 0 4px; }
.trackstatus .stufen i { height: 4px; border-radius: 2px; background: var(--linie); }
.trackstatus .stufen i.an { background: var(--plus); }
.trackstatus .knoepfe { display: flex; gap: 8px; margin-top: 10px; }
.trackstatus .knoepfe button, .trackstatus .knoepfe a {
  flex: 1; text-align: center; border: 0; border-radius: 10px; padding: 9px; font-size: 13px; font-weight: 600;
  background: var(--flaeche); color: var(--ink); text-decoration: none;
}
.schalterzeile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px;
  background: var(--karte); border-radius: 12px; padding: 10px 14px; box-shadow: 0 0 0 1px var(--linie);
  font-weight: 600; font-size: 15px;
}
.feld input.schalter { width: 46px; height: 28px; min-height: 0; padding: 0; border-radius: 999px; box-shadow: none; background: var(--linie); }
.feld input.schalter:checked { background: var(--plus); }
.kleinbetrag { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink2); flex: none; }
.feld .kleinbetrag input { width: 110px; min-height: 0; padding: 8px 10px; box-shadow: none; background: var(--flaeche); border-radius: 10px; text-align: right; font-weight: 600; }
.pill.erstattet { background: #ecebf9; color: #4a3db8; }
.eintrag .wert s { display: block; font-size: 11px; font-weight: 500; color: var(--ink3); text-align: right; }
.schalterzeile small { display: block; font-weight: 400; font-size: 12px; color: var(--ink3); }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-right: 4px; background: #fdeee6; color: #a4471f; vertical-align: 1px; }
.pill.da { background: #e3f2ea; color: var(--plus); }
.haupt { width: 100%; border: 0; border-radius: 14px; padding: 15px; font-weight: 650; font-size: 16px; background: var(--ink); color: #fff; margin-top: 4px; }
.haupt:disabled { opacity: .5; }
.loeschen { width: 100%; border: 0; background: none; color: var(--minus); font-weight: 600; padding: 14px; margin-top: 4px; }
.fehler { color: var(--minus); font-size: 13px; min-height: 18px; margin: 0 2px 6px; }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--unten)); z-index: 40;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 550;
  transition: opacity .2s, transform .2s;
}
.toast.an { opacity: 1; transform: translate(-50%, 0); }

.anmeldung { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; padding: 24px; }
.anmeldung form { width: 100%; max-width: 300px; text-align: center; }
.anmeldung h2 { margin-bottom: 18px; }
.anmeldung input { width: 100%; border: 0; border-radius: 12px; padding: 14px; font-size: 18px; text-align: center; letter-spacing: .05em; background: var(--karte); box-shadow: 0 0 0 1px var(--linie); margin-bottom: 8px; }

@keyframes ein { from { opacity: 0; } }
@keyframes hoch { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 700px) { .held .zahl { font-size: 48px; } }

/* Kennzahlen oben in der Übersicht */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.kpis .karte { margin: 0; min-width: 0; }
.kpi .label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.kpi .zahl { font-size: clamp(18px, 5vw, 24px); font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .zahl.neg { color: var(--minus); }
.kpi .unter { font-size: 12px; color: var(--ink3); }
.kpi.gewinn { grid-column: 1 / -1; order: -1; }
.kpi.gewinn .zahl { font-size: 40px; letter-spacing: -0.03em; }
.raster { display: grid; }
.spalte { min-width: 0; }

/* Desktop: drei Spalten */
@media (min-width: 1000px) {
  main.breit { max-width: 1240px; padding: 8px 24px 24px; }
  .kpis { grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
  .kpi.gewinn { grid-column: auto; order: 0; }
  .kpi .zahl, .kpi.gewinn .zahl { font-size: 34px; letter-spacing: -0.03em; }
  .kpis .karte { padding: 20px; }
  .raster { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .raster .karte { margin-bottom: 16px; }
  .spalte > .abschnitt:first-child { margin-top: 2px; }
  .kopf { padding-left: max(24px, calc((100vw - 1240px) / 2 + 24px)); padding-right: max(24px, calc((100vw - 1240px) / 2 + 24px)); }
  .leiste {
    left: 50%; right: auto; width: 520px; bottom: 16px; transform: translateX(-50%);
    border: 1px solid var(--linie); border-radius: 22px; padding: 6px;
    box-shadow: 0 8px 24px rgba(20, 20, 20, 0.08);
  }
}

/* ================= Design 2 ================= */
:root {
  --bg: #f2f1ec;
  --karte: #ffffff;
  --ink: #131312;
  --ink2: #5b5a54;
  --ink3: #96948c;
  --linie: rgba(19, 19, 18, 0.07);
  --flaeche: #f3f2ee;
  --plus: #0f7b4f;
  --minus: #c03a2b;
  --r: 22px;
}
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable", "Segoe UI", Roboto, sans-serif; padding-bottom: calc(112px + var(--unten)); }
.karte { border: 1px solid var(--linie); box-shadow: none; padding: 18px; border-radius: var(--r); }
.karte h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.liste { border: 1px solid var(--linie); border-radius: var(--r); }
.abschnitt { font-size: 15px; font-weight: 700; color: var(--ink); margin: 22px 4px 10px; display: flex; align-items: center; gap: 8px; }
.zaehler { font-size: 12px; font-weight: 700; background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 8px; }

/* Kopf mit Jahres-Pillen */
.kopf { padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-bottom: 14px; }
.marke h1 { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.logo { border-radius: 12px; font-weight: 800; }
.jahre { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(19, 19, 18, 0.06); overflow-x: auto; scrollbar-width: none; max-width: 60vw; }
.jahre::-webkit-scrollbar { display: none; }
.jahre button { flex: none; border: 0; background: none; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.jahre button.an { background: var(--karte); color: var(--ink); box-shadow: 0 1px 3px rgba(19, 19, 18, 0.12); }

/* Kennzahlen oben */
.kpis { gap: 12px; }
.hero {
  grid-column: 1 / -1; display: flex; flex-direction: column;
  background: #151514; color: #fff; border-radius: var(--r); padding: 20px 20px 16px; min-width: 0;
}
.hero-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.62); }
.hero-zahl { font-size: 44px; font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; margin: 10px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-zahl.neg { color: #ff9585; }
.hero-text { color: rgba(255, 255, 255, 0.62); font-size: 13px; margin: 4px 0 0; }
.hero-linie { display: block; width: 100%; height: 64px; margin: 8px 0 14px; overflow: visible; }
.hero-linie .li { fill: none; stroke: #7fe0b1; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hero-linie .fl { fill: rgba(127, 224, 177, 0.12); }
.hero-linie .null { stroke: rgba(255, 255, 255, 0.22); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.hero-fuss { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.hero-fuss span { display: block; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.5); }
.hero-fuss b { display: block; font-size: 15px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.trend { flex: none; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--flaeche); color: var(--ink2); }
.trend.gut { background: #e1f2e9; color: var(--plus); }
.trend.schlecht { background: #fbe8e5; color: var(--minus); }
.hero .trend { background: rgba(255, 255, 255, 0.1); color: #fff; }
.hero .trend.gut { background: rgba(127, 224, 177, 0.16); color: #8fe8bd; }
.hero .trend.schlecht { background: rgba(255, 149, 133, 0.16); color: #ffa699; }

.kpi { display: flex; flex-direction: column; }
.kpi-kopf { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.kpi-kopf > span:first-child { display: flex; align-items: center; gap: 6px; }
.kpi .zahl { font-weight: 800; letter-spacing: -0.035em; margin: 8px 0 2px; }
.kpi .unter { font-size: 12px; color: var(--ink3); }
.mini { display: flex; align-items: flex-end; gap: 3px; height: 50px; margin-top: auto; padding-top: 14px; }
.mini i { flex: 1; border-radius: 3px 3px 1px 1px; }
.mini.verkauf i { background: var(--verkauf); }
.mini.einkauf i { background: var(--einkauf); }
.mini i.ohne { background: var(--linie); }
.mini i.zukunft { opacity: 0.35; }

/* Steuer */
.steuerkarte { gap: 14px; }
.steuer-icon { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: #ecebf9; color: #4a3db8; font-weight: 800; font-size: 17px; }
.steuerkarte .betrag { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }

/* Wer hat was */
.person { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--linie); }
.person:first-of-type { border-top: 0; padding-top: 0; }
.person .avatar { width: 36px; height: 36px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; }
.pmitte { flex: 1; min-width: 0; }
.pzeile { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pzeile b { font-size: 15px; font-weight: 700; }
.pzeile .ergebnis { font-weight: 800; font-size: 15px; white-space: nowrap; }
.pbalken { height: 6px; border-radius: 4px; background: var(--flaeche); margin-bottom: 4px; overflow: hidden; }
.pbalken i { display: block; height: 100%; border-radius: 4px; }
.pbalken .verkauf { background: var(--verkauf); }
.pbalken .einkauf { background: var(--einkauf); }
.pbalken .auszahlung { background: var(--auszahlung); }
.pbalken.gestapelt { display: flex; gap: 2px; }
.pbalken.gestapelt i { flex: none; border-radius: 0; }
.pbalken.gestapelt i:first-child { border-radius: 4px 0 0 4px; }
.pbalken.gestapelt i:last-child { border-radius: 0 4px 4px 0; }
.legende.unten { flex-wrap: wrap; }
.legende.unten span:last-child { margin-left: auto; color: var(--ink3); }
.pwerte { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12px; color: var(--ink3); margin-top: 8px; }
.pwerte b { color: var(--ink); font-weight: 700; }
.legende.unten { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--linie); }

/* Anteil am Umsatz */
.anteil { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--flaeche); }
.anteil i { display: block; height: 100%; }
.a0 { background: #a9a79f; }
.a1 { background: #d6d4cc; }
.a2 { background: #131312; }
.marke > div { min-width: 0; }
.marke h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 699px) {
  .marke p { display: none; }
  .kopf { flex-wrap: wrap; row-gap: 10px; }
  .jahre { flex: 1 1 100%; max-width: none; }
  .jahre button { flex: 1 0 auto; }
}
.anteil-legende { display: grid; gap: 8px; margin-top: 14px; }
.anteil-legende span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.anteil-legende span i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.anteil-legende b { margin-left: auto; color: var(--ink); font-weight: 700; }

/* Plattformen */
.prow { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 12px; padding: 7px 0; font-size: 13px; }
.prow > span { color: var(--ink2); font-weight: 600; }
.pbar { height: 8px; border-radius: 5px; background: var(--flaeche); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 5px; background: var(--verkauf); }
.prow b { font-weight: 700; text-align: right; white-space: nowrap; }
.prow b small { color: var(--ink3); font-weight: 500; margin-left: 6px; }

/* Kennzahlen-Kacheln */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--flaeche); border-radius: 14px; padding: 12px; min-width: 0; }
.stat span { display: block; font-size: 12px; color: var(--ink2); font-weight: 600; }
.stat b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat small { display: block; font-size: 11px; color: var(--ink3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Diagramme */
.diagramm text { font-size: 10px; fill: var(--ink3); }
.diagramm .gplus { fill: var(--plus); }
.diagramm .gminus { fill: var(--minus); }

/* Listen ruhiger */
.symbol { border-radius: 12px; font-size: 14px; }
.symbol.verkauf { background: #e6effb; color: #1f62b5; }
.symbol.einkauf { background: #fdede4; color: #b44d1c; }
.symbol.auszahlung { background: #ecebf9; color: #4a3db8; }
.eintrag { padding: 12px 16px; }
.knopf { border: 1px solid var(--linie); box-shadow: none; border-radius: 16px; }

.segment { grid-template-columns: repeat(4, 1fr); }
.segment button { font-size: 13px; }
.symbol.steuer { background: #e9f0ea; color: #1d6a45; }
.feld select.auswahl {
  appearance: none; -webkit-appearance: none; width: 100%; border: 0; border-radius: 12px; background: var(--karte);
  box-shadow: 0 0 0 1px var(--linie); padding: 12px 14px; font-size: 16px; min-height: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2357564f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
}

/* Schwebende Leiste */
.leiste {
  left: 12px; right: 12px; bottom: calc(10px + var(--unten));
  border: 1px solid var(--linie); border-radius: 26px; padding: 6px;
  background: rgba(255, 255, 255, 0.9); box-shadow: 0 10px 30px rgba(19, 19, 18, 0.1);
}
.leiste .plus svg { border-radius: 18px; }
.toast { bottom: calc(100px + var(--unten)); }

@media (min-width: 1000px) {
  .kpis { grid-template-columns: 1.35fr 1fr 1fr; }
  .hero { grid-column: auto; padding: 24px 24px 18px; }
  .hero-zahl { font-size: 48px; }
  .kpi .zahl { font-size: 34px; }
  .kpis .karte { padding: 22px; }
  .leiste { left: 50%; right: auto; width: 520px; bottom: 18px; transform: translateX(-50%); }
  .jahre { max-width: none; }
}
