/* ===================================================================
   SK-System -- Oberfläche
   -------------------------------------------------------------------
   Vier Werte, mehr nicht: Weiß als Grund, ein Grau in Abstufungen für
   Linien und Nebentexte, ein sehr dunkles Anthrazit für Schrift und
   kräftige Marken, und genau eine Akzentfarbe. Der Akzent ist kein
   Schmuck -- er markiert, was gerade gilt: der Hover, das nächste
   Limit, die Ankerzone, der doppelte Vorteil. Keine Ampelfarben, keine
   Verläufe, keine Schatten mit Farbe.

   Schrift: Inter (dieselbe wie tally.so), mit einer echten
   Ersatzkette, falls das Netz sie nicht liefert. Grundgröße 15px --
   Kurslisten liest man lange, und Nebentext unter 13px liest niemand
   gern. Zahlen stehen in Tabellenziffern, damit Spalten untereinander
   stehen und nicht tanzen.
   =================================================================== */

/* Die Schrift lädt index.html per <link> neben dieser Datei: ein @import
   hier würde erst nach app.css angefragt und das erste Bild aufhalten. */

:root {
  /* -- Grund ------------------------------------------------------- */
  --bg:            #ffffff;
  --bg-soft:       #fafafa;
  --bg-sunken:     #f4f4f5;

  /* -- Das eine Grau ----------------------------------------------- */
  --line:          #e6e6e8;
  --line-strong:   #d2d2d6;
  --grey:          #6a6c72;      /* Nebentext -- dunkel genug zum Lesen */

  /* -- Das Schwarz, das keins ist ---------------------------------- */
  --ink:           #17181b;
  --ink-soft:      #3d3f45;

  /* -- Der Akzent, sparsam ----------------------------------------- */
  --accent:        #2b52d8;
  --accent-dark:   #1f3fb0;
  --accent-weak:   #f0f3fd;

  /* -- Flächen und was auf dem Schwarz steht ------------------------ */
  --surface:       #ffffff;      /* Karten, Knöpfe, Felder */
  --on-ink:        #ffffff;      /* Schrift auf var(--ink) */
  --win:           #089981;      /* Grün und Rot wie TradingView */
  --loss:          #f23645;

  --radius:        8px;
  --radius-lg:     12px;

  --sans: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --mono: "Cascadia Mono", "Consolas", ui-monospace, "SF Mono", Menlo, monospace;
}

/* -- Dunkel ---------------------------------------------------------
   Dieselben vier Werte, umgedreht: der Grund fast schwarz, die Schrift
   hell, der Akzent etwas heller, damit er auf dem Dunkel trägt. Gesetzt
   wird ``data-theme`` am Wurzelelement (Kopf von index.html, app.js). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:            #111214;
  --bg-soft:       #15161a;
  --bg-sunken:     #1e2025;
  --line:          #2a2c32;
  --line-strong:   #3b3e46;
  --grey:          #9a9da6;
  --ink:           #e8e9ec;
  --ink-soft:      #c4c6cc;
  --accent:        #5b7cf0;
  --accent-dark:   #9db1ff;
  --accent-weak:   #1c2442;
  --surface:       #17181b;
  --on-ink:        #17181b;
  --win:           #089981;
  --loss:          #f23645;

  /* Der Chart (chart.js) liest diese -- ohne sie bleibt er hell. */
  --skc-bg:        #000000;
  --skc-text:      #d1d4dc;
  --skc-muted:     #8b8f9a;
  --skc-line:      #2e3138;
  --skc-tip:       rgba(10, 10, 12, .94);
}
:root[data-theme="dark"] .badge.draw { background: #1c2442; color: #9db1ff; border-color: #34427a; }
:root[data-theme="dark"] .seg.on { box-shadow: 0 0 0 1px var(--line-strong); }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.011em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Nebentext ist grau, aber nicht hell: hellgrau auf Weiß liest sich
   nicht, und in dieser Oberfläche steht in den Nebenzeilen die halbe
   Auskunft. */
.muted { color: var(--grey); }
.num { font-variant-numeric: tabular-nums; }
.small { font-size: 13px; }

::selection { background: var(--accent-weak); }


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

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:disabled { opacity: .4; cursor: default; }
/* Der Chart-Knopf ist ein Verweis (er öffnet ein zweites Fenster) und
   soll trotzdem wie ein Knopf aussehen -- nur der Unterstrich muss weg. */
a.btn { text-decoration: none; }

/* Die Hauptaktion ist schwarz, nicht bunt. Farbe bekommt sie erst,
   wenn der Zeiger darauf steht -- dort ist der Akzent eine Auskunft
   ("das hier reagiert"), im Ruhezustand wäre er bloß laut. */
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent); }

.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-sunken); color: var(--accent); }

.btn-outline { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }

.btn-small { padding: 5px 11px; font-size: 13px; }

.btn-icon { width: 16px; height: 16px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7;
      stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* ===================================================================
   Onboarding
   =================================================================== */

.onboarding {
  min-height: 100%;
  display: flex; justify-content: center;
  padding: 72px 24px 120px;
  background: var(--bg);
  overflow-y: auto;
}
.onboarding-inner { width: 100%; max-width: 820px; }

.brand-mark {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  color: var(--ink);
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark.small { width: 30px; height: 30px; }

.onboarding-head { margin-bottom: 40px; }
.onboarding-head h1 { margin: 26px 0 12px; font-size: 32px; letter-spacing: -.02em; }
.lead { color: var(--ink-soft); max-width: 62ch; font-size: 15px; }

/* Anmeldung (auth.js) -- dieselbe Seite wie das Onboarding, nur schmal. */
.login-inner { max-width: 400px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .field input {
  width: 100%; box-sizing: border-box; padding: 9px 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); font: inherit; font-size: 14px; color: var(--ink);
}
.login-form .field input:focus { outline: 0; border-color: var(--accent); }
.login-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.login-msg { margin: 0; color: var(--ink-soft); }
.login-msg.bad { color: var(--loss); }
.plans { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.plan {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.plan:hover:not(:disabled) { border-color: var(--accent); }
.plan.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }   /* auf der Preisseite gewählt */
.plan:disabled { opacity: .6; cursor: default; }
.plan-name { font-weight: 600; }
.plan-tag {
  margin-left: 6px; padding: 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--accent-weak); color: var(--accent-dark);
}
.plan-price { font-size: 20px; font-weight: 600; white-space: nowrap; }
.plan-price small { font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.plan-was { margin-right: 4px; font-size: 14px; font-weight: 400; color: var(--ink-soft); }
.plan-then { display: block; margin-top: 2px; text-align: right; }
.paywall-code { margin-right: auto; font-weight: 600; color: var(--ink); }
.paywall-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 18px; }

/* Startliste: fünf Märkte als Knöpfe, "Detailliert" mit Suche, Reitern und Chips */
.markets { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.market {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  min-height: 130px; padding: 18px; text-align: left; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface);
  cursor: pointer; transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
/* Farben invertiert (Vorgabe 2026-10-20): nicht gewählt steht gefüllt da,
   gewählt hell mit kräftigem Rahmen und Haken. */
.market { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.market:hover { opacity: .9; }
.market:active { transform: scale(.985); }
.market.on { border: 2.5px solid var(--ink); padding: 17px; background: var(--surface); color: var(--ink); }
.market-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.market-name { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.market-check {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px; border: 1.5px solid currentColor; opacity: .55;
}
.market.on .market-check { background: var(--ink); border-color: var(--ink); color: var(--surface); opacity: 1; }
.market-check .ok-mark { width: 16px; height: 16px; margin: 0; }
.market-hint { color: var(--on-ink); opacity: .75; font-size: 14px; line-height: 1.4; }
.market.on .market-hint { color: var(--ink-soft); opacity: 1; }
.market-count { margin-top: auto; font-size: 13px; font-weight: 600; opacity: .8; }
.ok-mark { width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px;
  fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.ob-search {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px; padding: 0 14px; height: 48px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .25);
}
.ob-search[hidden] { display: none; }
.ob-search:focus-within { border-color: var(--accent); }
.ob-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--grey); stroke-width: 2; stroke-linecap: round; }
.ob-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink);
}
.ob-search input::-webkit-search-cancel-button { display: none; }
.ob-clear {
  flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--bg-sunken); color: var(--ink-soft); font-size: 18px; line-height: 1;
}

.categories { display: flex; flex-direction: column; gap: 14px; }

.ob-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ob-tabs::-webkit-scrollbar { display: none; }
.ob-tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.ob-tab:hover { border-color: var(--ink); }
.ob-tab.active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ob-badge {
  min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center;
  font-size: 12px; font-variant-numeric: tabular-nums; background: var(--bg-sunken); color: var(--grey);
}
.ob-badge.live { background: var(--accent); color: #fff; }
.ob-tab.active .ob-badge:not(.live) { background: rgba(255, 255, 255, .2); color: var(--on-ink); }

.ob-panel {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  padding: 6px 18px 18px;
}
.ob-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.ob-title { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ob-seg { display: inline-flex; flex: none; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.ob-seg button {
  height: 32px; padding: 0 14px; border: 0; border-left: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.ob-seg button:first-child { border-left: 0; }
.ob-seg button:hover:not(:disabled) { background: var(--accent-weak); color: var(--accent-dark); }
.ob-seg button:disabled { opacity: .4; cursor: default; }

.ob-group { padding-top: 14px; }
.ob-group + .ob-group { margin-top: 6px; border-top: 1px solid var(--line); }
.ob-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ob-group-text { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.ob-group-text b { font-size: 15px; }
.ob-count {
  font-size: 12px; font-variant-numeric: tabular-nums; color: var(--grey);
  background: var(--bg-sunken); border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.ob-count.live { background: var(--accent-weak); color: var(--accent-dark); }
.ob-hint { color: var(--grey); font-size: 13px; }
.ob-empty { margin: 18px 0 6px; color: var(--grey); font-size: 14px; }

.ob-chips {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
  padding-top: 12px;
}
.ob-group-head + .ob-chips { padding-top: 0; }
.pick { display: block; cursor: pointer; user-select: none; min-width: 0; }
.pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.pick-in {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); transition: background .1s ease, border-color .1s ease;
}
.pick:hover .pick-in { border-color: var(--ink); }
.pick-code { font-weight: 600; font-size: 14px; flex: none; }
.pick-name { color: var(--grey); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pick input:checked + .pick-in { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pick input:checked + .pick-in .pick-name { color: var(--on-ink); opacity: .7; }
.pick input:focus-visible + .pick-in { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Kästchen (auch anderswo im Einsatz) */
.check {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
  padding: 5px 0;
  min-width: 0;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.box {
  position: relative;
  flex: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  display: grid; place-items: center;
  transition: background .12s ease, border-color .12s ease;
}
.check:hover .box { border-color: var(--accent); }
.box svg { width: 12px; height: 12px; stroke: var(--on-ink); stroke-width: 2.6; opacity: 0; }
.box .dash {
  position: absolute; width: 9px; height: 2px;
  border-radius: 1px; background: var(--on-ink); opacity: 0;
}
.check input:checked + .box { background: var(--ink); border-color: var(--ink); }
.check input:checked + .box svg { opacity: 1; }
.check input:indeterminate + .box { background: var(--ink); border-color: var(--ink); }
.check input:indeterminate + .box svg { opacity: 0; }
.check input:indeterminate + .box .dash { opacity: 1; }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }

.onboarding-foot {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: flex-end;
  gap: 20px;
  padding: 14px 32px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.counter { font-size: 14px; color: var(--ink-soft); }
.counter strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.counter .muted { margin-left: 8px; }
.row-actions { display: flex; align-items: center; gap: 8px; }

@media (max-width: 640px) {
  .onboarding { padding: 28px 16px 150px; }
  .onboarding-head { margin-bottom: 22px; }
  .onboarding-head h1 { font-size: 26px; margin: 18px 0 8px; }
  .lead { font-size: 14px; }
  .markets { grid-template-columns: 1fr; gap: 10px; }
  .market { min-height: 0; padding: 16px; }
  .market.on { padding: 15px; }
  .ob-panel { padding: 4px 12px 14px; }
  .ob-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pick-in { height: 44px; padding: 0 10px; }
  .ob-hint { display: none; }
  .ob-seg button { height: 36px; padding: 0 12px; }
  .onboarding-foot {
    flex-direction: column; align-items: stretch; gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .counter { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
  .counter .muted { display: none; }
  .row-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
  .row-actions .btn { height: 44px; padding: 0 12px; }
  .row-actions .btn-primary { width: 100%; }
}


/* ===================================================================
   App-Rahmen
   =================================================================== */

.app { display: flex; height: 100%; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Die Kopfzeile wie auf TradingView: Marke, Suche als Pille, "Offen"
   und Research daneben, rechts in der Ecke der Profilkreis. */
.topbar {
  flex: none;
  display: flex; align-items: center;
  gap: 14px;
  height: 64px; padding: 0 28px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 9px; flex: none;
  border: 0; background: none; padding: 4px 6px 4px 0; cursor: pointer;
  color: var(--ink); margin-right: 18px;
}
.brand .brand-mark.small { width: 32px; height: 32px; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }

.topnav { display: flex; align-items: center; gap: 4px; flex: none; margin-left: 10px; }
.topnav-item {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  color: var(--ink); font-size: 15px; font-weight: 500; white-space: nowrap;
}
.topnav-item:hover { background: var(--bg-sunken); }
.topnav-item.on { background: var(--bg-sunken); font-weight: 600; }
.nav-count {
  min-width: 20px; padding: 0 6px;
  font-size: 11.5px; font-weight: 600; line-height: 19px; text-align: center;
  font-variant-numeric: tabular-nums;
  border-radius: 99px; background: var(--bg-sunken); color: var(--ink-soft);
}
.topnav-item.on .nav-count { background: var(--surface); }
.nav-count.hot { background: var(--accent); color: #fff; }

/* Rechts in der Ecke: der Profilkreis mit Aufklappmenü. */
.profile { position: relative; flex: none; margin-left: 6px; }

/* Die Glocke links neben dem Profilkreis, mit Zähler der ungelesenen. */
.inbox { position: relative; flex: none; margin-left: auto; }
.bell {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: transparent;
  color: var(--ink); cursor: pointer;
}
.bell:hover, .bell[aria-expanded="true"] { background: var(--bg-sunken); }
.bell svg { width: 22px; height: 22px; }
.bell-count {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 99px; background: var(--loss); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.inbox-menu {
  position: absolute; right: -50px; top: calc(100% + 10px); z-index: 60;
  width: 370px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
  overflow: hidden;
}
.ib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
           padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.ib-head b { font-size: 16px; }
.ib-act { border: 0; background: none; padding: 2px 6px; cursor: pointer;
          font: inherit; font-size: 13px; color: var(--accent); }
.ib-act:hover { text-decoration: underline; }
.ib-list { max-height: 440px; overflow-y: auto; }
.ib-row {
  display: flex; gap: 12px; width: 100%; padding: 12px 16px;
  border: 0; border-top: 1px solid var(--line); background: none;
  text-align: left; cursor: pointer; color: var(--ink); font: inherit;
}
.ib-row:first-child { border-top: 0; }
.ib-row:hover { background: var(--bg-soft); }
.ib-row.new { background: var(--accent-weak); }
.ib-row.new:hover { background: var(--bg-sunken); }
.ib-icon { flex: none; width: 32px; height: 32px; border-radius: 50%;
           display: grid; place-items: center; background: var(--bg-sunken); color: var(--ink-soft); }
.ib-icon svg { width: 17px; height: 17px; }
.ib-row.new .ib-icon { background: var(--accent); color: #fff; }
.ib-row .wl-logo.ib-logo { width: 32px; height: 32px; font-size: 14px; }
.ib-text .seq-way { font-size: inherit; }
.ib-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.ib-text b { font-weight: 600; font-size: 14px; }
.ib-text span { color: var(--ink-soft); overflow-wrap: anywhere; }
.ib-text em { font-style: normal; font-size: 12px; color: var(--grey); }
.ib-empty { display: flex; flex-direction: column; align-items: center; gap: 6px;
            padding: 36px 24px; text-align: center; font-size: 13.5px; color: var(--grey); }
.ib-empty svg { width: 34px; height: 34px; color: var(--line-strong); margin-bottom: 4px; }
.ib-empty b { color: var(--ink); font-size: 15px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  background: #3f8f76; color: #fff;
  font-size: 17px; font-weight: 600;
  transition: box-shadow .15s ease;
}
.avatar:hover, .avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--bg-sunken); }
.avatar.big { width: 42px; height: 42px; cursor: default; flex: none; }
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  width: 290px; padding: 8px 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
}
.pm-head { display: flex; align-items: center; gap: 12px; padding: 8px 16px 12px; }
.pm-name { font-weight: 600; }
.pm-sep { height: 1px; margin: 6px 0; background: var(--line); }
.pm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 38px; padding: 4px 16px;
  border: 0; background: none; text-align: left;
  font-size: 14px; color: var(--ink); cursor: pointer;
}
.pm-row:hover { background: var(--bg-sunken); }
.pm-link kbd { margin-left: auto; }
.pm-labels { cursor: default; }
.pm-labels:hover { background: none; }
.pm-labels .seg { padding: 4px 10px; font-size: 13px; }
/* Schalter: Kästchen versteckt, die Pille zeigt an/aus. */
.pm-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle {
  position: relative; flex: none; width: 34px; height: 20px; border-radius: 99px;
  background: var(--line-strong); transition: background .15s ease;
}
.toggle::after {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s ease;
}
.pm-switch input:checked + .toggle { background: var(--ink); }
.pm-switch input:checked + .toggle::after { transform: translateX(14px); }
.pm-switch input:focus-visible + .toggle { outline: 2px solid var(--accent); outline-offset: 2px; }
.pm-switch input:disabled + .toggle { opacity: .4; }

.rescan {
  margin-left: auto; align-self: center; flex: none;
  border: 0; background: none; padding: 2px 4px; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--grey);
  white-space: nowrap;
  transition: color .15s ease;
}
.rescan:hover { color: var(--ink); }
.rescan:disabled { cursor: default; opacity: .45; }
.rescan:disabled:hover { color: var(--grey); }

@keyframes pulse-shine {
  from { background-position: -40% 0; }
  to   { background-position: 140% 0; }
}

/* Research: Heute | Doppelte Vorteile */
.segmented {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--bg-sunken); border-radius: 10px;
}
.seg {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-soft);
  font: inherit; font-size: 14px; cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.seg:hover { color: var(--ink); }
.seg.on { background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.seg-count {
  min-width: 20px; padding: 0 6px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; line-height: 18px; text-align: center;
  background: var(--line); color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.seg.on .seg-count { background: var(--accent-weak); color: var(--accent-dark); }
.spinner {
  width: 14px; height: 14px; flex: none;
  border: 2px solid var(--line-strong); border-top-color: var(--ink);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tabbar {
  flex: none;
  display: flex; align-items: stretch; gap: 2px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tabbar:empty { display: none; }
.tab-switch { align-self: center; margin: 6px 10px 6px 0; flex: none; }
.tab-switch .seg { padding: 5px 14px; font-size: 13.5px; }
.tab {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px 10px;
  border-bottom: 2px solid transparent;
  color: var(--grey);
  font-size: 14px; cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--accent); }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab .close {
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 5px;
  color: var(--grey);
}
.tab .close:hover { background: var(--bg-sunken); color: var(--accent); }
.tab .close svg { width: 11px; height: 11px; stroke-width: 2.2; }

.content { flex: 1; overflow-y: auto; padding: 30px 28px 80px; }


/* ===================================================================
   Bausteine
   =================================================================== */

.page-head { margin-bottom: 24px; }
.page-head h2 { font-size: 22px; }
.page-head:has(.setup-filter) {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 24px; flex-wrap: wrap;
}
.setup-filter { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }

/* Research: Kopf, darunter eine Werkzeugleiste (Vorgabe 2026-10-26):
   Ansicht | Zone · TF · Markt · Rangfolge, jeder Knopf mit Symbol. */
.rs-bar {
  display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.rs-views { display: inline-flex; gap: 2px; }
.rs-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rs-sep { width: 1px; height: 20px; background: var(--line-strong); }
.rs-view, .rs-tool {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-soft);
  font: inherit; font-size: 13.5px; white-space: nowrap; cursor: pointer;
  transition: background-color .12s ease-out, color .12s ease-out;
}
.rs-view svg, .rs-tool svg { width: 17px; height: 17px; flex: none; }
.rs-tool > svg:last-child { width: 13px; height: 13px; margin-left: -2px; color: var(--grey); }
@media (hover: hover) and (pointer: fine) {
  .rs-view:hover, .rs-tool:hover { background: var(--bg-sunken); color: var(--ink); }
}
.rs-view.on { background: var(--bg-sunken); color: var(--ink); }
.rs-count {
  min-width: 20px; padding: 0 6px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; line-height: 18px; text-align: center;
  background: var(--line); color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.rs-view.on .rs-count { background: var(--ink); color: var(--on-ink); }
/* Ein Filter mit Wahl nennt sie und steht dunkel */
.rs-tool.on { color: var(--ink); background: var(--bg-sunken); }
/* Zone und TF unter "Doppelte Vorteile": gleicher Platz, ausgegraut */
.rs-tool:disabled, .rs-tool:disabled:hover { opacity: .4; cursor: default; background: transparent; color: var(--ink-soft); }
.rs-tool.open { background: var(--bg-sunken); color: var(--ink); }
.rs-reset { color: var(--grey); font-weight: 400; }
.rs-view:focus-visible, .rs-tool:focus-visible, .rs-item:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.rs-tool-wrap { position: relative; }
.rs-menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 50;
  min-width: 190px; padding: 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 14px 34px -14px rgba(0, 0, 0, .28);
}
.rs-item {
  display: flex; align-items: flex-start; gap: 8px; width: 100%;
  padding: 7px 10px 7px 6px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink); text-align: left;
  font: inherit; font-size: 13.5px; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .rs-item:hover { background: var(--bg-sunken); } }
.rs-tick { width: 16px; height: 18px; flex: none; display: grid; place-items: center; }
.rs-tick svg { width: 14px; height: 14px; stroke-width: 2.2; }
.rs-item-main { display: flex; flex-direction: column; gap: 1px; }
.rs-item.on .rs-item-main { font-weight: 600; }
.rs-hint { font-size: 12px; font-weight: 400; color: var(--grey); }
@media (max-width: 640px) {
  .rs-sep { display: none; }
  .rs-views { width: 100%; }
  .rs-view { flex: 1; justify-content: center; height: 40px; }
  .rs-tool { height: 38px; }
}
.rs-own {
  margin-left: 8px; padding: 0 6px; border: 1px solid var(--line-strong);
  border-radius: 4px; font-size: 11px; line-height: 16px; color: var(--grey);
}

/* Die Vorschau beim Überfahren: still, klickdurchlässig, nur Bild */
.rs-preview {
  position: fixed; left: 0; top: 0; z-index: 60;
  width: 300px; height: 150px; padding: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 14px 34px -14px rgba(0, 0, 0, .28);
  pointer-events: none; opacity: 0;
  transition: opacity .14s ease-out;
}
.rs-preview.on { opacity: 1; }
.rsp-cap {
  height: 26px; padding: 7px 10px 0; font-size: 11.5px; color: var(--grey);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rsp-wait {
  margin: 18px 14px; height: 72px; border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-sunken), var(--bg-soft), var(--bg-sunken));
  background-size: 200% 100%; animation: rsp-wait 1.1s linear infinite;
}
@keyframes rsp-wait { to { background-position: -200% 0; } }
.rsp-none { padding: 40px 0; text-align: center; font-size: 12.5px; color: var(--grey); }
.rsp-svg { display: block; }
.rsp-line { fill: none; stroke: var(--grey); stroke-opacity: .75; stroke-width: 1.2;
  stroke-linejoin: round; }
/* Zonen nur als Umriss in der Farbe der Richtung, ohne Fläche */
.rsp-box { fill: none; stroke-width: 1; }
.rsp-box.long  { stroke: var(--win); }
.rsp-box.short { stroke: var(--loss); }
.rsp-box.target { stroke-opacity: .55; }
.rsp-leg { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rsp-leg.long  { stroke: var(--win); }
.rsp-leg.short { stroke: var(--loss); }
.rsp-leg.support { stroke-opacity: .8; }
@media (prefers-reduced-motion: reduce) {
  .rs-preview { transition: none; }
  .rsp-wait { animation: none; }
}
.page-head .lead { margin-top: 6px; font-size: 14px; color: var(--grey); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.card + .card { margin-top: 18px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 15px; }
.card-head .sub { font-size: 13px; color: var(--grey); }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

.empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 88px 20px; text-align: center;
}
.empty h3 { font-size: 18px; }
.empty p { max-width: 48ch; color: var(--ink-soft); }
/* Jedes Bild im leeren Zustand, nicht nur die Weltkugel -- ohne Maß
   füllt ein SVG die ganze Breite. */
.empty > svg { width: 52px; height: 52px; flex: none; color: var(--line-strong);
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* -------------------------------------------------------------------
   Marken

   Drei Stufen, alle im selben Grau-Schwarz: laut (gefüllt), normal
   (Rahmen), leise (Fläche). Die Bedeutung steht im Wort, nicht in der
   Farbe. Nur ``accent`` markiert, was gerade gilt.
   ------------------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 5px;
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  background: var(--bg-sunken); color: var(--ink-soft);
  white-space: nowrap;
}
.badge.strong { background: var(--ink); color: var(--on-ink); }
.badge.plain  { background: transparent; border: 1px solid var(--line-strong);
                color: var(--ink-soft); font-weight: 500; }
.badge.quiet  { background: transparent; color: var(--grey); font-weight: 500;
                padding-left: 0; }
.badge.accent { background: var(--accent-weak); color: var(--accent-dark); }
/* Eigene, im Chart eingezeichnete Struktur -- blau wie das Zeichenwerkzeug. */
.badge.draw   { background: #eaf0ff; color: #1e53e5; border: 1px solid #c5d4ff; }

/* Richtung: LONG gefüllt, SHORT umrandet -- lesbar auch ohne Farbe. */
.badge.long  { background: var(--ink); color: var(--on-ink); }
.badge.short { background: var(--surface); color: var(--ink); border: 1px solid var(--ink); }
/* Doppelter Vorteil: beide Seiten nebeneinander (Research, 2026-09-29). */
.way-pair { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }


/* -------------------------------------------------------------------
   Tabellen
   ------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface);
  text-align: left;
  font-size: 12px; font-weight: 600; letter-spacing: .03em;
  color: var(--grey);
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
  font-size: 14px;
}
tbody tr:last-child td { border-bottom: 0; }
th.r, td.r { text-align: right; }
th.c, td.c { text-align: center; }

.row-link { cursor: pointer; }
.row-link:hover td { background: var(--accent-weak); }

.rank { color: var(--grey); font-variant-numeric: tabular-nums; }

.title-cell { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.title-code { font-weight: 600; }
/* Research-Tabelle: Logo vor dem Kürzel (Vorgabe 2026-10-22). */
.title-sym { display: inline-flex; align-items: center; gap: 10px; }
.title-sym .wl-logo { width: 22px; height: 22px; font-size: 11px; }
.title-name { font-size: 13px; color: var(--grey); }

/* Notenbalken -- ein Balken, ein Grau, gefüllt in Anthrazit. Die Höhe
   der Note steht in der Zahl daneben; ein Farbverlauf von Rot nach
   Grün behauptet eine Genauigkeit, die die Note nicht hat. */
.score { display: flex; align-items: center; gap: 9px; }
.score-num { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 26px;
             text-align: right; }
.score-bar { width: 52px; height: 5px; border-radius: 99px;
             background: var(--bg-sunken); overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: 99px;
               background: var(--ink); }
.score-bar.weak i { background: var(--line-strong); }

/* Abstand zum Limit: nah wird betont, fern tritt zurück -- über
   Gewicht und Grauwert, nicht über Ampelfarben. */
.gap-near { color: var(--accent-dark); font-weight: 600; }
.gap-mid  { color: var(--ink); }
.gap-far  { color: var(--grey); }

.mono { font-family: var(--mono); font-size: 13px; }

/* Anzahl der Strukturen auf demselben Level */
.stack { display: inline-flex; align-items: baseline; gap: 4px;
         font-variant-numeric: tabular-nums; }
.stack .count { font-weight: 600; }
.stack.one .count { color: var(--grey); font-weight: 500; }
.stack .of { font-size: 12px; color: var(--grey); }

/* Aufklappzeile in der Setup-Tabelle */
.detail-row td { background: var(--bg-soft); white-space: normal;
                 padding: 18px 20px 22px; }
/* Die Tabelle ist breiter als das Fenster und scrollt seitlich. Die
   aufgeklappte Zeile soll das nicht mitmachen: sie klebt am linken
   Rand des sichtbaren Ausschnitts, sonst schiebt sich ihr rechter
   Block aus dem Bild, obwohl dort genau die Begründung steht, die man
   lesen will. */
.detail-row td > * {
  position: sticky; left: 0;
  max-width: calc(100vw - 344px);
}
.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 20px 28px;
}
.detail-block h4 {
  font-size: 12px; font-weight: 600; letter-spacing: .03em;
  color: var(--grey);
  margin: 0 0 8px;
}
.detail-block ul { margin: 0; padding-left: 16px; }
.detail-block li { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 5px; }
.detail-line { display: flex; justify-content: space-between; gap: 14px;
               font-size: 13.5px; padding: 2px 0; }
.detail-line span:first-child { color: var(--grey); }
.detail-line span:last-child { font-variant-numeric: tabular-nums;
                               color: var(--ink); }

.expander {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 5px;
  border: 0; background: transparent; color: var(--grey); cursor: pointer;
}
.expander:hover { background: var(--bg-sunken); color: var(--accent); }
.expander svg { width: 13px; height: 13px; transition: transform .15s ease; }
.expander.open svg { transform: rotate(90deg); }


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

.kpi-group + .kpi-group { margin-top: 14px; }
.kpi-group-label {
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--grey);
  margin: 0 0 8px 2px;
}
/* Die Trennlinien entstehen aus der Lücke, nicht aus Rändern: so
   trennt es auch zwischen den Reihen, ohne Sonderfälle. */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
  overflow: hidden;
}
.kpi { padding: 14px 16px; background: var(--surface); }
.kpi-label {
  font-size: 12px; font-weight: 600; letter-spacing: .03em;
  color: var(--grey);
}
.kpi-value {
  margin-top: 3px; font-size: 19px; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: -.015em;
}
.kpi-note { font-size: 12.5px; color: var(--grey); }
.kpi.mark { background: var(--accent-weak); }
.kpi.mark .kpi-value { color: var(--accent-dark); }


/* -------------------------------------------------------------------
   Ein Setup-Reiter -- wie auf TradingView

   Randlos: oben eine Leiste, die beim Rollen kleben bleibt (Titel,
   Richtung, Sprossen, Neu rechnen, der Handelsknopf), darunter der
   Chart über die volle Fläche. Die Höhe setzt ``fitChart()`` -- das
   Fenster abzüglich Kopfzeile, Reiter und Leiste. Erst unter dem Chart,
   mit Rand, Orderplan und Orders zum Kopieren.
   ------------------------------------------------------------------- */

.content.bleed { padding: 0; }

.setup-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.setup-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
               margin-right: auto; }
.setup-title h2 { font-size: 19px; font-weight: 600; }
.setup-title .name { color: var(--grey); font-size: 14px; }
.setup-actions { display: flex; align-items: center; gap: 8px; }
.plan-line { flex-basis: 100%; font-size: 13px; color: var(--ink-soft, var(--grey));
             margin-top: -4px; }
.plan-line strong { color: var(--ink); }
.plan-wall { color: var(--ink); }
.plan-leg { white-space: nowrap; }
tr.leg-cont td { border-top-color: transparent; }

/* Der Handelsknopf -- das eine, was auf der Seite laut sein darf. */
.btn-cta {
  background: var(--accent); color: #fff;
  padding: 8px 16px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(31,63,176,.25);
}
.btn-cta:hover:not(:disabled) { background: var(--accent-dark); }

.chart-frame { padding: 8px 12px 0 12px; }
.chart-frame .chart-host { height: 100%; }

.setup-pad { padding: 24px 28px 80px; }
.setup-pad > .card + .card { margin-top: 18px; }

/* Preise mit Kopierfunktion */
.copy {
  border: 0; background: transparent; padding: 1px 5px; margin: -1px -5px;
  border-radius: 5px; cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background .12s ease, color .12s ease;
}
.copy:hover { background: var(--accent-weak); color: var(--accent-dark); }

/* Ordertabelle */
.order-next td { background: var(--accent-weak); }
.order-off td { color: var(--grey); }
.tp-row td { background: var(--bg-soft); font-size: 13px;
             color: var(--ink-soft); padding: 7px 12px; }
.tp-row td:first-child { padding-left: 34px; }

.list-lines { display: flex; flex-direction: column; gap: 9px; }
.line { display: flex; gap: 12px; align-items: baseline; font-size: 13.5px; }
.line .what { flex: none; width: 128px; color: var(--grey); }
.line .val { flex: none; width: 106px; font-variant-numeric: tabular-nums;
             font-weight: 600; }
.line .then { color: var(--ink-soft); }

.note-list { display: flex; flex-direction: column; gap: 8px; }
.note {
  display: flex; gap: 10px; font-size: 13.5px;
  padding: 9px 12px; border-radius: var(--radius);
  background: var(--bg-sunken); color: var(--ink-soft);
}
/* Ein Hinweis wird nicht gelb, er bekommt eine Kante. */
.note.warn { background: var(--surface); border: 1px solid var(--line-strong);
             border-left: 3px solid var(--ink); color: var(--ink); }
.note .mark { flex: none; font-weight: 700; }

.zone {
  padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); margin-bottom: 10px;
}
.zone.anchor { border-color: var(--accent); background: var(--accent-weak); }
.zone-head { display: flex; align-items: center; justify-content: space-between;
             gap: 12px; }
.zone-title { font-weight: 600; font-size: 14px; }
.zone-range { font-variant-numeric: tabular-nums; font-size: 14px; }
.zone-levels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.chip {
  font-size: 12px; font-variant-numeric: tabular-nums;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 5px; padding: 2px 7px; color: var(--ink-soft);
}

/* Platzhalter fürs Chartfenster */
/* Der Chart bekommt eine feste Hoehe -- eine Leinwand kann nicht aus
   ihrem Inhalt wachsen, und ein Chart, der mitwaechst, waere ohnehin
   kein Chart, sondern ein Bild ohne Massstab.

   Fest heisst nicht klein: die Hoehe folgt dem Fenster, bleibt aber
   zwischen zwei Grenzen. 440 Bildpunkte waren ein Streifen -- auf einem
   Bild, in dem ein Impuls, seine Korrektur und die Zielzone darueber
   Platz haben sollen, sind sie zu wenig, und Zonen, die uebereinander
   liegen, verschmelzen darin zu einem Balken. Nach oben deckelt die
   Grenze das Gegenteil: ein Chart, der laenger ist als der Schirm hoch,
   zwingt zum Rollen mitten im Bild. */
.chart-host { height: clamp(520px, 68vh, 980px); }
.chart-wait {
  height: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--grey); text-align: center;
}

/* Die Sprossen der Leiter als Schalter -- nur die, auf denen eine
   Struktur steht. */
.rungs { display: flex; gap: 4px; }
.rung {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.rung:hover { border-color: var(--accent); color: var(--accent); }
.rung.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
/* Die Zeiteinheit, die der Plan handelt: ein Punkt davor. */
.rung.plan::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
                     background: var(--accent); align-self: center; }


/* -------------------------------------------------------------------
   Einstellungen
   ------------------------------------------------------------------- */

.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px 24px;
}
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--grey); margin-top: 5px; }
.field input[type=number], .field input[type=text], .field select {
  width: 100%; padding: 8px 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); font: inherit; font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.field input:hover, .field select:hover { border-color: var(--grey); }
.field input:focus, .field select:focus {
  outline: 0; border-color: var(--accent);
}
.switch-row { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }

/* Zwei Spalten mit Karten; jede Karte eine Liste aus Zeilen: links Name
   und Erklärung, rechts das Bedienelement. */
.set-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px; align-items: start; max-width: 1180px;
}
.set-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.set-col .card + .card { margin-top: 0; }
.set-body { padding: 4px 20px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 0;
}
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-switch { cursor: pointer; }
.set-switch .pm-switch { flex: none; display: flex; }
.set-switch:has(input:disabled) { cursor: default; }
.set-text { min-width: 0; }
.set-title { font-size: 14px; font-weight: 500; }
.set-title label { cursor: pointer; }
.set-hint { margin-top: 3px; font-size: 13px; color: var(--grey); max-width: 46ch; }
.set-control { flex: none; display: flex; justify-content: flex-end; }
.set-control input[type=number], .set-control input[type=text], .set-control select {
  width: 190px; padding: 8px 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); font: inherit; font-size: 14px;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.set-control input:hover, .set-control select:hover { border-color: var(--grey); }
.set-control input:focus, .set-control select:focus { outline: 0; border-color: var(--accent); }
.set-value { font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.set-foot {
  display: flex; justify-content: flex-end;
  padding: 12px 20px; border-top: 1px solid var(--line);
}
@media (max-width: 1100px) { .set-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .set-body { padding: 2px 14px; }
  .set-row:not(.set-switch) { flex-direction: column; align-items: stretch; gap: 10px; }
  .set-control input[type=number], .set-control input[type=text], .set-control select { width: 100%; }
  .set-control { justify-content: flex-start; }
}


/* -------------------------------------------------------------------
   Meldung
   ------------------------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--ink); color: var(--on-ink);
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px;
  z-index: 70;   /* über den Fenstern (.keyhelp, 60) -- sonst verschluckt */
}

/* --- Suchzeile in der Kopfleiste ---------------------------------- */
.search { position: relative; flex: 1 1 auto; max-width: 460px; }
.search-icon { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px;
               transform: translateY(-50%); fill: none; stroke: var(--grey);
               stroke-width: 2; pointer-events: none; }
.search input { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px;
                padding: 8px 12px 8px 34px; border: 1px solid var(--line-strong);
                border-radius: 8px; background: var(--surface); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--ink); }
.search-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50;
               background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
               box-shadow: 0 8px 24px rgba(19,23,34,.12); max-height: 420px; overflow-y: auto; }
.search-item { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px;
               cursor: pointer; font-size: 13.5px; }
.search-item.on, .search-item:hover { background: var(--bg-sunken); }
.search-item b { font-weight: 600; min-width: 84px; }
.search-item span { color: var(--ink-soft); flex: 1; overflow: hidden;
                    text-overflow: ellipsis; white-space: nowrap; }
.search-item em { font-style: normal; font-size: 11.5px; color: var(--grey); white-space: nowrap; }
.search-note { padding: 8px 12px; font-size: 12.5px; color: var(--grey); }

/* -- Entdecken: eine Karte nach der anderen ------------------------- */
.swipe { max-width: 980px; margin: 0 auto; }
.swipe-count { font-size: 13px; margin-bottom: 10px; text-align: center; }
.swipe-card { overflow: hidden; }
.swipe-head { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.swipe-gap { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.swipe-gap .gap-near { font-size: 20px; }
.swipe-chart { padding: 8px 12px 0; }
.swipe-chart .chart-host { height: clamp(340px, 50vh, 620px); }
.swipe-facts { padding: 14px 20px 4px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); column-gap: 28px; }
.swipe-levels { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.swipe-level { font-size: 13px; font-variant-numeric: tabular-nums; padding: 3px 9px;
  border: 1px solid var(--line); border-radius: 99px; color: var(--ink-soft); }
.swipe-level span { color: var(--grey); margin-right: 6px; }
.swipe-level.next { border-color: var(--accent); background: var(--accent-weak); color: var(--accent-dark); }
.swipe-level.done { opacity: .5; text-decoration: line-through; }
.swipe-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 20px 20px; }
.swipe-actions .btn { justify-content: center; padding: 12px 16px; font-size: 15px; }
.swipe-actions .btn svg { width: 16px; height: 16px; }
.swipe-note { text-align: center; margin-top: 12px; }

/* -- Heute: was sich jetzt traden lässt ----------------------------- */
.today-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.today-count { display: flex; align-items: baseline; gap: 10px; }
.today-num { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; }
.today-label { font-size: 17px; color: var(--ink-soft); }
.today-label b { color: var(--accent-dark); }
.today-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Das Siegel: ein kurzes Aufleuchten beim Erscheinen, dann Ruhe. */
.seal {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: linear-gradient(135deg, #2b52d8, #6b3fd8);
  animation: seal-in .55s cubic-bezier(.2, 1.4, .4, 1) both;
}
.seal::before { content: '★'; font-size: 11px; }
@keyframes seal-in {
  0%   { transform: scale(.4); opacity: 0; box-shadow: 0 0 0 0 rgba(43, 82, 216, .5); }
  60%  { transform: scale(1.12); opacity: 1; box-shadow: 0 0 0 8px rgba(43, 82, 216, 0); }
  100% { transform: scale(1); }
}
/* Heute: Karte über die volle Breite, Chart so groß, dass die ganze
   Sequenz ohne Scrollen dasteht. Die Chart-Leiste braucht es hier nicht. */
.swipe.wide { max-width: none; }

.swipe.wide .swipe-head { padding: 12px 20px; }
.swipe.wide .swipe-chart { padding: 4px 8px 0; }
.swipe.wide .swipe-chart .chart-host { height: max(420px, calc(100vh - 360px)); }
.swipe.wide .skc-bar { display: none; }
.swipe.wide .swipe-levels { margin: 0; padding: 12px 20px 0; }
.swipe.wide .swipe-actions { padding: 12px 20px 16px; }
.swipe-card.perfect { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.radar { margin-top: 22px; }

/* -- Offen: überwachte Ticker --------------------------------------- */
.kpis + .card { margin-top: 18px; }

/* Kopf: Ansicht links, Kontostand rechts -- eine Zeile wie an der Börse. */
.offen-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px 28px; flex-wrap: wrap; margin-bottom: 16px;
}
.acct { display: flex; gap: 8px 26px; flex-wrap: wrap; }
.acct > div { display: flex; flex-direction: column; gap: 1px; }
.acct span { font-size: 12px; color: var(--grey); }
.acct b { font-size: 14.5px; font-weight: 600; }
.acct .win, .ex-table .win, .tk-table .win { color: var(--win); }
.acct .loss, .ex-table .loss, .tk-table .loss { color: var(--loss); }
.offen-head + .card, .offen-asked + .card { margin-top: 0; }
.offen-asked { margin-bottom: 18px; }

/* Reiter unterstrichen wie die Ordermaske einer Börse. */
.ex-tabs {
  display: flex; gap: 26px; padding: 0 18px;
  border-bottom: 1px solid var(--line); overflow-x: auto;
}
.ex-tab {
  padding: 13px 0 11px; border: 0; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font: inherit; font-size: 14px; color: var(--grey); white-space: nowrap;
}
.ex-tab:hover { color: var(--ink); }
.ex-tab.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* Dichte Tabellen: kleinere Schrift, Kopf ohne Großbuchstaben. */
.ex-table thead th { font-size: 12px; font-weight: 500; letter-spacing: 0;
  border-bottom-color: var(--line); padding: 10px 14px; }
.ex-table tbody td { font-size: 13.5px; padding: 12px 14px; }
.ex-table tbody tr:hover > td { background: var(--bg-soft); }
.ex-empty { text-align: center; color: var(--grey); padding: 48px 14px !important; }
.ex-sub > td { background: var(--bg-soft); padding-top: 8px !important; padding-bottom: 10px !important; }
.ex-link { border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--accent); text-decoration: underline;
  text-underline-offset: 2px; }
.ex-link:hover { color: var(--accent-dark); }

.fut { display: flex; flex-direction: column; gap: 2px; }
.fut-name { border: 0; background: none; padding: 0; cursor: pointer; text-align: left;
  font: inherit; font-weight: 600; font-size: 14px; color: var(--ink); }
.fut-name:hover { color: var(--accent); }
.fut-sub { display: flex; gap: 8px; font-size: 12px; color: var(--grey); }

/* Eine Zahl, die man anklickt, um sie zu ändern. */
.lvl {
  border: 0; background: none; padding: 1px 3px; margin: 0 -3px; cursor: text;
  font: inherit; color: inherit; border-radius: 4px;
  border-bottom: 1px dashed var(--line-strong);
}
.lvl:hover { background: var(--accent-weak); color: var(--accent-dark);
  border-bottom-color: var(--accent); }
.lvl-input {
  font: inherit; font-size: 13.5px; padding: 2px 6px; text-align: right;
  border: 1px solid var(--accent); border-radius: 5px; outline: none;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-weak);
}
.tp-list { display: flex; gap: 6px 14px; flex-wrap: wrap; }
.tp-item { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.tp-item > i { font-style: normal; font-size: 11.5px; color: var(--grey); }

/* Ansicht "Ticker": Titelzeile, darunter eingerückt die Sequenzen. */
.tk-table tbody.tk-block + tbody.tk-block tr.tk-head > td { border-top: 6px solid var(--bg-soft); }
tr.tk-head { cursor: pointer; }
tr.tk-head > td { background: var(--bg-soft); padding: 12px 14px; }
tr.tk-head:hover > td { background: var(--accent-weak); }
.tk-line { display: flex; align-items: baseline; gap: 6px 24px; flex-wrap: wrap; }
.tk-code { font-size: 15.5px; font-weight: 700; }
.tk-name { font-size: 13px; color: var(--grey); margin-left: -14px; }
.tk-price { font-size: 15.5px; font-weight: 600; }
.tk-price small { font-size: 11.5px; color: var(--grey); font-weight: 500; }
.tk-stat { display: inline-flex; align-items: baseline; gap: 6px; }
.tk-stat i { font-style: normal; font-size: 12px; color: var(--grey); }
.tk-stat b { font-size: 13.5px; font-weight: 500; }
.tk-pnl { margin-left: auto; }
.tk-pnl b { font-weight: 600; }
tr.tk-seq > td:first-child { padding-left: 34px; position: relative; }
tr.tk-seq > td:first-child::before {
  content: ""; position: absolute; left: 18px; top: 0; bottom: 50%;
  width: 9px; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.seq-way { font-weight: 600; }
.seq-way.long { color: var(--win); }
.seq-way.short { color: var(--loss); }
.kpi-value.win, td.win { color: var(--win); }
.kpi-value.loss, td.loss { color: var(--loss); }
/* "Überwacht" -- im Stil des Balkens oben (``.pulse``): derselbe Verlauf
   von accent-dark nach accent, derselbe Glanz. Unten läuft eine Spur
   immer wieder voll, darüber streicht ein Lichtschein, der Punkt pingt. */
.btn-watched {
  position: relative; overflow: hidden; isolation: isolate;
  gap: 9px; padding: 8px 16px; font-weight: 600;
  color: var(--ink); background: var(--surface); border-color: var(--ink);
}
/* Ohne Animation (Vorgabe 2026-09-27): der Knopf sagt still, dass
   gehandelt wird -- kein Glanz, keine Spur, kein pingender Punkt. */
.btn-watched::before, .btn-watched .watch-track,
.btn-watched .live-dot::after { display: none; }
.btn-watched:hover:not(:disabled) { border-color: var(--ink); background: var(--bg-soft); }
.btn-watched::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%,
    color-mix(in srgb, var(--accent) 16%, transparent) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: watch-sheen 3.2s ease-in-out infinite;
}
.watch-text { font-variant-numeric: tabular-nums; }
.watch-track {
  position: absolute; left: 10px; right: 10px; bottom: 4px; height: 3px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 99px; overflow: hidden;
}
.watch-fill {
  position: absolute; inset: 0;
  transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border-radius: 99px;
  animation: watch-fill 2.4s cubic-bezier(.45, .05, .25, 1) infinite;
}
.watch-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .6) 50%, transparent 100%);
  background-size: 40% 100%; background-repeat: no-repeat;
  animation: pulse-shine 1.2s ease-in-out infinite;
}
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: none; }
.btn-watched .live-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: var(--accent);
  animation: watch-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes watch-fill {
  0%   { transform: scaleX(0); opacity: 1; }
  72%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
@keyframes watch-ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }
@keyframes watch-sheen { 0%, 25% { transform: translateX(-100%); } 75%, 100% { transform: translateX(100%); } }
@keyframes watch-glow {
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
}

/* Eine kleine Feier, wenn ein Ziel erreicht wird. */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 90; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px;
  animation: confetti 2.2s ease-in forwards; }
@keyframes confetti { to { top: 105vh; transform: rotate(720deg) translateX(40px); opacity: .8; } }

@media (prefers-reduced-motion: reduce) {
  .seal, .btn-watched, .btn-watched::before, .watch-fill, .watch-fill::after,
  .btn-watched .live-dot::after { animation: none; }
  .watch-fill { transform: none; }
  .confetti { display: none; }
}

/* -- Tastenkürzel --------------------------------------------------- */
kbd {
  display: inline-block; min-width: 20px; padding: 1px 6px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 500; line-height: 1.5;
  text-align: center; color: var(--ink-soft); background: var(--bg-soft);
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px;
}
kbd + kbd { margin-left: 3px; }
.kbd-or { margin: 0 5px; color: var(--grey); font-size: 12px; }

.search-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
              pointer-events: none; }
.search input:focus ~ .search-kbd,
.search input:not(:placeholder-shown) ~ .search-kbd { display: none; }


/* Der Zeiger der Tastatur in der Rangliste. */
tr.row-link.kbd td { background: var(--accent-weak); }
tr.row-link.kbd td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.keyhelp {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 16px 16px; background: rgba(23, 24, 27, .32);
}
.keyhelp[hidden] { display: none; }

.keyhelp-card {
  width: min(760px, 100%); max-height: 84vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px rgba(19, 23, 34, .18);
}
.keyhelp-head { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.keyhelp-head h3 { margin: 0; font-size: 15px; }
.keyhelp-head svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.keyhelp-body { padding: 16px 20px 20px; }
.keyhelp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px 32px; }
.keyhelp-group h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--grey); }
.keyhelp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 5px 0; font-size: 13.5px; border-bottom: 1px solid var(--bg-sunken); }
.keyhelp-keys { white-space: nowrap; }
.keyhelp-more { margin-top: 18px; }
.keyhelp-more summary { cursor: pointer; font-size: 13px; color: var(--grey); margin-bottom: 12px; }

/* Fenster im Stil des Trade-Panels. */
.pw-card {
  display: flex; flex-direction: column;
  width: min(1080px, 100%); max-height: 92vh;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px rgba(19, 23, 34, .18);
}
.pw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.pw-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.pw-sub { font-size: 13px; font-weight: 400; }
.pw-body { display: flex; flex-direction: column; gap: 18px; padding: 16px 20px;
  overflow-y: auto; min-height: 0; }
.pw-table { font-size: 13px; }
.pw-table td, .pw-table th { white-space: nowrap; }
.pw-table td.pw-note { white-space: normal; min-width: 220px; color: var(--ink-soft); }
.pw-group td { padding-top: 10px; font-size: 11px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--grey); background: var(--bg-soft); }
.pw-win { color: var(--win); }
.pw-loss { color: var(--loss); }
.pw-notice { margin: 0; padding: 10px 12px; font-size: 13px; line-height: 1.5;
  color: var(--ink-soft); background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); }
.pw-actions { display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 20px; border-top: 1px solid var(--line); }
.pw-actions .btn { min-width: 132px; justify-content: center; }
@media (max-width: 860px) {
  .pw-actions .btn { flex: 1; }
}

.pw-body { gap: 12px; }
/* Zwei Farben (Vorgabe 2026-09-29): Schwarz (--ink) auf Weiß (--surface),
   Abstufungen nur als Deckkraft von Schwarz. Im dunklen Thema kehrt es
   sich von selbst um. */
.fl-card, .fl-empty, #inbox-menu, .fl-intro {
  --bw-muted: color-mix(in srgb, var(--ink) 55%, transparent);
  --bw-line: color-mix(in srgb, var(--ink) 14%, transparent);
  --bw-soft: color-mix(in srgb, var(--ink) 5%, transparent);
}
.fl-card .badge.long, .fl-card .badge.short {
  color: var(--ink); background: transparent; border: 1px solid var(--ink); }
.fl-card .badge.short { color: var(--surface); background: var(--ink); }

/* Die Kurse: jede Zelle ein Knopf, der sich als kopierbar zeigt. */
.pw-levels-wrap { overflow-x: auto; }
.pw-levels { width: 100%; border-collapse: collapse; font-size: 13px; }
.pw-levels th { padding: 0 2px 4px; text-align: left; font-size: 11px; font-weight: 600;
  letter-spacing: .03em; color: var(--bw-muted); white-space: nowrap; }
.pw-levels td { padding: 1px 2px; white-space: nowrap; }
.pw-levels tr.next td:nth-child(1) .chip-copy { border-color: var(--ink); }
.pw-levels .fl-state { width: 1%; padding-right: 8px; font-size: 12px; color: var(--bw-muted); }
.pw-levels tr.hit .fl-state { color: var(--ink); font-weight: 600; }

/* Kopierfeld: grau hinterlegt, beim Überfahren schwarz umrandet, kopiert
   invertiert. Überall gleich -- Planfenster, Offen, Nachrichten. */
.chip-copy {
  display: block; width: 100%; text-align: left;
  padding: 4px 6px; border: 1px solid transparent; border-radius: 6px;
  background: var(--bw-soft, var(--bg-soft)); color: var(--ink); cursor: copy;
  font: inherit; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.chip-copy i { margin-right: 5px; font-style: normal; font-weight: 500; font-size: 11px;
  color: var(--bw-muted, var(--grey)); }
.chip-copy.qty { font-weight: 500; }
.chip-copy.moved { text-decoration: underline; text-underline-offset: 3px; }
.chip-copy:hover, .chip-copy:focus-visible { border-color: var(--ink); outline: none; }
.chip-copy.copied { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip-copy.copied i { color: inherit; }
.fl-copy .chip-copy, .ib-copy .chip-copy { display: inline-block; width: auto; }

/* Knöpfe: weiß mit schwarzem Rand, der Hauptknopf schwarz. */
.pw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 7px 16px; border: 1px solid var(--ink); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.pw-btn:hover:not(:disabled) { background: var(--bw-soft, var(--bg-soft)); }
.pw-btn-main { background: var(--ink); color: var(--surface); }
.pw-btn-main:hover:not(:disabled) { background: var(--ink); opacity: .85; }
.pw-btn:disabled { border-color: var(--bw-line, var(--line)); color: var(--bw-muted, var(--grey));
  background: var(--surface); cursor: not-allowed; }
.pw-btn-main:disabled { background: var(--bw-line, var(--line)); border-color: transparent; }

/* Seite "Offen": je verfolgtem Ticker eine Karte, je Sequenz die Level. */
.fl-card { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px;
  padding: 14px 16px; border: 1px solid var(--bw-line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); }
.fl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.fl-name { display: inline-flex; align-items: center; gap: 10px; border: 0; padding: 0;
  background: none; color: var(--ink); font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.fl-name .wl-logo { font-family: var(--sans); }
.fl-name:hover { text-decoration: underline; }
.fl-price { font-size: 14px; font-weight: 600; }
.fl-change { font-size: 13px; color: var(--bw-muted); }
.fl-stop { margin-left: auto; min-height: 30px; padding: 4px 12px; font-size: 13px; }
.fl-seq { display: flex; flex-direction: column; gap: 6px; padding-top: 10px;
  border-top: 1px solid var(--bw-line); }
.fl-seq-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.fl-status { font-size: 13px; color: var(--bw-muted); }
.fl-actions { display: inline-flex; gap: 6px; margin-left: auto; }
.fl-actions .pw-btn { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.fl-last { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-size: 13px; color: var(--bw-muted); }
.fl-copy, .ib-copy { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ib-copy { margin-top: 4px; font-size: 12.5px; }
.fl-empty { display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 48px 16px; text-align: center; color: var(--bw-muted); }
.fl-empty b { color: var(--ink); font-size: 16px; }
.fl-empty .pw-btn { margin-top: 6px; }

/* To-do-Liste (Vorgabe 2026-10-17, schlicht seit 2026-10-18): je Zeile
   vorn "Gemacht", die Aufforderung, dann nur ihre Werte, jeder mit seiner
   Beschriftung in der Zelle. Erledigtes eingeklappt. */
.fl-list { display: flex; flex-direction: column; }
/* Je Sequenz ein Block, eingerückt unter dem Ticker (Vorgabe 2026-10-18). */
.fl-seq-name { font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.fl-card > .fl-seq { margin-left: 14px; padding-left: 14px; border-top: 0;
  border-left: 2px solid var(--bw-line); }
.fl-offer { opacity: .55; transition: opacity .15s ease; }
.fl-offer:hover, .fl-offer:focus-within { opacity: 1; }
.fl-offer .fl-actions .pw-btn svg { flex: none; }
.fl-row { display: grid; grid-template-columns: 88px minmax(150px, 220px) 1fr; align-items: center;
  gap: 6px 12px; padding: 6px 0; border-top: 1px solid var(--bw-line); }
.fl-list > .fl-row:first-child { border-top: 0; }
.fl-vals { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.fl-vals .chip-copy { display: inline-block; width: auto; min-width: 92px; }
.fl-val { display: inline-flex; align-items: baseline; padding: 4px 6px; border-radius: 6px;
  background: var(--bw-soft); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fl-own .fl-val { background: transparent; font-weight: 500; }
.fl-mine { cursor: default; text-align: center; }
.fl-val i { margin-right: 5px; font-style: normal; font-size: 11px; color: var(--bw-muted); }
.fl-done { min-height: 30px; padding: 4px 12px; border: 1px solid var(--ink); border-radius: 8px;
  background: var(--ink); color: var(--surface); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; }
.fl-done:hover:not(:disabled) { opacity: .85; }
.fl-done:disabled { opacity: .5; cursor: progress; }
.fl-done.is-done { justify-self: start; min-width: 30px; padding: 4px 8px; background: var(--surface);
  color: var(--ink); border-color: var(--bw-line); }
.fl-act { font-size: 13.5px; }
.fl-act b { font-weight: 600; }
.fl-leg { font-size: 11.5px; color: var(--bw-muted); }
.fl-row.done, .fl-row.done .fl-act b { color: var(--bw-muted); }
.fl-row.done .chip-copy { background: transparent; color: var(--bw-muted); font-weight: 500; }
.fl-fold-btn { align-self: flex-start; margin-top: 4px; border: 0; padding: 6px 0; background: none;
  color: var(--bw-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fl-fold-btn:hover { color: var(--ink); }
.fl-none { padding: 6px 0; font-size: 13px; color: var(--bw-muted); }
.fl-own { grid-template-columns: 160px 1fr auto; padding: 8px 0 10px; }
.fl-own select, .fl-in input { min-height: 30px; padding: 4px 8px; border: 1px solid var(--bw-line);
  border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.fl-own > select { font-weight: 600; }
.fl-in { display: inline-flex; align-items: center; gap: 5px; }
.fl-in i { font-style: normal; font-size: 11px; color: var(--bw-muted); }
.fl-in input { width: 96px; font-variant-numeric: tabular-nums; }
.fl-in.wide input { width: 150px; }
.fl-own-btns { display: inline-flex; gap: 6px; }
.fl-own-btns .pw-btn { min-height: 30px; padding: 4px 12px; font-size: 13px; }
/* Infotext oben auf "Offen" (Vorgabe 2026-10-18, als Karte seit
   2026-10-22): die drei Aufgaben des Watchers nebeneinander, je mit
   Zeichen; darunter der Hinweis zu den Benachrichtigungen. */
.fl-intro { margin: 2px 0 16px; padding: 18px 20px; border: 1px solid var(--bw-line);
  border-radius: var(--radius); background: var(--surface); font-size: 14px; line-height: 1.55;
  color: color-mix(in srgb, var(--ink) 78%, transparent); }
.fl-intro b { color: var(--ink); }
.fl-intro { position: relative; }
.fl-intro-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent;
  color: var(--bw-muted); cursor: pointer; transition: background .2s ease, color .2s ease; }
.fl-intro-close:hover { background: var(--bw-soft); color: var(--ink); }
.fl-intro-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px;
  margin: 0; padding: 0 28px 0 0; list-style: none; }
.fl-intro-points li { display: flex; align-items: flex-start; gap: 12px; }
.fl-intro-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--bw-line); border-radius: 8px; background: var(--bw-soft); color: var(--ink); }
.fl-intro-icon svg { width: 16px; height: 16px; }
.fl-intro-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--bw-line); }
.fl-intro-btn { min-height: 32px; padding: 4px 12px; font-size: 13px; }
@media (max-width: 860px) {
  .fl-intro-points { grid-template-columns: 1fr; }
}
.fl-look { display: inline-flex; align-items: center; gap: 6px; min-height: 30px;
  padding: 4px 12px; font-size: 13px; }
.fl-own-note { font-size: 14px; color: var(--bw-muted); }
.fl-card.fl-flash { box-shadow: 0 0 0 2px var(--ink); transition: box-shadow .3s ease; }
/* Aus einer Meldung: auch die Sequenz selbst (Vorgabe 2026-10-25). */
.fl-card > .fl-seq.fl-flash { border-left-color: var(--ink); opacity: 1; transition: border-color .3s ease; }

/* "Order vorbereiten" als Beta ohne Funktion, Rechtshinweis klein unten. */
.pw-legal { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--bw-muted); }
.badge-beta { display: inline-block; padding: 0 5px; border: 1px solid currentColor;
  border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; }
@media (max-width: 600px) {
  .pw-actions { flex-wrap: wrap; }
  .pw-actions .pw-btn { flex: 1; }
}


/* ===================================================================
   Ticker-Ansicht wie TradingView (Vorgabe 2026-09-27)
   -------------------------------------------------------------------
   Keine Seitenleiste, keine Reiterleiste. Die Kopfzeile bleibt wie auf
   jeder Seite stehen (Vorgabe 2026-10-22); darunter eine schmale zweite
   Zeile (``.tv-bar``): links zurück, Symbol, Zeiteinheiten und Knöpfe,
   rechts der Handelsknopf. Darunter der Chart randlos über die ganze
   Fläche; die Werkzeugleiste liegt links im Chart (``chart.js``).
   =================================================================== */

.tv-bar { display: none; }
.app.tv .tabbar { display: none; }

.app.tv .tv-bar {
  flex: none;
  display: flex; align-items: center; justify-content: flex-start;
  gap: 4px;
  height: 46px; padding: 0 10px 0 6px;
  border-bottom: 1px solid var(--line);
}
.tv-home, .tv-left, .tv-right { display: flex; }

.tv-home {
  align-items: center; gap: 2px; flex: none;
  height: 34px; padding: 0 6px 0 2px; margin-right: 4px;
  border: 0; border-radius: 6px; background: transparent; cursor: pointer;
  color: var(--grey);
}
.tv-home svg { width: 16px; height: 16px; fill: none; stroke: currentColor;
               stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tv-home:hover { background: var(--bg-sunken); color: var(--ink); }
.tv-home .brand-mark svg { width: 100%; height: 100%; }

.tv-sep { flex: none; width: 1px; height: 22px; margin: 0 6px;
          background: var(--line); align-self: center; }
.tv-left { align-items: center; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.tv-left > .tv-sep:first-child { display: none; }
/* Zeiteinheiten und Knöpfe: auf dem Telefon die zweite Zeile (ganz unten). */
.tv-strip { display: flex; align-items: center; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.topnav-item.nav-home { display: none; }
.tv-right { align-items: center; gap: 8px; flex: none; margin-left: auto; }

/* Zeiteinheiten: Text, keine Kästen. Gewählt = Akzent, Struktur = Punkt. */
.app.tv .rungs { align-items: center; gap: 1px; }
.app.tv .rung {
  position: relative;
  padding: 6px 9px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink);
  font-size: 13.5px; font-weight: 500;
}
.app.tv .rung:hover { background: var(--bg-sunken); color: var(--ink); }
.app.tv .rung.on { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.app.tv .rung.plan::before, .app.tv .rung.has::before { display: none; }
/* Ein blauer Punkt, wo eine Struktur (ein Retracement) eingezeichnet ist
   -- ob der Plan sie handelt oder nicht (Vorgabe 2026-10-14). */
.app.tv .rung.has::after, .app.tv .rung.plan::after {
  content: ""; position: absolute; top: 4px; right: 3px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}

/* Rechts: der Handelsknopf als Pille wie "Trade". */
.app.tv .tv-right .btn { border-radius: 99px; height: 34px; padding: 0 16px; font-size: 13.5px; }
.app.tv .tv-right .badge { font-size: 11px; }
/* Chart randlos, Höhe setzt ``fitChart``. */
.app.tv .chart-frame { padding: 0; border-bottom: 1px solid var(--line); }

@media (max-width: 900px) {
  .app.tv .tv-right .badge { display: none; }
}

/* ===================================================================
   Wie auf TradingView (Vorgabe 2026-09-27): rechte Leiste, Symbolsuche,
   kleines Eingabefenster, Intervall-Menü, Zeitspannen unter dem Chart.
   =================================================================== */

.main-body { flex: 1; display: flex; min-height: 0; }
.main-body .content { flex: 1; min-width: 0; }

/* Knöpfe in der Kopfzeile: Indikatoren, Alarm, Wiedergabe. */
.tv-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 34px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink); font: inherit; font-size: 13.5px;
  cursor: pointer; white-space: nowrap;
}
.tv-btn:hover:not(:disabled) { background: var(--bg-sunken); }
/* "Konfluenz" öffnet sein Fenster im Chart; das Beta-Badge bleibt stehen. */
.tv-btn:disabled { opacity: .4; cursor: not-allowed; }
.tv-btn.tv-konf .badge-beta { font-size: 9.5px; }
/* Rückgängig und Wiederholen: nur die Pfeile, wie auf TradingView. */
.tv-btn.tv-hist { padding: 0 8px; }
.tv-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor;
              stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app.tv .rung.fav-open { padding: 6px 5px; color: var(--grey); }
@media (max-width: 1100px) {
  .tv-btn { font-size: 0; gap: 0; }
  .tv-btn.tv-konf { font-size: 13.5px; gap: 6px; }
}

/* Die rechte Leiste: Symbole ganz außen, Tafel davor. */
.tv-side { display: none; }
.app.tv .tv-side { display: flex; flex: none; border-left: 1px solid var(--line);
                   background: var(--bg); }
.app.tv .tv-side[hidden] { display: none; }
.side-strip { display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; }
.side-icon {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent; color: var(--grey); cursor: pointer;
}
.side-icon:hover { background: var(--bg-sunken); color: var(--ink); }
.side-icon.on { background: var(--accent-weak); color: var(--accent); }
.side-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor;
                 stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-icon i {
  position: absolute; top: 3px; right: 2px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 99px; background: var(--accent); color: #fff;
  font-style: normal; font-size: 10px; line-height: 15px; text-align: center;
}
.side-panel { width: 320px; display: flex; flex-direction: column; min-height: 0;
              border-right: 1px solid var(--line); overflow: hidden; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
             padding: 10px 12px 8px; }
.side-head h4 { margin: 0; font-size: 14px; }
.side-cols, .side-row {
  display: grid; grid-template-columns: 1fr auto 64px 20px; align-items: center; gap: 8px;
  padding: 0 12px;
}
.side-cols { font-size: 11.5px; color: var(--grey); padding-bottom: 4px;
             border-bottom: 1px solid var(--line); }
.side-cols span:nth-child(n+2) { text-align: right; }
.side-cols span:last-child { grid-column: 3 / 5; text-align: left; padding-left: 8px; }
.side-list { flex: 1; overflow-y: auto; }
.side-row { height: 34px; font-size: 13px; cursor: pointer; }
.side-row:hover { background: var(--bg-sunken); }
.side-row.on { background: var(--accent-weak); }
.side-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-row .num, .side-row .up, .side-row .down { text-align: right; font-variant-numeric: tabular-nums; }
.side-row.fired { opacity: .55; }
.side-x {
  width: 20px; height: 20px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 4px; background: transparent; color: var(--grey); cursor: pointer;
  visibility: hidden;
}
.side-row:hover .side-x { visibility: visible; }
.side-x:hover { background: var(--line); color: var(--ink); }
.side-x svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.side-empty, .side-sum { padding: 8px 12px; margin: 0; }
/* Die Setups kompakt (Vorgabe 2026-10-21): Schalter, Richtung, Zeiteinheit. */
.side-panel.side-setups { width: 220px; }
.ss-cols, .ss-row { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.ss-cols span:last-child { grid-column: auto; padding-left: 0; text-align: left; }
.ss-row { height: 40px; }
.ss-row.off .trp-name { opacity: .7; }
.ss-row.blocked { cursor: pointer; }
.ss-row.blocked .trp-name { opacity: .4; }
.ss-row.picked { background: var(--accent-weak); box-shadow: inset 3px 0 0 var(--accent); }
.ss-price { min-height: 18px; gap: 0; }
.ss-foot { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px;
           border-top: 1px solid var(--line); }
.ss-foot .btn { width: 100%; justify-content: center; }
/* Watchlist wie auf TradingView. */
.wl-add { width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
          border: 0; border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; }
.wl-add:hover { background: var(--bg-sunken); }
.wl-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;
              stroke-linecap: round; }
.wl-cols, .wl-row { grid-template-columns: minmax(0, 1fr) 76px 58px 58px; gap: 6px; }
.wl-cols span:last-child { grid-column: auto; text-align: right; padding-left: 0; }
.wl-row { position: relative; }
.wl-row .side-x { position: absolute; right: 4px; top: 7px; background: var(--bg-sunken); }
.wl-sym { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wl-logo { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
           color: #fff; font-style: normal; font-size: 10px; font-weight: 700; }
/* Das Coin-Logo liegt über dem Buchstaben; erst geladen nimmt es Farbe und Buchstaben weg. */
.wl-logo { position: relative; }
.wl-logo .wl-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%;
                   object-fit: cover; opacity: 0; }
.wl-logo.has-img { background: transparent !important; color: transparent; }
.wl-logo.has-img .wl-img { opacity: 1; }
/* Dasselbe in der Marktübersicht; gezeichnete Logos füllen den Kreis ganz. */
.mk-icon { position: relative; }
.mk-icon .wl-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%;
                   object-fit: cover; opacity: 0; }
.mk-icon.has-img { background: transparent !important; color: transparent; }
.mk-icon.has-img .wl-img { opacity: 1; }
.wl-logo.drawn, .mk-icon.drawn { background: transparent; overflow: hidden; }
.wl-logo.drawn svg, .mk-icon.drawn svg { display: block; width: 100%; height: 100%;
  /* nicht die Strichvorgabe der Symbole erben: sonst weißer Rand um jede Form */
  stroke: none; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
.wl-row .num { color: var(--ink); }
.wl-section { display: flex; align-items: center; gap: 4px; width: 100%; padding: 10px 8px 6px;
              border: 0; background: transparent; color: var(--grey); cursor: pointer;
              font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .06em;
              text-transform: uppercase; text-align: left; }
.wl-section:hover { color: var(--ink); }
.wl-section svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2;
                  stroke-linecap: round; stroke-linejoin: round; transition: transform .12s; }
.wl-section.shut svg { transform: rotate(-90deg); }
/* Der offene Titel unter der Watchlist, wie auf TradingView. */
.sym-detail { flex: none; padding: 14px 14px 16px; border-top: 1px solid var(--line); }
.sd-head { display: flex; align-items: center; gap: 10px; }
.sd-head b { font-size: 16px; font-weight: 700; }
.wl-logo.big { width: 30px; height: 30px; font-size: 14px; }
.sd-name { margin-top: 8px; font-size: 13.5px; color: var(--ink); }
.sd-kind { margin-top: 2px; font-size: 12px; color: var(--grey); }
.sd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; }
.sd-price .num { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sd-price .up, .sd-price .down { font-size: 14px; font-variant-numeric: tabular-nums; }
.up { color: var(--win); }
.down { color: var(--loss); }

/* Symbolsuche. */
.sym-card {
  width: min(720px, 100%); max-height: 78vh; display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px rgba(19, 23, 34, .18); overflow: hidden;
}
.sym-head { display: flex; align-items: center; justify-content: space-between;
            padding: 12px 14px 8px 20px; }
.sym-head h3 { margin: 0; font-size: 16px; }
.sym-head svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.sym-field { display: flex; align-items: center; gap: 10px; margin: 0 20px;
             padding: 0 12px; border-bottom: 1px solid var(--line); }
.sym-field svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--grey); stroke-width: 2; }
.sym-field input {
  flex: 1; height: 44px; border: 0; outline: none; background: transparent;
  color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; text-transform: uppercase;
}
.sym-field input::placeholder { text-transform: none; font-weight: 400; color: var(--grey); }
.sym-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px 8px; }
.sym-tab {
  padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 99px;
  background: transparent; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer;
}
.sym-tab:hover { border-color: var(--ink); }
.sym-tab.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.sym-list { flex: 1; min-height: 120px; overflow-y: auto; padding: 4px 0 8px; }
.sym-list .search-item { align-items: center; padding: 9px 20px; cursor: pointer; }
.sym-list .search-item .wl-logo { width: 24px; height: 24px; font-size: 11px; }
.sym-list .search-item em { min-width: 64px; text-align: right; }
.search-item small { min-width: 70px; text-align: right; font-size: 11.5px; color: var(--grey);
                     white-space: nowrap; }
.sym-caption { padding: 6px 20px 4px; font-size: 11.5px; font-weight: 600;
               letter-spacing: .04em; text-transform: uppercase; color: var(--grey); }
.sym-list .search-note { padding: 14px 20px; color: var(--grey); font-size: 13px; }
.sym-foot { display: flex; gap: 16px; padding: 9px 20px; border-top: 1px solid var(--line);
            font-size: 12px; color: var(--grey); }
.sym-foot kbd { margin-right: 3px; }

/* Kleines Eingabefenster: Intervall, Alarm. */
.mini-card {
  width: min(300px, 100%); margin-top: 16vh; padding: 14px 16px 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px rgba(19, 23, 34, .18);
}
.mini-head { font-size: 13px; color: var(--grey); margin-bottom: 8px; }
.mini-card input {
  width: 100%; height: 40px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid var(--accent); border-radius: var(--radius); outline: none;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 18px; font-weight: 600;
}
.mini-hint { min-height: 1.4em; margin-top: 8px; font-size: 12.5px; }

/* Intervall-Menü unter "▾". */
.tv-menu {
  position: fixed; z-index: 70; min-width: 200px; padding: 6px 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(19, 23, 34, .16);
}
.tv-menu-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 32px; padding: 0 8px 0 14px; font-size: 13.5px; cursor: pointer;
}
.tv-menu-row:hover { background: var(--bg-sunken); }
.tv-menu-row.on { color: var(--accent); font-weight: 600; }
.fav-star {
  border: 0; background: transparent; color: var(--line-strong); font-size: 15px;
  cursor: pointer; padding: 2px 6px;
}
.fav-star.on { color: #f7a600; }
.fav-menu { overflow-y: auto; }
.fav-has::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 6px;
  border-radius: 50%; background: var(--accent); vertical-align: middle;
}
.tv-menu-note { padding: 6px 14px 2px; font-size: 11.5px; color: var(--grey);
                border-top: 1px solid var(--line); margin-top: 4px; }

/* Zeitspannen unter dem Chart. */
.chart-frame { display: flex; flex-direction: column; }
.chart-frame .chart-host { flex: 1; min-height: 0; height: auto; }
.tv-ranges { display: flex; align-items: center; gap: 1px; flex: none;
             height: 32px; padding: 0 8px; border-top: 1px solid var(--line); }
.tv-range {
  padding: 4px 8px; border: 0; border-radius: 4px; background: transparent;
  color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer;
}
.tv-range:hover { background: var(--bg-sunken); }
.tv-range.on { color: var(--accent); background: var(--accent-weak); }
.tv-clock { margin-left: auto; font-size: 12px; color: var(--grey);
            font-variant-numeric: tabular-nums; }

/* Während "Heute" sucht: der zuletzt geöffnete Titel. */
.today-peek { margin-top: 14px; padding: 0; overflow: hidden; }
.today-peek .chart-host { height: clamp(360px, 52vh, 620px); }


/* ===================================================================
   Marktübersicht -- die Startseite wie auf TradingView
   =================================================================== */

/* Die Suche als Pille (Feinschliff unten bei der Kopfzeile). */
.topbar .search { flex: 0 1 240px; max-width: 240px; }
.topbar .search input {
  height: 40px; padding-top: 0; padding-bottom: 0; border-radius: 99px;
  border-color: transparent; background: var(--bg-sunken); cursor: pointer;
}
.topbar .search input:hover { border-color: var(--line-strong); }

.mk { max-width: 1460px; margin: 0 auto; }
.mk-h { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 22px; }
.mk .card + .card { margin-top: 0; }

.mk-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 24px;
          align-items: start; }

/* Empfehlungen über der Übersicht (``marketTips`` in app.js). */
.mk-tips { margin: -8px 0 22px; }
.mk-tips-title { font-size: 13px; font-weight: 600; color: var(--grey); text-transform: uppercase;
                 letter-spacing: .06em; margin: 0 0 8px; }
.mk-tip { display: flex; align-items: stretch; border: 1px solid var(--line);
          border-radius: var(--radius-lg); background: var(--accent-weak); overflow: hidden; }
.mk-tip-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 18px;
             border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.mk-tip-go:hover .mk-tip-arrow { transform: translateX(3px); }
.mk-tip-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
               background: var(--accent); color: #fff; }
.mk-tip-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
                   stroke-linecap: round; }
.mk-tip-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.mk-tip-text .muted { font-size: 13px; }
.mk-tip-arrow { flex: none; display: grid; color: var(--accent); transition: transform .12s ease; }
.mk-tip-arrow svg, .mk-tip-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor;
                                       stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mk-tip-close { flex: none; width: 48px; border: 0; border-left: 1px solid var(--line); background: none;
                color: var(--grey); cursor: pointer; display: grid; place-items: center; }
.mk-tip-close:hover { color: var(--ink); background: var(--bg-soft); }
.mk-hero { padding: 18px 0 12px; overflow: hidden; }
.mk-hero-head { display: flex; align-items: center; gap: 14px; padding: 0 18px 8px; cursor: pointer; }
.mk-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.mk-bigprice { font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.mk-bigprice .mk-change { font-size: 17px; margin-left: 8px; }
.mk-hero-chart { cursor: pointer; }
.mk-spark { display: block; width: 100%; }
.mk-nochart { background: var(--bg-soft); }
.mk-axis { display: flex; justify-content: space-between; padding: 8px 18px 0;
           font-size: 12px; color: var(--grey); font-variant-numeric: tabular-nums; }

.mk-badge {
  display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 5px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  background: var(--bg-sunken); color: var(--ink-soft); white-space: nowrap;
}
.mk-change { font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-change.up { color: var(--win); }
.mk-change.down { color: var(--loss); }
.mk-pill { font-weight: 600; font-size: 13px; padding: 2px 8px; border-radius: 6px; color: #fff; }
.mk-pill.up { background: var(--win); }
.mk-pill.down { background: var(--loss); }

.mk-icon {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: hsl(var(--hue) 55% 42%); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: -.02em;
}
.mk-icon.big { width: 54px; height: 54px; font-size: 14px; }

.mk-list { padding: 14px 0 6px; }
.mk-list-title { font-size: 17px; font-weight: 600; padding: 0 16px 8px; }
.mk-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 16px; border: 0; border-top: 1px solid var(--line);
  background: none; text-align: left; cursor: pointer; color: var(--ink);
}
.mk-list-title + .mk-row { border-top: 0; }
.mk-row:hover { background: var(--bg-soft); }
.mk-row.on { background: var(--bg-sunken); }
.mk-row-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
               font-size: 14.5px; font-weight: 500; }
.mk-row-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mk-sub { font-size: 12.5px; color: var(--grey); font-weight: 400;
          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mk-row-num { display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
              font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.mk-row-num .mk-change { font-size: 13px; }

.mk-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 24px; margin-top: 24px; }
.mk-tile {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  padding: 16px 0 0; overflow: hidden; text-align: left; cursor: pointer; color: var(--ink);
  font: inherit;
  transition: border-color .12s ease;
}
.mk-tile:hover { border-color: var(--line-strong); }
.mk-tile-head { display: flex; align-items: center; gap: 8px; padding: 0 16px 8px; min-width: 0; }
.mk-tile-head .mk-icon { width: 28px; height: 28px; font-size: 8.5px; }
.mk-icon { overflow: hidden; }
.mk-tile-name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-tile-price { padding: 0 16px; font-size: 17px; font-weight: 600; }
.mk-tile > .mk-change { padding: 0 16px 8px; font-size: 14px; }

.mk-movers-head { display: flex; align-items: center; justify-content: space-between; gap: 16px;
                  margin-top: 40px; }
.mk-movers-head .mk-h { margin-bottom: 18px; }
.mk-movers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

@media (max-width: 1000px) {
  .mk-top, .mk-movers { grid-template-columns: 1fr; }
  .brand-name { display: none; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 16px; gap: 8px; }
  .content { padding: 20px 16px 60px; }
  .mk-h { font-size: 22px; }
  .mk-tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ===================================================================
   Telefon und Finger (Vorgabe 2026-10-02): alles muss sich mit dem
   Daumen treffen lassen. Drei Schichten --
     (pointer: coarse)   Trefferflächen, egal wie breit der Schirm ist
     (hover: none)       was sonst erst unter dem Zeiger erscheint
     (max-width: 640px)  die Anordnung fürs Hochformat
   Der Chart selbst regelt seine Finger in ``chart.js``.
   =================================================================== */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
       touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* Der Rand um Kerbe und Home-Strich (``viewport-fit=cover``). */
.app { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }

@media (pointer: coarse) {
  /* Kein Gummiband und kein "Seite neu laden" beim Ziehen im Chart. */
  html, body { overscroll-behavior: none; }

  .btn { min-height: 42px; padding: 9px 16px; }
  .btn-small { min-height: 38px; padding: 7px 13px; }
  .seg { min-height: 40px; }
  .tab-switch .seg { padding: 7px 14px; }
  .tab { padding: 14px 12px 13px; }
  .tab .close { width: 30px; height: 30px; }
  .tab .close svg { width: 13px; height: 13px; }
  .topnav-item { height: 44px; }
  .bell { width: 44px; height: 44px; }
  .avatar { width: 40px; height: 40px; }
  .rung { padding: 9px 12px; font-size: 14px; }
  .expander { width: 36px; height: 36px; }
  .expander svg { width: 15px; height: 15px; }
  .expand { padding: 9px 13px; }
  .check { padding: 10px 0; }
  .box { width: 22px; height: 22px; }
  .copy { padding: 8px 9px; margin: -6px -9px; }
  .lvl { padding: 7px 6px; margin: -5px -6px; }
  .ex-link { padding: 8px 4px; margin: -8px -4px; }
  .chip-copy { padding: 9px 10px; }
  .pw-btn { min-height: 44px; }
  .fl-stop, .fl-look, .fl-actions .pw-btn { min-height: 40px; padding: 8px 14px; }
  .pm-row { min-height: 46px; }
  .ib-act { padding: 9px 10px; }
  .ib-row { padding: 14px 16px; }
  .search-item { padding: 12px; font-size: 14.5px; }
  .sym-tab { padding: 9px 15px; font-size: 14px; }
  .sym-list .search-item { padding: 13px 20px; }
  .sym-foot { display: none; }          /* Tastenkürzel helfen dem Finger nicht */
  .search-kbd { display: none; }
  .tv-menu-row { height: 46px; font-size: 15px; }
  .fav-star { padding: 10px 12px; font-size: 18px; }
  .tv-ranges { height: 42px; overflow-x: auto; scrollbar-width: none; }
  .tv-range { flex: none; padding: 9px 11px; font-size: 13.5px; }

  /* Unter 16px zoomt iOS beim Antippen in das Feld hinein. */
  .search input, .field input[type=number], .field input[type=text], .field select,
  .login-form .field input, .set-control input, .set-control select,
  .lvl-input, .mini-card input, textarea { font-size: 16px; }
  .search input { padding: 10px 12px 10px 36px; }

  /* Ticker-Ansicht. */
  .app.tv .tv-bar { height: 52px; }
  .tv-home, .tv-btn { height: 42px; }
  .tv-home { padding: 0 8px 0 4px; }
  .tv-home svg { width: 20px; height: 20px; }
  .tv-btn { padding: 0 12px; }
  .tv-btn svg { width: 20px; height: 20px; }
  .app.tv .rung { padding: 10px 12px; font-size: 14.5px; }
  .app.tv .rung.fav-open { padding: 10px 9px; }
  .app.tv .tv-right .btn { height: 40px; }
  .side-icon { width: 44px; height: 44px; }
  .side-icon svg { width: 22px; height: 22px; }
  .side-panel { width: min(360px, calc(100vw - 60px)); }
  .side-row { height: 46px; font-size: 14px; }
  .side-cols, .side-row { grid-template-columns: 1fr auto 64px 34px; }
  .side-panel.side-setups { width: min(260px, calc(100vw - 60px)); }
  .ss-cols, .ss-row { grid-template-columns: 34px minmax(0, 1fr); }
  .side-x { width: 34px; height: 34px; }
  .side-x svg { width: 14px; height: 14px; }
  .wl-cols, .wl-row { grid-template-columns: minmax(0, 1fr) 76px 58px 58px; padding-right: 44px; }
  .wl-row .side-x { top: 6px; right: 5px; background: transparent; }
  .wl-add { width: 40px; height: 40px; }
  .wl-section { padding: 14px 8px 10px; }
}

@media (hover: none) {
  /* Ohne Zeiger gäbe es das Kreuz zum Entfernen nie zu sehen. */
  .side-x { visibility: visible; }
}

/* Schmal oder quer gehalten: die Tafel der rechten Leiste legt sich
   über den Chart, statt ihm die halbe Breite zu nehmen. */
@media (max-width: 900px) {
  .app.tv .tv-side { position: relative; }
  .app.tv .side-panel {
    position: absolute; right: 100%; top: 0; bottom: 0; z-index: 30;
    background: var(--bg); border-left: 1px solid var(--line);
    box-shadow: -10px 0 28px rgba(19, 23, 34, .14);
  }
}

@media (max-width: 640px) {
  /* --- Kopfzeile und Menü ------------------------------------------ */
  .topbar { height: 56px; padding: 0 12px; }
  .brand { margin-right: 2px; }
  .search { max-width: none; }
  .inbox-menu, .profile-menu {
    position: fixed; top: calc(58px + env(safe-area-inset-top)); left: 8px; right: 8px;
    width: auto; max-width: none;
  }
  .profile-menu { left: auto; width: min(320px, calc(100vw - 16px));
                  max-height: calc(100dvh - 140px); overflow-y: auto; }
  .ib-list { max-height: min(440px, 58dvh); }

  /* Das Menü als Leiste unten, wo der Daumen ist. */
  .app:not(.tv) .topnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    margin: 0; gap: 4px;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line);
  }
  .app:not(.tv) .topnav-item { flex: 1; justify-content: center; height: 46px; font-size: 14.5px; }
  .app .topnav-item.nav-home, .app .topnav-item[data-goto="research"] { display: inline-flex; }
  .app:not(.tv) .content { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px);
           text-align: center; }
  .tabbar { padding: 0 10px; }

  /* --- Inhalt ------------------------------------------------------- */
  .card-body { padding: 16px 14px; }
  .card-body.tight { padding: 0; }
  .detail-row td { padding: 14px 14px 18px; }
  .detail-row td > * { max-width: calc(100vw - 62px); }
  .chart-host { height: clamp(340px, 62vh, 980px); }
  .form-grid { grid-template-columns: 1fr; }
  .offen-head { flex-wrap: wrap; }
  .fl-stop, .fl-actions { margin-left: 0; }
  .fl-row, .fl-own { grid-template-columns: auto 1fr; }
  .fl-row .fl-vals, .fl-own .fl-vals, .fl-own-btns { grid-column: 1 / -1; }

  /* --- Ticker-Ansicht: Kopfzeile, eine Zeile darunter, Leiste unten --
     Das Symbol steht oben in der Suchzeile; darunter zurück, der
     wischbare Streifen mit Zeiteinheiten und Knöpfen und "Trade". */
  .app.tv .topnav { display: none; }    /* unten liegt die rechte Leiste */
  .app.tv .tv-bar { height: auto; padding: 3px 8px 3px 2px; gap: 0 2px; }
  .app.tv .tv-left { display: contents; }
  .app.tv .tv-home { margin-right: 0; }
  .app.tv .tv-right { flex: 0 1 auto; min-width: 0; padding-left: 6px; }
  .app.tv .tv-right .btn { padding: 0 14px; min-width: 0; overflow: hidden; }
  .app.tv .tv-strip {
    flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none;
    padding: 0 0 0 2px; -webkit-overflow-scrolling: touch;
  }
  .app.tv .tv-strip::-webkit-scrollbar, .tv-ranges::-webkit-scrollbar { display: none; }
  .app.tv .tv-strip .rungs { flex: none; }
  .app.tv .tv-strip .rung { flex: none; }
  .tv-btn { font-size: 0; gap: 0; }
  .tv-btn.tv-konf { font-size: 0; gap: 0; }   /* nur das Zeichen */
  .tv-btn.tv-konf .badge-beta { display: none; }
  .tv-ranges { display: none; }          /* Zwei Finger zoomen besser */

  .app.tv .main-body { flex-direction: column; }
  .app.tv .main-body .content { min-height: 0; }
  .app.tv .tv-side {
    flex-direction: column; border-left: 0; border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .app.tv .side-strip { flex-direction: row; justify-content: space-around; padding: 4px 10px; }
  .app.tv .side-panel {
    left: 0; right: 0; top: auto; bottom: 100%;
    width: auto; max-height: min(64dvh, 520px);
    border-left: 0; border-right: 0; border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -14px 32px rgba(19, 23, 34, .18);
  }
  .app.tv .side-panel .side-list { min-height: 0; }
  .side-head { padding: 14px 14px 10px; }
  .tv-menu { max-width: calc(100vw - 16px); max-height: calc(100dvh - 120px); overflow-y: auto; }

  /* --- Fenster füllen den Schirm ------------------------------------ */
  .keyhelp:not(#minidlg) {
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
             env(safe-area-inset-bottom) env(safe-area-inset-left);
    align-items: stretch; background: var(--bg);
  }
  .keyhelp:not(#minidlg) > * {
    width: 100% !important; max-width: none; max-height: none;
    border: 0; border-radius: 0; box-shadow: none;
  }
  #minidlg { padding: 16px; }
  .mini-card { margin-top: 10vh; }
  .keyhelp-cols { grid-template-columns: 1fr; }
  .pw-head { padding: 10px 10px 10px 16px; }
  .pw-body { padding: 14px 14px; }
  .pw-actions { padding: 10px 14px; }
  .pw-actions .btn { min-width: 0; }
  .sym-head { padding: 10px 10px 6px 16px; }
  .sym-field { margin: 0 16px; }
  .sym-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 12px 16px 8px; }
  .sym-tab { flex: none; }
  .sym-list .search-item { padding: 13px 16px; }
  .search-item b { min-width: 72px; }

  /* --- Auswahl der Märkte ------------------------------------------- */
  .onboarding { padding: 32px 16px 170px; }
  .onboarding-head { margin-bottom: 26px; }
  .onboarding-head h1 { margin: 18px 0 10px; font-size: 25px; }
  .category-head { flex-wrap: wrap; gap: 10px 12px; padding: 14px; }
  .tickers { grid-template-columns: 1fr; padding: 6px 14px 12px; }
  .onboarding-foot {
    flex-direction: column; align-items: stretch; gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }
  .row-actions { gap: 6px; }
  .row-actions .btn { flex: 1; justify-content: center; padding-left: 8px; padding-right: 8px; }
  .login-actions .btn { flex: 1; justify-content: center; }
  .plan { padding: 14px; }
}

/* Telefon quer: wenig Höhe -- die Kopfzeile wird flach, die Fenster hoch. */
@media (max-height: 520px) and (min-width: 641px) {
  .app.tv .tv-bar { height: 42px; }
  .topbar { height: 52px; }
  .keyhelp { padding-top: 8px; padding-bottom: 8px; }
  .keyhelp-card, .pw-card, .sym-card { max-height: calc(100dvh - 16px); }
  .mini-card { margin-top: 4vh; }
}


/* ===================================================================
   Trade-Panel unter dem Chart (Vorgabe 2026-10-13, Layout B)
   -------------------------------------------------------------------
   Wie das Trading Panel von TradingView: Reiter Setups / Orders /
   Bedingte Orders, rechts Filter, Hebel und Konto, unten die Summen und
   "Ticker verfolgen". Seit 2026-10-14 im Fluss der Seite unter dem Chart:
   ``fitChart`` lässt nur die Reiterleiste ins Bild schauen, der Rest
   kommt beim Rollen. Die Spalten fallen von rechts weg, je schmaler es wird.
   =================================================================== */

.trp {
  --trp-cols: 44px 112px minmax(120px, 1fr) 88px 72px 56px 136px 56px 106px 100px 100px 94px 100px 46px 40px;
  position: relative; display: flex; flex-direction: column;
  border-top: 1px solid var(--line-strong); background: var(--bg);
  font-variant-numeric: tabular-nums;
}
.trp-bar {
  flex: none; display: flex; align-items: stretch; gap: 2px; height: 42px;
  padding: 0 8px 0 10px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.trp-bar::-webkit-scrollbar { display: none; }
.trp-title { display: flex; align-items: center; gap: 6px; flex: none; padding: 0 6px;
             font-size: 13.5px; font-weight: 600; }
.trp-count { padding: 0 6px; border-radius: 99px; background: var(--bg-sunken);
             color: var(--ink-soft); font-size: 11px; font-weight: 700; line-height: 18px; }
.trp-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; padding-left: 12px;
             white-space: nowrap; font-size: 12.5px; }
.trp-asof { display: inline-flex; align-items: center; gap: 6px; color: var(--grey);
            font-size: 12px; }
.trp-mode { color: var(--grey); font-size: 12px; }
.trp-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px 0 10px;
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg-sunken);
  color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.trp-chip svg, .trp-chev svg, .trp-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trp-chip.warn { border-color: color-mix(in srgb, var(--loss) 55%, transparent); color: var(--loss); }
.trp-chip[aria-expanded="true"] { border-color: var(--ink); }
.trp-icon, .trp-chev {
  width: 28px; height: 28px; display: inline-grid; place-items: center; flex: none;
  border: 0; border-radius: 6px; background: none; color: var(--grey); cursor: pointer;
}
.trp-icon:hover, .trp-chev:hover { background: var(--bg-sunken); color: var(--ink); }
.trp-chev svg { transition: transform .15s ease; }
.trp-chev.open svg { transform: rotate(180deg); }

.trp-levpop {
  position: absolute; right: 44px; top: 46px; z-index: 20; width: min(400px, calc(100% - 24px));
  display: flex; flex-direction: column; gap: 10px; padding: 12px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  box-shadow: 0 14px 36px rgba(19, 23, 34, .18); font-size: 12.5px;
}
.trp-levhead { display: flex; justify-content: space-between; }
.trp-presets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.trp-presets button {
  height: 30px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.trp-presets button:hover { border-color: var(--ink); }
.trp-presets button.on { border-color: var(--accent); background: var(--accent-weak); color: var(--accent-dark); }
.trp-safe { display: flex; align-items: center; gap: 8px; white-space: nowrap; }

/* Kapital und Risiko (Vorgabe 2026-10-17): beim ersten Setup gefragt, sonst
   hinter dem Knopf "Konto". */
.trp-acct { gap: 4px; font-weight: 600; }
.trp-moneypop { right: 8px; width: min(380px, calc(100% - 16px)); }
.trp-moneypop p { color: var(--ink-soft); }
.trp-moneypop p.muted { color: var(--grey); }
.trp-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--grey); }
.trp-field input {
  height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13px;
}
.trp-field input:focus { outline: none; border-color: var(--accent); }
.trp-risks { grid-template-columns: repeat(4, minmax(0, 1fr)) 92px; }
.trp-pct { display: flex; align-items: center; gap: 4px; color: var(--ink); }
.trp-pct input { width: 100%; min-width: 0; height: 30px; padding: 0 6px; text-align: right; }
.trp-moneyact { display: flex; justify-content: flex-end; gap: 8px; }
.trp-moneyact .btn { height: 34px; }

/* Fachbegriffe mit Erklärung: unterstrichelt, beim Darüberfahren oder
   Antippen ein kleines Fenster (``hintShow``). */
.hint { text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
        text-underline-offset: 3px; cursor: help; }
.hint:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.trp-flag[data-hint] { cursor: help; }
.hint-pop {
  position: fixed; z-index: 1000; max-width: min(300px, calc(100vw - 24px)); padding: 8px 10px;
  border-radius: 8px; background: var(--ink); color: var(--bg); box-shadow: 0 10px 28px rgba(19, 23, 34, .22);
  font-size: 12.5px; font-weight: 400; line-height: 1.45; white-space: normal; text-align: left;
  pointer-events: none;
}
.hint-pop[hidden] { display: none; }
.trp-levpop p { margin: 0; font-size: 11.5px; line-height: 1.5; }

.trp-body { overflow-x: auto; overflow-y: hidden; }
.trp-table { min-width: 1280px; }
.trp-row {
  display: grid; grid-template-columns: var(--trp-cols); align-items: center;
  min-height: 40px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.trp-row > span { padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trp-row > .c-sw, .trp-row > .c-chev { padding: 0 4px; text-overflow: clip; }
.trp .r { text-align: right; }
.trp .strong { font-weight: 700; }
.trp-head {
  position: sticky; top: 0; z-index: 2; min-height: 32px; background: var(--bg);
  font-size: 11.5px; font-weight: 500; color: var(--grey);
}
.trp-head small { margin-left: 4px; font-size: 10.5px; }
.trp-setup:hover, .trp-setup.open { background: var(--bg-soft); }
/* Die Zeile öffnet ihre Zeiteinheit mit ihrer Struktur im Chart. */
.trp-setup[data-trp-open] { cursor: pointer; }
.trp-setup.off > span:not(:first-child) { opacity: .55; }
.trp-setup.blocked { color: var(--grey); }
.trp-price { display: flex; align-items: center; gap: 10px; min-height: 26px; padding: 0 12px;
             color: var(--win); font-size: 12px; font-weight: 600; }
.trp-price::before, .trp-price::after { content: ''; flex: 1;
  border-top: 1px dashed color-mix(in srgb, var(--win) 60%, transparent); }

.trp-sw {
  position: relative; display: block; width: 34px; height: 20px; padding: 0;
  border: 0; border-radius: 99px; background: var(--line-strong); cursor: pointer;
  transition: background .15s ease;
}
.trp-sw::after {
  content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.trp-sw.on { background: var(--ink); }
.trp-sw.on::after { transform: translateX(14px); background: var(--surface); }
.trp-sw:disabled { opacity: .35; cursor: not-allowed; }
.trp-sw:focus-visible, .trp-chev:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.trp-name { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.trp-name b { font-weight: 700; }
.trp-blocked { color: var(--grey); font-weight: 600; }
.trp-why { margin-left: 6px; color: var(--grey); font-style: normal; }
.trp-flag {
  display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line-strong);
  border-radius: 4px; color: var(--ink-soft); font-size: 11px; font-weight: 600; line-height: 18px;
  white-space: nowrap;
}
.trp-flag.bad, .trp-flag.warn { color: var(--loss); border-color: color-mix(in srgb, var(--loss) 45%, transparent); }
.trp-flag.ok { color: var(--win); border-color: color-mix(in srgb, var(--win) 45%, transparent); margin-left: 0; }
/* Im Chart gezogene Kurse (Vorgabe 2026-10-16): ein Klick verwirft sie. */
button.trp-flag.edit { background: none; cursor: pointer; font-family: inherit;
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
/* Das Setup, dessen Linien im Chart stehen. */
.trp-setup.picked { background: var(--accent-weak); box-shadow: inset 3px 0 0 var(--accent); }
.trp-loss { color: var(--loss); }
.trp-win { color: var(--win); }
.trp-warn-t { color: var(--loss); font-weight: 600; }
.trp-ok-t { color: var(--win); font-weight: 600; }
.trp-side { font-weight: 600; }
.trp-side.long { color: var(--win); }
.trp-side.short { color: var(--loss); }
.trp-next { margin-left: 4px; font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent); }
/* Kopierfeld im Panel (Vorgabe 2026-10-14): als Feld zu erkennen -- grau
   hinterlegt, mit Kopierzeichen; überfahren schwarz umrandet, kopiert
   invertiert. */
.trp-cp {
  display: inline-flex; align-items: center; gap: 6px; margin: -3px 0;
  padding: 3px 7px; border: 1px solid transparent; border-radius: 6px;
  background: var(--bg-sunken); color: var(--ink); cursor: copy;
  font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.trp-cp svg { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor;
              stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .45; }
.trp-cp:hover, .trp-cp:focus-visible { border-color: var(--ink); outline: none; }
.trp-cp:hover svg, .trp-cp:focus-visible svg { opacity: 1; }
.trp-cp.trp-loss { color: var(--loss); }
.trp-cp.trp-win { color: var(--win); }
.trp-cp.copied { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.trp-tps { display: flex; gap: 6px; }
.trp-cphint { margin-left: auto; font-size: 11.5px; }

.trp-detail { padding: 4px 12px 12px 52px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.trp-orders { display: grid; align-items: center; width: max-content; font-size: 12.5px; }
.trp-orders > span { padding: 7px 8px; text-align: right; white-space: nowrap;
                     border-bottom: 1px solid var(--line); }
.trp-orders > .l { text-align: left; }
.trp-orders > .h { font-size: 11px; font-weight: 500; color: var(--grey); border-bottom-color: var(--line-strong); }
.trp-dnote { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 8px; font-size: 12px; color: var(--grey); }
.trp-dnote b { color: var(--ink); font-weight: 600; }
.trp-msg { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.trp-msg.warn { color: var(--loss); }
/* Aufgeklappt unter den Limits (Vorgabe 2026-10-17, vorher eigene Reiter). */
.trp-sub { margin-top: 14px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.trp-conds { grid-template-columns: minmax(180px, auto) minmax(260px, auto) auto; }
.trp-notes { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.trp-msg.trp-notify { margin-top: 4px; }

.trp-foot {
  flex: none; display: flex; align-items: center; gap: 8px 16px;
  padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12.5px;
}
.trp-sums { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.trp-actions { flex: none; display: flex; gap: 8px; }
.trp-kv { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.trp-grow { flex: 1; }
.trp-hint { font-size: 12px; }
.trp-foot .btn { height: 36px; }
.trp-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
             padding: 18px 16px; color: var(--ink-soft); }
.trp-note { margin: 12px; font-size: 12.5px; color: var(--grey); }
.trp-focus-note { margin: 10px 12px 0; padding: 8px 12px; border-radius: 8px; font-size: 12.5px;
                  border: 1px solid color-mix(in srgb, var(--loss) 35%, transparent);
                  background: color-mix(in srgb, var(--loss) 8%, transparent); color: var(--ink); }


@media (max-width: 1360px) {
  .trp { --trp-cols: 44px 112px minmax(120px, 1fr) 88px 72px 136px 56px 106px 100px 100px 94px 100px 40px; }
  .trp .c-n, .trp .c-crv { display: none; }
  .trp-table { min-width: 1180px; }
}
@media (max-width: 1180px) {
  .trp { --trp-cols: 44px 108px minmax(110px, 1fr) 88px 132px 54px 100px 94px 100px 40px; }
  .trp .c-gap, .trp .c-sl, .trp .c-margin { display: none; }
  .trp-table { min-width: 870px; }
  .trp-mode { display: none; }
}
@media (max-width: 640px) {
  /* Zuerst, was an der Börse zählt: Wert, Hebel, Liquidation. Einstieg
     und Hinweise folgen beim Wischen. */
  .trp { --trp-cols: 44px 100px 104px 44px 88px 88px minmax(140px, 1fr) 40px; }
  .trp .c-risk, .trp .c-gain { display: none; }
  .trp .c-sw { order: 1; } .trp .c-name { order: 2; } .trp .c-value { order: 3; }
  .trp .c-lev { order: 4; } .trp .c-liq { order: 5; } .trp .c-entry { order: 6; }
  .trp .c-note { order: 7; } .trp .c-chev { order: 8; }
  .trp-table { min-width: 700px; }
  .trp-bar { height: auto; flex-wrap: wrap; overflow: visible; padding: 0 6px; }
  .trp-title { height: 40px; }
  .trp-tools { width: 100%; margin-left: 0; padding: 2px 4px 8px; }
  .trp-levpop { left: 8px; right: 8px; top: 92px; width: auto; }
  .trp-actions .btn-ghost { display: none; }
  .trp-moneypop { left: 8px; right: 8px; top: 92px; width: auto; }
  /* 16 px: iOS zoomt sonst beim Antippen ins Feld. */
  .trp-field input { font-size: 16px; }
  .trp-detail { padding-left: 12px; }
  .trp-foot { flex-direction: column; align-items: stretch; }
  .trp-actions .btn { flex: 1; height: 42px; }
}

/* Der Wechsel der Kerzen in "alle": der alte Chart blendet über den neuen aus. */
.all-fade { position: absolute; pointer-events: none; opacity: 1;
            transition: opacity .32s ease-out; }


/* ===================================================================
   Feinschliff im Stil der Landingpage (Vorgabe 2026-10-21)
   -------------------------------------------------------------------
   Dieselbe Sprache wie der Hero: ruhige dunkle Flächen, Karten aus Glas
   mit feinem Rand, Schlagzeilen in Manrope, viel Luft und ein weicher
   Schein in Champagner, nur als Licht im Hintergrund. Keine neue Farbe:
   der Akzent bleibt, wo er etwas sagt, Knöpfe bleiben kantig.

   Ausgenommen ist die Ticker-Ansicht (``.app.tv``): alles hier hängt an
   ``.app:not(.tv)``, an der Auswahl der Märkte oder an den Fenstern.
   Bewegt wird nur, was die Grafikkarte billig kann (transform, opacity);
   Unschärfe nur auf kleinen Flächen, die über dem Inhalt schweben.
   =================================================================== */

:root {
  --head: "Manrope", var(--sans);
  --acc-glow: 201, 169, 110;           /* Champagner der Landingpage */
  --radius-card: 14px;
  --ease-soft: cubic-bezier(.2, .7, .1, 1);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .78) 60%), var(--surface);
  --glass-line: rgba(23, 24, 27, .09);
  --glass-line-hover: rgba(23, 24, 27, .2);
  --lift: 0 1px 2px rgba(23, 24, 27, .04), 0 18px 40px -24px rgba(23, 24, 27, .18);
  --float: 0 1px 2px rgba(23, 24, 27, .06), 0 24px 60px -18px rgba(23, 24, 27, .28);
  --glow-alpha: .07;
}
:root[data-theme="dark"] {
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01) 60%), rgba(14, 14, 16, .62);
  --glass-line: rgba(255, 255, 255, .1);
  --glass-line-hover: rgba(255, 255, 255, .24);
  --lift: 0 24px 60px -24px rgba(0, 0, 0, .9);
  --float: 0 0 0 1px rgba(0, 0, 0, .5), 0 30px 70px -20px rgba(0, 0, 0, .95);
  --glow-alpha: .12;
}
/* Das Dunkel der Landingpage: fast schwarz statt Anthrazit, Linien als
   Weiß mit wenig Deckkraft, Nebentext im selben Grau wie dort. */
:root[data-theme="dark"] .app:not(.tv),
:root[data-theme="dark"] .app.tv .topbar,
:root[data-theme="dark"] .onboarding {
  --bg:          #0a0a0b;
  --bg-soft:     #101012;
  --bg-sunken:   #18181b;
  --surface:     #0e0e10;
  --line:        rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .15);
  --grey:        #8e8e93;
  --ink:         #f5f5f7;
  --ink-soft:    #c7c7cc;
  --on-ink:      #0a0a0b;
  --accent-weak: rgba(91, 124, 240, .14);
}

/* -- Grund und Licht ------------------------------------------------ */
.app:not(.tv) { background: var(--bg); }
.app:not(.tv) .content {
  background: radial-gradient(ellipse 900px 420px at 0% 0%, rgba(var(--acc-glow), var(--glow-alpha)), transparent 70%) no-repeat;
}
.app:not(.tv) .content { padding: 36px clamp(20px, 3vw, 44px) 96px; }

/* -- Schlagzeilen in Manrope --------------------------------------- */
.app:not(.tv) .mk-h, .app:not(.tv) .page-head h2, .onboarding-head h1,
.app:not(.tv) .today-num, .app:not(.tv) .empty h3, .brand-name {
  font-family: var(--head);
}
.app:not(.tv) .mk-h, .app:not(.tv) .page-head h2 {
  font-size: clamp(26px, 2.2vw, 32px); font-weight: 650; letter-spacing: -.03em; line-height: 1.15;
}
.app:not(.tv) .page-head { margin-bottom: 28px; }
.onboarding-head h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 650; letter-spacing: -.035em; line-height: 1.1; }
.brand-name { font-weight: 700; letter-spacing: -.025em; }

/* -- Kopfzeile (Vorgabe 2026-10-22) ---------------------------------
   Auf jeder Seite gleich, auch in der Ticker-Ansicht: Marke, Suche als
   Glaspille mit Tastenkürzel, das Menü als Pillengruppe wie die
   Umschalter, rechts Glocke und Profilkreis als runde Knöpfe. Unten
   ein Hauch Licht auf der Kante, sonst nur Linien und Fläche. */
.topbar {
  position: relative; z-index: 20;
  height: 60px; gap: 12px; padding: 0 clamp(16px, 2.6vw, 40px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent), var(--bg);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--acc-glow), .45) 35%, rgba(var(--acc-glow), .45) 65%, transparent);
  opacity: .35; pointer-events: none;
}
.topbar .brand { margin-right: 6px; padding-right: 4px; }
.topbar .brand .brand-mark.small { width: 30px; height: 30px; }
.topbar .brand-name { font-size: 18px; }

.topbar .search { flex: 0 1 320px; max-width: 320px; }
.topbar .search input {
  height: 38px; padding-left: 38px; padding-right: 74px; font-size: 14px;
  border: 1px solid var(--line); background: var(--bg-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.topbar .search input::placeholder { color: var(--grey); }
.topbar .search input:hover { border-color: var(--line-strong); background: var(--bg-sunken); }
.topbar .search input:focus { border-color: var(--line-strong); background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-weak); }
.topbar .search-icon { left: 14px; color: var(--grey); }
.topbar .search-kbd { right: 12px; display: flex; gap: 3px; }
.topbar .search-kbd kbd { min-width: 0; padding: 0 5px; font-size: 10.5px; line-height: 18px;
  border: 1px solid var(--line); border-bottom-width: 1px; background: var(--bg-sunken); color: var(--grey); }
.topbar .search kbd + kbd { margin-left: 0; }
/* Ein offener Titel steht in der Suchzeile: Zeichen und Kürzel. */
.search-sym { position: absolute; left: 36px; top: 50%; transform: translateY(-50%);
  display: flex; pointer-events: none; }
.search-sym .wl-logo { width: 20px; height: 20px; font-size: 10.5px; }
.topbar .search.has-sym input { padding-left: 64px; font-weight: 700; letter-spacing: .01em;
  color: var(--ink); text-overflow: ellipsis; }
.topbar .search.has-sym input ~ .search-kbd { display: flex; }

.topbar .topnav {
  gap: 2px; margin-left: 4px; padding: 3px; border-radius: 999px;
  background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line);
}
.topbar .topnav-item {
  height: 32px; padding: 0 15px; border-radius: 999px; font-size: 14px; color: var(--ink-soft);
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.topbar .topnav-item:hover { color: var(--ink); background: transparent; }
.topbar .topnav-item.on { color: var(--ink); font-weight: 600; background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 24, 27, .08), inset 0 0 0 1px var(--glass-line); }
:root[data-theme="dark"] .topbar .topnav-item.on { background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px var(--line-strong); }
.topbar .nav-count { line-height: 18px; background: var(--bg-sunken); }
.topbar .nav-count.hot { background: var(--accent); color: #fff; }

.topbar .bell {
  width: 38px; height: 38px; border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--ink-soft); transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.topbar .bell:hover, .topbar .bell[aria-expanded="true"] {
  background: var(--bg-sunken); border-color: var(--line-strong); color: var(--ink); }
.topbar .bell svg { width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topbar .bell-count { top: -3px; right: -4px; box-shadow: 0 0 0 2px var(--bg); }
.topbar .profile { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); }
.topbar .avatar { width: 36px; height: 36px; font-size: 15px;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line-strong); transition: box-shadow .2s ease; }
.topbar .avatar:hover, .topbar .avatar[aria-expanded="true"] {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--glass-line-hover), 0 0 0 7px var(--bg-sunken); }

/* -- Karten aus Glas ------------------------------------------------ */
.app:not(.tv) .card, .app:not(.tv) .fl-card, .ob-panel {
  border-color: var(--glass-line); border-radius: var(--radius-card);
}
.market { border-radius: var(--radius-card); }
.app:not(.tv) .card, .app:not(.tv) .fl-card, .ob-panel {
  background: var(--glass); box-shadow: var(--lift);
}
.app:not(.tv) .card-head { padding: 16px 22px; border-bottom-color: var(--line); }
.app:not(.tv) .card-head h3 { font-size: 15px; letter-spacing: -.01em; }
.app:not(.tv) .card-body { padding: 22px; }
.app:not(.tv) .card-body.tight { padding: 0; }
/* Was sich anklicken lässt, hebt sich ein wenig (translate, kein Neumalen). */
.app:not(.tv) .mk-tile, .app:not(.tv) .mk-hero {
  transition: border-color .25s ease, translate .35s var(--ease-soft);
}
.app:not(.tv) .mk-tile:hover { border-color: var(--glass-line-hover); translate: 0 -2px; }
.app:not(.tv) .mk-hero:hover { border-color: var(--glass-line-hover); }

/* -- Marktübersicht ------------------------------------------------- */
.app:not(.tv) .mk-h { margin: 4px 0 26px; }
.app:not(.tv) .mk-top { gap: 20px; }
.app:not(.tv) .mk-tiles { gap: 20px; margin-top: 20px; }
.app:not(.tv) .mk-movers { gap: 20px; }
.app:not(.tv) .mk-movers-head { margin-top: 52px; }
.app:not(.tv) .mk-hero { padding: 22px 0 14px; }
.app:not(.tv) .mk-hero-head { padding: 0 22px 10px; }
.app:not(.tv) .mk-bigprice { font-family: var(--head); font-size: 34px; font-weight: 650; letter-spacing: -.03em; }
.app:not(.tv) .mk-axis { padding: 10px 22px 0; }
.app:not(.tv) .mk-list { padding: 18px 0 6px; }
.app:not(.tv) .mk-list-title, .app:not(.tv) .mk-title { letter-spacing: -.015em; }
.app:not(.tv) .mk-list-title { padding: 0 20px 10px; }
.app:not(.tv) .mk-row { padding: 12px 20px; transition: background .2s ease; }
.app:not(.tv) .mk-row:hover { background: var(--bg-soft); }
.app:not(.tv) .mk-row.on { background: var(--bg-sunken); }
.app:not(.tv) .mk-tile { padding-top: 18px; }
.app:not(.tv) .mk-tile-head { padding: 0 18px 10px; }
.app:not(.tv) .mk-tile-price { padding: 0 18px; font-size: 18px; letter-spacing: -.01em; }
.app:not(.tv) .mk-tile > .mk-change { padding: 0 18px 10px; }
.app:not(.tv) .mk-badge { padding: 1px 7px; border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--grey); font-weight: 500; }
.app:not(.tv) .mk-icon:not(.drawn):not(.has-img) { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
/* Die Empfehlung als Glaskarte; Kennung wie die Marke der Landingpage. */
.app:not(.tv) .mk-tips-title {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--ink-soft);
}
.app:not(.tv) .mk-tips-title::before { content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: rgb(var(--acc-glow)); box-shadow: 0 0 8px rgba(var(--acc-glow), .8); }
.app:not(.tv) .mk-tip {
  border-color: var(--glass-line); border-radius: var(--radius-card);
  background: radial-gradient(ellipse 60% 140% at 0% 0%, var(--accent-weak), transparent 70%), var(--glass);
  box-shadow: var(--lift); transition: border-color .25s ease;
}
.app:not(.tv) .mk-tip:hover { border-color: var(--glass-line-hover); }
.app:not(.tv) .mk-tip-go { padding: 16px 20px; }
.app:not(.tv) .mk-tip-icon { box-shadow: 0 0 0 4px var(--accent-weak); }
.app:not(.tv) .mk-tip-close { border-left-color: var(--line); transition: color .2s ease, background .2s ease; }

/* -- Leerer Zustand ------------------------------------------------- */
.app:not(.tv) .empty { padding: 96px 24px; gap: 12px; }
.app:not(.tv) .empty h3 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.app:not(.tv) .empty p { color: var(--grey); }
.app:not(.tv) .empty > svg { width: 48px; height: 48px; margin-bottom: 6px; color: var(--grey); opacity: .6; }

/* -- Tabellen ------------------------------------------------------- */
.app:not(.tv) thead th { background: var(--surface); font-weight: 500; letter-spacing: .01em;
  border-bottom-color: var(--line); padding: 12px 12px; }
.app:not(.tv) tbody td { padding: 13px 12px; border-bottom-color: var(--line); }
.app:not(.tv) .row-link td { transition: background .15s ease; }
.app:not(.tv) .row-link:hover td { background: var(--bg-soft); }
.app:not(.tv) tr.row-link.kbd td { background: var(--accent-weak); }
.app:not(.tv) .detail-row td { background: var(--bg-soft); }
.app:not(.tv) .score-bar { background: var(--line); }

/* -- Kennzahlen ----------------------------------------------------- */
.app:not(.tv) .kpis { border-color: var(--glass-line); border-radius: var(--radius-card); box-shadow: var(--lift); }
.app:not(.tv) .kpi { padding: 16px 18px; }
.app:not(.tv) .kpi-label { font-weight: 500; letter-spacing: .01em; }
.app:not(.tv) .kpi-value { font-family: var(--head); font-size: 21px; font-weight: 650; letter-spacing: -.02em; }

/* -- Knöpfe: kantig, weiche Übergänge ------------------------------- */
.app:not(.tv) .btn, .onboarding .btn, .app:not(.tv) .pw-btn, .app:not(.tv) .fl-done {
  border-radius: 6px;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s var(--ease-soft), opacity .2s ease;
}
.app:not(.tv) .btn:active:not(:disabled), .onboarding .btn:active:not(:disabled),
.app:not(.tv) .pw-btn:active:not(:disabled) { transform: scale(.97); }
.app:not(.tv) .btn-outline, .app:not(.tv) .pw-btn:not(.pw-btn-main) { border-color: var(--line-strong); }
.app:not(.tv) .btn-outline:hover:not(:disabled), .app:not(.tv) .pw-btn:not(.pw-btn-main):hover:not(:disabled) {
  border-color: var(--ink); }

/* -- Felder --------------------------------------------------------- */
.app:not(.tv) .field input[type=number], .app:not(.tv) .field input[type=text], .app:not(.tv) .field select,
.app:not(.tv) .set-control input[type=number], .app:not(.tv) .set-control input[type=text],
.app:not(.tv) .set-control select, .onboarding .login-form .field input,
.app:not(.tv) .fl-own select, .app:not(.tv) .fl-in input {
  border-color: var(--line-strong); border-radius: 8px; background-color: var(--bg-soft);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.app:not(.tv) .set-control input[type=number], .app:not(.tv) .set-control input[type=text],
.app:not(.tv) .set-control select, .app:not(.tv) .field input[type=number],
.app:not(.tv) .field input[type=text], .app:not(.tv) .field select { min-height: 40px; }
.app:not(.tv) .field input:focus, .app:not(.tv) .field select:focus,
.app:not(.tv) .set-control input:focus, .app:not(.tv) .set-control select:focus,
.onboarding .login-form .field input:focus, .app:not(.tv) .fl-own select:focus, .app:not(.tv) .fl-in input:focus {
  outline: 0; border-color: var(--accent); background-color: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-weak);
}
:root[data-theme="dark"] .app:not(.tv) select, :root[data-theme="dark"] .onboarding select { color-scheme: dark; }

/* -- Einstellungen -------------------------------------------------- */
.app:not(.tv) .set-grid { gap: 20px; }
.app:not(.tv) .set-col { gap: 20px; }
.app:not(.tv) .set-body { padding: 4px 22px; }
.app:not(.tv) .set-row { padding: 16px 0; }
.app:not(.tv) .set-row + .set-row { border-top-color: var(--line); }
.app:not(.tv) .set-foot { padding: 14px 22px; border-top-color: var(--line); }
.app:not(.tv) .set-title { letter-spacing: -.005em; }
.app:not(.tv) .segmented { padding: 3px; border-radius: 10px; background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--line); }
.app:not(.tv) .seg.on { box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 1px var(--line-strong); }
.app:not(.tv) .toggle, .onboarding .toggle { transition: background .2s ease; }
.app:not(.tv) .toggle::after, .onboarding .toggle::after { transition: transform .25s var(--ease-soft); }
.app:not(.tv) kbd { border-color: var(--line-strong); background: var(--bg-sunken); }

/* -- Offen ---------------------------------------------------------- */
.app:not(.tv) .fl-intro { margin: 0 0 24px; padding: 22px 24px; border-color: var(--glass-line);
  border-radius: var(--radius-card); background: var(--glass); box-shadow: var(--lift); color: var(--ink-soft); }
.app:not(.tv) .fl-intro-icon { border-color: var(--glass-line); border-radius: 6px; background: var(--bg-sunken); }
.app:not(.tv) .fl-card { gap: 12px; margin-bottom: 16px; padding: 18px 20px; }
.app:not(.tv) .fl-name { font-family: var(--head); font-size: 18px; letter-spacing: -.02em; }
.app:not(.tv) .fl-empty { padding: 64px 20px; gap: 10px; }
.app:not(.tv) .fl-empty b { font-family: var(--head); font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.app:not(.tv) .chip-copy, .app:not(.tv) .fl-val { border-radius: 7px; }
.app:not(.tv) .ex-tabs { padding: 0 22px; border-bottom-color: var(--line); }
.app:not(.tv) .ex-tab { transition: color .2s ease, border-color .2s ease; }
.app:not(.tv) tr.tk-head > td { background: var(--bg-soft); }

/* -- Research ------------------------------------------------------- */
.app:not(.tv) .swipe-card.perfect { border-color: var(--accent);
  box-shadow: var(--lift), 0 0 0 3px var(--accent-weak); }
.app:not(.tv) .swipe-head { padding: 18px 22px; border-bottom-color: var(--line); }
.app:not(.tv) .swipe-level { border-color: var(--line-strong); }
.app:not(.tv) .today-num { font-weight: 700; letter-spacing: -.04em; }

/* -- Menüs, Suche und Nachrichten: schwebendes Glas ----------------- */
.topbar .profile-menu, .topbar .inbox-menu, .app:not(.tv) .search-list {
  border: 1px solid var(--glass-line); border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--float);
  animation: sk-pop .22s var(--ease-soft) both; transform-origin: top right;
}
.app:not(.tv) .search-list { transform-origin: top left; top: calc(100% + 8px); padding: 4px 0; }
.topbar .profile-menu { width: 312px; padding: 8px; }
/* Eingeschaltet: der Knopf in der Farbe des Grundes, sonst verschwindet er im Dunkel. */
.topbar .pm-switch input:checked + .toggle::after { background: var(--on-ink); }
.topbar .pm-row { border-radius: 8px; padding: 4px 10px; transition: background .15s ease; }
.topbar .pm-head { padding: 8px 10px 12px; }
.topbar .pm-sep { margin: 6px 2px; background: var(--line); }
.app:not(.tv) .search-item { margin: 0 4px; border-radius: 8px; }
.topbar .ib-head { padding: 16px 18px 12px; border-bottom-color: var(--line); }
.topbar .ib-row { border-top-color: var(--line); transition: background .15s ease; }
@keyframes sk-pop { from { opacity: 0; transform: translateY(-4px) scale(.985); } }

/* -- Fenster: ruhig abgedunkelt, Karte schwebt ---------------------- */
.keyhelp { background: rgba(0, 0, 0, .42); animation: sk-fade .2s ease both; }
:root[data-theme="dark"] .keyhelp { background: rgba(0, 0, 0, .62); }
.keyhelp-card, .pw-card, .sym-card, .mini-card {
  border-color: var(--glass-line); border-radius: var(--radius-card); box-shadow: var(--float);
  animation: sk-rise .26s var(--ease-soft) both;
}
.keyhelp-head h3, .pw-head h3, .sym-head h3 { font-family: var(--head); letter-spacing: -.02em; }
@keyframes sk-fade { from { opacity: 0; } }
@keyframes sk-rise { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.toast { border: 1px solid var(--glass-line); box-shadow: var(--float); animation: sk-rise .25s var(--ease-soft) both; }

/* -- Auswahl der Märkte und Anmeldung ------------------------------- */
.onboarding {
  background: radial-gradient(ellipse 900px 480px at 0% 0%, rgba(var(--acc-glow), var(--glow-alpha)), transparent 70%) no-repeat, var(--bg);
}
.onboarding .lead { color: var(--grey); font-size: 16px; line-height: 1.6; }
.onboarding-head { margin-bottom: 44px; }
.onboarding-head .brand-mark { width: 44px; height: 44px; }
.markets { gap: 14px; }
.market {
  min-height: 140px; padding: 20px; box-shadow: var(--lift);
  transition: border-color .2s ease, background .2s ease, color .2s ease, opacity .2s ease, transform .25s var(--ease-soft);
}
.market.on { padding: 19px; }
.market:hover { opacity: 1; transform: translateY(-2px); }
.market:active { transform: scale(.985); }
.market-name { font-family: var(--head); font-weight: 650; letter-spacing: -.02em; }
.ob-search { border-color: var(--line-strong); background: var(--surface); box-shadow: var(--lift); }
.ob-search:focus-within { box-shadow: var(--lift), 0 0 0 3px var(--accent-weak); }
.ob-tab { transition: background .2s ease, border-color .2s ease, color .2s ease; }
.pick-in { border-radius: 10px; transition: background .15s ease, border-color .15s ease; }
.onboarding-foot {
  padding: 14px clamp(20px, 3vw, 44px); border-top-color: var(--line);
  background: var(--bg);
}
.plan { border-color: var(--glass-line); border-radius: var(--radius-card);
  background: var(--glass); box-shadow: var(--lift); transition: border-color .2s ease; }
.plan:hover:not(:disabled) { border-color: var(--glass-line-hover); }

/* -- Telefon -------------------------------------------------------- */
@media (max-width: 640px) {
  .topbar { height: 56px; padding: 0 12px; gap: 8px; }
  .topbar .search { flex: 1 1 auto; max-width: none; }
  .topbar .search input { padding-right: 12px; }
  .topbar .search-kbd,
  .topbar .search.has-sym input ~ .search-kbd { display: none; }
  .topbar .profile { margin-left: 6px; padding-left: 0; border-left: 0; }
  .app:not(.tv) .topbar .topnav { padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    border-radius: 0; box-shadow: none; background: var(--bg); }
  .app:not(.tv) .content { padding: 22px 16px calc(92px + env(safe-area-inset-bottom)); }
  .app:not(.tv) .topnav { border-top-color: var(--line); }
  .app:not(.tv) .topnav-item { border-radius: 10px; }
  .app:not(.tv) .topnav-item.on { box-shadow: none; }
  .app:not(.tv) .mk-h, .app:not(.tv) .page-head h2 { font-size: 24px; }
  .app:not(.tv) .mk-bigprice { font-size: 28px; }
  .app:not(.tv) .mk-tiles { gap: 12px; }
  .app:not(.tv) .card-body { padding: 16px 14px; }
  .app:not(.tv) .set-body { padding: 2px 16px; }
  .app:not(.tv) .fl-card { padding: 16px; }
  .topbar .profile-menu, .topbar .inbox-menu { transform-origin: top center; }
  .onboarding-head h1 { font-size: 28px; }
  .market { min-height: 0; padding: 16px; }
  .market.on { padding: 15px; }
  .onboarding-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .topbar .profile-menu, .topbar .inbox-menu, .app:not(.tv) .search-list,
  .keyhelp, .keyhelp-card, .pw-card, .sym-card, .mini-card, .toast { animation: none; }
  .market:hover, .app:not(.tv) .mk-tile:hover { transform: none; translate: none; }
}

/* -- Gastmodus (Vorgabe 2026-11-15) ---------------------------------
   Ohne Anmeldung: statt Glocke und Profil "Anmelden" und "Registrieren"
   rechts oben; Offen und Research tragen ein Schloss und zeigen eine
   Karte statt der Ansicht. Im Chart sagt ein kleiner Hinweis, dass
   fertige SK-Sequenzen unter 1w nur mit Konto stehen. */
.is-guest .topbar .inbox, .is-guest .topbar .profile { display: none; }
.guest-cta { display: flex; flex: none; align-items: center; gap: 8px; margin-left: auto; }
.guest-cta[hidden] { display: none; }
/* In jeder Ansicht gleich rund (sonst setzt ``.app:not(.tv) .btn`` 6 px). */
.topbar .guest-cta .btn { height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 600;
  white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.topbar .guest-cta .btn-ghost { border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink); }
.topbar .guest-cta .btn-ghost:hover { border-color: var(--line-strong); background: var(--bg-sunken); color: var(--ink); }
.nav-lock { display: inline-flex; margin-left: 6px; color: var(--grey); }
.nav-lock svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }

.guest-page { display: grid; place-items: center; min-height: 52vh; padding: 24px 0; }
.guest-card {
  width: min(460px, 100%); padding: 32px 30px; text-align: center;
  border: 1px solid var(--glass-line); border-radius: var(--radius-card);
  background: var(--glass); box-shadow: var(--lift);
}
.guest-lock-icon { display: inline-grid; place-items: center; width: 44px; height: 44px;
  margin-bottom: 14px; border-radius: 999px; background: var(--bg-sunken); color: var(--ink); }
.guest-lock-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.guest-card h2 { font-size: 21px; letter-spacing: -.02em; }
.guest-card p { margin: 10px auto 0; max-width: 36ch; color: var(--grey); font-size: 14.5px; line-height: 1.55; }
.guest-card-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.guest-page .guest-card-actions .btn { height: 40px; padding: 0 20px; border-radius: 999px; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center; }
.guest-card-actions .btn-ghost { border: 1px solid var(--line); }

.chart-frame { position: relative; }
.guest-hint {
  position: absolute; z-index: 6; top: 44px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 140px);
  padding: 7px 8px 7px 12px; border: 1px solid var(--glass-line); border-radius: 999px;
  background: var(--surface); box-shadow: var(--lift); color: var(--ink-soft);
  font-size: 12.5px; line-height: 1.35;
}
.guest-hint[hidden] { display: none; }
.guest-hint b { color: var(--ink); font-weight: 600; }
.guest-hint-icon { display: inline-flex; flex: none; color: var(--grey); }
.guest-hint-icon svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.guest-hint a { flex: none; padding: 4px 11px; border-radius: 999px; background: var(--ink); color: var(--on-ink);
  font-weight: 600; text-decoration: none; }
.guest-hint a:hover { background: var(--accent); }
.guest-hint-short { display: none; }

@media (max-width: 640px) {
  /* Schmal: die Suche braucht den Platz. "Anmelden" steht als Textknopf,
     "Registrieren" bleibt der helle Knopf. */
  .guest-cta { gap: 2px; }
  .topbar .guest-cta .btn { height: 32px; padding: 0 11px; font-size: 12.5px; }
  .topbar .guest-cta .btn-ghost { padding: 0 8px; border-color: transparent; background: transparent; }
  .is-guest .topbar .brand-name { display: none; }
  .is-guest .topbar .search { min-width: 0; }
  /* Im Ticker reicht das Zeichen des Titels; die Lupe weicht dem Kürzel. */
  .is-guest .topbar .search.has-sym .search-icon { display: none; }
  .is-guest .topbar .search.has-sym .search-sym { left: 10px; }
  .is-guest .topbar .search.has-sym input { padding-left: 38px; padding-right: 8px; }
  /* Unter der Legende, als schmale Leiste mit kurzem Text. */
  .guest-hint { top: 52px; max-width: calc(100% - 24px); width: max-content;
    padding: 6px 6px 6px 10px; border-radius: 12px; font-size: 12px; }
  .guest-hint-long { display: none; }
  .guest-hint-short { display: inline; }
  .guest-card { padding: 26px 20px; }
}
