/* =========================================================
   Lucky Group – "Washi"-Stil: Papier, Serifen, Rosé, Blüten
   ========================================================= */
:root {
  --bg: #090506;
  --bg-2: #120809;
  --panel: rgba(30, 14, 17, .62);
  --panel-solid: #140a0c;
  --panel-hover: rgba(44, 18, 22, .82);
  --border: #2f1c20;
  --line: #3d252a;
  --text: #f4ece6;
  --ink-soft: #cdbfb8;
  --muted: #94837e;
  --dim: #64534f;
  --accent: #d93a54;
  --accent-hi: #f05a72;
  --accent-deep: #8e1f33;
  --accent-grad: linear-gradient(135deg, #e04a62 0%, #9c2538 100%);
  --rose: #c9566b;
  --rose-soft: rgba(217, 58, 84, .18);
  --espresso: #8e1f33;
  --espresso-hi: #a8263d;
  --gold: #c9a666;
  --gold-grad: linear-gradient(135deg, #e3c584 0%, #a07a2f 100%);
  --green: #74b388;
  --red: #e0525e;
  --discord: #5865f2;
  --radius: 6px;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --serif: 'Cormorant Garamond', 'EB Garamond', Garamond, Georgia, serif;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 24px 50px -30px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1100px 650px at 85% -12%, rgba(176, 22, 44, .38), transparent 62%),
    radial-gradient(900px 600px at -12% 108%, rgba(120, 12, 28, .32), transparent 60%),
    radial-gradient(700px 400px at 50% 50%, rgba(60, 6, 14, .25), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* feines Papierkorn */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  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='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
.inline { display: inline; margin: 0; }
.muted { color: var(--muted); }
::selection { background: var(--rose-soft); color: #f3a3b0; }

/* ---------- Deko: Spirale, Linien, Blüten, Motto ---------- */
.deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.deco .spiral { position: absolute; left: -6vw; top: 6vh; width: min(1100px, 95vw); height: auto; color: #6a2430; opacity: .55; }
.deco .vline { position: absolute; top: 0; bottom: 0; width: 1px; background: linear-gradient(transparent, #2e1a1e 20%, #2e1a1e 80%, transparent); }
.deco .hline { position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, #2e1a1e 20%, #2e1a1e 80%, transparent); }
.deco .motto {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl;
  font-family: var(--display); font-size: 11px; letter-spacing: .6em; color: #5e3d43;
}
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.petal {
  position: absolute; top: -40px; width: 12px; height: 9px; border-radius: 120% 0 120% 0;
  background: linear-gradient(135deg, #ff9aab 0%, #d93a54 60%, #8e1f33 100%); opacity: .75;
  animation: fall linear infinite, sway ease-in-out infinite alternate;
}
@keyframes fall { to { transform: translate3d(var(--drift, -80px), 110vh, 0) rotate(var(--spin, 540deg)); } }
@keyframes sway { from { margin-left: -14px; } to { margin-left: 14px; } }
.petals.still .petal { animation: none; }

/* ---------- Typo & Marke ---------- */
.brand {
  font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .32em; color: var(--text); text-transform: uppercase;
}
.brand-logo { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo img { width: 30px; height: 30px; }
.link-btn {
  background: none; border: 0; color: var(--ink-soft); font-family: var(--serif); font-style: italic; font-size: 15px;
  letter-spacing: .04em; cursor: var(--cur-hand, pointer); padding: 0; margin-left: 26px; transition: color .2s;
}
.link-btn:hover { color: var(--accent); }
.grad-text { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--accent); text-transform: none; letter-spacing: 0; }
.eyebrow { font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .3em; color: var(--accent); margin-bottom: 10px; }
.section-label {
  display: flex; align-items: center; gap: 14px; font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .32em;
  text-transform: uppercase; color: var(--muted); margin: 44px 0 16px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

/* ---------- Tags ---------- */
.tag { font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .26em; margin-bottom: 4px; }
.tag-all { color: var(--muted); }
.tag-level { color: var(--accent); }
.tag-lifetime { color: var(--gold); }
.now { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--rose-soft); color: var(--accent); font-size: 8.5px; letter-spacing: .2em; vertical-align: 1px; }

/* ---------- Seitenrahmen ---------- */
.dash { max-width: 920px; margin: 0 auto; padding: 30px 20px 100px; }
.dash.wide { max-width: 1140px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 56px; }
.welcome {
  font-family: var(--display); font-weight: 500; font-size: clamp(32px, 6vw, 58px); line-height: 1.05;
  letter-spacing: .02em; margin: 0 0 14px; color: var(--text);
}
.welcome .grad-text { font-size: .82em; }
.lead { color: var(--ink-soft); font-size: 19px; margin: 0 0 40px; max-width: 640px; }

/* ---------- Karten ---------- */
.cards { display: flex; flex-direction: column; gap: 14px; }
.card {
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: var(--panel); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px 24px; box-shadow: var(--shadow);
  transition: background .25s, border-color .25s, transform .25s, box-shadow .25s;
  animation: rise .6s ease both; animation-delay: calc(var(--i, 0) * 60ms);
}
a.card:hover { background: var(--panel-hover); border-color: rgba(217,58,84,.45); transform: translateY(-2px); box-shadow: 0 22px 46px -30px rgba(184,50,74,.45); }
.card .chev { color: var(--dim); transition: transform .25s, color .25s; }
a.card:hover .chev { color: var(--accent); transform: translateX(3px); }
.card.current { border-color: rgba(217,58,84,.45); }
.card.current::before { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 2px; background: var(--accent); }
.card-title { font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: .03em; }
.card-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; font-style: italic; white-space: nowrap; }
.card.complete .card-meta span { color: var(--green); }
.card-progress { position: absolute; left: 26px; right: 26px; bottom: 0; height: 2px; background: #2c1a1e; }
.card-progress span { display: block; height: 100%; background: var(--accent); transition: width .8s ease; }
.card.complete .card-progress span { background: var(--green); }
.card.locked { opacity: .55; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card, .hero, .cert-card { animation: none !important; } }

.next-hint {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding: 16px 20px;
  border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 16px; font-style: italic;
}
.next-hint .lock { color: var(--gold); flex-shrink: 0; }
.next-hint span { flex: 1; min-width: 200px; }
.next-hint a { color: var(--accent); font-style: normal; font-family: var(--display); font-size: 11px; letter-spacing: .2em; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  padding: 34px 36px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(36,16,19,.85), rgba(255,255,255,.04)); box-shadow: var(--shadow);
  animation: rise .6s ease both;
}
.hero::after {
  content: ''; position: absolute; right: -40px; bottom: -70px; width: 260px; height: 260px; opacity: .07; pointer-events: none;
  background: url(/static/logo.svg) center / contain no-repeat; transform: rotate(14deg);
}
.hero-main h2 { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 3.4vw, 30px); letter-spacing: .02em; margin: 0 0 4px; }
.hero-main p { color: var(--muted); font-style: italic; font-size: 18px; margin: 0 0 24px; }
.btn-lg { padding: 14px 26px; }
.hero-stats { display: flex; align-items: center; gap: 28px; }
.ring {
  --p: 0; width: 124px; height: 124px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #2c1a1e 0);
}
.ring-inner { width: 112px; height: 112px; border-radius: 50%; background: var(--panel-solid); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-inner strong { font-family: var(--display); font-weight: 500; font-size: 26px; line-height: 1; }
.ring-inner small { font-family: var(--display); font-size: 8.5px; color: var(--muted); letter-spacing: .25em; margin-top: 6px; text-transform: uppercase; }
.stat-list { display: flex; flex-direction: column; gap: 14px; min-width: 140px; }
.stat-label { display: block; font-family: var(--display); font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.stat strong { font-family: var(--display); font-weight: 500; font-size: 22px; }
.stat strong small { font-size: 13px; color: var(--muted); }
a.stat { display: block; }
a.stat:hover strong { color: var(--accent); }
.level-steps { display: flex; gap: 3px; margin-top: 7px; }
.level-steps i { flex: 1; height: 3px; min-width: 9px; background: #2c1a1e; }
.level-steps i.past { background: var(--rose); }
.level-steps i.now { background: var(--accent); }

/* ---------- Knöpfe ---------- */
.btn-primary, .btn-ghost, .btn-small {
  display: inline-flex; align-items: center; gap: 10px; border-radius: 4px; padding: 12px 20px; cursor: var(--cur-hand, pointer);
  font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn-primary { background: var(--espresso); color: #f7ece8; box-shadow: 0 10px 24px -14px rgba(0,0,0,.7); }
.btn-primary:hover { background: var(--espresso-hi); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-ghost { border-color: var(--line); color: var(--ink-soft); background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: var(--rose); color: var(--accent); }
.btn-small { padding: 8px 14px; font-size: 10px; background: #1c1012; color: var(--ink-soft); border-color: var(--line); }
.btn-small:hover { border-color: var(--rose); color: var(--accent); }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--display); font-size: 10px; font-style: normal; letter-spacing: 0; text-align: center; line-height: 18px; vertical-align: 1px; }

/* ---------- Login ---------- */
.login-page .deco .spiral { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1300px, 140vw); opacity: .7; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.login-hero { text-align: center; max-width: 760px; animation: rise .8s ease both; }
.login-hero .brand-logo { justify-content: center; margin-bottom: 40px; }
.login-title {
  font-family: var(--display); font-weight: 400; font-size: clamp(46px, 11vw, 112px); line-height: 1; letter-spacing: .02em; margin: 0;
}
.login-title span { color: #6f5c5a; }
.login-sub { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: clamp(20px, 3.5vw, 30px); margin: 14px 0 22px; }
.login-text { color: var(--ink-soft); font-size: 19px; max-width: 520px; margin: 0 auto 34px; }
.btn-discord {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--espresso); color: #f7ece8; font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase;
  padding: 16px 28px; border-radius: 4px; box-shadow: 0 16px 34px -18px rgba(0,0,0,.75); transition: background .2s, transform .2s;
}
.btn-discord svg { color: #fff; }
.btn-discord:hover { background: var(--espresso-hi); transform: translateY(-1px); }
.btn-discord.disabled { opacity: .5; }
.dev-link { display: block; margin-top: 18px; font-size: 15px; font-style: italic; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.fine { font-size: 14px; font-style: italic; color: var(--dim); margin: 26px 0 0; }
.alert { display: inline-block; background: rgba(217,58,84,.12); border: 1px solid rgba(217,58,84,.4); color: #f3a3b0; border-radius: 4px; padding: 10px 16px; font-size: 16px; margin-bottom: 22px; }
/* einfache Meldungs-Karte (Fehlerseiten) */
.login-card {
  width: 100%; max-width: 460px; text-align: center; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 44px 34px; box-shadow: var(--shadow); animation: rise .5s ease both;
}
.login-card h1 { font-family: var(--display); font-weight: 500; font-size: 28px; margin: 18px 0 8px; }
.login-card .muted { margin: 0 0 26px; font-style: italic; }
.login-logo { display: block; margin: 0 auto 14px; }

/* ---------- App-Layout (Lektion) ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 272px; flex-shrink: 0; border-right: 1px solid var(--border); padding: 24px 14px 40px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: rgba(12,6,7,.86); backdrop-filter: blur(8px);
}
.side-brand { display: flex; padding: 0 8px 28px; font-size: 11px; }
.side-brand img { width: 24px; height: 24px; }
.side-sec { margin-bottom: 4px; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 8px; border-radius: 4px; }
a.side-head:hover, button.side-head:hover { background: rgba(255,255,255,.04); }
button.side-head { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: var(--cur-hand, pointer); }
button.side-head:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
.side-sec:not(.open) > .side-lessons { display: none; }
/* Sektions-Übersicht */
.section-ov .eyebrow { margin-bottom: 8px; }
.ov-progress { display: flex; align-items: center; gap: 14px; margin: 18px 0 20px; color: var(--muted); font-size: 16px; }
.ov-bar { flex: 1; max-width: 340px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ov-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent-hi)); border-radius: 4px; }
.ov-continue { margin-bottom: 26px; max-width: 100%; }
.ov-complete { color: var(--green); font-size: 18px; margin: 0 0 22px; }
.ov-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ov-row, .ov-hw { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); transition: border-color .2s, background .2s, transform .2s; }
.ov-row:hover, .ov-hw:hover { border-color: rgba(217,58,84,.5); background: rgba(217,58,84,.06); transform: translateX(2px); }
.ov-row.is-next { border-color: rgba(217,58,84,.55); box-shadow: inset 3px 0 0 var(--accent); }
.ov-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--line); font-family: var(--display); font-size: 13px; color: var(--ink-soft); }
.ov-row.is-done .ov-num { background: rgba(116,179,136,.15); border-color: rgba(116,179,136,.45); color: #a5d8b4; }
.ov-row.is-next .ov-num { background: var(--accent-deep); border-color: var(--accent); color: #fff; }
.ov-text { flex: 1; min-width: 0; }
.ov-text strong { display: block; font-weight: 600; font-size: 17px; line-height: 1.3; }
.ov-text small { display: block; color: var(--muted); font-size: 15px; font-style: italic; }
.ov-row.is-done .ov-text strong { color: var(--ink-soft); }
.ov-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ov-meta em { font-family: var(--display); font-style: normal; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-hi); }
.ov-play { color: var(--accent); font-size: 12px; }
.ov-soon { color: var(--dim); font-size: 13px; font-style: italic; }
.ov-hw { margin-top: 16px; border-color: rgba(201,166,102,.35); }
.ov-hw .ov-num { color: var(--gold); border-color: rgba(201,166,102,.45); }
.pill-mini { font-family: var(--display); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill-mini.pending { color: #e6c88e; border-color: rgba(201,166,102,.4); }
.pill-mini.approved { color: #a5d8b4; border-color: rgba(116,179,136,.45); }
.pill-mini.rejected { color: var(--accent-hi); border-color: rgba(217,58,84,.45); }
@media (max-width: 560px) {
  .ov-row, .ov-hw { padding: 12px; gap: 11px; }
  .ov-meta em { display: none; }
  .ov-progress { flex-wrap: wrap; gap: 8px; }
  .ov-bar { flex-basis: 100%; max-width: none; }
}
.side-lessons a.ov-link { padding-left: 34px; font-style: italic; color: var(--muted); }
.side-head .tag { font-size: 8.5px; margin-bottom: 2px; }
.side-title { font-family: var(--display); font-size: 13px; font-weight: 500; line-height: 1.3; letter-spacing: .02em; }
.side-head .chev { color: var(--dim); flex-shrink: 0; transition: transform .2s; }
.side-sec.open .side-head .chev { transform: rotate(90deg); color: var(--accent); }
.side-prog { height: 2px; background: #2c1a1e; margin-top: 7px; overflow: hidden; width: 120px; }
.side-prog span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.side-lessons { list-style: none; margin: 4px 0 10px 8px; padding: 0 0 0 8px; border-left: 1px solid var(--line); }
.side-lessons a { display: flex; align-items: flex-start; gap: 9px; padding: 6px 10px; border-radius: 4px; font-size: 16px; line-height: 1.3; color: var(--ink-soft); transition: color .2s, background .2s; }
.side-lessons a:hover { color: var(--accent); background: rgba(255,255,255,.04); }
.side-lessons a.active { color: var(--accent); background: #1c1012; box-shadow: inset 2px 0 0 var(--accent); }
.side-lessons a.done { color: var(--muted); }
.side-lessons a.hw-link { color: var(--gold); padding-left: 34px; font-style: italic; }
.side-cert { display: block; margin: 22px 8px 0; padding: 11px 14px; border: 1px solid rgba(201,166,102,.35); border-radius: 4px; color: var(--gold); font-family: var(--display); font-size: 10.5px; letter-spacing: .2em; background: rgba(255,255,255,.03); }
.side-cert:hover { border-color: var(--gold); }
.side-cert + .side-cert { margin-top: 8px; }
.ck {
  flex-shrink: 0; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; border: 1px solid #5c4549;
  display: grid; place-items: center; transition: background .2s, border-color .2s;
}
.done .ck, .is-done .ck { background: var(--green); border-color: var(--green); }
.done .ck::after, .is-done .ck::after { content: ''; width: 3px; height: 6px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translate(-.5px, -1px); }

.main { flex: 1; min-width: 0; padding: 28px 44px 100px; }
.main-top { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.back { font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .26em; color: var(--muted); transition: color .2s; }
.back:hover { color: var(--accent); }
.user-chip { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 16px; font-style: italic; color: var(--muted); }
.user-chip img { border-radius: 50%; }
.user-chip .link-btn { margin-left: 14px; }
.menu-btn { display: none; background: #1c1012; border: 1px solid var(--line); color: var(--text); border-radius: 4px; padding: 4px 10px; font-size: 18px; cursor: var(--cur-hand, pointer); }

.lesson { max-width: 860px; }
.lesson h1 { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 4.6vw, 44px); line-height: 1.1; letter-spacing: .02em; margin: 0 0 6px; }
.subtitle { color: var(--accent); font-style: italic; font-size: 20px; margin: 0 0 24px; }

.player {
  position: relative; aspect-ratio: 16 / 9; background: #0f0d0c; border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden; user-select: none; box-shadow: 0 36px 70px -40px rgba(0,0,0,.75);
}
.player video, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player:fullscreen { border: 0; border-radius: 0; }
.video-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #6f5c5a; font-style: italic; font-size: 18px; }
.wm {
  position: absolute; z-index: 3; pointer-events: none; font-family: system-ui, sans-serif; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.28); text-shadow: 0 1px 2px rgba(0,0,0,.6); white-space: nowrap;
  transition: left 1.2s ease, top 1.2s ease; left: 8%; top: 10%;
}
.wm-tile {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; display: grid; font-family: system-ui, sans-serif;
  grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center;
  transform: rotate(-18deg) scale(1.2); font-size: 11px; color: rgba(255,255,255,.035); letter-spacing: .2em;
}
.fs-btn {
  position: absolute; top: 10px; right: 10px; z-index: 4; background: rgba(0,0,0,.45); color: #fff;
  border: 0; border-radius: 4px; padding: 6px; cursor: var(--cur-hand, pointer); display: grid; opacity: .75;
}
.fs-btn:hover { opacity: 1; }
.wm-note { font-size: 14px; font-style: italic; color: var(--dim); margin: 12px 0 26px; }

.lesson-actions { display: flex; gap: 10px; margin: -6px 0 28px; }
.done-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; cursor: var(--cur-hand, pointer);
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--ink-soft);
  font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  transition: background .2s, border-color .2s, color .2s;
}
.done-btn:hover { border-color: var(--rose); color: var(--accent); }
.done-btn.is-done { background: rgba(116,179,136,.12); border-color: rgba(116,179,136,.4); color: var(--green); }

.body { color: var(--ink-soft); font-size: 19px; line-height: 1.65; }
.body p { margin: 0 0 18px; }
.body strong { color: var(--text); font-weight: 600; }
.body ul, .body ol { padding-left: 22px; }
.body li { margin-bottom: 6px; }
.body li::marker { color: var(--accent); }
.body h2 { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: .03em; color: var(--text); margin: 32px 0 12px; }
.body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100;
  background: var(--espresso); color: #f7ece8; padding: 11px 22px; border-radius: 999px;
  font-size: 16px; font-style: italic; box-shadow: 0 18px 40px -16px rgba(0,0,0,.7); transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Hausaufgabe ---------- */
.result { border-radius: var(--radius); padding: 18px 20px; margin: 0 0 22px; font-size: 17px; }
.result strong { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .08em; }
.result p { margin: 6px 0 12px; }
.result p:last-child { margin-bottom: 0; }
.result.ok { background: rgba(116,179,136,.1); border: 1px solid rgba(116,179,136,.35); color: #a5d8b4; }
.result.fail { background: rgba(217,58,84,.1); border: 1px solid rgba(217,58,84,.35); color: #f3a3b0; }
.result.wait { background: rgba(201,166,102,.1); border: 1px solid rgba(201,166,102,.35); color: #e6c88e; }
.fb { background: rgba(255,255,255,.04); border-radius: 4px; padding: 10px 14px; color: var(--ink-soft); font-style: italic; }
.fb span { font-style: normal; font-family: var(--display); font-size: 9.5px; letter-spacing: .25em; color: var(--muted); }

.flash { border-radius: 4px; padding: 11px 16px; margin: 0 0 20px; font-size: 16px; font-style: italic; }
.flash-ok { background: rgba(116,179,136,.1); border: 1px solid rgba(116,179,136,.35); color: #a5d8b4; }
.flash-err { background: rgba(217,58,84,.1); border: 1px solid rgba(217,58,84,.35); color: #f3a3b0; }

.task, .submit-card, .edit-card, .review-side, .review-preview, .table-wrap, .empty, .hist-row, .c-row, .sub-row {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.task { padding: 22px 26px; margin-bottom: 26px; }
.task > :last-child { margin-bottom: 0; }
.submit-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.submit-card h2, .h2 { font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: .03em; margin: 0 0 6px; }
.h2 { margin: 40px 0 14px; }
.submit-card .btn-primary { align-self: flex-start; margin-top: 8px; }
.seg { display: inline-flex; align-self: flex-start; background: #1a0f11; border: 1px solid var(--border); border-radius: 999px; padding: 3px; margin-bottom: 8px; flex-wrap: wrap; }
.seg label { padding: 7px 16px; border-radius: 999px; cursor: var(--cur-hand, pointer); font-size: 16px; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: #1c1012; color: var(--accent); box-shadow: 0 2px 8px -4px rgba(0,0,0,.2); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--rose); }
.field-label { font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); display: block; }
.input {
  width: 100%; background: #120a0b; color: var(--text); border: 1px solid var(--line);
  border-radius: 4px; padding: 11px 14px; font: inherit; font-size: 17px; resize: vertical;
}
.input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.hint { font-size: 15px; font-style: italic; color: var(--muted); margin: 4px 0 0; }
.hint strong { color: var(--ink-soft); font-style: normal; }
.pane { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.pane[hidden] { display: none; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 16px; cursor: var(--cur-hand, pointer);
  border: 1px dashed #4f3237; border-radius: 4px; background: #120a0b; text-align: center; transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--rose); background: #1f0f12; }
.dropzone.has-file { border-style: solid; border-color: rgba(116,179,136,.4); }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dz-text { font-family: var(--display); font-size: 12px; letter-spacing: .12em; word-break: break-all; }

.pill { display: inline-block; font-family: var(--display); font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; white-space: nowrap; font-style: normal; }
.pill-pending { background: rgba(201,166,102,.15); color: #e6c88e; }
.pill-ok { background: rgba(116,179,136,.15); color: #a5d8b4; }
.pill-fail { background: rgba(217,58,84,.15); color: var(--accent); }

.history { display: flex; flex-direction: column; gap: 10px; }
.hist-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; }
.hist-main { flex: 1; min-width: 0; }
.hist-main a { color: var(--accent); word-break: break-all; }
.hist-main small { display: block; color: var(--dim); font-size: 14px; font-style: italic; }
.hist-fb { flex-basis: 100%; font-size: 16px; font-style: italic; color: var(--ink-soft); border-left: 2px solid var(--rose); padding-left: 12px; }

/* ---------- Support-Chat (Mitglied) ---------- */
.chat-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 90; width: 56px; height: 56px; border-radius: 50%; cursor: var(--cur-hand, pointer);
  background: var(--espresso); color: #f7ece8; display: grid; place-items: center; border: 0;
  box-shadow: 0 0 0 5px rgba(9,5,6,.9), 0 0 0 6px var(--line), 0 18px 34px -14px rgba(0,0,0,.7); transition: transform .25s;
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab.active { transform: rotate(-8deg) scale(.96); }
.chat-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-family: system-ui, sans-serif; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.chat-badge[hidden] { display: none; }
.chat-panel {
  position: fixed; right: 24px; bottom: 96px; z-index: 90; width: min(390px, calc(100vw - 32px)); height: min(570px, calc(100vh - 130px));
  display: flex; flex-direction: column; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.75); animation: rise .3s ease both;
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: #1c1012; border-bottom: 1px solid var(--border); }
.chat-head strong { display: block; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .1em; }
.chat-head small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-style: italic; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #6aa57a; display: inline-block; }
.chat-close { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: var(--cur-hand, pointer); line-height: 1; padding: 0 4px; }
.chat-close:hover { color: var(--accent); }
.chat-msgs, .ic-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { margin: auto; text-align: center; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 16px; font-style: italic; max-width: 250px; }
.chat-empty strong { color: var(--text); font-family: var(--display); font-weight: 500; font-style: normal; font-size: 17px; }
.wave { font-size: 32px; }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.them { align-self: flex-start; }
.bubble { padding: 9px 14px; border-radius: 14px; font-size: 16.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.msg.me .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.them .bubble { background: #1c1012; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg small { font-size: 12.5px; font-style: italic; color: var(--dim); margin-top: 3px; padding: 0 4px; }
.seen { align-self: flex-end; font-size: 12.5px; font-style: italic; color: var(--dim); margin-top: -6px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--border); background: #1c1012; }
.chat-form textarea { flex: 1; resize: none; background: #120a0b; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 16.5px; max-height: 120px; }
.chat-form textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.chat-form button[type=submit]:not(.btn-primary) { width: 42px; height: 42px; flex-shrink: 0; border-radius: 8px; border: 0; background: var(--espresso); color: #fff; cursor: var(--cur-hand, pointer); display: grid; place-items: center; }

/* ---------- Support-Postfach (Admin) ---------- */
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: min(72vh, 760px); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel-solid); box-shadow: var(--shadow); }
.inbox-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.inbox-filter { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--border); }
.inbox-filter button { flex: 1; background: none; border: 1px solid transparent; color: var(--muted); border-radius: 999px; padding: 6px; font-family: var(--display); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; cursor: var(--cur-hand, pointer); }
.inbox-filter button.active { background: #1c1012; color: var(--accent); border-color: var(--border); }
.thread-list { overflow-y: auto; flex: 1; }
.thread { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 13px 14px; background: none; border: 0; border-bottom: 1px solid #24161a; color: inherit; font: inherit; cursor: var(--cur-hand, pointer); }
.thread:hover { background: #1c1012; }
.thread.active { background: #1c1012; box-shadow: inset 2px 0 0 var(--accent); }
.thread-body { flex: 1; min-width: 0; }
.thread-top { display: flex; justify-content: space-between; gap: 8px; }
.thread-top strong { font-family: var(--display); font-weight: 500; font-size: 14px; }
.thread-top small { color: var(--dim); font-size: 13px; font-style: italic; white-space: nowrap; }
.thread-last { color: var(--muted); font-size: 15px; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread.unread .thread-last { color: var(--ink-soft); font-style: normal; font-weight: 600; }
.av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.av-letter { display: grid; place-items: center; background: var(--rose-soft); color: var(--accent); font-family: var(--display); font-weight: 600; }
.inbox-chat { display: flex; flex-direction: column; min-height: 0; background: rgba(0,0,0,.18); }
.inbox-empty { margin: auto; color: var(--muted); font-style: italic; }
.ic-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: #1c1012; }
.ic-who { display: flex; align-items: center; gap: 10px; }
.ic-who strong { font-family: var(--display); font-weight: 500; }
.ic-who small { display: block; color: var(--muted); font-size: 14px; font-style: italic; }
.ic-note { font-size: 14px; font-style: italic; color: var(--green); padding: 0 18px; }
.ic-note:empty { display: none; }
.ic-form .btn-primary { align-self: stretch; }
.empty { padding: 44px 16px; text-align: center; color: var(--muted); font-style: italic; }
.empty.small { padding: 26px 12px; border: 0; background: none; box-shadow: none; }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -26px 0 34px; flex-wrap: wrap; }
.tabs a { padding: 12px 14px; color: var(--muted); font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; border-bottom: 1px solid transparent; margin-bottom: -1px; transition: color .2s; }
.tabs a.active { color: var(--accent); border-color: var(--accent); }
.tabs a:hover { color: var(--accent); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.filters a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 15px; font-style: italic; color: var(--muted); background: rgba(255,255,255,.03); }
.filters a.active { background: #1c1012; color: var(--accent); border-color: rgba(217,58,84,.45); }
.sub-list { display: flex; flex-direction: column; gap: 10px; }
.sub-row { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(140px, 1.3fr) 160px 120px 90px; align-items: center; gap: 14px; padding: 14px 18px; transition: background .2s; }
.sub-row:hover { background: #1c1012; }
.sub-sec { font-family: var(--display); font-size: 14px; }
.sub-sec small, .u small { display: block; color: var(--dim); font-family: var(--serif); font-size: 14px; font-style: italic; letter-spacing: 0; }
.sub-date { color: var(--muted); font-size: 15px; font-style: italic; }
.sub-row .pill { justify-self: start; }
.sub-go { display: flex; align-items: center; justify-content: flex-end; gap: 2px; color: var(--accent); font-family: var(--display); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }

.review { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 22px; margin-top: 18px; align-items: start; }
.review-preview { padding: 12px; }
.pdf-frame { width: 100%; height: 75vh; border: 0; border-radius: 4px; background: #1c1012; }
.preview-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.link-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 70px 20px; }
.link-icon { font-size: 36px; }
.link-url { font-size: 15px; font-style: italic; color: var(--muted); word-break: break-all; max-width: 520px; }
.review-side { padding: 20px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.u { display: flex; gap: 10px; align-items: center; }
.u strong { font-family: var(--display); font-weight: 500; font-size: 15px; }
.u img, .noav { border-radius: 50%; width: 30px; height: 30px; background: var(--rose-soft); flex-shrink: 0; }
.u.big strong { font-size: 17px; }
.u-open { display: block; padding: 0; border: 0; background: none; cursor: var(--cur-hand, pointer); text-align: left; color: var(--text); font-family: var(--display); font-weight: 500; font-size: 15px; border-bottom: 1px dashed transparent; }
.u-open:hover, .u-open:focus-visible { color: var(--accent-hi); border-bottom-color: var(--accent); outline: none; }

/* ---------- Mitglieder-Pop-up ---------- */
.mi { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-solid); color: var(--text); box-shadow: 0 40px 90px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(217,58,84,.12); overflow: auto; }
.mi::backdrop { background: rgba(5,2,3,.72); backdrop-filter: blur(3px); }
.mi[open] { animation: mi-in .22s ease-out; }
@keyframes mi-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.mi-close { position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink-soft); font-size: 20px; line-height: 1; cursor: var(--cur-hand, pointer); z-index: 2; }
.mi-close:hover { color: var(--text); border-color: var(--accent); }
.mi-body { padding: 26px 28px 24px; }
.mi-loading { color: var(--muted); font-style: italic; margin: 30px 0; text-align: center; }
.mi-head { display: flex; gap: 18px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.mi-av { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--accent-deep); box-shadow: 0 0 0 4px rgba(217,58,84,.12); }
.mi-noav { display: block; background: var(--rose-soft); }
.mi-head h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: .02em; }
.mi-head p { margin: 2px 0 8px; color: var(--muted); font-size: 16px; }
.mi-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mi-badge { display: inline-block; font-family: var(--display); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); vertical-align: middle; }
.mi-badge.hl { color: var(--accent-hi); border-color: rgba(217,58,84,.45); }
.mi-badge.gold { color: var(--gold); border-color: rgba(201,166,102,.4); }
.mi-badge.bad { color: #ff8a9a; border-color: rgba(255,138,154,.45); }
.mi section { margin-top: 22px; }
.mi h3 { margin: 0 0 10px; font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.mi-count { color: var(--muted); margin-left: 6px; }
.mi dl { margin: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.mi-row { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 9px 14px; background: rgba(20,10,12,.92); font-size: 16px; }
.mi-row dt { color: var(--muted); }
.mi-row dd { margin: 0; overflow-wrap: anywhere; }
.mi-row a { color: var(--accent-hi); }
.mi code { font-size: 13px; color: var(--ink-soft); }
.mi-copy { margin-left: 6px; padding: 1px 8px; font-size: 11px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: var(--cur-hand, pointer); }
.mi-copy:hover { color: var(--text); border-color: var(--accent); }
.mi-muted { color: var(--muted); font-style: italic; }
.mi-note { margin: 0 0 10px; padding: 9px 12px; border-radius: 8px; background: rgba(201,166,102,.08); border: 1px solid rgba(201,166,102,.25); color: var(--ink-soft); font-size: 15px; }
.mi-note.bad { background: rgba(217,58,84,.1); border-color: rgba(217,58,84,.35); }
.mi-guilds { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mi-guild { display: flex; gap: 12px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.02); }
.mi-guild.is-main { border-color: rgba(217,58,84,.45); background: rgba(217,58,84,.06); }
.mi-guild img, .mi-gicon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }
.mi-gicon { display: grid; place-items: center; background: #2c1a1e; color: var(--ink-soft); font-family: var(--display); font-size: 11px; }
.mi-gbody { min-width: 0; flex: 1; }
.mi-gname { font-weight: 600; font-size: 16px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-start; }
.mi .mi-badge { flex: 0 0 auto; width: auto; padding: 3px 9px; } /* nie vom Seiten-Layout (.main) überschreiben lassen */
.mi-gbody small { display: block; color: var(--muted); font-size: 14px; margin-top: 1px; }
.mi-roles { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; font-size: 14px; }
.mi-role { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 6px; background: rgba(255,255,255,.05); border: 1px solid var(--border); font-size: 13px; }
.mi-role i { width: 9px; height: 9px; border-radius: 50%; }
.mi-foot { margin: 10px 0 0; color: var(--dim); font-size: 13.5px; }
.mi-nda { display: flex; gap: 16px; align-items: center; padding: 12px 14px; border: 1px solid rgba(201,166,102,.3); border-radius: 10px; background: rgba(201,166,102,.06); }
.mi-nda img { width: 170px; height: 64px; object-fit: contain; background: #fbf7f0; border-radius: 6px; padding: 4px 8px; flex-shrink: 0; }
.mi-nda strong { display: block; font-family: var(--display); font-weight: 500; font-size: 17px; }
.mi-nda small { display: block; color: var(--muted); font-size: 14px; }
.mi-warn { color: #ff8a9a !important; }
.mi-link { display: inline-block; margin-top: 5px; color: var(--accent-hi); font-size: 15px; }
@media (max-width: 560px) { .mi-nda { flex-direction: column; align-items: flex-start; } }
.nda-pill { display: inline-block; font-family: var(--display); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.nda-pill.ok { color: #a5d8b4; border-color: rgba(116,179,136,.4); }
.nda-pill.no { color: #ff8a9a; border-color: rgba(255,138,154,.4); }
.nda-pill.na { color: var(--muted); border-color: var(--line); }
@media (max-width: 560px) {
  .mi-body { padding: 20px 16px; }
  .mi-row { grid-template-columns: 1fr; gap: 2px; }
  .mi-head { flex-direction: column; align-items: flex-start; }
}
.u.big img, .u.big .noav { width: 42px; height: 42px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 16px; }
.meta dt { color: var(--muted); font-style: italic; }
.meta dd { margin: 0; }
.note { background: #120a0b; border: 1px solid var(--border); border-radius: 4px; padding: 10px 14px; font-size: 16px; font-style: italic; }
.note span { display: block; font-style: normal; font-family: var(--display); font-size: 9.5px; letter-spacing: .22em; color: var(--muted); margin-bottom: 4px; }
.decide { display: flex; flex-direction: column; gap: 8px; }
.decide-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-approve, .btn-reject { border: 1px solid transparent; border-radius: 4px; padding: 12px 10px; cursor: var(--cur-hand, pointer); font-family: var(--display); font-weight: 600; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
.btn-approve { background: var(--green); color: #fff; }
.btn-reject { background: #1c1012; color: var(--accent); border-color: rgba(217,58,84,.45); }
.btn-approve:hover, .btn-reject:hover { filter: brightness(1.06); }
.prev { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 14px; }
.prev-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.prev-row a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.dash .back { display: inline-block; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head .welcome { margin-bottom: 10px; }
.page-head.sub { margin: 40px 0 14px; }
.h2.flush { margin: 0; }
.c-list { display: flex; flex-direction: column; gap: 10px; }
.c-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.c-order { display: flex; flex-direction: column; gap: 3px; }
.c-order form { margin: 0; }
.icon-btn { background: #1c1012; border: 1px solid var(--line); color: var(--ink-soft); width: 26px; height: 22px; border-radius: 3px; cursor: var(--cur-hand, pointer); font-size: 12px; line-height: 1; }
.icon-btn:hover:not(:disabled) { border-color: var(--rose); color: var(--accent); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.c-main { flex: 1; min-width: 0; }
.c-main:hover .c-title { color: var(--accent); }
.c-title { font-family: var(--display); font-weight: 500; font-size: 16px; letter-spacing: .02em; transition: color .2s; }
.c-stats { color: var(--muted); font-size: 15px; font-style: italic; white-space: nowrap; }
.edit-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; margin-top: 10px; }
.edit-card .field-label { margin-top: 8px; }
.edit-card .seg { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.grid-2 > div { display: flex; flex-direction: column; gap: 6px; }
.grid-2 [hidden] { display: none; }
select.input { appearance: auto; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; cursor: var(--cur-hand, pointer); font-size: 17px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
#hwBox { display: flex; flex-direction: column; gap: 6px; }
#hwBox[hidden], .hint[hidden] { display: none; }
.form-actions { margin-top: 12px; }
.admin-video { width: 100%; max-height: 360px; background: #000; border-radius: 4px; }

.rte { border: 1px solid var(--line); border-radius: 4px; background: #120a0b; overflow: hidden; }
.rte:focus-within { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.rte-bar { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: #1a0f11; flex-wrap: wrap; }
.rte-bar button { background: none; border: 0; color: var(--ink-soft); min-width: 30px; height: 28px; border-radius: 3px; cursor: var(--cur-hand, pointer); font: inherit; font-size: 15px; }
.rte-bar button:hover { background: #1c1012; color: var(--accent); }
.rte-area { min-height: 170px; padding: 14px 16px; outline: none; }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--dim); font-style: italic; }
.rte-area h2 { margin-top: 0; }
.rte-area a { color: var(--accent); text-decoration: underline; }

.progress { position: relative; height: 26px; background: #120a0b; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.progress[hidden] { display: none; }
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--rose), var(--accent)); transition: width .2s; }
.progress-text { position: relative; display: block; text-align: center; font-family: var(--display); font-size: 10.5px; letter-spacing: .15em; line-height: 24px; font-weight: 600; }

.danger-zone { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--border); }
.btn-danger { background: none; border: 1px solid rgba(217,58,84,.45); color: var(--accent); border-radius: 4px; padding: 10px 16px; font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; cursor: var(--cur-hand, pointer); }
.btn-danger:hover { background: rgba(217,58,84,.1); }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.admin-table th { text-align: left; font-family: var(--display); font-size: 9.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 13px 18px; border-bottom: 1px solid #24161a; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.row-form { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.row-form select { background: #120a0b; color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; font: inherit; font-size: 16px; }
.row-form label { display: flex; gap: 6px; align-items: center; color: var(--ink-soft); }
.saved { color: var(--green); margin-left: 8px; }

/* ---------- Zertifikate: Galerie ---------- */
.cert-banner {
  display: flex; align-items: center; gap: 16px; margin: -28px 0 34px; padding: 16px 20px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(201,166,102,.12), rgba(217,58,84,.12)); border: 1px solid rgba(201,166,102,.4); box-shadow: var(--shadow);
  animation: rise .6s ease both;
}
.cert-banner-icon { font-size: 26px; }
.cert-banner strong { display: block; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .12em; }
.cert-banner small { color: var(--ink-soft); font-style: italic; font-size: 15px; }
.cert-banner-go { margin-left: auto; font-family: var(--display); font-size: 10.5px; letter-spacing: .2em; color: var(--gold); white-space: nowrap; }

.tier-key { display: flex; flex-wrap: wrap; gap: 8px; margin: -18px 0 28px; }
.tl { font-family: var(--display); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; border: 1px solid; background: rgba(255,255,255,.04); }
.tl.bronze { color: #e0a978; border-color: rgba(224,169,120,.35); }
.tl.silver { color: #ced3d9; border-color: rgba(206,211,217,.3); }
.tl.gold { color: #e6c77a; border-color: rgba(230,199,122,.35); }
.tl.legend { color: var(--accent); border-color: rgba(217,58,84,.45); }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cert-card {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--c1) 40%, var(--border)); box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s; animation: rise .5s ease both; animation-delay: calc(var(--i, 0) * 60ms);
}
a.cert-card:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -28px color-mix(in srgb, var(--c2) 80%, transparent); }
.cc-seal { width: 54px; height: 54px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font-family: var(--display); font-weight: 600; font-size: 20px; box-shadow: 0 0 0 4px #140a0c, 0 0 0 5px color-mix(in srgb, var(--c1) 50%, transparent); }
.cc-body { display: flex; flex-direction: column; min-width: 0; }
.cc-body small { font-family: var(--display); font-size: 9px; letter-spacing: .22em; color: var(--c1); font-weight: 600; }
.cc-body strong { font-family: var(--display); font-weight: 500; font-size: 19px; letter-spacing: .03em; }
.cc-body span { font-size: 14.5px; font-style: italic; color: var(--muted); }
.cc-new { position: absolute; top: 10px; right: 10px; font-family: var(--display); font-size: 8.5px; letter-spacing: .2em; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.cert-card.locked { --c1: #cfc7ba; --c2: #a39b8e; border-style: dashed; opacity: .75; }
.cert, .cert-card { --c1: #d6b56c; --c2: #8a6a1f; }
.tier-bronze { --c1: #d9a374; --c2: #8f5629; }
.tier-silver { --c1: #c3c8cf; --c2: #6c737c; }
.tier-gold { --c1: #dcbc6d; --c2: #8a6a1f; }
.tier-legend { --c1: #d4677a; --c2: #9c2538; }
.tier-lifetime { --c1: #d8b878; --c2: #7d5f22; }

/* ---------- Zertifikat (Elfenbein-Papier) ---------- */
.cert-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: -26px 0 20px; }
.cert-stage { container-type: inline-size; }
.hint.center { text-align: center; margin-top: 16px; }
.cert {
  --text: #1a1714; --ink-soft: #4a4640; --muted: #8b847a; --accent: #b8324a;
  position: relative; aspect-ratio: 1.414; overflow: hidden; border-radius: 2px; color: var(--text);
  background:
    radial-gradient(70% 60% at 50% 0%, color-mix(in srgb, var(--c1) 14%, transparent), transparent 70%),
    radial-gradient(50% 50% at 100% 100%, rgba(217,138,155,.12), transparent 70%),
    linear-gradient(160deg, #fdfbf6 0%, #f7f2e9 60%, #f1ebdf 100%);
  box-shadow: 0 50px 100px -50px rgba(60,40,30,.55), 0 0 0 1px #e5ddcf;
  font-family: var(--serif);
}
.cert::before {
  content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(150,130,100,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(150,130,100,.07) 1px, transparent 1px);
  background-size: 2.2cqw 2.2cqw;
}
.cert-frame { position: absolute; inset: 2.6cqw; border: 1px solid color-mix(in srgb, var(--c1) 70%, transparent); }
.corner { position: absolute; width: 4cqw; height: 4cqw; border-color: var(--c2); border-style: solid; }
.corner.tl { top: 1.6cqw; left: 1.6cqw; border-width: 2px 0 0 2px; }
.corner.tr { top: 1.6cqw; right: 1.6cqw; border-width: 2px 2px 0 0; }
.corner.bl { bottom: 1.6cqw; left: 1.6cqw; border-width: 0 0 2px 2px; }
.corner.br { bottom: 1.6cqw; right: 1.6cqw; border-width: 0 2px 2px 0; }
.laurel { position: absolute; top: 16%; width: 13cqw; height: auto; color: color-mix(in srgb, var(--c1) 45%, #efe7da); }
.laurel:not(.flip) { left: 6cqw; }
.laurel.flip { right: 6cqw; transform: scaleX(-1); }
.cert-watermark { position: absolute; inset: 22% 32%; opacity: .05; background: url(/static/logo.svg) center / contain no-repeat; }
.cert-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 6cqw 12cqw 0; text-align: center; }
.cert-brand { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.cert-brand img { width: 4.4cqw; height: auto; margin-bottom: .8cqw; }
.cert-brand span { font-family: var(--display); font-weight: 600; font-size: 3.2cqw; letter-spacing: .14em; color: var(--text); }
.cert-brand small { font-family: var(--display); font-size: 1.1cqw; letter-spacing: .7em; color: var(--c2); margin-top: .6cqw; padding-left: .7em; }
.cert-kicker { display: flex; align-items: center; gap: 1.4cqw; margin-top: 2.6cqw; font-family: var(--display); font-weight: 600; font-size: 1.1cqw; letter-spacing: .45em; color: var(--ink-soft); }
.cert-kicker i { width: 7cqw; height: 1px; background: linear-gradient(90deg, transparent, var(--c2)); }
.cert-kicker i:last-child { background: linear-gradient(90deg, var(--c2), transparent); }
.cert-kicker.small { margin-top: 1.4cqw; font-size: .95cqw; }
.cert-title {
  margin: 1.2cqw 0 0; font-family: var(--display); font-weight: 400; font-size: 7cqw; line-height: 1; letter-spacing: .05em; text-transform: uppercase;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 70%, #3b3530) 0%, var(--c2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cert-name { margin-top: 1.2cqw; font-style: italic; font-weight: 500; font-size: 5.4cqw; line-height: 1.1; color: var(--accent); padding: 0 3cqw .8cqw; border-bottom: 1px solid color-mix(in srgb, var(--c1) 60%, transparent); min-width: 40cqw; }
.cert-text { margin: 2cqw 0 0; max-width: 56cqw; font-size: 2.1cqw; line-height: 1.45; color: var(--ink-soft); }
.cert-foot { position: absolute; left: 12cqw; right: 12cqw; bottom: 6.2cqw; display: grid; grid-template-columns: repeat(4, 1fr); }
.cert-foot > div { display: flex; flex-direction: column; align-items: center; gap: .5cqw; border-left: 1px solid color-mix(in srgb, var(--c1) 45%, transparent); }
.cert-foot > div:first-child { border-left: 0; }
.cert-foot small { font-family: var(--display); font-size: .85cqw; letter-spacing: .28em; color: var(--c2); font-weight: 600; }
.cert-foot strong { font-family: var(--display); font-size: 1.45cqw; font-weight: 600; letter-spacing: .06em; }
.signature { font-family: 'Pinyon Script', cursive; font-size: 2.8cqw; line-height: 1; padding: 0 1cqw .3cqw; color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--c1) 60%, transparent); }
.sig em { font-style: normal; font-family: var(--display); font-size: .75cqw; letter-spacing: .3em; color: var(--muted); }
.cert-seal {
  position: absolute; right: 6.5cqw; top: 6.5cqw; width: 9cqw; height: 9cqw; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; transform: rotate(-12deg);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.45) 0, transparent 40%), linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 0 0 .5cqw rgba(255,255,255,.8), 0 0 0 .6cqw color-mix(in srgb, var(--c1) 60%, transparent), 0 1cqw 2.5cqw rgba(60,40,30,.35);
}
.cert-seal::before { content: ''; position: absolute; inset: .7cqw; border-radius: 50%; border: 1px dashed rgba(255,255,255,.6); }
.cert-seal span { font-family: var(--display); font-weight: 600; font-size: 3.4cqw; line-height: 1; }
.cert-seal small { font-family: var(--display); font-weight: 600; font-size: .8cqw; letter-spacing: .2em; }

@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fdfbf6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body::before, .deco, .petals { display: none !important; }
  .cert-page .topbar, .cert-page .cert-actions, .cert-page .hint, .chat-fab, .chat-panel { display: none !important; }
  .cert-page .dash { max-width: none; padding: 0; margin: 0; }
  .cert-page .cert { border-radius: 0; box-shadow: none; width: 100vw; height: 100vh; aspect-ratio: auto; }
  .cert-stage { width: 100vw; }
  /* NDA: Hochformat mit Rand */
  @page nda { size: A4 portrait; margin: 16mm 14mm; }
  .nda-view .nda-wrap { page: nda; max-width: none; padding: 0; margin: 0; }
  .nda-view .no-print { display: none !important; }
  .nda-view .nda-doc { box-shadow: none; border: 0; padding: 0; background: #fff; }
}

/* ---------- NDA / Geheimhaltung ---------- */
.nda-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 900px; margin: 0 auto; padding: 22px 20px; position: relative; z-index: 2; }
.nda-top .brand { text-decoration: none; }
.nda-actions { display: flex; align-items: center; gap: 4px; }
.nda-wrap { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; padding: 10px 20px 80px; }
.nda-eyebrow { margin: 0 0 10px; font-family: var(--display); font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.nda-title { margin: 0 0 14px; font-family: var(--display); font-weight: 500; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; }
.nda-title span { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--accent); }
.nda-lead { margin: 0 0 26px; font-size: 19px; color: var(--ink-soft); max-width: 680px; }

/* Dokument auf Papier (auch in der dunklen Seite gut lesbar) */
.nda-doc {
  --text: #1a1714; --ink-soft: #4a4640; --muted: #8b847a;
  background: #fbf7f0; color: var(--text); border-radius: 6px; padding: 44px 52px; font-size: 17px; line-height: 1.6;
  box-shadow: 0 30px 70px -40px rgba(0,0,0,.95), inset 0 0 0 1px rgba(201,166,102,.35);
}
.nda-doc-head { text-align: center; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid #e5dccb; }
.nda-brand { font-family: var(--display); font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: #b8324a; }
.nda-doc h1 { margin: 8px 0 2px; font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: .04em; color: var(--text); }
.nda-doc-head p { margin: 0; color: var(--muted); font-style: italic; font-size: 15px; }
.nda-doc section { margin: 0 0 16px; break-inside: avoid; }
.nda-doc h2 { margin: 0 0 3px; font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .08em; color: #7a2232; }
.nda-doc section p { margin: 0; color: #2b2622; text-align: justify; hyphens: auto; }
.nda-page .nda-wrap { z-index: 3; }
.nda-pad-hint[hidden] { display: none; }
.nda-scroll { max-height: 46vh; overflow: auto; border-radius: 6px; margin-bottom: 26px; outline: none; box-shadow: 0 0 0 1px var(--border); scrollbar-color: #8e1f33 transparent; }
.nda-scroll .nda-doc { box-shadow: none; border-radius: 0; }
.nda-scroll:focus-visible { box-shadow: 0 0 0 2px var(--accent); }

.nda-sign-block { display: grid; grid-template-columns: minmax(220px, 1fr) 1.2fr; gap: 30px; align-items: end; margin-top: 34px; padding-top: 26px; border-top: 1px solid #e5dccb; break-inside: avoid; }
.nda-sig { text-align: center; }
.nda-sig img { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto -6px; }
.nda-line { height: 1px; background: #1a1714; opacity: .55; margin-bottom: 6px; }
.nda-sig strong { display: block; font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: .06em; }
.nda-sig small { color: var(--muted); font-style: italic; font-size: 14px; }
.nda-meta { margin: 0; display: grid; gap: 6px; font-size: 14.5px; }
.nda-meta div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.nda-meta dt { color: var(--muted); }
.nda-meta dd { margin: 0; overflow-wrap: anywhere; color: #2b2622; }
.nda-hash, .nda-ua { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--muted) !important; }

/* Formular */
.nda-form { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 26px; backdrop-filter: blur(6px); }
.nda-form .alert { display: block; }
.nda-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.nda-fields label { display: grid; gap: 6px; font-family: var(--display); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.nda-fields input { font: inherit; font-family: var(--serif); font-size: 19px; letter-spacing: 0; text-transform: none; color: var(--text); background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 6px; padding: 10px 13px; }
.nda-fields input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--rose-soft); }
.nda-pad-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; font-family: var(--display); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.nda-pad-label .link-btn { margin: 0; font-size: 15px; letter-spacing: .02em; text-transform: none; }
.nda-pad { position: relative; height: 190px; border-radius: 8px; background: #fbf7f0; box-shadow: inset 0 0 0 1px rgba(201,166,102,.5); overflow: hidden; transition: box-shadow .2s; }
.nda-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 1; }
.nda-pad::after { content: ''; position: absolute; left: 34px; right: 24px; bottom: 44px; height: 1px; background: #1a1714; opacity: .25; }
.nda-pad-x { position: absolute; left: 14px; bottom: 44px; color: #1a1714; opacity: .35; font-size: 15px; line-height: 1; }
.nda-pad-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #a39b8e; font-style: italic; font-size: 17px; pointer-events: none; padding: 0 20px; text-align: center; }
.nda-pad-error { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px var(--rose-soft); animation: nda-shake .4s; }
@keyframes nda-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.nda-check { display: flex; gap: 11px; align-items: flex-start; margin: 20px 0 22px; font-size: 17px; color: var(--ink-soft); cursor: var(--cur-hand, pointer); }
.nda-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: #b8324a; flex-shrink: 0; }
.nda-submit { width: 100%; justify-content: center; padding: 15px 20px; }
.nda-fine { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 14.5px; font-style: italic; }
@media (max-width: 560px) {
  .nda-doc { padding: 26px 20px; font-size: 16px; }
  .nda-fields, .nda-sign-block { grid-template-columns: 1fr; }
  .nda-meta div { grid-template-columns: 1fr; gap: 0; }
  .nda-form { padding: 18px; }
  .nda-pad { height: 170px; }
}

/* ---------- Responsive ---------- */
.scrim { display: none; }
@media (max-width: 900px) {
  .review { grid-template-columns: 1fr; }
  .review-side { position: static; }
  .pdf-frame { height: 60vh; }
  .sub-row { grid-template-columns: 1fr auto; }
  .sub-sec, .sub-date { grid-column: 1; }
  .sub-row .pill { grid-row: 1; grid-column: 2; }
  .sub-go { display: none; }
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .25s; background: var(--panel-solid); width: 280px; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; }
  .main { padding: 18px 18px 70px; }
  .user-chip span { display: none; }
  .deco .motto { display: none; }
}
@media (max-width: 760px) {
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox-list { max-height: 280px; border-right: 0; border-bottom: 1px solid var(--border); }
  .inbox-chat { height: 70vh; }
  .chat-fab { right: 16px; bottom: 16px; }
  .chat-panel { right: 16px; bottom: 86px; }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding: 26px 22px; }
  .hero-stats { justify-content: flex-start; }
  .ring { width: 100px; height: 100px; }
  .ring-inner { width: 90px; height: 90px; }
  .ring-inner strong { font-size: 21px; }
}
@media (max-width: 700px) {
  .grid-2 { grid-template-columns: 1fr; }
  .c-stats { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .card { padding: 18px 18px 22px; flex-direction: column; align-items: flex-start; }
  .card-progress { left: 18px; right: 18px; }
  .card-meta { white-space: normal; }
  .topbar { margin-bottom: 34px; gap: 10px; }
  .topbar .brand { font-size: 10px; letter-spacing: .2em; white-space: nowrap; gap: 8px; }
  .topbar .brand img { width: 24px; height: 24px; }
  .topbar nav { display: flex; white-space: nowrap; }
  .link-btn { margin-left: 12px; font-size: 14px; }
  .login-card { padding: 34px 22px; }
  .topbar .top-links { display: none; }
  .topbar .top-menu { display: block; }
}

/* ---------- Team & Rechte ---------- */
.tm-me { margin: -40px 0 34px; text-align: right; font-size: 14px; color: var(--muted); font-style: italic; }
.tm-me b { color: var(--gold); font-style: normal; }
.tm-role { display: inline-block; padding: 3px 11px; border-radius: 999px; border: 1px solid; font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.tm-owner { color: var(--gold); border-color: rgba(201,166,102,.5); }
.tm-admin { color: var(--accent-hi, var(--accent)); border-color: rgba(217,58,84,.45); }
.tm-mod { color: #8fb8ff; border-color: rgba(143,184,255,.45); }
.tm-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tm-legend div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.tm-legend b { font-family: var(--display); font-weight: 500; font-size: 15px; }
.tm-legend span { color: var(--muted); font-size: 15px; }
.tm-perms td { vertical-align: middle; }
.tm-perms td small { display: block; color: var(--muted); font-size: 14px; }
.tm-perms th:not(:first-child), .tm-perms td:not(:first-child) { text-align: center; width: 110px; }
.tm-always { color: var(--gold); font-size: 18px; }
.tm-never { color: var(--dim); }
.tm-check { display: inline-grid; place-items: center; cursor: var(--cur-hand, pointer); }
.tm-check input { position: absolute; opacity: 0; pointer-events: none; }
.tm-check span { width: 24px; height: 24px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.tm-check input:checked + span { background: var(--accent); border-color: var(--accent); }
.tm-check input:checked + span::after { content: '✓'; color: #fff; font-size: 14px; font-weight: 700; }
.tm-check input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }
.tm-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 16px; }
.tm-add label { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) {
  .tm-legend, .tm-add { grid-template-columns: 1fr; }
  .tm-me { margin: 0 0 10px; text-align: left; }
}

/* ---------- Shop (Banküberweisung) ---------- */
.sh-notice { margin: 0 0 26px; padding: 14px 18px; border-radius: var(--radius); background: rgba(201,166,102,.08); border: 1px solid rgba(201,166,102,.35); color: var(--ink-soft); }
.sh-notice strong { color: var(--gold); }
.sh-topnav { display: flex; align-items: center; }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.sh-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); animation: rise .5s ease both; animation-delay: calc(var(--i, 0) * 70ms);
}
.sh-card.sh-feature { border-color: rgba(201,166,102,.55); background: linear-gradient(180deg, rgba(201,166,102,.08), transparent 55%), var(--panel); }
.sh-ribbon { position: absolute; top: -11px; right: 18px; padding: 3px 12px; border-radius: 999px; background: var(--gold-grad); color: #1a0d0e; font-family: var(--display); font-size: 9.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.sh-card h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: .04em; }
.sh-price { margin: 0; font-family: var(--display); font-size: 38px; font-weight: 500; line-height: 1.1; }
.sh-feature .sh-price { color: var(--gold); }
.sh-price small { display: block; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); font-weight: 400; }
.sh-desc { margin: 0 0 8px; color: var(--ink-soft); flex: 1; }
.sh-card form .btn-primary, .sh-card .btn-ghost, .sh-card form .btn-ghost { width: 100%; justify-content: center; }
.sh-buy { display: flex; flex-direction: column; gap: 8px; }
.sh-card.sh-off { filter: grayscale(.7); }
.sh-card.sh-off > :not(.sh-ribbon) { opacity: .5; }
.sh-ribbon.sh-ribbon-off { background: #2a1d20; color: var(--muted); border: 1px solid var(--line); }
.sh-card button[disabled] { width: 100%; justify-content: center; opacity: .6; cursor: default; }
.sh-invite { display: inline-block; margin-top: 8px; color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.sh-hero { margin-bottom: 10px; }
.sh-hero .welcome { line-height: 1.08; }
.sh-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.sh-hero-stats div { text-align: center; padding: 14px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.sh-hero-stats strong { display: block; font-family: var(--display); font-weight: 500; font-size: 28px; color: var(--accent-hi, var(--accent)); }
.sh-hero-stats span { font-family: var(--display); font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.sh-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sh-features div { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.sh-features i { font-style: normal; font-size: 24px; margin-bottom: 4px; }
.sh-features b { font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: .03em; }
.sh-features span { color: var(--muted); font-size: 15px; line-height: 1.45; }
.sh-curriculum { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.sh-curriculum li { display: flex; gap: 14px; align-items: baseline; padding: 11px 16px; border-left: 2px solid var(--accent); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; }
.sh-curriculum span { flex-shrink: 0; width: 62px; font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.sh-curriculum b { font-weight: 500; }
.sh-incl { list-style: none; margin: 0 0 10px; padding: 0; display: grid; align-content: start; gap: 6px; font-size: 15px; color: var(--ink-soft); flex: 1; }
.sh-page .sh-desc { flex: none; }
.sh-incl li::before { content: '✓'; color: var(--green); margin-right: 8px; font-weight: 700; }
.sh-incl li.sh-gold { color: var(--gold); }
.sh-incl li.sh-gold::before { color: var(--gold); }
.sh-faq { display: flex; flex-direction: column; gap: 8px; }
.sh-faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); padding: 0 18px; }
.sh-faq summary { list-style: none; cursor: var(--cur-hand, pointer); padding: 14px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.sh-faq summary::-webkit-details-marker { display: none; }
.sh-faq summary::after { content: '+'; color: var(--accent); font-size: 20px; line-height: 1; transition: transform .2s; }
.sh-faq details[open] summary::after { transform: rotate(45deg); }
.sh-faq p { margin: 0 0 16px; color: var(--ink-soft); }
.sh-motto { text-align: center; margin: 40px 0 0; font-style: italic; color: var(--muted); font-size: 18px; }
@media (max-width: 760px) {
  .sh-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh-features { grid-template-columns: 1fr; }
  .sh-curriculum { grid-template-columns: 1fr; }
}
.sh-whop { width: 100%; justify-content: center; flex-direction: column; gap: 3px !important; }
.sh-whop small { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 13px; opacity: .85; }
.sh-tag { font-family: var(--serif); font-style: italic; font-size: 14px; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.sh-howto { margin: 0 0 12px; padding-left: 20px; color: var(--ink-soft); display: grid; gap: 6px; }
.sh-howto code { font-size: 13px; color: var(--gold); }
.sh-owned { margin: 0; color: var(--green); font-family: var(--display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.sh-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin: 26px 0 0; }
.sh-steps li { counter-increment: s; display: flex; flex-direction: column; gap: 2px; padding-left: 40px; position: relative; color: var(--muted); font-size: 15px; }
.sh-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--accent); font-family: var(--display); font-size: 13px; }
.sh-steps b { color: var(--text); font-weight: 600; }
.sh-orders { display: flex; flex-direction: column; gap: 8px; }
.sh-order-row { display: grid; grid-template-columns: 120px 1fr auto auto; gap: 16px; align-items: center; padding: 12px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.sh-order-row:hover { border-color: var(--line); }
.sh-ref { font-family: var(--display); font-weight: 600; letter-spacing: .08em; }
.sh-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sh-status { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid; font-family: var(--display); font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }
.sh-open { color: var(--gold); border-color: rgba(201,166,102,.45); }
.sh-reported { color: #8fb8ff; border-color: rgba(143,184,255,.45); }
.sh-paid { color: var(--green); border-color: rgba(116,179,136,.45); }
.sh-cancelled { color: var(--muted); border-color: var(--line); }
.sh-pay { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; padding: 22px 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 14px; }
.sh-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--espresso); color: #fff; font-size: 13px; }
.sh-pay dl { margin: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.sh-field { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 10px 14px; background: rgba(20,10,12,.95); }
.sh-field dt { color: var(--muted); font-size: 15px; }
.sh-field dd { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; font-weight: 600; overflow-wrap: anywhere; }
.sh-copy { flex-shrink: 0; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 400; cursor: var(--cur-hand, pointer); }
.sh-copy:hover { color: var(--text); border-color: var(--accent); }
.sh-copy.ok { color: var(--green); border-color: var(--green); }
.sh-warn { margin: 12px 0 0; padding: 10px 14px; border-radius: 8px; background: rgba(217,58,84,.08); border: 1px solid rgba(217,58,84,.35); color: var(--ink-soft); font-size: 15px; }
.sh-qr { margin: 0; text-align: center; }
.sh-qr svg { display: block; width: 100%; height: auto; border-radius: 12px; background: #fff; padding: 8px; box-shadow: 0 18px 40px -20px rgba(0,0,0,.8); }
.sh-qr figcaption { margin-top: 10px; color: var(--ink-soft); font-size: 15px; }
.sh-qr small { color: var(--muted); font-style: italic; }
.sh-next p { margin: 0 0 14px; color: var(--ink-soft); }
.sh-cancel { margin-top: 10px; text-align: right; }
.sh-cancel .link-btn { margin: 0; font-size: 14px; color: var(--muted); }
.sh-done { display: flex; gap: 20px; align-items: flex-start; padding: 24px; border-radius: var(--radius); background: rgba(116,179,136,.07); border: 1px solid rgba(116,179,136,.4); }
.sh-done-icon { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-size: 26px; }
.sh-done h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 500; font-size: 20px; }
.sh-done p { margin: 0 0 14px; color: var(--ink-soft); }
.sh-adminhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sh-adminhead .welcome { margin: 0; }
.sh-kpis { margin-top: 6px; }
.sh-table td { vertical-align: middle; }
.sh-row-hot td { background: rgba(143,184,255,.05); }
.sh-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sh-actions .btn-approve, .sh-actions .btn-reject { padding: 9px 12px; }
.sh-prod { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px 16px; margin: 0 0 12px; }
.sh-prod legend { padding: 0 8px; font-family: var(--display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.sh-prod-new { border-style: dashed; }
.sh-prod-flags { display: flex; gap: 20px; margin-top: 10px; }
.jr-wide2 { grid-column: span 2; }
@media (max-width: 760px) {
  .sh-pay { grid-template-columns: 1fr; }
  .sh-qr { max-width: 240px; margin: 0 auto; order: -1; }
  .sh-steps { grid-template-columns: 1fr; }
  .sh-order-row { grid-template-columns: 1fr auto; }
  .sh-field { grid-template-columns: 1fr; gap: 2px; }
  .jr-wide2 { grid-column: auto; }
}

/* ---------- Trading-Journal ---------- */
.jr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 26px 0 12px; }
.jr-h { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing: .06em; }
.jr-quick { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: end; }
.jr-quick > div { display: flex; flex-direction: column; gap: 6px; }
.jr-file em { font-style: italic; text-transform: none; letter-spacing: 0; font-family: var(--serif); color: var(--muted); font-weight: 400; font-size: 14px; }
.jr-more { border-top: 1px solid var(--border); padding-top: 12px; }
.jr-more > summary { list-style: none; cursor: var(--cur-hand, pointer); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.jr-more > summary::-webkit-details-marker { display: none; }
.jr-more > summary::before { content: '▸'; color: var(--accent); transition: transform .2s; display: inline-block; }
.jr-more[open] > summary::before { transform: rotate(90deg); }
.jr-more > summary small { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 14px; color: var(--muted); }
.jr-more[open] > summary { margin-bottom: 14px; }
.jr-wide { grid-column: 1 / -1; }
.jr-extra { margin: 8px 0 0; color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.jr-extra b { color: var(--ink-soft); font-weight: 600; }
.jr-extra i { color: var(--dim); font-style: normal; }
.jr-filters { margin-bottom: 12px; }
.jr-privacy { margin-top: 22px; }
.jr-who { display: flex; align-items: center; gap: 10px; }
.jr-who img, .jr-who .noav { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.jr-who strong { display: block; } .jr-who small { color: var(--muted); font-size: 13px; }
.jr-admin td { vertical-align: middle; }
.jr-stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.jr-stat span { display: block; font-family: var(--display); font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.jr-stat strong { display: block; margin-top: 6px; font-family: var(--display); font-weight: 500; font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-stat.pos strong, .jr-pnl.pos { color: var(--green); }
.jr-stat.neg strong { color: var(--accent-hi, var(--accent)); }
.jr-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.jr-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.jr-card-head small { color: var(--muted); font-size: 14px; font-style: italic; }
.jr-curve { display: block; width: 100%; height: 160px; }
.jr-curve.up { color: var(--green); }
.jr-curve.down { color: var(--accent); }
.jr-zero { stroke: var(--line); stroke-dasharray: 4 5; stroke-width: 1; vector-effect: non-scaling-stroke; }
.jr-new > summary { list-style: none; cursor: var(--cur-hand, pointer); display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text); }
.jr-new > summary::-webkit-details-marker { display: none; }
.jr-plus { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--espresso); color: #fff; font-size: 18px; transition: transform .2s; }
.jr-new[open] .jr-plus { transform: rotate(45deg); }
.jr-new[open] > summary { margin-bottom: 18px; }
.jr-form { display: flex; flex-direction: column; gap: 14px; }
.jr-form label { display: flex; flex-direction: column; gap: 6px; }
.jr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.jr-grid > div { display: flex; flex-direction: column; gap: 6px; }
.jr-form .seg { margin: 0; }
.jr-form select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.jr-form input[type="datetime-local"] { color-scheme: dark; }
.jr-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.jr-stars input { position: absolute; opacity: 0; pointer-events: none; }
.jr-stars label { font-size: 26px; line-height: 1; color: var(--line); cursor: var(--cur-hand, pointer); transition: color .15s; display: inline; }
.jr-stars label:hover, .jr-stars label:hover ~ label, .jr-stars input:checked ~ label { color: var(--gold); }
.jr-file input { color: var(--muted); font: inherit; font-size: 15px; }
.jr-file input::file-selector-button { margin-right: 12px; padding: 8px 14px; border-radius: 4px; border: 1px solid var(--line); background: #1c1012; color: var(--ink-soft); font-family: var(--display); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; cursor: var(--cur-hand, pointer); }
.jr-check { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--ink-soft); }
.jr-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.jr-listhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 26px 0 12px; }
.jr-listhead .filters { margin: 0; }
.jr-cur label { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.jr-cur select { background: #120a0b; color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; font: inherit; font-size: 13px; letter-spacing: 0; }
.jr-list { display: flex; flex-direction: column; gap: 8px; }
.jr-entry { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--line); transition: border-color .2s; }
.jr-entry.jr-win { box-shadow: inset 3px 0 0 var(--green); }
.jr-entry.jr-loss { box-shadow: inset 3px 0 0 var(--accent); }
.jr-entry.jr-be { box-shadow: inset 3px 0 0 var(--gold); }
.jr-entry:hover, .jr-entry[open] { border-color: var(--line); }
.jr-entry > summary {
  list-style: none; cursor: var(--cur-hand, pointer); display: grid; align-items: center; gap: 14px; padding: 14px 18px;
  grid-template-columns: 150px 90px 92px minmax(0, 1fr) 80px 130px;
}
.jr-entry > summary::-webkit-details-marker { display: none; }
.jr-when { color: var(--muted); font-size: 15px; font-style: italic; }
.jr-sym { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .08em; }
.jr-side-tag { justify-self: start; font-family: var(--display); font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.jr-side-tag.long { color: var(--green); border-color: rgba(116,179,136,.4); }
.jr-side-tag.short { color: var(--accent-hi, var(--accent)); border-color: rgba(217,58,84,.45); }
.jr-setup { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-r { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.jr-pnl { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.jr-win .jr-pnl { color: var(--green); }
.jr-loss .jr-pnl { color: var(--accent-hi, var(--accent)); }
.jr-pnl em { font-weight: 400; color: var(--muted); }
.jr-body { padding: 4px 18px 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.jr-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px 18px; margin: 12px 0 0; }
.jr-body > :first-child { margin-top: 12px; }
.jr-facts dt { font-family: var(--display); font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.jr-facts dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.jr-ok { color: var(--green); } .jr-no { color: var(--accent-hi, var(--accent)); }
.jr-rated { color: var(--gold); letter-spacing: 2px; } .jr-rated span { color: var(--line); }
.jr-notes { margin: 0; white-space: pre-wrap; color: var(--ink-soft); }
.jr-lesson { margin: 0; padding: 10px 14px; border-radius: 6px; background: rgba(201,166,102,.07); border: 1px solid rgba(201,166,102,.25); color: var(--ink-soft); }
.jr-lesson strong { color: var(--gold); font-family: var(--display); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; margin-right: 6px; }
.jr-chartlink {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(201,166,102,.4); background: rgba(201,166,102,.07); color: var(--gold);
  font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; transition: background .2s, border-color .2s;
}
.jr-chartlink:hover { background: rgba(201,166,102,.14); border-color: var(--gold); }
.jr-chartlink small { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 14px; color: var(--muted); }
.jr-has { font-style: normal; font-size: 13px; margin-right: 8px; opacity: .8; }
.jr-shot img { display: block; max-width: 100%; max-height: 460px; border-radius: 6px; border: 1px solid var(--border); }
@media (max-width: 900px) {
  .jr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jr-entry > summary { grid-template-columns: 1fr auto; grid-template-areas: "sym pnl" "when r" "side setup"; gap: 4px 12px; }
  .jr-sym { grid-area: sym; } .jr-pnl { grid-area: pnl; } .jr-when { grid-area: when; } .jr-r { grid-area: r; }
  .jr-side-tag { grid-area: side; } .jr-setup { grid-area: setup; text-align: right; }
}
@media (max-width: 560px) {
  .jr-stats { gap: 6px; }
  .jr-stat { padding: 12px 10px; }
  .jr-stat span { font-size: 8.5px; letter-spacing: .16em; }
  .jr-grid { grid-template-columns: 1fr; }
  .jr-quick { grid-template-columns: 1fr; }
  .jr-stat strong { font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
}

/* ---------- Scrollbar: schmal, rot, ohne Pfeile ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-hi, #f05a72), var(--accent-deep, #8e1f33));
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-hi, #f05a72); background-clip: padding-box; border: 1.5px solid transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
@supports (-moz-appearance: none) { /* Firefox */
  * { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
}

/* ---------- Mauszeiger im Figma-Stil (nur Geräte mit Maus) ---------- */
@media (hover: hover) and (pointer: fine) {
  :root { --cur-hand: url(/static/cursors/hand.svg) 13 3, pointer; }
  html, body { cursor: url(/static/cursors/arrow.svg) 5 3, default; }
  a, button, summary, label, select, [role="button"], [data-set-theme], .u-open, .side-head,
  input[type="checkbox"], input[type="radio"], input[type="submit"], input[type="file"] {
    cursor: var(--cur-hand);
  }
  input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="number"],
  input[type="password"], input:not([type]), textarea, [contenteditable="true"] {
    cursor: url(/static/cursors/text.svg) 12 14, text;
  }
  button:disabled, .btn-primary:disabled { cursor: url(/static/cursors/arrow.svg) 5 3, not-allowed; }
  .nda-pad, canvas { cursor: crosshair; }
}

/* ---------- Hintergrundmusik (unten links) ---------- */
.music { position: fixed; left: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.music-card {
  width: 160px; height: 90px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.85); background: #000;
  opacity: 0; transform: translateY(8px) scale(.96); pointer-events: none; transition: opacity .3s, transform .3s;
  position: absolute; bottom: 48px; left: 0;
}
.music.playing .music-card { opacity: .92; transform: none; pointer-events: auto; }
.music-card iframe, .music-frame { width: 100% !important; height: 100% !important; display: block; border: 0; }
.music-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px 9px 12px; border-radius: 999px; cursor: var(--cur-hand, pointer);
  border: 1px solid var(--line); background: rgba(20,10,12,.82); backdrop-filter: blur(8px); color: var(--muted);
  font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  transition: color .2s, border-color .2s, background .2s;
}
.music-btn:hover { color: var(--text); border-color: var(--accent); }
.music.playing .music-btn { color: var(--accent-hi, var(--accent)); border-color: rgba(217,58,84,.5); }
.music.waiting .music-btn { color: var(--gold); border-color: rgba(201,166,102,.5); animation: music-pulse 1.6s ease-in-out infinite; }
@keyframes music-pulse { 50% { box-shadow: 0 0 0 6px rgba(201,166,102,.12); } }
.music-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.music-eq i { width: 2.5px; height: 4px; background: currentColor; border-radius: 1px; }
.music.playing .music-eq i { animation: music-eq .9s ease-in-out infinite; }
.music.playing .music-eq i:nth-child(2) { animation-delay: -.3s; }
.music.playing .music-eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes music-eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
@media (max-width: 560px) {
  .music { left: 12px; bottom: 12px; }
  .music-label { display: none; }
  .music-btn { padding: 10px 11px; }
  .music-card { width: 128px; height: 72px; }
}
@media print { .music { display: none !important; } }
:root[data-theme="classic"] .music-btn { background: rgba(21,17,18,.9); border-radius: 999px; font-weight: 700; letter-spacing: .1em; }

/* ---------- Web-App installieren ---------- */
[data-install-app][hidden] { display: none !important; }
.install-link { color: var(--gold) !important; }
.install-cta {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding: 10px 18px 10px 10px; border-radius: 14px;
  border: 1px solid rgba(201,166,102,.35); background: rgba(201,166,102,.06); color: var(--text); text-align: left;
  cursor: var(--cur-hand, pointer); transition: border-color .2s, background .2s, transform .2s;
}
.install-cta:hover { border-color: var(--gold); background: rgba(201,166,102,.12); transform: translateY(-1px); }
.install-cta img { border-radius: 9px; }
.install-cta strong { display: block; font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.install-cta small { display: block; color: var(--muted); font-size: 14px; }
/* In der installierten App: kein Install-Hinweis, Platz für die Statusleiste (iPhone) */
.is-app [data-install-app] { display: none !important; }
.is-app body { padding-top: env(safe-area-inset-top); }

/* ---------- Stil-Umschalter (Japan / Classic) ---------- */
.theme-pick { display: inline-flex; vertical-align: middle; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); }
.theme-pick button {
  border: 0; background: none; color: var(--muted); cursor: var(--cur-hand, pointer); padding: 5px 11px; border-radius: 999px;
  font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  transition: background .2s, color .2s;
}
.theme-pick button:hover { color: var(--text); }
.theme-pick button.on { background: var(--accent); color: #fff; }
.topbar .top-links .theme-pick { margin-right: 4px; }
.user-chip .theme-pick { margin-left: 10px; }
.top-menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin-top: 6px; border-top: 1px solid var(--line); }
.top-menu-theme small { font-family: var(--display); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* ---------- Handy-Menü oben rechts ---------- */
.top-menu { display: none; position: relative; }
.topbar:has(.top-menu[open]) { position: relative; z-index: 5; } /* Fenster über den Blüten */
.top-menu summary {
  list-style: none; cursor: var(--cur-hand, pointer); display: flex; align-items: center; gap: 9px;
  font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .22em; color: var(--text);
  padding: 9px 14px; border: 1px solid var(--line, rgba(255,255,255,.14)); border-radius: 999px;
  background: rgba(255,255,255,.03); -webkit-tap-highlight-color: transparent; user-select: none;
}
.top-menu summary::-webkit-details-marker { display: none; }
.top-menu[open] summary { border-color: var(--accent); color: var(--accent-hi, var(--accent)); }
.top-menu-bars { display: grid; gap: 3px; width: 14px; }
.top-menu-bars i { display: block; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.top-menu[open] .top-menu-bars i:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.top-menu[open] .top-menu-bars i:nth-child(2) { opacity: 0; }
.top-menu[open] .top-menu-bars i:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }
.top-menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; min-width: 230px;
  background: var(--card, #17090d); border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 14px;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.8); padding: 8px; animation: mi-in .18s ease-out;
}
.top-menu-who { display: flex; align-items: center; gap: 10px; padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line, rgba(255,255,255,.1)); color: var(--muted); font-style: italic; font-size: 16px; }
.top-menu-who img { border-radius: 50%; }
.top-menu-links { display: flex; flex-direction: column; }
.top-menu-panel .link-btn {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 13px 12px; border-radius: 9px;
  font-size: 13px; text-decoration: none;
}
.top-menu-panel .link-btn:active, .top-menu-panel .link-btn:hover { background: rgba(255,255,255,.05); }
.top-menu-logout { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line, rgba(255,255,255,.1)); }
.top-menu-logout button {
  width: 100%; text-align: left; padding: 13px 12px; border-radius: 9px; border: 0; cursor: var(--cur-hand, pointer);
  background: transparent; color: var(--accent-hi, var(--accent)); font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.top-menu-logout button:hover, .top-menu-logout button:active { background: var(--rose-soft); }

/* ---------- Admin: Discord-Rollen ---------- */
.rl-warn, .rl-good { margin: 0 0 20px; padding: 14px 18px; border-radius: 8px; font-size: 16px; }
.rl-warn { background: rgba(217,58,84,.1); border: 1px solid rgba(217,58,84,.4); color: #f3c1c9; }
.rl-warn strong { display: block; font-family: var(--display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-hi); margin-bottom: 4px; }
.rl-warn ul { margin: 0; padding-left: 18px; }
.rl-good { background: rgba(116,179,136,.1); border: 1px solid rgba(116,179,136,.35); color: #a5d8b4; }
.rl-form { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 8px 20px 20px; }
.rl-toggle { display: flex; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 17px; cursor: var(--cur-hand, pointer); }
.rl-toggle input { width: 18px; height: 18px; accent-color: #b8324a; }
.rl-list { display: grid; }
.rl-row { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(220px, 1.4fr) minmax(160px, 1fr); gap: 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid #24161a; }
.rl-lvl { display: flex; gap: 12px; align-items: center; min-width: 0; }
.rl-lvl strong { display: block; font-family: var(--display); font-weight: 500; font-size: 15px; }
.rl-lvl small { display: block; color: var(--muted); font-style: italic; font-size: 14px; }
.rl-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-family: var(--display); font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); }
.rl-row input { font: inherit; font-family: ui-monospace, Consolas, monospace; font-size: 14px; color: var(--text); background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; width: 100%; }
.rl-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--rose-soft); }
.rl-state { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; color: var(--ink-soft); }
.rl-state i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rl-state.ok { color: var(--text); }
.rl-state.none { color: var(--dim); font-style: italic; }
.rl-state.bad { color: #ff8a9a; }
.rl-state b { color: #e6c88e; font-weight: 400; }
.rl-actions { padding-top: 18px; }
.rl-sync { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 20px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.rl-sync h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 500; font-size: 18px; }
.rl-sync p { margin: 0; color: var(--muted); font-size: 16px; }
.rl-sync .rl-job { margin-top: 6px; color: var(--ink-soft); }
.rl-help { margin-top: 20px; color: var(--ink-soft); font-size: 16px; }
.rl-help summary { cursor: var(--cur-hand, pointer); color: var(--gold); font-family: var(--display); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.rl-help ol { margin: 10px 0 0; padding-left: 20px; }
@media (max-width: 760px) {
  .rl-row { grid-template-columns: 1fr; gap: 8px; }
  .rl-form { padding: 8px 14px 16px; }
}

/* ---------- Zertifikat herunterladen ---------- */
.cc-wrap { position: relative; }
.cc-wrap .cert-card { height: 100%; padding-right: 58px; }
.cc-dl {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-soft); background: rgba(255,255,255,.04);
  border: 1px solid var(--line); transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.cc-dl:hover, .cc-dl:focus-visible { color: #fff; background: var(--accent-deep); border-color: var(--accent); transform: translateY(-1px); outline: none; }
.cert-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cert-page .dash { position: relative; z-index: 3; } /* Zertifikat über den fallenden Blüten */
.cert-btns .btn-primary svg { flex-shrink: 0; }
.cert-img { display: none; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(201,166,102,.25); }
/* Handy: fertiges Bild statt der HTML-Version (bleibt lesbar, lange drücken zum Speichern) */
@media (max-width: 700px) {
  .cert-stage .cert { display: none; }
  .cert-img { display: block; }
  .cert-actions { margin-top: -10px; }
  .cert-btns { width: 100%; }
  .cert-btns .btn-primary { flex: 1; justify-content: center; }
  .cert-print { display: none; }
}
@media print { .cert-img { display: none !important; } .cert-stage .cert { display: block !important; } }
