/* Trench Journal: Glas ueber Landschaft. Helles und dunkles Glas je nach Hintergrund (body[data-tone]). */
:root {
  --ink: #0c1016;
  --ink-2: rgba(12, 16, 22, .64);
  --ink-3: rgba(12, 16, 22, .42);
  --line: rgba(12, 16, 22, .08);
  --glass: rgba(255, 255, 255, .52);
  --glass-2: rgba(255, 255, 255, .7);
  --glass-3: rgba(255, 255, 255, .86);
  --stroke: rgba(255, 255, 255, .65);
  --chip: rgba(12, 16, 22, .06);
  --up: #0a8f5f;
  --up-bg: rgba(10, 143, 95, .12);
  --down: #d93a3f;
  --down-bg: rgba(217, 58, 63, .1);
  --accent: #2448ff;
  --accent-bg: rgba(36, 72, 255, .1);
  --warm: #e0761b;
  --pill: #0c1016;
  --pill-ink: #fff;
  --shadow: 0 40px 90px -30px rgba(10, 20, 40, .45), 0 2px 0 rgba(255, 255, 255, .5) inset;
  --r: 22px;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}
body[data-tone="dark"] {
  --ink: #f4f6fb;
  --ink-2: rgba(244, 246, 251, .7);
  --ink-3: rgba(244, 246, 251, .45);
  --line: rgba(255, 255, 255, .09);
  --glass: rgba(14, 17, 25, .48);
  --glass-2: rgba(18, 22, 32, .62);
  --glass-3: rgba(22, 26, 38, .82);
  --stroke: rgba(255, 255, 255, .12);
  --chip: rgba(255, 255, 255, .08);
  --up: #3ddc97;
  --up-bg: rgba(61, 220, 151, .12);
  --down: #ff6b6b;
  --down-bg: rgba(255, 107, 107, .12);
  --accent: #8ea6ff;
  --accent-bg: rgba(142, 166, 255, .14);
  --pill: #f4f6fb;
  --pill-ink: #0c1016;
  --shadow: 0 40px 90px -30px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .08) inset;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans); color: var(--ink); background: #1b2333;
  -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.45; overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
svg { display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up { color: var(--up); } .down { color: var(--down); } .muted { color: var(--ink-3); }

/* ---------- Hintergrund ---------- */
.bg {
  position: fixed; inset: -2%; background-size: cover; background-position: center;
  transform: scale(1.04); filter: saturate(1.05); transition: opacity .9s ease, transform 1.6s cubic-bezier(.2, .7, .2, 1);
  animation: bgIn 1.6s cubic-bezier(.2, .7, .2, 1) both;
}
.bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(0, 0, 0, .25)); }
@keyframes bgIn { from { opacity: 0; transform: scale(1.12); filter: blur(12px); } }
.grain {
  position: fixed; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Fenster ---------- */
.shell {
  position: fixed; inset: 20px; display: grid; grid-template-columns: 232px 1fr; gap: 0;
  border-radius: 28px; overflow: hidden; background: var(--glass);
  backdrop-filter: blur(30px) saturate(170%); -webkit-backdrop-filter: blur(30px) saturate(170%);
  border: 1px solid var(--stroke); box-shadow: var(--shadow);
  animation: rise .9s .15s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.985); } }
@media (min-width: 1600px) { .shell { inset: 28px max(28px, calc((100vw - 1560px) / 2)); } }

.side { display: flex; flex-direction: column; padding: 22px 14px 14px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .06); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 26px; }
.brand .logo { width: 30px; height: 30px; fill: var(--ink); }
.brand b { font-family: var(--serif); font-weight: 400; font-size: 25px; letter-spacing: -.01em; display: block; line-height: .9; }
.brand span { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
nav { display: flex; flex-direction: column; gap: 3px; }
nav button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; color: var(--ink-2); font-weight: 500; transition: background .2s, color .2s; }
nav button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav button:hover { background: var(--chip); color: var(--ink); }
nav button.on { background: var(--glass-3); color: var(--ink); box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .35); }
.side-foot { margin-top: auto; }
.me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 14px; text-align: left; }
.me:hover { background: var(--chip); }
.me b { display: block; font-weight: 600; }
.me small { color: var(--ink-3); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 19px; background: var(--pill); color: var(--pill-ink); flex: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 26px; border-bottom: 1px solid var(--line); gap: 12px; }
.crumbs { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.crumbs span { font-weight: 600; font-size: 15px; }
.crumbs small { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { display: flex; align-items: center; gap: 8px; }
.sync { font-size: 12px; color: var(--ink-3); margin-right: 6px; display: flex; align-items: center; gap: 6px; }
.sync::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.sync.ok::before { background: var(--up); box-shadow: 0 0 0 4px var(--up-bg); }
.sync.bad::before { background: var(--down); }

.view { flex: 1; overflow-y: auto; padding: 26px 26px 60px; scroll-behavior: smooth; }
.view::-webkit-scrollbar { width: 10px; }
.view::-webkit-scrollbar-thumb { background: var(--chip); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------- Bausteine ---------- */
.pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13px; white-space: nowrap; transition: transform .15s, background .2s, opacity .2s; }
.pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill:active { transform: scale(.97); }
.pill.dark { background: var(--pill); color: var(--pill-ink); }
.pill.dark:hover { opacity: .88; }
.pill.ghost { background: var(--chip); }
.pill.ghost:hover { background: var(--glass-3); }
.pill.line { border: 1px solid var(--line); background: var(--glass-2); }
.pill.sm { height: 30px; padding: 0 11px; font-size: 12px; }
.pill.icon { width: 36px; padding: 0; justify-content: center; }
.pill:disabled { opacity: .4; cursor: default; }
.pill.up { background: var(--up-bg); color: var(--up); }
.pill.down { background: var(--down-bg); color: var(--down); }

.card {
  background: var(--glass-2); border: 1px solid var(--stroke); border-radius: var(--r); padding: 20px;
  box-shadow: 0 18px 40px -28px rgba(10, 20, 40, .5); position: relative; min-width: 0;
  animation: fadeUp .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms + 120ms);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.card h3 { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card h3 em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; }
.grid { display: grid; gap: 16px; }
.g12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }
@media (max-width: 1250px) { .s3 { grid-column: span 6; } .s4, .s5 { grid-column: span 6; } .s7, .s8 { grid-column: span 12; } .s4.keep { grid-column: span 4; } }
@media (max-width: 860px) { .g12 > * { grid-column: span 12 !important; } }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--chip); font-size: 11.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tag.hot { background: rgba(224, 118, 27, .14); color: var(--warm); }
.tag.new { background: var(--accent-bg); color: var(--accent); }
.tag.up { background: var(--up-bg); color: var(--up); }
.tag.down { background: var(--down-bg); color: var(--down); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ico { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--chip); flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink-2); overflow: hidden; }
.ico.lg { width: 52px; height: 52px; font-size: 18px; }
.ico.sm { width: 22px; height: 22px; font-size: 9px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty b { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--ink); margin-bottom: 6px; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.row + .row { border-top: 1px solid var(--line); }

/* ---------- Heute ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; animation: fadeUp .7s .1s both; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 64px); line-height: .98; letter-spacing: -.02em; margin: 0; max-width: 820px; }
.hero h1 i { color: var(--ink-2); }
.hero .lead { margin: 12px 0 0; color: var(--ink-2); font-size: 15px; max-width: 640px; }
.hero-r { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.fetch { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fetch .pill { height: 42px; padding: 0 18px; font-size: 13.5px; }
.fetch .pill svg { width: 17px; height: 17px; }
.fetch small { font-size: 12px; color: var(--ink-3); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .hero-r, .fetch { align-items: flex-start; } }
.days { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.days button { height: 32px; padding: 0 12px; border-radius: 999px; background: var(--chip); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.days button.on { background: var(--pill); color: var(--pill-ink); }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--up); }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--up-bg); } 70% { box-shadow: 0 0 0 9px transparent; } }

.meta-card { padding: 26px; overflow: hidden; }
.meta-card .kicker { font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.meta-card .name { font-family: var(--serif); font-size: clamp(34px, 3.6vw, 52px); line-height: 1; letter-spacing: -.015em; margin: 10px 0 12px; }
.meta-card p { color: var(--ink-2); font-size: 15px; margin: 0 0 18px; max-width: 620px; }
.meta-card .story-lead { color: var(--ink); font-size: 17px; line-height: 1.55; margin-bottom: 12px; max-width: 680px; }
.meta-card .glow { position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, var(--accent-bg), transparent 70%); pointer-events: none; }
.coinchips { display: flex; flex-wrap: wrap; gap: 8px; }
.coinchip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--glass-3); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.coinchip small { font-family: var(--mono); color: var(--ink-3); font-weight: 400; }

.ath-card .big { font-family: var(--mono); font-size: clamp(30px, 3vw, 42px); font-weight: 500; letter-spacing: -.04em; line-height: 1; margin: 14px 0 6px; }
.ath-card .who { display: flex; align-items: center; gap: 12px; }
.ath-card .who b { font-size: 18px; display: block; }
.ath-card .who small { color: var(--ink-3); }
.spark { width: 100%; height: 64px; margin-top: 14px; }

.stats4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { padding: 14px; border-radius: 16px; background: var(--chip); }
.stat b { font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -.03em; display: block; line-height: 1.1; }
.stat small { color: var(--ink-3); font-size: 12px; }

.story p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; }
.story .note { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.story .note span { color: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding-top: 2px; }

.narr { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.narr:first-of-type { border-top: 0; padding-top: 0; }
.narr .n { font-family: var(--mono); color: var(--ink-3); font-size: 12px; padding-top: 3px; }
.narr b { font-weight: 600; font-size: 15px; }
.narr p { margin: 3px 0 7px; color: var(--ink-2); font-size: 13px; }
.narr p.src, .meta-card .src { font-size: 12px; color: var(--ink-3); margin: -3px 0 8px; }
.meta-card .src { margin: 0; }
.narr .bar { height: 5px; border-radius: 5px; background: var(--chip); overflow: hidden; margin: 2px 0 8px; }
.narr .bar i { display: block; height: 100%; border-radius: 5px; background: var(--ink); opacity: .75; }
.narr .r { text-align: right; }
.narr .r b { font-family: var(--mono); font-weight: 500; font-size: 14px; display: block; }
.narr .r small { color: var(--ink-3); font-size: 11.5px; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px 10px; white-space: nowrap; }
.tbl td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl th.n, .tbl td.n { text-align: right; }
.tbl tr.click { cursor: pointer; transition: background .15s; }
.tbl tr.click:hover td { background: var(--chip); }
.tbl tr.click td:first-child { border-radius: 12px 0 0 12px; } .tbl tr.click td:last-child { border-radius: 0 12px 12px 0; }
.coin { display: flex; align-items: center; gap: 10px; min-width: 0; }
.coin b { display: block; font-weight: 600; }
.coin small { color: var(--ink-3); font-size: 12px; display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.rank { font-family: var(--mono); color: var(--ink-3); font-size: 12px; width: 18px; }
.xbadge { font-family: var(--mono); font-weight: 600; font-size: 13px; padding: 3px 8px; border-radius: 8px; background: var(--up-bg); color: var(--up); }
.mini { width: 96px; height: 30px; }
.tblwrap { overflow-x: auto; margin: 0 -10px; }
.links { display: flex; gap: 4px; }
.links a { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 4px 7px; border-radius: 7px; background: var(--chip); text-decoration: none; color: var(--ink-2); }
.links a:hover { background: var(--pill); color: var(--pill-ink); }
.star { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); }
.star svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.star.on { color: var(--warm); } .star.on svg { fill: currentColor; }

.hours { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.hours div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.hours i { width: 100%; border-radius: 5px 5px 2px 2px; background: var(--ink); opacity: .14; min-height: 3px; transition: opacity .2s; }
.hours i.hi { opacity: .85; }
.hours div:hover i { opacity: .6; }
.hours small { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); }

.lp-wrap { display: flex; align-items: center; gap: 20px; }
.donut { width: 132px; height: 132px; flex: none; }
.legend { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.legend div { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend small { color: var(--ink-3); font-family: var(--mono); font-size: 12px; }

/* ---------- Journal ---------- */
.mood { display: flex; align-items: center; gap: 18px; padding: 26px; flex-wrap: wrap; }
.mood h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 40px); margin: 0; line-height: 1; letter-spacing: -.015em; flex: 1 1 320px; }
.mood h2 i { color: var(--ink-2); }
.mood .tg { display: flex; gap: 6px; background: var(--chip); padding: 4px; border-radius: 999px; }
.mood .tg button { height: 34px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.mood .tg button.on.bull { background: var(--up); color: #fff; }
.mood .tg button.on.bear { background: var(--down); color: #fff; }
.mood textarea { flex: 1 1 100%; }

.trade { padding: 0; overflow: hidden; }
.trade .head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 18px 20px; }
.trade .head b { font-size: 16px; }
.trade .head small { display: block; color: var(--ink-3); font-size: 12.5px; }
.trade .pnl { text-align: right; }
.trade .pnl b { font-family: var(--mono); font-size: 20px; font-weight: 500; display: block; letter-spacing: -.03em; }
.trade .pnl small { font-family: var(--mono); }
.trade .body { padding: 0 20px 16px; }
.trade .why { font-size: 14px; color: var(--ink-2); margin: 10px 0 0; line-height: 1.55; }
.trade .why b { color: var(--ink); font-weight: 600; }
.trade .acts { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.trade .bar3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.trade .bar3 div { background: var(--glass-2); padding: 10px 14px; }
.trade .bar3 small { display: block; color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.trade .bar3 span { font-family: var(--mono); font-size: 13.5px; }
.trade.open { border-color: color-mix(in srgb, var(--accent) 35%, var(--stroke)); }
.alert { margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(224, 118, 27, .13); color: var(--warm); font-size: 13px; font-weight: 500; }
.daygroup { margin: 26px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.daygroup h4 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.daygroup span { font-family: var(--mono); font-size: 13px; }
.stack { display: grid; gap: 12px; }

.watch .w { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.watch .w:first-of-type { border-top: 0; }
.watch .w b { display: block; }
.watch .w small { color: var(--ink-3); font-size: 12px; }

/* ---------- Statistik ---------- */
.pnl-hero .big { font-family: var(--mono); font-size: clamp(40px, 5vw, 66px); font-weight: 500; letter-spacing: -.05em; line-height: 1; margin: 6px 0 8px; }
.pnl-hero .sub { color: var(--ink-2); display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 14px; border-radius: 16px; background: var(--chip); }
.kpi small { color: var(--ink-3); font-size: 12px; display: block; }
.kpi b { font-family: var(--mono); font-weight: 500; font-size: 22px; letter-spacing: -.03em; }
.curve { width: 100%; height: 220px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head b { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; padding: 0 4px 4px; }
.cal .d { aspect-ratio: 1.25; border-radius: 12px; background: var(--chip); padding: 7px 8px; display: flex; flex-direction: column; justify-content: space-between; position: relative; transition: transform .15s; min-width: 0; }
.cal .d.has { cursor: pointer; }
.cal .d.has:hover { transform: translateY(-2px); }
.cal .d.today { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal .d.out { opacity: .3; }
.cal .d small { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.cal .d b { font-family: var(--mono); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .d .dot { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; }
.cal .d.pos { background: color-mix(in srgb, var(--up) calc(var(--k) * 55% + 10%), transparent); }
.cal .d.neg { background: color-mix(in srgb, var(--down) calc(var(--k) * 55% + 10%), transparent); }
.cal .d.pos b, .cal .d.neg b { color: var(--ink); }
.breakdown .row b { font-family: var(--mono); font-weight: 500; }
.hbar { height: 6px; border-radius: 6px; background: var(--chip); overflow: hidden; margin-top: 5px; }
.hbar i { display: block; height: 100%; border-radius: 6px; }
.check { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.check:first-of-type { border-top: 0; }
.check .c { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); }
.check .c.ok { background: var(--up); }
.check .c svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check small { display: block; color: var(--ink-3); font-size: 12px; }
.verdict { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-weight: 600; font-size: 14px; }
.verdict.ok { background: var(--up-bg); color: var(--up); }
.verdict.no { background: var(--chip); color: var(--ink-2); }

/* ---------- Karten ---------- */
.cardstudio { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .cardstudio { grid-template-columns: 1fr; } }
.preview-wrap { display: grid; place-items: center; padding: 26px; border-radius: var(--r); background: var(--chip); }
.preview-wrap canvas { width: 100%; max-width: 440px; height: auto; border-radius: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55); }
.picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.picker button { aspect-ratio: 1.6; border-radius: 12px; background-size: cover; background-position: center; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s, transform .15s; }
.picker button:hover { transform: scale(1.04); }
.picker button.on { outline-color: var(--ink); }
.seg { display: flex; gap: 4px; background: var(--chip); padding: 4px; border-radius: 999px; }
.seg button { flex: 1; height: 32px; border-radius: 999px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.seg button.on { background: var(--glass-3); color: var(--ink); box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .4); }
.list-pick { max-height: 300px; overflow-y: auto; display: grid; gap: 4px; }
.list-pick button { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; text-align: left; }
.list-pick button:hover { background: var(--chip); }
.list-pick button.on { background: var(--glass-3); box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .4); }

/* ---------- Formulare + Modal ---------- */
label.l { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 7px; }
.in { width: 100%; height: 44px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--glass-3); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.in { height: auto; padding: 12px 14px; resize: vertical; min-height: 84px; line-height: 1.5; }
.in:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { height: 32px; padding: 0 13px; border-radius: 999px; background: var(--chip); font-size: 13px; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s; }
.chips button.on { background: var(--pill); color: var(--pill-ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(8, 12, 20, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s both; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 26px; padding: 26px;
  background: var(--glass-3); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(170%); -webkit-backdrop-filter: blur(30px) saturate(170%);
  animation: rise .4s cubic-bezier(.2, .8, .2, 1) both;
}
.sheet.wide { width: min(760px, 100%); }
.sheet h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0 0 4px; letter-spacing: -.015em; line-height: 1.05; }
.sheet .sub { color: var(--ink-3); margin: 0 0 6px; }
.sheet .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; }
.prev { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--chip); }
.prev .coin b { font-size: 16px; }
.prev .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.prev .grid4 div small { display: block; color: var(--ink-3); font-size: 11px; }
.prev .grid4 div span { font-family: var(--mono); font-size: 13px; }
.hint { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-bg); color: var(--accent); font-size: 13px; font-weight: 500; }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); opacity: 0; z-index: 60; padding: 12px 18px; border-radius: 999px; background: var(--pill); color: var(--pill-ink); font-weight: 600; font-size: 13.5px; transition: all .3s cubic-bezier(.2, .8, .2, 1); pointer-events: none; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--chip), var(--glass-3), var(--chip)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Handy ---------- */
@media (max-width: 860px) {
  body { overflow: auto; }
  /* keine Animation/Transform am Fenster, sonst haengt die fixe Leiste unten am Seitenende statt am Bildschirm */
  .shell { position: relative; inset: auto; min-height: 100vh; display: block; border-radius: 0; border: 0; margin: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; animation: none; }
  .side { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); padding: 6px; border-radius: 22px; border: 1px solid var(--stroke); background: var(--glass-3); backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); box-shadow: var(--shadow); }
  .brand, .side-foot { display: none; }
  nav { flex-direction: row; }
  nav button { flex: 1; flex-direction: column; gap: 3px; padding: 8px 4px; font-size: 11px; }
  .main { min-height: 100vh; }
  .top { position: sticky; top: 0; z-index: 30; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); background: var(--glass-2); backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); }
  .top .pill.dark span { display: none; }
  .top .pill.dark { width: 36px; padding: 0; justify-content: center; }
  .crumbs small { display: none; }
  .view { overflow: visible; padding: 18px 16px 120px; }
  .card { padding: 16px; }
  .trade .bar3 { grid-template-columns: repeat(2, 1fr); }
  .prev .grid4 { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: 1fr; }
  .lp-wrap { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
  .story .note { grid-template-columns: 1fr; gap: 4px; }
  .modal { align-items: end; padding: 0; }
  .sheet { border-radius: 26px 26px 0 0; max-height: 92vh; padding-bottom: max(26px, env(safe-area-inset-bottom)); }
}
/* Grosse Zahlen in der Grotesk mit festen Ziffernbreiten (Mono-Kommas sind bei grossen Betraegen zu breit) */
.num, .ath-card .big, .stat b, .kpi b, .trade .pnl b, .pnl-hero .big { font-family: var(--sans); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.tbl .tags { flex-wrap: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
