/* RacoonBank · Optik nach tr-screens.md: schwarz, Karten dunkelgrau,
   Systemschrift, Pillen mit Text links und Symbol rechts. */
:root {
  color-scheme: dark;
  --bg: #000; --karte: #1c1c1e; --karte2: #2c2c2e; --linie: #2c2c2e;
  --text: #fff; --grau: #8e8e93; --grau2: #636366;
  --gruen: #30d158; --rot: #ff453a; --blau: #0a84ff; --akzent: #fff;
  --radius: 16px; --pille: 999px;
  --sicher-unten: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; }
body { min-height: 100vh; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; }
.grau { color: var(--grau); } .klein { font-size: 12px; } .fett { font-weight: 700; }
.plus { color: var(--gruen); } .minus { color: var(--rot); }
.verborgen { display: none !important; }

/* ── Der Rahmen: am Handy voll, am PC ein Telefon in der Mitte ── */
#app { position: relative; max-width: 430px; margin: 0 auto; min-height: 100vh; background: var(--bg);
  overflow: hidden; }
@media (min-width: 500px) { #app { min-height: 100vh; box-shadow: 0 0 0 1px #222; } }

/* ── Startseite ── */
.seite { padding: 12px 16px calc(120px + var(--sicher-unten)); min-height: 100vh; }
.steuerpille { display: block; margin: 0 auto 14px; padding: 6px 12px; border-radius: var(--pille);
  background: var(--karte); color: var(--text); font-size: 12px; font-weight: 600; }
.kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.reiter { display: flex; gap: 14px; font-size: 22px; font-weight: 700; }
.reiter button { color: var(--grau); } .reiter button[aria-selected="true"] { color: var(--text); }
.kopfrechts { display: flex; align-items: center; gap: 10px; }
.avatar { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--karte2);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.avatar::after { content: ""; position: absolute; top: -1px; right: -1px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--blau); border: 2px solid var(--bg); }
.pfote { width: 30px; height: 30px; border-radius: 50%; background: var(--karte2); display: grid; place-items: center; }
.pfote svg { width: 20px; height: 20px; }
.wertblock { margin-bottom: 14px; }
.wertblock .zeile { display: flex; justify-content: space-between; color: var(--grau); font-size: 13px; }
.wert { font-size: 28px; font-weight: 700; letter-spacing: -0.3px; }
.wert small { font-size: 14px; margin-left: 8px; font-weight: 600; }
.zeitraum { display: flex; gap: 18px; margin: 10px 0 6px; font-size: 13px; font-weight: 600; }
.zeitraum button { color: var(--grau); padding: 4px 0; } .zeitraum button[aria-selected="true"] { color: var(--akzent); }
.chart { width: 100%; height: 150px; display: block; }
.chart path { fill: none; stroke: var(--akzent); stroke-width: 1.6; stroke-linejoin: round; }
.chart .basis { stroke: var(--grau2); stroke-dasharray: 2 4; stroke-width: 1; }

.raeuberkarte { position: relative; border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, #3a3a3c, #111);
  height: 340px; margin: 6px 0 16px; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; }
.raeuberkarte img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.raeuberkarte::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.85)); }
.raeuberkarte h2, .raeuberkarte p { position: relative; z-index: 1; }
.raeuberkarte h2 { font-size: 20px; } .raeuberkarte p { margin: 4px 0 0; color: #d1d1d6; font-size: 13px; }

.kacheln { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.kacheln::-webkit-scrollbar { display: none; }
.kachel { flex: 0 0 auto; min-width: 104px; height: 64px; border-radius: 14px; background: var(--karte); padding: 10px 12px;
  text-align: left; color: var(--grau); font-weight: 600; font-size: 13px; display: flex; flex-direction: column; justify-content: space-between; }
.kachel b { color: var(--text); font-size: 15px; }
.kleintext { color: var(--grau2); font-size: 10px; line-height: 1.4; margin: 16px 0; }

.liste { margin: 0; padding: 0; list-style: none; }
.abschnitt { margin-top: 22px; }
.abschnitt h3 { font-size: 15px; margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.abschnitt h3 .pfeil { color: var(--grau); font-weight: 400; }
.abschnitt h3 button { font: inherit; display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; }
.zeile-papier { display: flex; align-items: center; gap: 12px; padding: 9px 0; width: 100%; text-align: left; }
.logo { width: 34px; height: 34px; border-radius: 50%; background: var(--karte); display: grid; place-items: center;
  font-size: 9px; font-weight: 700; color: var(--text); flex: 0 0 auto; letter-spacing: -0.3px; }
.zeile-papier .name { flex: 1; min-width: 0; } .zeile-papier .name b { display: block; font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile-papier .name span { font-size: 12px; color: var(--grau); }
.zeile-papier .rechts { text-align: right; font-size: 13px; font-weight: 600; }
.zeile-papier .rechts small { display: block; color: var(--grau); font-weight: 400; font-size: 12px; }

/* Schwebende Pillen unten */
.fuss { position: fixed; bottom: calc(18px + var(--sicher-unten)); left: 0; right: 0; display: flex; justify-content: center; gap: 10px;
  padding: 0 16px; pointer-events: none; z-index: 5; }
.fuss > * { pointer-events: auto; }
.pille { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; height: 48px; padding: 0 18px;
  border-radius: var(--pille); background: #fff; color: #000; font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.pille.dunkel { background: var(--karte2); color: var(--text); }
.pille.akzent { background: var(--akzent); color: #000; }
.pille .sym { font-size: 17px; line-height: 1; }
.pille.breit { flex: 1; }
.pille:disabled { opacity: .35; }

/* ── Bögen (Sheets) ── */
.dimmer { position: fixed; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .25s; z-index: 10; pointer-events: none; }
.dimmer.an { opacity: 1; pointer-events: auto; }
.bogen { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 430px; height: 94vh; height: 94dvh;
  background: var(--bg); border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  z-index: 20; display: flex; flex-direction: column; overflow: hidden; }
.bogen.offen { transform: translateY(0); }
.bogen .griff { flex: 0 0 auto; height: 22px; display: grid; place-items: center; touch-action: none; }
.bogen .griff::before { content: ""; width: 36px; height: 4px; border-radius: 2px; background: #fff; }
.bogen .inhalt { flex: 1; overflow-y: auto; padding: 4px 16px calc(96px + var(--sicher-unten)); -webkit-overflow-scrolling: touch; }
.bogen .inhalt.ohne-fuss { padding-bottom: calc(24px + var(--sicher-unten)); }
.bogen h1 { font-size: 24px; margin: 10px 0 4px; }
.bogen .fuss { position: absolute; }

/* Suche */
.suchfeld { display: flex; gap: 8px; }
.suchfeld label { flex: 1; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: var(--pille);
  background: var(--karte2); color: var(--grau); }
.suchfeld input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font-size: 15px; min-width: 0; }
.suchfeld input::placeholder { color: var(--grau); }
.filterknopf { width: 48px; height: 48px; border-radius: var(--pille); background: var(--karte2); display: grid; place-items: center; font-size: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 12px; background: var(--karte); font-weight: 600; font-size: 13px; }
.chip .logo { width: 20px; height: 20px; font-size: 7px; }
.chip[aria-pressed="true"] { background: #fff; color: #000; }
.karten { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.karten::-webkit-scrollbar { display: none; }
.mover { flex: 0 0 auto; width: 124px; height: 96px; border-radius: 14px; background: var(--karte); padding: 10px 12px; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; font-size: 13px; font-weight: 600; min-width: 0; }
.mover .logo { position: static; } .mover .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.mover small { font-size: 12px; font-weight: 700; }

/* Wertpapierseite */
.papierkopf { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 12px; }
.papierkopf .logo { width: 28px; height: 28px; }
.rundknopf { width: 30px; height: 30px; border-radius: 50%; background: var(--karte2); display: grid; place-items: center; font-size: 18px; }
.kurs { font-size: 26px; font-weight: 700; } .kurs small { font-size: 13px; font-weight: 700; margin-left: 8px; }
.statistik { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.statistik .zeile { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--karte); font-size: 13px; }
.statistik .zeile span:first-child { color: var(--grau); } .statistik .zeile span:last-child { font-weight: 700; }
.link { color: var(--akzent); font-weight: 700; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }
.karte { background: var(--karte); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.karte b { display: block; font-size: 14px; } .karte span { color: var(--grau); font-size: 12px; }
.karte .pfeil { margin-left: auto; color: var(--grau); }
.position { background: var(--karte); border-radius: 14px; padding: 14px; }
.position .zeile { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.position .zeile span:first-child { color: var(--grau); }
.schluessel { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--karte); font-size: 13px; }
.schluessel span:first-child { color: var(--grau); } .schluessel span:last-child { font-weight: 700; text-align: right; }
.absatz { color: #d1d1d6; font-size: 14px; line-height: 1.5; }

/* Kaufmaske */
.eingabe { text-align: center; margin: 40px 0 20px; }
.eingabe .betrag { font-size: 44px; font-weight: 700; letter-spacing: -1px; min-height: 54px; }
.eingabe .neben { color: var(--grau); font-size: 13px; margin-top: 6px; }
.umschalter { display: inline-flex; background: var(--karte); border-radius: var(--pille); padding: 3px; margin-top: 18px; }
.umschalter button { padding: 6px 14px; border-radius: var(--pille); font-size: 13px; font-weight: 600; color: var(--grau); }
.umschalter button[aria-pressed="true"] { background: var(--karte2); color: var(--text); }
.tasten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.tasten button { height: 56px; font-size: 24px; font-weight: 500; border-radius: 12px; }
.tasten button:active { background: var(--karte); }
.ordertyp { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--pille); background: var(--karte); font-weight: 600; font-size: 13px; }
.zusammenfassung .zeile { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--karte); font-size: 14px; }
.zusammenfassung .zeile span:first-child { color: var(--grau); }
.zusammenfassung .zeile.gesamt span { font-weight: 700; font-size: 16px; color: var(--text); }
.wischer { position: relative; height: 56px; border-radius: var(--pille); background: var(--karte2); display: grid; place-items: center;
  font-weight: 700; color: var(--grau); overflow: hidden; user-select: none; touch-action: pan-y; }
.wischer .knauf { position: absolute; left: 4px; top: 4px; width: 48px; height: 48px; border-radius: 50%; background: var(--akzent);
  color: #000; display: grid; place-items: center; font-size: 20px; transition: left .15s; }
.wischer.fertig { background: var(--akzent); color: #000; }
.erfolg { text-align: center; padding: 60px 0 20px; }
.erfolg .haken { width: 72px; height: 72px; border-radius: 50%; background: var(--gruen); color: #000; display: grid; place-items: center; font-size: 36px; margin: 0 auto 18px; }
.optionen { display: flex; flex-direction: column; gap: 4px; }
.option { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 12px; text-align: left; width: 100%; }
.option .sym { width: 30px; height: 30px; border-radius: 50%; background: var(--karte); display: grid; place-items: center; font-size: 14px; }
.option b { display: block; font-size: 14px; } .option span { color: var(--grau); font-size: 12px; }
.option .rechts { margin-left: auto; color: var(--grau); font-size: 12px; text-align: right; }
.option[aria-pressed="true"] { background: var(--karte); }
.option:disabled { opacity: .4; }
.leer { padding: 8px 0; }
.leer ol { padding: 0; margin: 16px 0; list-style: none; counter-reset: s; }
.leer li { counter-increment: s; display: flex; gap: 12px; padding: 8px 0; }
.leer li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--grau); display: grid; place-items: center; font-size: 11px; flex: 0 0 auto; }
.leer li b { display: block; font-size: 14px; } .leer li span { color: var(--grau); font-size: 12px; }

/* Profil: schiebt von rechts */
.profil { position: fixed; top: 0; bottom: 0; right: 0; width: 82%; max-width: 360px; background: var(--bg); z-index: 20;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); padding: 60px 20px 20px; overflow-y: auto; }
.profil.offen { transform: translateX(0); }
.profil .name { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.profil .konto { display: flex; gap: 10px; margin-bottom: 26px; }
.profil .konto .kachel { flex: 1; }
.dienst { display: flex; align-items: center; gap: 12px; padding: 10px 0; width: 100%; text-align: left; }
.dienst .sym { width: 30px; height: 30px; border-radius: 50%; background: var(--karte); display: grid; place-items: center; font-size: 14px; }
.dienst b { display: block; font-size: 14px; } .dienst span { color: var(--grau); font-size: 12px; }
.dienst.blau b { color: var(--blau); }

/* Räuberpfote */
.pfotenbogen .inhalt { padding-top: 10px; }
.pfotenkopf { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pfotenkopf img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.tipp { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--karte); font-size: 14px; line-height: 1.5; }
.tipp::before { content: "🐾"; flex: 0 0 auto; }
.spruch { margin-top: 20px; padding: 14px; border-radius: 14px; background: var(--karte); font-style: italic; color: #d1d1d6; font-size: 14px; }

.hinweis { padding: 10px 14px; border-radius: 12px; background: var(--karte); color: var(--grau); font-size: 13px; margin: 12px 0; }
.transaktion { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.transaktion .sym { width: 34px; height: 34px; border-radius: 50%; background: var(--karte); display: grid; place-items: center; }
.transaktion .name { flex: 1; } .transaktion .name b { display: block; font-size: 14px; font-weight: 600; } .transaktion .name span { font-size: 12px; color: var(--grau); }
.transaktion .betrag { font-weight: 700; font-size: 14px; }

.hinweis.fehler { color: var(--rot); border: 1px solid var(--rot); }

/* Chart mit Finger (V-01) */
.chartbox { position: relative; touch-action: pan-y; }
.chartbox .chart { cursor: crosshair; }
.chartbox .zeiger { stroke: var(--grau); stroke-width: 1; }
.chartwert { position: absolute; top: 0; left: 0; right: 0; text-align: center; font-size: 12px; pointer-events: none; }
.chartwert b { font-size: 14px; margin-right: 8px; }

/* Lernen (P13) */
.punkte { display: flex; gap: 6px; margin: 14px 0 18px; } .punkte i { width: 8px; height: 8px; border-radius: 50%; background: var(--karte2); } .punkte i.an { background: #fff; }
.fortschritt { height: 6px; border-radius: 3px; background: var(--karte); overflow: hidden; margin-bottom: 16px; } .fortschritt i { display: block; height: 100%; background: var(--gruen); }
.quest { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--karte); font-size: 14px; }
.quest .haken2 { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--grau2); display: grid; place-items: center; font-size: 13px; }
.quest.ok .haken2 { background: var(--gruen); border-color: var(--gruen); color: #000; }
.risiko { background: var(--karte); border-radius: 14px; padding: 14px; }
.stufen { display: flex; gap: 4px; } .stufen span { flex: 1; text-align: center; padding: 6px 0; border-radius: 6px; background: var(--karte2); font-size: 12px; color: var(--grau); }
.stufen span.an { background: #fff; color: #000; font-weight: 700; }

/* Stimmungsbilder (E-014): oben in Boegen, ruhig und gross */
.stimmung { display: block; width: 100%; height: 170px; object-fit: cover; object-position: center 30%; border-radius: 16px; margin: 6px 0 14px; }

/* Boegen sperren den Hintergrund (P14) */
html.gesperrt, html.gesperrt body { overflow: hidden; height: 100%; }
.bogen .inhalt { overscroll-behavior: contain; }

/* Tutorial hell wie die Registrierung (P14) */
.bogen.hell { background: #f2f2f7; color: #000; --grau: #6e6e73; --karte: #e5e5ea; --karte2: #d1d1d6; }
.bogen.hell .griff::before { background: #c7c7cc; }
.bogen.hell .inhalt { padding-top: 10px; }
.bogen.hell .balken { display: flex; gap: 6px; margin: 4px 0 14px; }
.bogen.hell .balken i { flex: 1; height: 3px; border-radius: 2px; background: #d1d1d6; } .bogen.hell .balken i.an { background: #000; }
.bogen.hell .hoch { display: block; width: 100%; height: 46vh; min-height: 260px; object-fit: cover; object-position: center 20%; border-radius: 18px; }
.bogen.hell h1 { font-size: 24px; margin: 18px 0 8px; }
.bogen.hell .absatz { color: #3a3a3c; font-size: 15px; }
.bogen.hell .pille { background: #000; color: #fff; } .bogen.hell .pille.dunkel { background: #fff; color: #000; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
