/* Smart Money Social · CI
   Tinte + Limette auf Lavendel. Fünf Modellfarben. Bricolage Grotesque für Aussagen, Onest für Text. */
:root {
  color-scheme: light;
  /* Flächen */
  --bg: #F3F1FA; --bg-2: #EAE6F6; --surface: #FFFFFF; --surface-2: #F9F8FD; --sunken: #EFECF8; --line: #E6E2F1; --line-2: #D7D1E8;
  /* Schrift */
  --ink: #15121F; --ink-2: #3D3852; --muted: #6C6782; --faint: #9D98B2; --on-ink: #FFFFFF;
  /* Abzeichen (klein) und dunkle Flächen (groß): in beiden Designs gut lesbar */
  --pop: #15121F; --pop-ink: #C8F445; --panel: #15121F; --panel-ink: #FFFFFF;
  /* Hausfarbe Limette */
  --lime: #C8F445; --lime-2: #B6E72E; --lime-ink: #1A2400; --lime-deep: #4C6800; --lime-wash: #F0FBCB;
  /* Fünf Modelle */
  --core: #2E6BFF; --core-wash: #E4ECFF; --core-ink: #173FA8;
  --signal: #F2A100; --signal-wash: #FFF2D2; --signal-ink: #7C5000;
  --deep: #7B4DFF; --deep-wash: #EDE6FF; --deep-ink: #4320B0;
  --smart: #00B5A3; --smart-wash: #D6F6F1; --smart-ink: #00594F;
  --stock: #FF6A2B; --stock-wash: #FFE8DC; --stock-ink: #93330A;
  /* Bedeutung */
  --up: #0A9A61; --up-wash: #DFF7EB; --down: #E23A53; --down-wash: #FFE4E8; --pink: #FF4D8F; --pink-wash: #FFE3EE;
  /* Form */
  --r-xl: 30px; --r-l: 22px; --r-m: 16px; --r-s: 11px;
  --shadow-1: 0 1px 2px rgba(21, 18, 31, .04), 0 10px 28px -14px rgba(60, 40, 130, .16);
  --shadow-2: 0 2px 6px rgba(21, 18, 31, .06), 0 28px 56px -22px rgba(60, 40, 130, .34);
  --display: 'Bricolage Grotesque', 'Onest', system-ui, sans-serif;
  --text: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --rail: 256px; --side: 332px; --tabbar: 68px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0D0B14; --bg-2: #131020; --surface: #17141F; --surface-2: #1C1826; --sunken: #231E30; --line: #2A2539; --line-2: #3B3452;
  --ink: #F5F3FB; --ink-2: #D9D4E9; --muted: #A49FBA; --faint: #77718D; --on-ink: #15121F;
  --pop: #C8F445; --pop-ink: #1A2400; --panel: #262036; --panel-ink: #F5F3FB;
  --lime-wash: rgba(200, 244, 69, .13); --lime-deep: #C8F445;
  --core: #6E98FF; --core-wash: rgba(110, 152, 255, .16); --core-ink: #BCCEFF;
  --signal: #FFC043; --signal-wash: rgba(255, 192, 67, .15); --signal-ink: #FFDE9C;
  --deep: #A78BFF; --deep-wash: rgba(167, 139, 255, .17); --deep-ink: #D5C8FF;
  --smart: #2FD9C5; --smart-wash: rgba(47, 217, 197, .14); --smart-ink: #A6F2E9;
  --stock: #FF8B58; --stock-wash: rgba(255, 139, 88, .16); --stock-ink: #FFCBB3;
  --up: #3DDC97; --up-wash: rgba(61, 220, 151, .14); --down: #FF6B81; --down-wash: rgba(255, 107, 129, .15); --pink-wash: rgba(255, 77, 143, .16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -14px rgba(0, 0, 0, .7);
  --shadow-2: 0 28px 56px -22px rgba(0, 0, 0, .9);
}
.m-core { --m: var(--core); --m-wash: var(--core-wash); --m-ink: var(--core-ink); }
.m-signal { --m: var(--signal); --m-wash: var(--signal-wash); --m-ink: var(--signal-ink); }
.m-deep { --m: var(--deep); --m-wash: var(--deep-wash); --m-ink: var(--deep-ink); }
.m-smart { --m: var(--smart); --m-wash: var(--smart-wash); --m-ink: var(--smart-ink); }
.m-stock { --m: var(--stock); --m-wash: var(--stock-wash); --m-ink: var(--stock-ink); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 500 15.5px/1.55 var(--text); font-feature-settings: 'ss01', 'cv11'; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before { /* weiches Licht oben, damit die Fläche nicht tot wirkt */
  content: ''; position: fixed; inset: 0 0 auto 0; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 100% at 12% 0%, color-mix(in srgb, var(--lime) 22%, transparent), transparent 70%), radial-gradient(50% 90% at 92% 0%, color-mix(in srgb, var(--deep) 16%, transparent), transparent 72%);
  opacity: .9;
}
:root[data-theme='dark'] body::before { opacity: .42; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; margin: 0; font-variation-settings: 'opsz' 60; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
img, svg, canvas { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--lime); color: var(--lime-ink); }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); } .dim { color: var(--muted); }
.ic { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill { fill: currentColor; stroke: none; }

/* Marker: die Limette als Textmarker hinter dem wichtigsten Wort */
.mark { position: relative; display: inline-block; z-index: 0; padding: 0 .12em; margin: 0 -.06em; color: var(--lime-ink); white-space: nowrap; }
.mark::before { content: ''; position: absolute; inset: .12em -.04em .04em; z-index: -1; background: var(--lime); border-radius: .22em; transform: rotate(-1.4deg); transform-origin: left center; }
.mark.draw::before { animation: mark-in .7s .25s var(--ease) both; }
@keyframes mark-in { from { transform: rotate(-1.4deg) scaleX(0); } to { transform: rotate(-1.4deg) scaleX(1); } }

/* ───────────── Knöpfe ───────────── */
.btn {
  --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px; white-space: nowrap; background: var(--sunken); color: var(--ink);
  transition: transform .18s var(--spring), box-shadow .2s, background .2s, color .2s, opacity .2s; user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.96); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.sm { --h: 34px; padding: 0 14px; font-size: 13.5px; gap: 6px; }
.btn.lg { --h: 54px; padding: 0 28px; font-size: 17px; }
.btn.block { width: 100%; }
.btn-lime { background: var(--lime); color: var(--lime-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 8px 20px -10px color-mix(in srgb, var(--lime-2) 90%, #000); }
.btn-lime:hover { background: var(--lime-2); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 14px 26px -12px color-mix(in srgb, var(--lime-2) 90%, #000); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--ink) 60%, transparent); }
.btn-line { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn-model { background: var(--m); color: #fff; }
:root[data-theme='dark'] .btn-model { color: #12101A; }
.btn.is-on { background: var(--sunken); color: var(--ink); box-shadow: none; }
.btn-icon { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px; color: var(--muted); transition: background .2s, color .2s, transform .18s var(--spring); }
.btn-icon:hover { background: var(--sunken); color: var(--ink); }
.btn-icon:active { transform: scale(.9); }
.link { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--lime-2); text-decoration-thickness: 2.5px; text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--ink); }

/* ───────────── Kleine Bausteine ───────────── */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 650; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.chip .ic { width: 15px; height: 15px; }
.chip.m { background: var(--m-wash); color: var(--m-ink); }
.chip.up { background: var(--up-wash); color: var(--up); } .chip.down { background: var(--down-wash); color: var(--down); }
.chip.lime { background: var(--lime); color: var(--lime-ink); }
.chip.line { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
button.chip, a.chip { transition: background .2s, box-shadow .2s, transform .18s var(--spring); }
button.chip:hover, a.chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
button.chip:active, a.chip:active { transform: scale(.95); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.chip.m[aria-pressed='true'] { background: var(--m); color: #fff; }
:root[data-theme='dark'] .chip.m[aria-pressed='true'] { color: #12101A; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--m, var(--faint)); flex: none; }
.tag-pro { display: inline-flex; align-items: center; gap: 3px; height: 19px; padding: 0 7px 0 5px; border-radius: 6px; background: var(--pop); color: var(--pop-ink); font: 800 10.5px/1 var(--text); letter-spacing: .04em; vertical-align: 2px; }
.tag-pro .ic { width: 10px; height: 10px; fill: var(--pop-ink); stroke: none; }
.tag-team { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 6px; background: var(--lime); color: var(--lime-ink); font: 800 10.5px/1 var(--text); letter-spacing: .03em; vertical-align: 2px; }
.tag-demo { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 6px; background: var(--sunken); color: var(--muted); font: 700 10.5px/1 var(--text); vertical-align: 2px; }

/* Avatare: Mitglieder rund mit Verlauf, Modelle als farbige Kachel, Coins als Münze */
.av { --s: 44px; --h: 250; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; color: #fff;
  font: 800 calc(var(--s) * .38)/1 var(--display); letter-spacing: -.02em; text-transform: uppercase;
  background: linear-gradient(140deg, hsl(var(--h) 88% 64%), hsl(calc(var(--h) + 48) 92% 52%)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22); user-select: none; }
.av.emoji { font-size: calc(var(--s) * .52); text-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.av.s { --s: 30px; } .av.m { --s: 38px; } .av.l { --s: 56px; } .av.xl { --s: 104px; }
.mav { --s: 44px; width: var(--s); height: var(--s); border-radius: 32%; flex: none; display: grid; place-items: center; background: var(--m); color: #fff; box-shadow: 0 6px 14px -8px var(--m), inset 0 1px 0 rgba(255, 255, 255, .28); }
.mav svg { width: 54%; height: 54%; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme='dark'] .mav { color: #12101A; }
.mav.s { --s: 30px; } .mav.m { --s: 38px; } .mav.l { --s: 56px; } .mav.xl { --s: 72px; }
.coin { --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; object-fit: cover; background: var(--sunken); display: grid; place-items: center; overflow: hidden;
  font: 800 calc(var(--s) * .34)/1 var(--display); color: var(--ink-2); letter-spacing: -.02em; box-shadow: inset 0 0 0 1px var(--line); }
.coin.s { --s: 26px; } .coin.m { --s: 34px; } .coin.l { --s: 52px; } .coin.xl { --s: 76px; }
img.coin { box-shadow: none; }
.coin.stock { border-radius: 26%; background: #fff; padding: calc(var(--s) * .15); object-fit: contain; box-shadow: inset 0 0 0 1px var(--line); }

/* Karten und Listen */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.pad { padding: 20px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-s { font: 800 19px/1.2 var(--display); letter-spacing: -.02em; }
.label { font-size: 13px; font-weight: 650; color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
hr.sep { border: 0; height: 1px; background: var(--line); margin: 0; }

/* Felder */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.input, .textarea { width: 100%; background: var(--sunken); border: 1.5px solid transparent; border-radius: var(--r-s); padding: 12px 14px; outline: none; transition: border-color .2s, background .2s; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus { border-color: var(--ink); background: var(--surface); }
.textarea { resize: none; min-height: 96px; line-height: 1.5; }
.hint { font-size: 13px; color: var(--muted); }
.error { font-size: 13.5px; font-weight: 650; color: var(--down); }

/* Umschalter mit gleitender Pille */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; background: var(--sunken); border-radius: 999px; isolation: isolate; }
.seg > button, .seg > a { position: relative; z-index: 1; height: 38px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--muted); display: grid; place-items: center; transition: color .25s; white-space: nowrap; }
.seg > [aria-selected='true'] { color: var(--on-ink); }
.seg > .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 3)); background: var(--ink); border-radius: 999px; transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .38s var(--ease); pointer-events: none; }

/* Laden */
.skel { border-radius: 10px; background: linear-gradient(100deg, var(--sunken) 30%, var(--surface-2) 50%, var(--sunken) 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; color: transparent !important; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--ink); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* Leerzustand */
.empty { text-align: center; padding: 48px 24px; display: grid; gap: 10px; justify-items: center; color: var(--muted); }
.empty .bubble { width: 72px; height: 72px; border-radius: 28%; background: var(--lime-wash); color: var(--lime-deep); display: grid; place-items: center; transform: rotate(-6deg); }
.empty .bubble .ic { width: 32px; height: 32px; }
.empty b { font: 800 20px/1.2 var(--display); color: var(--ink); letter-spacing: -.02em; }
.empty p { max-width: 38ch; }

/* Schloss für Pro-Inhalte */
.lock { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-m); background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--sunken) 10px 20px); border: 1.5px dashed var(--line-2); }
.lock .lock-ic { width: 42px; height: 42px; border-radius: 14px; background: var(--pop); color: var(--pop-ink); display: grid; place-items: center; flex: none; }
.lock b { display: block; font-weight: 750; }
.lock span { font-size: 13.5px; color: var(--muted); }
.lock .btn { margin-left: auto; flex: none; }
.veil { filter: blur(7px); user-select: none; pointer-events: none; opacity: .7; }

/* Hinweis-Leiste, Toast, Dialog */
.toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--panel); color: var(--panel-ink); padding: 12px 18px; border-radius: 999px; font-weight: 650; font-size: 14.5px; box-shadow: var(--shadow-2); display: flex; align-items: center; gap: 10px; animation: toast-in .4s var(--spring) both; max-width: min(92vw, 480px); }
.toast.out { animation: toast-out .25s ease-in both; }
.toast .ic { color: var(--lime); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }
.overlay { position: fixed; inset: 0; z-index: 80; background: color-mix(in srgb, #0B0912 55%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; animation: fade .2s both; overflow-y: auto; }
.dialog { width: min(560px, 100%); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-2); animation: pop-in .35s var(--spring) both; position: relative; max-height: calc(100vh - 40px); overflow-y: auto; }
.dialog.wide { width: min(760px, 100%); }
.dialog-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 0; }
.dialog-head h2 { font-size: 24px; flex: 1; }
.dialog-body { padding: 18px 22px 22px; display: grid; gap: 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@media (max-width: 640px) {
  .overlay { align-items: end; padding: 0; }
  .dialog, .dialog.wide { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92vh; animation: sheet-in .35s var(--ease) both; padding-bottom: env(safe-area-inset-bottom); }
  @keyframes sheet-in { from { transform: translateY(100%); } }
}
.menu { position: absolute; z-index: 60; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 6px; animation: pop-in .2s var(--ease) both; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14.5px; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--sunken); }
.menu .danger { color: var(--down); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.lock .grow { flex: 1 1 180px; }
@media (max-width: 560px) { .lock { flex-wrap: wrap; } .lock .btn { margin-left: 0; width: 100%; } }
