/* Aktien-Radar – dunkles Design nach Apples Human Interface Guidelines */
:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-elevated: #1c1c1e;
  --bg-elevated-2: #2c2c2e;
  --bg-elevated-3: #3a3a3c;
  --separator: rgba(84, 84, 88, 0.55);
  --label: #ffffff;
  --label-2: rgba(235, 235, 245, 0.62);
  --label-3: rgba(235, 235, 245, 0.32);
  --green: #30d158;
  --red: #ff453a;
  --blue: #0a84ff;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --purple: #bf5af2;
  --green-fill: rgba(48, 209, 88, 0.16);
  --red-fill: rgba(255, 69, 58, 0.16);
  --blue-fill: rgba(10, 132, 255, 0.16);
  --orange-fill: rgba(255, 159, 10, 0.16);
  --material: rgba(22, 22, 24, 0.72);
  --radius: 18px;
  --radius-sm: 12px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  font: 100%/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--label); overscroll-behavior-y: none; }
/* Nie breiter als der Bildschirm (sonst zoomt Android heraus). „clip“ statt „hidden“:
   hidden auf html+body macht in manchen Android-WebViews das Scrollen kaputt. */
html, body { overflow-x: clip; }
body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--blue); text-decoration: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

/* ---------- Navigation: durchscheinendes Material, Inhalt scrollt darunter */
/* Kopfleiste steht fest; darunter die Zeitraum-Zeile, die beim Herunterscrollen einfährt */
:root {
  --nav-h: 64px; --subnav-h: 52px;
  /* Platz für Gestenstrich/Navigationstasten unten. In der Android-App gilt NUR der Wert der App
     (--app-inset-bottom): manche Samsung-Handys melden den Tastenbereich zusätzlich über env(),
     obwohl die App ihn schon freihält – das ergab doppelten Abstand. Im Browser gilt env(). */
  --inset-b: var(--app-inset-bottom, env(safe-area-inset-bottom, 0px));
  /* Oben genauso: ab App 1.6 zeichnet die App hinter die Statusleiste, die Kopfzeile reicht dann bis ganz oben */
  --inset-t: var(--app-inset-top, env(safe-area-inset-top, 0px));
  --top-h: calc(var(--nav-h) + var(--inset-t));      /* Kopfzeile inkl. Statusleiste */
}
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 22;
  padding-top: var(--inset-t);                       /* Glas reicht hinter Uhrzeit und Kamera */
  background: var(--material);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: box-shadow 200ms ease;
}
.nav.scrolled { box-shadow: 0 0.5px 0 var(--separator); }
.nav-inner {
  max-width: 1180px; margin: 0 auto; height: var(--nav-h);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 0 max(16px, env(safe-area-inset-left));
}
.nav-titles { min-width: 0; }
.nav-title {
  margin: 0; font-weight: 700; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.022em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-sub {
  margin: 2px 0 0; font-size: 0.75rem; color: var(--label-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Ohne Weichzeichner: der lässt sich auf Android nicht stufenlos einblenden und „springt“.
   Fast deckender Hintergrund gleitet und blendet zusammen mit den Chips. */
.subnav {
  position: fixed; top: var(--top-h); left: 0; right: 0; z-index: 21; height: var(--subnav-h);
  background: rgba(24, 24, 26, 0.96);
  box-shadow: 0 0.5px 0 var(--separator);
  transition: transform 340ms cubic-bezier(0.22, 1, 0.36, 1), opacity 340ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity; transform: translateZ(0); contain: layout paint;   /* eigene Grafikebene */
}
.nav { transform: translateZ(0); }
.nav { transition: none; }
.subnav.hidden {
  transform: translateY(-100%); opacity: 0; pointer-events: none;
  transition: transform 260ms cubic-bezier(0.4, 0, 1, 1), opacity 200ms ease-in;   /* Einfahren etwas schneller */
}
.subnav-inner { max-width: 1180px; margin: 0 auto; padding: 4px max(16px, env(safe-area-inset-left)) 0; }
.nav-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }

/* iOS-Schalter: Knopf gleitet, Spur färbt sich grün */
.auto-toggle { display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.auto-label { font-size: 0.8125rem; font-weight: 500; color: var(--label-2); transition: color 200ms; }
.auto-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.switch {
  position: relative; width: 44px; height: 26px; border-radius: 13px; flex: none;
  background: rgba(120, 120, 128, 0.32); transition: background 220ms ease;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 260ms cubic-bezier(0.3, 1.3, 0.5, 1), width 160ms ease;
}
.auto-toggle:active .switch::after { width: 26px; }                 /* Knopf dehnt sich beim Drücken */
.auto-toggle input:checked + .switch { background: var(--green); }
.auto-toggle input:checked + .switch::after { transform: translateX(18px); }
.auto-toggle:active input:checked + .switch::after { transform: translateX(14px); }
.auto-toggle input:checked ~ .auto-label, .auto-toggle:has(input:checked) .auto-label { color: var(--label); }
.auto-toggle input:focus-visible + .switch { outline: 2px solid var(--blue); outline-offset: 2px; }

.icon-btn {
  justify-self: end; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--blue);
  background: var(--bg-elevated-2);
  transition: transform 120ms ease-out, background 120ms;
}
.icon-btn:active { transform: scale(0.92); background: var(--bg-elevated-3); }
.icon-btn.spinning svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Liquid Glass: gemeinsame Glas-Bausteine (Apple, iOS 26) */
:root {
  --glass-bg: rgba(52, 52, 58, 0.42);
  --glass-edge: rgba(255, 255, 255, 0.16);
  --glass-hi: rgba(255, 255, 255, 0.30);       /* Lichtkante oben (Spiegelung) */
  --lens-bg: rgba(255, 255, 255, 0.13);
  --lens-edge: rgba(255, 255, 255, 0.28);
}

/* ---------- Zeitraum-Chips im Glas-Look */
.chips {
  position: relative; display: inline-flex; gap: 2px; margin-top: 0; padding: 4px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 0.5px var(--glass-edge), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.35);
}
.chips button {
  position: relative; z-index: 1; padding: 7px 16px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 500; color: var(--label-2); white-space: nowrap;
  transition: color 180ms ease;
}
.chips button[aria-selected="true"] { color: var(--label); font-weight: 600; }
.chips button:active { transform: scale(0.96); }
.chip-thumb {
  position: absolute; top: 4px; left: 0; bottom: 4px; width: 0; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.10));
  box-shadow: inset 0 0 0 0.5px var(--lens-edge), inset 0 1px 0 rgba(255, 255, 255, 0.45),
              inset 0 -1px 2px rgba(255, 255, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.35);
  will-change: transform, width; transform-origin: center;
}
/* Kleine Auswahl-Chips (Zeitraum im Analysieren-Tab), ohne Gleit-Animation */
.sort-chips { display: inline-flex; gap: 6px; margin-bottom: 12px; }
.sort-chips button {
  padding: 6px 14px; border-radius: 999px; font-size: 0.8125rem; font-weight: 500;
  color: var(--label-2); background: var(--bg-elevated); transition: background 150ms, color 150ms;
}
.sort-chips button[aria-selected="true"] { background: rgba(10, 132, 255, 0.2); color: var(--blue); font-weight: 600; }
.sort-chips button:active { transform: scale(0.96); }

/* ---------- Signale: Filter „ohne schlechtes Gewissen“ */
/* klein, rechts in der Kopfzeile von „Kaufsignale“ */
.eth-toggle { margin-left: auto; flex: none; gap: 6px; }
.eth-toggle .auto-label { font-size: 0.75rem; }
.eth-toggle .switch { transform: scale(0.8); transform-origin: right center; }
.section-title .section-note { font-size: 0.8125rem; font-weight: 400; margin-left: 6px; }
@media (max-width: 420px) { .section-title .section-note { display: none; } }   /* Platz für den Schalter */
.eth-note { margin: -4px 0 12px; font-size: 0.75rem; line-height: 1.45; color: var(--label-3); }
.eth-line { margin: 10px 0 0; font-size: 0.8125rem; line-height: 1.45; color: var(--label-2); }
.eth-line.ok b { color: var(--green); }
.eth-line.out b { color: var(--orange); }

/* ---------- Depot: Spieldepot, Kauf-Feld, Klima-Etikett */
body[data-tab="rank"] .subnav { display: none; }
body[data-tab="rank"] .page { padding-top: calc(var(--top-h) + 8px); }
body[data-tab="all"] .subnav { display: none; }               /* Zeitraum gilt fürs Depot nicht */
body[data-tab="all"] .page { padding-top: calc(var(--top-h) + 8px); }
body[data-tab="mine"] .subnav { display: none; }              /* Zeitraum gilt für Mein Depot nicht */
body[data-tab="mine"] .page { padding-top: calc(var(--top-h) + 8px); }
.dep-card { padding: 16px; border-radius: 18px; background: var(--bg-elevated); }
.dep-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dep-top .k { font-size: 0.75rem; color: var(--label-3); text-transform: uppercase; letter-spacing: 0.04em; }
.dep-total { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 2px 0; font-variant-numeric: tabular-nums; }
.dep-reset { flex: none; padding: 6px 12px; border-radius: 999px; font-size: 0.75rem; color: var(--label-2); background: var(--bg-elevated-2); }
.dep-reset:active { transform: scale(0.96); }
.dep-range { margin: 12px 0 0; }
.dep-chart-wrap { margin: 8px 0 4px; }
.dep-chart { display: block; width: 100%; height: 110px; }
.dep-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 0.75rem; color: var(--label-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
/* Live-Kurse: neuer Kurs blinkt kurz grün bzw. rot auf */
.d-live { display: contents; }
.tick-up { animation: tick-up 900ms ease-out; }
.tick-down { animation: tick-down 900ms ease-out; }
@keyframes tick-up { 0% { color: var(--green); } 100% { color: inherit; } }
@keyframes tick-down { 0% { color: var(--red); } 100% { color: inherit; } }
.dep-stats { margin-top: 12px; }
.dep-trades { margin-top: 14px; }
.dep-trades summary { cursor: pointer; font-size: 0.875rem; color: var(--label-2); padding: 6px 0; }
.trade-box { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--bg-elevated); }
.trade-head { display: flex; justify-content: space-between; gap: 8px; font-size: 0.875rem; margin-bottom: 8px; }
.trade-head span { color: var(--label-2); }
.trade-row { display: flex; gap: 8px; }
.trade-amt {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--separator);
  background: var(--bg); color: var(--label); font-size: 1rem; font-variant-numeric: tabular-nums;
}
.trade-btn { flex: none; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 0.9375rem; }
.trade-btn.buy { background: var(--green); color: #000; }
.trade-btn.sell { background: var(--red); color: #fff; }
.trade-btn:active, .trade-all:active { transform: scale(0.97); }
.trade-btn:disabled, .trade-all:disabled { opacity: 0.5; }
.trade-all { margin-top: 8px; width: 100%; padding: 8px; border-radius: 10px; font-size: 0.8125rem; color: var(--red); background: var(--red-fill); }
.trade-hint { margin-top: 8px; font-size: 0.75rem; line-height: 1.4; color: var(--label-3); font-variant-numeric: tabular-nums; }
/* Order-Art (Sofort / Limit / Stop-Loss) */
.trade-modes { display: flex; gap: 2px; padding: 2px; margin-bottom: 10px; border-radius: 9px; background: var(--bg); }
.trade-modes button { flex: 1; padding: 6px 4px; border-radius: 7px; font-size: 0.8125rem; font-weight: 600; color: var(--label-2); }
.trade-modes button[aria-selected="true"] { background: var(--bg-elevated-3); color: var(--label); }
.trade-row + .trade-row { margin-top: 8px; }
.trade-row .trade-btn { flex: 1; }
.trade-lbl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--label-2); }
.trade-lbl input, .trade-price {
  width: 100%; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--separator);
  background: var(--bg); color: var(--label); font-size: 1rem; font-variant-numeric: tabular-nums;
}
.trade-lbl input:disabled { opacity: 0.45; }
.trade-check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.8125rem; color: var(--label-2); }
.trade-check input { width: 18px; height: 18px; accent-color: var(--blue); }
.trade-btn.wide { width: 100%; margin-top: 8px; }
.order-list { margin-top: 10px; }
.order-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 0.5px solid var(--separator); font-size: 0.875rem; }
.trade-box .order-row { padding: 9px 0; }
.list.order-list .order-row:first-child { border-top: 0; }
.order-sub { font-size: 0.75rem; color: var(--label-2); }
.order-row > div { flex: 1; }
.order-x { padding: 6px 10px; border-radius: 8px; font-size: 0.75rem; font-weight: 600; color: var(--red); background: var(--red-fill); }
.order-x:disabled { opacity: 0.5; }
.stop-badge { font-size: 0.6875rem; font-weight: 600; color: var(--orange); background: var(--orange-fill); padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }
.tag.green { color: var(--green); background: rgba(48, 209, 88, 0.14); }

/* ---------- Analysieren: Chart-Muster */
body[data-tab="analyze"] .subnav { display: none; }           /* Tag / Woche / Monat gilt hier nicht */
body[data-tab="analyze"] .page { padding-top: calc(var(--top-h) + 8px); }
.ana-quick { display: grid; gap: 8px; margin-top: 12px; }
.ana-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ana-row::-webkit-scrollbar { display: none; }
.ana-row-label { flex: none; width: 72px; font-size: 0.75rem; color: var(--label-3); text-transform: uppercase; letter-spacing: 0.04em; }
.ana-chip {
  flex: none; padding: 6px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--label); background: var(--bg-elevated); transition: background 150ms, transform 100ms ease-out;
}
.ana-chip.on { background: rgba(10, 132, 255, 0.22); color: var(--blue); }
.ana-chip:active { transform: scale(0.95); }
#anaResults:not(:empty) { margin-top: 8px; }
.ana-head { justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.ana-range { margin-bottom: 8px; }
.chart.ana-chart svg { touch-action: pan-y; height: auto; }   /* 1:1 zur Breite, wächst mit RSI/MACD */
.ana-mark { font-size: 11px; font-weight: 700; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.ana-lbl { font-weight: 600; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.ana-badge text { font-size: 10.5px; font-weight: 800; fill: #000; }
.ana-list { display: grid; gap: 10px; }
.ana-pat {
  display: flex; gap: 12px; text-align: left; width: 100%; padding: 14px; border-radius: 16px;
  background: var(--bg-elevated); color: var(--label); box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 150ms, transform 100ms ease-out;
}
.ana-pat:active { transform: scale(0.99); }
.ana-pat.on.bias-up { box-shadow: inset 0 0 0 1.5px var(--green); }
.ana-pat.on.bias-down { box-shadow: inset 0 0 0 1.5px var(--red); }
.ana-num {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.8125rem; font-weight: 800; color: #000;
}
.ana-pat.bias-up .ana-num { background: var(--green); }
.ana-pat.bias-down .ana-num { background: var(--red); }
.ana-pat-body { min-width: 0; flex: 1; }
.ana-pat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ana-pat p { margin: 6px 0 8px; font-size: 0.875rem; line-height: 1.45; color: var(--label-2); }
.ana-ev { font-size: 0.8125rem; line-height: 1.4; color: var(--label-2); padding: 8px 10px; border-radius: 10px; background: var(--bg-elevated-2); }
.ana-ev b { color: var(--label); }
.ana-ev.ev-good b { color: var(--green); }
.ana-ev.ev-weak b { color: var(--orange); }
.ana-intro p { margin: 0 0 8px; }
.ana-link {
  display: inline-block; margin-top: 10px; padding: 8px 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 600;
  color: var(--blue); background: rgba(10, 132, 255, 0.14); transition: transform 100ms ease-out;
}
.ana-link:active { transform: scale(0.96); }

/* ---------- Glas hinter den Android-Navigationstasten (nur App 1.6+ mit Tasten; sonst Höhe 0) */
.sysbar {
  position: fixed; z-index: 29; left: 0; right: 0; bottom: 0; height: var(--app-navbar-h, 0px);
  background: var(--material); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  pointer-events: none;
}

/* ---------- Bereiche: nur der aktive Tab ist sichtbar */
.panel-tab { display: none; }
body[data-tab="signals"] [data-panel="signals"],
body[data-tab="analyze"] [data-panel="analyze"],
body[data-tab="all"] [data-panel="all"],
body[data-tab="rank"] [data-panel="rank"],
body[data-tab="mine"] [data-panel="mine"],
body[data-tab="journal"] [data-panel="journal"] { display: block; }
.mood { margin-top: 12px; }
.section.first { margin-top: 16px; }

/* ---------- Tab-Leiste: schwebende Glas-Kapsel (Liquid Glass), Inhalt scrollt darunter durch */
.tabbar {
  /* dicht über dem Gestenstrich: vom Systembereich 10 px mitnutzen, darüber 4 px Luft.
     Bei Navigationstasten (App 1.6 setzt --app-gesture-overlap: 0px) komplett über den Tasten. */
  position: fixed; z-index: 30; left: 12px; right: 12px;
  bottom: calc(max(var(--inset-b) - var(--app-gesture-overlap, 10px), 0px) + 4px);
  display: flex; padding: 5px; border-radius: 32px; isolation: isolate;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(190%) brightness(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(190%) brightness(1.08);
  box-shadow: inset 0 0 0 0.5px var(--glass-edge),        /* feine Kante */
              inset 0 1px 0 var(--glass-hi),               /* Licht von oben */
              inset 0 -1px 1px rgba(255, 255, 255, 0.06),  /* schwacher Gegenschein unten */
              0 12px 32px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  touch-action: none; user-select: none;
}
.tabbar::before {                                          /* Glanz über der oberen Hälfte */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 55%);
}
.tab-lens {                                                /* gleitende Glas-Linse unter dem aktiven Tab */
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 27px; z-index: 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.07) 70%);
  box-shadow: inset 0 0 0 0.5px var(--lens-edge), inset 0 1px 0 rgba(255, 255, 255, 0.5),
              inset 0 -2px 4px rgba(255, 255, 255, 0.05), 0 6px 16px rgba(0, 0, 0, 0.3);
  will-change: transform, width; transform-origin: center;
}
.tab-btn {
  position: relative; z-index: 1; flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 5px;
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.01em; color: rgba(235, 235, 245, 0.62);
  transition: color 180ms ease;
}
.tab-btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-btn svg { width: 25px; height: 25px; transition: transform 220ms cubic-bezier(0.3, 1.4, 0.5, 1); }
.tab-btn:active svg { transform: scale(0.84); }
.tab-btn.on svg { transform: scale(1.06); }                /* aktives Icon „ploppt“ leicht auf */
.tab-btn .i-fill { display: none; }
.tab-btn.on { color: var(--blue); }
.tab-btn.on .i-fill { display: inline; }
.tab-btn.on .i-line { display: none; }
@media (prefers-reduced-transparency: reduce) { .tabbar { background: #1f1f22; backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* ---------- Tagebuch */
.j-date { padding: 10px 16px 4px; font-size: 0.75rem; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; }
.j-row { grid-template-columns: minmax(0, 1fr) auto auto !important; }
.j-out { display: flex; align-items: center; gap: 6px; justify-content: flex-end; min-width: 92px; }
.j-res { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; }
.j-res.ok { background: var(--green-fill); color: var(--green); }
.j-res.bad { background: var(--red-fill); color: var(--red); }
.j-star { font-size: 0.6875rem; font-weight: 700; color: var(--orange); background: var(--orange-fill); padding: 1px 6px; border-radius: 999px; vertical-align: 2px; }
.j-h3 { font-size: 1.0625rem; font-weight: 600; margin: 22px 0 10px; }
.empty-journal p { margin: 0 0 8px; }

/* ---------- Seite */
.page {
  will-change: transform;   /* Ebene von Anfang an bereit, damit Dehnen/Abprallen nicht beim ersten Bild hängt */
  max-width: 1180px; margin: 0 auto;
  padding: calc(var(--top-h) + var(--subnav-h) + 4px) max(16px, env(safe-area-inset-left)) calc(100px + var(--inset-b));
}

.mood {
  margin-top: 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--bg-elevated); border-radius: var(--radius); padding: 14px 16px;
}
.mood-gauge { position: relative; flex: 1 1 220px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--red), var(--orange) 35%, var(--yellow) 50%, #a4e05a 65%, var(--green)); }
.mood-dot { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px var(--bg-elevated), 0 2px 6px rgba(0,0,0,.5); }
.mood-label { font-weight: 600; min-width: 120px; }
.mood-meta { color: var(--label-2); font-size: 0.8125rem; }

.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 12px; }
.section-note { color: var(--label-2); font-size: 0.8125rem; }

/* ---------- Tagesempfehlungen */
.daily { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.daily > * { min-width: 0; }
.rec {
  position: relative; overflow: hidden; text-align: left; width: 100%;
  background: var(--bg-elevated); border-radius: 22px; padding: 18px;
  transition: transform 140ms ease-out;
}
.rec:active { transform: scale(0.985); }
.rec::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.9;
  background: radial-gradient(120% 70% at 0% 0%, var(--glow), transparent 60%);
}
.rec.buy { --glow: rgba(48, 209, 88, 0.20); }
.rec.sell { --glow: rgba(255, 69, 58, 0.20); }
.rec > * { position: relative; }
.rec-kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rec.buy .rec-kicker { color: var(--green); }
.rec.sell .rec-kicker { color: var(--red); }
.rec-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 8px; }
.rec-ticker { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.rec-name { color: var(--label-2); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.rec-price { text-align: right; }
.rec-price .price { font-size: 1.25rem; font-weight: 600; }
.limits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.limit {
  border-radius: 14px; padding: 12px; background: var(--bg-elevated-2);
}
.limit.buy { box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.35); }
.limit.sell { box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.4); }
.limit.primary.sell { box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.45); }
/* Einstiegs-Ampel */
.limit.entry.good { box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.45); }
.limit.entry.ok { box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.45); }
.limit.entry.bad { box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.35); }
.limit.entry .limit-value { display: flex; align-items: center; gap: 8px; font-size: clamp(0.9375rem, 4.2vw, 1.125rem); white-space: nowrap; }
.limit.entry .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.limit.entry.good .limit-value { color: var(--green); } .limit.entry.good .dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.limit.entry.ok .limit-value { color: var(--orange); } .limit.entry.ok .dot { background: var(--orange); }
.limit.entry.bad .limit-value { color: var(--red); } .limit.entry.bad .dot { background: var(--red); }
.entry-txt.good { color: var(--green); } .entry-txt.ok { color: var(--orange); } .entry-txt.bad { color: var(--red); }
.entry-reasons { margin-top: 10px; display: grid; gap: 4px; font-size: 0.8125rem; color: var(--label-2); }
.entry-reason { display: flex; gap: 8px; }
.entry-reason .sign { width: 12px; flex: none; font-weight: 700; text-align: center; }
.limit-label { font-size: 0.75rem; color: var(--label-2); font-weight: 600; }
.limit-value { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
.limit.buy .limit-value { color: var(--green); }
.limit.sell .limit-value { color: var(--blue); }
.limit.primary.sell .limit-value { color: var(--red); }
.limit-range { font-size: 0.75rem; color: var(--label-2); margin-top: 2px; }
.rec-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; color: var(--label-2); font-size: 0.8125rem; }
.rec-foot b { color: var(--label); font-weight: 600; }

/* ---------- Karten */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.grid > * { min-width: 0; }
.card {
  text-align: left; width: 100%; background: var(--bg-elevated); border-radius: var(--radius);
  padding: 14px 14px 12px; display: grid; gap: 8px;
  grid-template-columns: minmax(0, 1fr); min-width: 0;   /* lange Firmennamen dürfen die Karte nicht verbreitern */
  transition: transform 120ms ease-out, background 120ms;
}
.card:hover { background: #222224; }
.card:active { transform: scale(0.97); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ticker { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; }
.name { color: var(--label-2); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-mid { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.price { font-weight: 600; }
.chg { font-size: 0.8125rem; font-weight: 600; }
.up { color: var(--green); } .down { color: var(--red); } .flat { color: var(--label-2); }
.card-stats { display: flex; gap: 12px; font-size: 0.75rem; color: var(--label-2); border-top: 0.5px solid var(--separator); padding-top: 8px; }
.card-stats b { color: var(--label); font-weight: 600; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 0.6875rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--bg-elevated-2); color: var(--label-2); }
.tag.earn { color: var(--yellow); background: rgba(255, 214, 10, 0.14); }
.tag.notr { color: var(--red); background: var(--red-fill); }
.tag.mine { color: var(--yellow); background: rgba(255, 214, 10, 0.14); }
/* Eigene Watchlist: + / Stern in Listen, Knopf in der Detailansicht */
.star-btn {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 1.125rem; font-weight: 700; color: var(--blue); background: var(--blue-fill); cursor: pointer;
  transition: transform 120ms ease-out;
}
.star-btn.on { color: var(--yellow); background: rgba(255, 214, 10, 0.16); }
.star-btn:active { transform: scale(0.85); }
.row:has(.star-btn) { grid-template-columns: minmax(0, 1.5fr) 1fr 0.9fr auto auto; }
@media (max-width: 720px) { .row:has(.star-btn) { grid-template-columns: minmax(0, 1.5fr) 1fr auto auto; } }
.watch-btn {
  margin-top: 12px; padding: 9px 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 600;
  color: var(--blue); background: var(--blue-fill); transition: transform 120ms ease-out;
}
.watch-btn.on { color: var(--yellow); background: rgba(255, 214, 10, 0.16); }
.watch-btn:active { transform: scale(0.96); }
/* Anmeldung: Glas-Karte über abgedunkeltem Hintergrund */
.login {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(120% 80% at 50% 0%, rgba(48, 209, 88, 0.12), transparent 60%), rgba(0, 0, 0, 0.92);
}
.login-card {
  width: min(380px, 100%); padding: 28px 22px 22px; border-radius: 28px; text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 0.5px var(--glass-edge), inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: login-in 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes login-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.login-logo { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 6px 18px rgba(48, 209, 88, 0.25); }
.login-card h2 { margin: 14px 0 4px; font-size: 1.5rem; letter-spacing: -0.02em; }
.login-sub { margin: 0 0 18px; color: var(--label-2); font-size: 0.9375rem; }
.login-card input {
  display: block; width: 100%; margin: 0 0 10px; padding: 13px 14px; border: 0; border-radius: 14px;
  font: inherit; font-size: 1rem; color: var(--label); background: rgba(118, 118, 128, 0.24);
}
.login-card input:focus { outline: none; box-shadow: 0 0 0 2px var(--blue); }
.login-error { min-height: 1.2em; margin: 4px 0 10px; color: var(--red); font-size: 0.875rem; }
.login-btn {
  width: 100%; padding: 14px; border-radius: 14px; font-size: 1rem; font-weight: 600; color: #fff;
  background: var(--blue); transition: transform 120ms ease-out, opacity 150ms;
}
.login-btn:active { transform: scale(0.98); }
.login-btn[disabled] { opacity: 0.6; }
.login-hint { margin: 14px 0 0; color: var(--label-3); font-size: 0.8125rem; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.account-row + .account-row { border-top: 0.5px solid var(--separator); }
.link-btn { color: var(--blue); font-weight: 600; font-size: 0.9375rem; }
.link-btn.danger { color: var(--red); }
.link-btn:disabled { opacity: 0.5; }

/* Hinweis im Offline-Modus (Server nicht erreichbar) */
.offline-bar {
  position: fixed; z-index: 25; left: 12px; right: 12px; top: calc(var(--top-h) + var(--subnav-h) + 8px);
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px;
  font-size: 0.8125rem; color: var(--label); background: rgba(255, 159, 10, 0.18);
  box-shadow: inset 0 0 0 0.5px rgba(255, 159, 10, 0.5), 0 8px 20px rgba(0, 0, 0, 0.4);
}
.offline-bar span { flex: 1; }
.offline-bar button { flex: none; padding: 7px 12px; border-radius: 999px; font-weight: 600; color: #000; background: var(--orange); }
body:has(.offline-bar) .page { padding-top: calc(var(--top-h) + var(--subnav-h) + 72px); }

/* Kurzer Hinweis unten (Toast) */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(88px + var(--inset-b)); max-width: calc(100% - 32px);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 999px; font-size: 0.875rem; font-weight: 500; color: var(--label);
  background: rgba(58, 58, 64, 0.92); box-shadow: inset 0 0 0 0.5px var(--glass-edge), 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.isin { font-family: ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: 0.02em; user-select: all; color: var(--label); }
.settings label { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; font-size: 0.9375rem; }
.settings label + label { border-top: 0.5px solid var(--separator); }
.settings input {
  width: 110px; font: inherit; text-align: right; color: var(--label); background: var(--bg-elevated-3);
  border: 0; border-radius: 8px; padding: 6px 10px; margin-right: 6px;
}
.settings input:focus { outline: none; box-shadow: 0 0 0 2px var(--blue); }

.pill { font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.buy { color: var(--green); background: var(--green-fill); }
.pill.sell { color: var(--red); background: var(--red-fill); }
.pill.hold { color: var(--orange); background: var(--orange-fill); }

.ring { width: 38px; height: 38px; flex: none; }
.ring text { font-size: 11px; font-weight: 700; fill: var(--label); }
.spark { width: 100%; height: 34px; display: block; }

/* ---------- Liste */
.search {
  font: inherit; font-size: 0.9375rem; color: var(--label); width: min(320px, 100%);
  background: rgba(118, 118, 128, 0.24); border: 0; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px;
}
.search::placeholder { color: var(--label-3); }
.search:focus { outline: none; box-shadow: 0 0 0 2px var(--blue); }
.list { background: var(--bg-elevated); border-radius: var(--radius); overflow: hidden; }
.row {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1.6fr) 1fr 0.9fr 0.9fr auto; align-items: center; gap: 12px;
  padding: 11px 16px; text-align: left; position: relative;
  transition: background 100ms;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--separator); }
.row:active, .row:hover { background: var(--bg-elevated-2); }
.row .r-num { text-align: right; font-size: 0.875rem; }
.row .r-sub { font-size: 0.75rem; color: var(--label-2); }
.empty { padding: 24px 16px; text-align: center; color: var(--label-2); }

/* ---------- Reddit */
.reddit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
.panel { background: var(--bg-elevated); border-radius: var(--radius); padding: 14px 16px; }
.panel h3 { margin: 0 0 10px; font-size: 0.9375rem; font-weight: 600; color: var(--label-2); }
.trend-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; font-size: 0.875rem; }
.trend-row + .trend-row { border-top: 0.5px solid var(--separator); }
.trend-rank { color: var(--label-3); font-weight: 600; }
.trend-bar { height: 4px; border-radius: 2px; background: #ff8a4c; margin-top: 4px; }
.post { display: block; padding: 9px 0; color: var(--label); font-size: 0.875rem; }
.post + .post { border-top: 0.5px solid var(--separator); }
.post .meta { color: var(--label-2); font-size: 0.75rem; margin-top: 2px; }
.post:hover .ptitle { color: var(--blue); }

/* ---------- Footer */
.footer { margin-top: 48px; color: var(--label-2); font-size: 0.8125rem; max-width: 760px; }
.footer strong { color: var(--label); }
.sources { color: var(--label-3); }

/* ---------- Skeletons */
.skeleton {
  height: 132px; border-radius: var(--radius);
  background: linear-gradient(100deg, var(--bg-elevated) 30%, #252527 50%, var(--bg-elevated) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
.skeleton.tall { height: 250px; border-radius: 22px; }
.skeleton.line { height: 16px; border-radius: 6px; margin: 10px 0; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- Sheet (Detailansicht) */
.scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.6);
  opacity: 0; pointer-events: none;
}
.scrim.active { pointer-events: auto; }
.sheet {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; margin: 0 auto;
  width: min(820px, 100%); height: min(94vh, 980px);
  background: var(--bg-elevated); border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6), inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
  display: flex; flex-direction: column; will-change: transform;
  transform: translateY(110%);
}
.sheet[hidden] { display: none; }
.sheet-handle { touch-action: none; cursor: grab; padding: 8px 18px 10px; flex: none; user-select: none; }
.sheet-handle:active { cursor: grabbing; }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--bg-elevated-3); margin: 0 auto 10px; }
.sheet-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-ticker { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.sheet-name { color: var(--label-2); font-size: 0.875rem; }
.close-btn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elevated-2); color: var(--label-2); transition: transform 120ms ease-out; }
.close-btn:active { transform: scale(0.9); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px calc(40px + var(--inset-b)); flex: 1; }

.d-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.d-price .big { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.025em; }
.d-block { margin-top: 22px; }
.d-block h3 { font-size: 1.0625rem; font-weight: 600; margin: 0 0 10px; letter-spacing: -0.01em; }
.inset { background: var(--bg-elevated-2); border-radius: var(--radius-sm); padding: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--bg-elevated-2); border-radius: var(--radius-sm); padding: 12px; }
.stat .k { font-size: 0.75rem; color: var(--label-2); }
.stat .v { font-size: 1.125rem; font-weight: 600; margin-top: 2px; }
.stat .s { font-size: 0.75rem; color: var(--label-2); margin-top: 2px; }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 260px; overflow: visible; touch-action: pan-y; user-select: none; }
.chart .axis { font-size: 10px; fill: var(--label-3); }
.chart-tip {
  position: absolute; top: 6px; pointer-events: none; font-size: 0.75rem; padding: 5px 8px; border-radius: 8px;
  background: rgba(58, 58, 60, 0.9); backdrop-filter: blur(10px); white-space: nowrap; transform: translateX(-50%); opacity: 0;
  transition: opacity 120ms;
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.75rem; color: var(--label-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.ladder { position: relative; height: 64px; margin: 8px 6px 4px; }
.ladder-track { position: absolute; left: 0; right: 0; top: 22px; height: 6px; border-radius: 3px; background: var(--bg-elevated-3); }
.ladder-zone { position: absolute; top: 18px; height: 14px; border-radius: 7px; }
.ladder-zone.buy { background: rgba(48, 209, 88, 0.45); }
.ladder-zone.sell { background: rgba(10, 132, 255, 0.5); }
.ladder-zone.sell.primary { background: rgba(255, 69, 58, 0.5); }
.ladder-mark { position: absolute; top: 12px; width: 2px; height: 26px; margin-left: -1px; border-radius: 1px; }
.ladder-mark.stop { background: var(--red); }
.ladder-mark.now { background: #fff; width: 4px; margin-left: -2px; height: 30px; top: 10px; }
.ladder-lbl { position: absolute; top: 44px; transform: translateX(-50%); font-size: 0.6875rem; color: var(--label-2); white-space: nowrap; }
.ladder-lbl.top { top: -4px; }

.reasons { display: grid; gap: 8px; }
.reason { display: grid; grid-template-columns: 1fr 90px; gap: 12px; align-items: center; font-size: 0.875rem; }
.reason-bar { height: 6px; border-radius: 3px; background: var(--bg-elevated-3); position: relative; overflow: hidden; }
.reason-bar span { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.news-item { display: block; padding: 10px 0; color: var(--label); font-size: 0.875rem; }
.news-item + .news-item { border-top: 0.5px solid var(--separator); }
.news-item .meta { color: var(--label-2); font-size: 0.75rem; margin-top: 2px; }
.news-item:hover .ptitle { color: var(--blue); }
.callout { font-size: 0.8125rem; color: var(--label-2); margin-top: 10px; }
.warn { color: var(--yellow); }

.fade-swap { transition: opacity 160ms ease; }
.fade-swap.out { opacity: 0; }

/* Am PC: Tab-Leiste wird zur Seitenleiste links (wie bei Apple auf dem iPad) */
@media (min-width: 1024px) {
  .tabbar {
    top: var(--top-h); bottom: 0; left: 0; right: auto; width: 220px; flex-direction: column; gap: 4px;
    padding: 20px 12px; border-radius: 0; box-shadow: 0.5px 0 0 var(--separator); background: rgba(18, 18, 20, 0.6);
  }
  .tabbar::before, .tab-lens { display: none; }
  .tab-btn {
    flex: none; flex-direction: row; gap: 12px; padding: 9px 12px; border-radius: 10px;
    font-size: 0.9375rem; font-weight: 500; color: var(--label-2);
  }
  .tab-btn svg { width: 22px; height: 22px; }
  .tab-btn.on svg { transform: none; }
  .tab-btn.on { background: rgba(118, 118, 128, 0.24); color: var(--label); }
  .tab-btn.on svg { color: var(--blue); }
  .page { padding-left: calc(220px + 32px); max-width: calc(1180px + 220px); padding-bottom: 48px; }
  .nav-inner { max-width: none; padding-left: 24px; }
  .subnav { left: 220px; }
  .subnav-inner { max-width: none; padding-left: 32px; }
}

@media (max-width: 720px) {
  .chips button { padding: 7px 13px; }
  .reddit { grid-template-columns: 1fr; }
  .row { grid-template-columns: minmax(0, 1.5fr) 1fr auto; }
  .row .hide-sm { display: none; }
  .daily { grid-template-columns: 1fr; }
  .sheet { height: 96vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .skeleton { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: #121212; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --label-2: rgba(235, 235, 245, 0.85); --separator: rgba(160, 160, 165, 0.8); }
  .card, .list, .panel, .rec { box-shadow: inset 0 0 0 1px var(--separator); }
}

/* Insider-Geschäfte (Detailansicht) */
.ins-verdict { margin: 0 0 10px; font-size: 0.9375rem; font-weight: 600; }
.ins-verdict.good { color: var(--green); }
.ins-verdict.neutral { color: var(--label); }
.ins-verdict.none { color: var(--label-2); font-weight: 500; }
.ins-list { margin-top: 12px; }
.ins-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 0.5px solid var(--separator); }
.ins-who { min-width: 0; }
.ins-name { font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-meta { font-size: 0.75rem; color: var(--label-2); }
.ins-amt { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ins-val { font-variant-numeric: tabular-nums; font-size: 0.875rem; min-width: 64px; text-align: right; }

/* Indikator-Schalter im Analyse-Tab (nur Browser) */
.ind-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ind-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 0.5px solid var(--separator);
  background: transparent; color: var(--label-2); font: inherit; font-size: 0.8125rem; cursor: pointer;
  transition: background 120ms var(--ease-out), color 120ms var(--ease-out), transform 100ms var(--ease-out); }
.ind-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--ic); opacity: .4; }
.ind-chip.on { background: var(--bg-elevated-2); color: var(--label); border-color: transparent; }
.ind-chip.on i { opacity: 1; }
.ind-chip:active { transform: scale(0.97); }
.ind-notes { margin-top: 10px; font-size: 0.8125rem; line-height: 1.45; color: var(--label-2); }
.ind-notes p { margin: 0 0 6px; }

/* ---------- Suche wie bei Trade Republic: Lupe unten rechts (nur Depot) + Vollbild-Suche */
.search-fab {
  position: fixed; z-index: 31; right: 16px;
  bottom: calc(max(var(--inset-b) - var(--app-gesture-overlap, 10px), 0px) + 4px + 64px + 14px);
  width: 54px; height: 54px; border-radius: 50%; border: 0; display: none; place-items: center; cursor: pointer;
  color: var(--label); background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 0.5px 0 rgba(255, 255, 255, 0.25);
  transition: transform 100ms var(--ease-out);
}
.search-fab svg { width: 24px; height: 24px; }
.search-fab:active { transform: scale(0.94); }
body[data-tab="all"] .search-fab { display: grid; }
body.search-open .search-fab { display: none; }
@media (min-width: 1024px) { .search-fab { bottom: 24px; right: 24px; } }

.search-overlay {
  position: fixed; inset: 0; z-index: 35; background: var(--bg); display: flex; flex-direction: column;
  padding-top: var(--inset-t); opacity: 0; transform: translateY(12px);
  transition: opacity 200ms var(--ease-out), transform 220ms var(--ease-out);
}
.search-overlay.on { opacity: 1; transform: none; }
.search-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px 10px; max-width: 760px; width: 100%; margin: 0 auto; }
.search-field { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px; border-radius: 12px;
  background: rgba(118, 118, 128, 0.24); color: var(--label-2); }
.search-field svg { width: 17px; height: 17px; flex-shrink: 0; }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--label);
  font: inherit; font-size: 1rem; outline: none; }
.search-field input::placeholder { color: var(--label-3); }
.search-field input::-webkit-search-cancel-button { filter: invert(0.6); }
.search-field:focus-within { box-shadow: 0 0 0 2px var(--blue); }
.search-cancel { border: 0; background: none; color: var(--blue); font: inherit; font-size: 1rem; padding: 6px 0; cursor: pointer; }
.search-results { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px calc(24px + var(--inset-b));
  max-width: 760px; width: 100%; margin: 0 auto; }
.search-results .list { background: transparent; }
.search-results .row { border-radius: 0; }
.search-recent-head { display: flex; justify-content: space-between; align-items: center; }
.search-clear { border: 0; background: none; color: var(--blue); font: inherit; font-size: 0.8125rem; cursor: pointer; padding: 0; }
@media (prefers-reduced-motion: reduce) { .search-overlay { transform: none; transition: opacity 120ms linear; } }

/* ---------- Rangliste der Spieldepots */
.rank-head { padding: 16px; margin-bottom: 14px; }
.k-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--label-2); }
.rank-me-place { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin-top: 4px; }
.rank-me-place span { font-size: 1.0625rem; font-weight: 500; color: var(--label-2); letter-spacing: 0; }
.rank-me-sub { font-size: 0.875rem; color: var(--label-2); margin: 4px 0 12px; }
.rank-mode { margin-bottom: 0; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 0.5px solid var(--separator); }
.rank-row:first-child { border-top: 0; }
.rank-row.me { background: rgba(10, 132, 255, 0.10); }
.rank-pos { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 0.9375rem; background: var(--bg-elevated-2); color: var(--label-2); font-variant-numeric: tabular-nums; }
.rank-pos.gold { background: linear-gradient(145deg, #ffd95a, #c99a1d); color: #2b1d00; }
.rank-pos.silver { background: linear-gradient(145deg, #e9edf2, #9aa3ad); color: #1c2026; }
.rank-pos.bronze { background: linear-gradient(145deg, #f0b07a, #a8622e); color: #2a1404; }
.rank-who { flex: 1; min-width: 0; }
.rank-name { font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-you { font-size: 0.6875rem; font-weight: 700; color: var(--blue); background: var(--blue-fill); padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }
.rank-meta { font-size: 0.75rem; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-num { text-align: right; flex-shrink: 0; }
.rank-pct { font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-waiting { display: flex; flex-wrap: wrap; gap: 6px; }
.rank-chip { font-size: 0.8125rem; padding: 5px 10px; border-radius: 999px; background: var(--bg-elevated); color: var(--label-2); }

/* ---------- Screener */
.scr-open { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 18px; padding: 14px 16px; border: 0; border-radius: var(--radius);
  background: var(--bg-elevated); color: var(--label); font: inherit; text-align: left; cursor: pointer; transition: transform 100ms var(--ease-out); }
.scr-open:active { transform: scale(0.98); }
.scr-open svg { width: 22px; height: 22px; color: var(--blue); flex-shrink: 0; }
.scr-open span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.scr-open small { font-size: 0.8125rem; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr-open i { font-style: normal; font-size: 1.4rem; color: var(--label-3); }
.scr-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.scr-title b { font-size: 1.25rem; }
.scr-title span { font-size: 0.75rem; color: var(--label-2); }
.scr-presets { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.scr-presets::-webkit-scrollbar { display: none; }
.scr-presets .ana-chip { flex-shrink: 0; }
.scr-group { margin-bottom: 10px; }
.scr-glabel { font-size: 0.75rem; font-weight: 600; color: var(--label-2); margin-bottom: 5px; }
.scr-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.scr-opts .ind-chip i { display: none; }
.scr-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 8px; }
.scr-head b { font-size: 1.0625rem; }
.scr-sort { margin-left: auto; display: inline-flex; gap: 2px; background: var(--bg-elevated); border-radius: 9px; padding: 2px; }
.scr-sort button { border: 0; background: none; color: var(--label-2); font: inherit; font-size: 0.75rem; padding: 4px 9px; border-radius: 7px; cursor: pointer; }
.scr-sort button.on { background: var(--bg-elevated-3); color: var(--label); }
.scr-facts { font-size: 0.6875rem; color: var(--label-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* Rangliste: Portfolio aufklappen + Privat-Knopf */
.rank-head { position: relative; }
.rank-private { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--label-2);
  background: var(--bg-elevated-2); transition: background 150ms var(--ease-out), color 150ms var(--ease-out), transform 100ms var(--ease-out); }
.rank-private svg { width: 14px; height: 14px; }
.rank-private.on { color: var(--orange); background: var(--orange-fill); }
.rank-private:active { transform: scale(0.95); }
.rank-row { cursor: pointer; }
.rank-chev { color: var(--label-3); font-size: 1.2rem; transition: transform 200ms var(--ease-out); }
.rank-row.open .rank-chev { transform: rotate(90deg); }
.rank-detail { padding: 4px 16px 14px 58px; background: rgba(255, 255, 255, 0.025); }
.rank-row.me + .rank-detail { background: rgba(10, 132, 255, 0.06); }
.rank-hold { padding: 7px 0; cursor: pointer; }
.rank-hold.cash { cursor: default; }
.rank-hold-top { display: flex; justify-content: space-between; gap: 10px; font-size: 0.875rem; }
.rank-hold-top > span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-hold-num { flex-shrink: 0; font-variant-numeric: tabular-nums; color: var(--label-2); }
.rank-bar { height: 4px; margin-top: 5px; border-radius: 2px; background: var(--bg-elevated-2); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 2px; background: var(--blue); }
.rank-hold.cash .rank-bar i { background: var(--label-3); }
.rank-locked { margin: 6px 0 0; font-size: 0.8125rem; color: var(--label-2); }
@media (max-width: 420px) { .rank-detail { padding-left: 16px; } }

/* Einstellungen: Schalter-Zeilen (Benachrichtigungen) */
.set-toggle { justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 0.5px solid var(--separator, rgba(128,128,128,.2)); }
.set-toggle:last-of-type { border-bottom: 0; }
.set-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-title { font-size: 0.9375rem; color: var(--label); }
.set-toggle.dim { opacity: 0.45; }

/* Depot: Verteilung nach Branchen und Ländern */
.mix-card { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: var(--bg-elevated); border-radius: var(--radius); padding: 16px 14px; }
.mix-pie { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.mix-title { font-size: 0.8125rem; font-weight: 600; color: var(--label-2); margin-bottom: 8px; }
.mix-ring { position: relative; width: 100%; max-width: 132px; aspect-ratio: 1; }
.mix-ring svg { width: 100%; height: 100%; display: block; }
.mix-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 24%; }
.mix-center b { font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.mix-center span { font-size: 0.6875rem; color: var(--label-2); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.mix-legend { list-style: none; margin: 12px 0 0; padding: 0; width: 100%; display: grid; gap: 5px; }
.mix-legend li { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 7px; font-size: 0.75rem; color: var(--label-2); }
.mix-legend i { width: 9px; height: 9px; border-radius: 50%; }
.mix-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-legend b { color: var(--label); font-weight: 600; font-variant-numeric: tabular-nums; }
.mix-warn { margin-top: 10px; }
@media (min-width: 900px) { .mix-card { max-width: 560px; } }

/* Mein Depot */
.tab-btn[hidden] { display: none; }
.mine-legend { display: flex; gap: 14px; justify-content: center; margin-top: 6px; font-size: 0.6875rem; color: var(--label-2); }
.mine-legend i { display: inline-block; width: 14px; height: 2px; margin-right: 5px; vertical-align: middle; border-radius: 1px; }
.mine-legend i.dash { background: repeating-linear-gradient(90deg, var(--label-3) 0 4px, transparent 4px 7px); }
.mine-form { margin: 12px 0 4px; padding: 14px; border-radius: var(--radius-sm); background: var(--bg-elevated-2); }
.mine-in { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 0; font: inherit; font-size: 16px;
  background: var(--bg-elevated-3); color: var(--label); color-scheme: dark; }
.mine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mine-grid label { display: flex; flex-direction: column; min-width: 0; }
.mine-results { margin-top: 6px; }
.mine-results .row { width: 100%; text-align: left; }
.mine-picked { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg-elevated-3); font-size: 0.875rem; }
.mine-picked span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 6px; }
.mine-actions .login-btn { width: auto; padding: 10px 18px; margin: 0; }

/* Depot-Kurven durchwischen: Linie, Punkt und Wert am Finger/Mauszeiger */
.scrub { position: relative; touch-action: pan-y; cursor: crosshair; }
.scrub-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--label-2); opacity: 0; pointer-events: none; }
.scrub-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px var(--bg-elevated); opacity: 0; pointer-events: none; transition: opacity 120ms; }
.scrub-tip { top: -8px; transform: translate(-50%, -100%); z-index: 2; }
.scrub-tip b { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .scrub-dot, .scrub-tip { transition: none; } }

/* PIN-Sperre vor „Mein Depot“: Inhalt verschwommen, Ziffernfeld darüber */
.pin-wrap { position: relative; min-height: 560px; }
.pin-blur { filter: blur(14px) saturate(120%); opacity: 0.55; pointer-events: none; user-select: none; }
.pin-pad { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 36px; text-align: center; }
.pin-lock { width: 30px; height: 30px; color: var(--label); margin-bottom: 10px; }
.pin-title { font-size: 1.25rem; font-weight: 600; }
.pin-sub { font-size: 0.8125rem; color: var(--label-2); margin-top: 4px; }
.pin-dots { display: flex; gap: 18px; margin: 22px 0 6px; }
.pin-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--label); transition: background 120ms; }
.pin-dots i.on { background: var(--label); }
.pin-dots.shake { animation: pin-shake 360ms cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes pin-shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.pin-err { min-height: 18px; font-size: 0.8125rem; color: var(--red); margin-bottom: 8px; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; }
.pin-key { width: 76px; height: 76px; border-radius: 50%; border: 0; font: inherit; font-size: 1.75rem; font-weight: 400;
  color: var(--label); background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 160ms;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pin-key { transition: background 280ms ease-out; user-select: none; -webkit-user-select: none; }
.pin-key.down, .pin-key:active { background: rgba(255, 255, 255, 0.42); transition: none; }   /* Aufleuchten sofort, Ausblenden weich */
.pin-key.del.down, .pin-key.del:active { background: rgba(255, 255, 255, 0.14); }
.pin-key.del { background: transparent; }
.pin-key:disabled { opacity: 0.5; }
@media (prefers-reduced-motion: reduce) { .pin-dots.shake { animation: none; } }

/* Bilanz-Knopf oben: blau, solange die Bilanz offen ist */
.icon-btn.on { color: var(--blue); background: var(--blue-fill); }
.tab-lens { transition: opacity 160ms; }
[data-panel="signals"] > .mood { margin: 16px 0 4px; }
/* Schmale Handys: Platz für den Titel – „Auto“ steht dann nur am Schalter (Tooltip/Bildschirmleser behalten den Namen) */
@media (max-width: 430px) {
  .nav-actions > .auto-toggle .auto-label { display: none; }
  .nav-actions { gap: 8px; }
}

/* Bilanz: Prognose-Forschung */
.research-state { font-size: 1.0625rem; font-weight: 600; margin: 4px 0 2px; }
#research .name, #research .r-sub { white-space: normal; }
