/* LernHub
   Layout: Arbeitsplatz. Bühne (Karte/Bild) links groß, Arbeitsblatt rechts (Desktop);
   auf dem Handy Bühne oben, Blatt darunter, Navigation unten. */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("../fonts/lexend-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("../fonts/lexend-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #eef2f2; --surface: #ffffff; --surface-2: #f2f5f5; --ink: #13202b; --muted: #5a6975; --line: #d5dde0;
  --ocean: #cfe3ee; --ocean-2: #bdd6e5; --land: #e9e6d8; --land-t: #dde7c8; --border: #a3ab9c;
  --pen: #2340c8; --pen-dk: #152a8f; --pen-ink: #ffffff; --pen-soft: #2340c81f; --hl: #ffc22e; --ok-dk: #0c6436; --bad-dk: #a3241a; --card-sh: #d5dde0;
  --ok: #138548; --bad: #cf3427; --mtn: #94643a; --river: #2a72c3; --sand: #d7ae5f;
  --shadow: 0 1px 2px #0d1b2a14, 0 8px 24px #0d1b2a12;
  --f-display: "Bricolage", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 16px; --top-h: 60px; --panel-w: 440px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0c1218; --surface: #141c24; --surface-2: #1a242e; --ink: #e6ecf1; --muted: #93a2ae; --line: #25323e;
  --ocean: #0f2233; --ocean-2: #0b1b29; --land: #2a2e2a; --land-t: #33412c; --border: #56614f;
  --pen: #8fa3ff; --pen-dk: #5a6fd0; --pen-ink: #0c1218; --pen-soft: #8fa3ff24; --hl: #ffc93f; --ok-dk: #2c9a5e; --bad-dk: #c84d42; --card-sh: #25323e;
  --ok: #4fd08a; --bad: #ff7a6d; --mtn: #cf9d68; --river: #5ca8f2; --sand: #bf9a55;
  --shadow: 0 1px 2px #0006, 0 8px 24px #0005; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0c1218; --surface: #141c24; --surface-2: #1a242e; --ink: #e6ecf1; --muted: #93a2ae; --line: #25323e;
  --ocean: #0f2233; --ocean-2: #0b1b29; --land: #2a2e2a; --land-t: #33412c; --border: #56614f;
  --pen: #8fa3ff; --pen-dk: #5a6fd0; --pen-ink: #0c1218; --pen-soft: #8fa3ff24; --hl: #ffc93f; --ok-dk: #2c9a5e; --bad-dk: #c84d42; --card-sh: #25323e;
  --ok: #4fd08a; --bad: #ff7a6d; --mtn: #cf9d68; --river: #5ca8f2; --sand: #bf9a55;
  --shadow: 0 1px 2px #0006, 0 8px 24px #0005; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; border-radius: 6px; }
svg { overflow: visible; }

/* ---------- Gerüst ---------- */
.app { display: grid; grid-template-rows: auto 1fr; height: 100dvh; padding-top: env(safe-area-inset-top, 0px); }
.top { display: flex; align-items: center; gap: 16px; padding-inline: 16px; height: var(--top-h); background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 21px/1 var(--f-display); letter-spacing: -.01em; white-space: nowrap; }
.brand em { font-style: normal; color: var(--pen); }
.brand-mark { width: 28px; height: 28px; fill: none; stroke: var(--pen); stroke-width: 2; }
.tabs { display: flex; gap: 4px; margin-inline: auto; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; transition: background .15s, color .15s; }
.tabs a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a:hover { color: var(--ink); background: var(--surface-2); }
.tabs a[aria-current="page"] { color: var(--pen-ink); background: var(--pen); }
.top-tools { display: flex; align-items: center; gap: 10px; }
.ring { position: relative; width: 40px; height: 40px; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.5; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--pen); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; transition: stroke-dashoffset .6s ease; }
.ring span { font: 700 11px var(--f-body); font-variant-numeric: tabular-nums; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--surface-2); }

.set-main { min-height: 0; display: grid; }
.stage { display: grid; grid-template-columns: 1fr var(--panel-w); min-height: 0; height: 100%; }
.stage.solo { grid-template-columns: 1fr; }
.stage.solo .map-wrap { display: none; }
.stage.solo .panel { border-left: 0; width: 100%; max-width: 780px; margin-inline: auto; background: transparent; }
.on-set .stage.solo { background: var(--bg); }
.stage.solo .panel > * { flex: none; }
.map-wrap { position: relative; min-height: 0; background: var(--ocean-2); overflow: hidden; touch-action: none; }
#map { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; -webkit-user-select: none; }
#map.picking { cursor: crosshair; }
.panel { background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; padding: 20px 20px 40px; display: flex; flex-direction: column; gap: 16px; }

.map-tools { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.map-tools .icon-btn { box-shadow: var(--shadow); }
.map-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); pointer-events: none; white-space: nowrap; max-width: calc(100% - 100px); overflow: hidden; text-overflow: ellipsis; }
.legend { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; color: var(--muted); max-width: calc(100% - 24px); }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); padding: 4px 9px; border-radius: 7px; font-size: 13px; font-weight: 700; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; }

/* ---------- Karte ---------- */
.sphere { fill: var(--ocean); }
.grat { fill: none; stroke: var(--border); stroke-opacity: .28; stroke-width: .5; vector-effect: non-scaling-stroke; }
.special-lat { fill: none; stroke: var(--border); stroke-opacity: .7; stroke-width: .8; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.country { fill: var(--land); stroke: var(--border); stroke-width: .5; vector-effect: non-scaling-stroke; transition: fill .2s; }
.show-targets .country.target { fill: var(--land-t); }
.country.hover { fill: color-mix(in srgb, var(--pen) 22%, var(--land)); }
.country.sel, .country.hl { fill: var(--hl); }
.country.ok { fill: var(--ok); }
.country.bad { fill: var(--bad); }
.country.m0 { fill: color-mix(in srgb, var(--bad) 55%, var(--land)); }
.country.m1 { fill: color-mix(in srgb, var(--hl) 70%, var(--land)); }
.country.m2 { fill: color-mix(in srgb, var(--ok) 45%, var(--land)); }
.country.m3 { fill: var(--ok); }
.country.mx { fill: var(--land-t); }
.lake { fill: var(--ocean); stroke: var(--river); stroke-width: .4; stroke-opacity: .5; vector-effect: non-scaling-stroke; }
.river-bg { fill: none; stroke: var(--river); stroke-opacity: .45; stroke-width: .7; vector-effect: non-scaling-stroke; }
.capital { fill: var(--surface); stroke: var(--ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; }

.feat { vector-effect: non-scaling-stroke; transition: opacity .2s; }
.feat.g.area { fill: url(#hatch); stroke: var(--mtn); stroke-width: 1; }
.feat.g.line { fill: none; stroke: var(--mtn); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 7; }
.feat.l.area { fill: color-mix(in srgb, var(--sand) 45%, transparent); stroke: var(--sand); stroke-width: 1; }
.feat.w.area { fill: color-mix(in srgb, var(--river) 30%, var(--ocean)); stroke: var(--river); stroke-width: 1; }
.feat.w.line { fill: none; stroke: var(--river); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.feat.pt { fill: var(--sand); stroke: var(--ink); stroke-width: 1.5; }
.feat.dim { opacity: .28; }
.feat.focus.area { stroke: var(--hl); stroke-width: 3; }
.feat.focus.line { stroke-width: 4.5; filter: drop-shadow(0 0 3px var(--hl)) drop-shadow(0 0 2px var(--hl)); }
.feat.focus.g.line { stroke-width: 7; }
.feat.focus.pt { stroke: var(--hl); stroke-width: 3; }
.feat.reveal.area { stroke: var(--ok); stroke-width: 3; }
.feat.reveal.line { stroke: var(--ok); stroke-width: 4.5; }
.feat.hit { cursor: pointer; }
.halo { fill: none; stroke: var(--hl); stroke-width: 2.5; vector-effect: non-scaling-stroke; animation: halo 1.6s ease-out infinite; }
@keyframes halo { from { stroke-opacity: 1; } to { stroke-opacity: 0; } }

.label { font-family: var(--f-body); font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.label.num { fill: var(--pen); font-family: var(--f-display); font-weight: 800; }
.label.feat-label { fill: var(--ink); }
.guess { stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.guess.ok { fill: var(--ok); } .guess.bad { fill: var(--bad); }
.guess-line { fill: none; stroke: var(--bad); stroke-width: 1.8; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.dist { font: 700 12px var(--f-body); fill: var(--bad); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; text-anchor: middle; }

/* ---------- Panel-Bausteine ---------- */
.eyebrow { font: 700 12px var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.015em; line-height: 1.1; }
h2 { font-size: 22px; font-weight: 800; line-height: 1.15; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #0002; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 5px 11px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--pen); color: var(--pen); background: var(--pen-soft); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .08s, background .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--pen); border-color: var(--pen); color: var(--pen-ink); }
.btn.primary:hover { filter: brightness(1.08); background: var(--pen); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: none; }
.btn.block { width: 100%; }
.btn kbd { font: 700 11px var(--f-body); opacity: .7; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
.btn:disabled { opacity: .5; cursor: default; }

/* Listen */
.list { display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 8px; border: 0; background: none; text-align: left; border-radius: 9px; width: 100%; }
.item + .item { border-top: 1px solid var(--line); }
.item:hover { background: var(--surface-2); }
.item.sel { background: var(--pen-soft); }
.item .num { font: 800 15px var(--f-display); color: var(--pen); text-align: center; }
.item .t { display: flex; flex-direction: column; min-width: 0; }
.item .t b { font-weight: 700; }
.item .t span { font-size: 13.5px; color: var(--muted); }
.ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; justify-self: center; }
.ico.g { background: color-mix(in srgb, var(--mtn) 20%, transparent); color: var(--mtn); }
.ico.w { background: color-mix(in srgb, var(--river) 20%, transparent); color: var(--river); }
.ico.l { background: color-mix(in srgb, var(--sand) 30%, transparent); color: color-mix(in srgb, var(--sand) 60%, var(--ink)); }
.ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dots { display: flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--ok); }
.group-h { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 2px; }
.group-h h3 { font-size: 18px; font-weight: 800; }
.group-h .muted { font-size: 13px; }
.sub-h { font: 700 12px var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 8px 8px 2px; }

/* Karten / Kacheln */
.card { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--surface); }
.card.flat { background: var(--surface-2); border-color: transparent; }
.ex-grid { display: grid; gap: 8px; }
.ex { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 12px 14px; transition: border-color .15s, background .15s; }
.ex:hover { border-color: var(--pen); }
.ex[aria-pressed="true"] { border-color: var(--pen); background: var(--pen-soft); }
.ex .ex-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--pen-soft); color: var(--pen); display: grid; place-items: center; }
.ex .ex-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ex b { display: block; }
.ex span { font-size: 13.5px; color: var(--muted); }
.ex .pct { font: 700 13px var(--f-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.opts { display: grid; gap: 12px; }
.opt-label { font: 700 13px var(--f-body); color: var(--muted); margin-bottom: 6px; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.switch input { width: 20px; height: 20px; accent-color: var(--pen); }

/* Abfrage */
.q-head { display: flex; align-items: center; gap: 10px; }
.q-head .count { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--pen); border-radius: 3px; transition: width .35s ease; }
.prompt { font: 800 25px/1.2 var(--f-display); letter-spacing: -.01em; text-wrap: balance; }
.prompt mark { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--hl) 70%, transparent) 55%); color: inherit; padding: 0 2px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font: 700 13px var(--f-body); color: var(--muted); }
.input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 17px; transition: border-color .15s, background .15s; }
.input:focus { border-color: var(--pen); background: var(--surface); outline: none; }
.input.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.input.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.45; }
.fb { border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; animation: pop .22s ease; }
.fb.ok { background: color-mix(in srgb, var(--ok) 13%, var(--surface)); }
.fb.bad { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.fb.part { background: color-mix(in srgb, var(--hl) 20%, var(--surface)); }
.fb strong { font: 800 18px var(--f-display); }
.fb.ok strong { color: var(--ok); } .fb.bad strong { color: var(--bad); }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.facts-check { display: flex; flex-direction: column; gap: 2px; }
.facts-check button { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 0; background: none; padding: 7px 6px; border-radius: 8px; font-size: 15px; }
.facts-check button:hover { background: var(--surface-2); }
.facts-check b { width: 20px; flex: none; font-size: 16px; }
.facts-check .y b { color: var(--ok); } .facts-check .n b { color: var(--bad); } .facts-check .n span { color: var(--muted); }
.hintline { font-size: 14px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .row > .i { width: 26px; height: 26px; color: var(--pen); }

/* Ergebnis */
.result-top { display: flex; align-items: center; gap: 18px; }
.grade { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font: 800 44px var(--f-display); color: var(--pen-ink); background: var(--pen); flex: none; }
.grade.g1, .grade.g2 { background: var(--ok); } .grade.g4, .grade.g5 { background: var(--bad); } .grade.g3 { background: var(--hl); color: #1d1600; }
.grade small { font-size: 18px; }
.miss { display: flex; flex-wrap: wrap; gap: 6px; }
.miss button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 4px 10px; font-size: 14px; }

/* Fortschritt */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface-2); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.stat b { font: 800 22px var(--f-display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }

/* Detail */
.detail-head { display: flex; align-items: flex-start; gap: 12px; }
.badge { font: 800 18px var(--f-display); color: var(--pen-ink); background: var(--pen); border-radius: 10px; min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 16px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; }
.fact-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-weight: 700; box-shadow: var(--shadow); z-index: 50; animation: pop .2s ease; }

/* ---------- Handy ---------- */
@media (max-width: 899px) {
  :root { --top-h: 54px; }
  .app { height: auto; min-height: 100dvh; grid-template-rows: auto auto; padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .brand { font-size: 19px; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .tabs a { flex-direction: column; gap: 2px; font-size: 11.5px; padding: 6px 10px; border-radius: 12px; }
  .tabs a[aria-current="page"] { background: var(--pen-soft); color: var(--pen); }
  .top-tools { margin-left: auto; }
  .stage { grid-template-columns: 1fr; }
  .map-wrap { position: sticky; top: 0; z-index: 4; height: 46dvh; min-height: 260px; border-bottom: 1px solid var(--line); }
  .panel { border-left: 0; overflow: visible; padding: 18px 16px 28px; }
  .prompt { font-size: 22px; }
  h1 { font-size: 26px; }
  .legend { font-size: 12px; padding: 6px 10px; }
  .map-tools { top: 8px; right: 8px; }
  .map-tools .icon-btn { width: 34px; height: 34px; }
  .map-hint { top: 8px; font-size: 13px; }
}
@media (min-width: 1400px) { :root { --panel-w: 480px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =================================================================== LernHub */
.brand-mark { fill: none; stroke: var(--pen); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.page { overflow-y: auto; min-height: 0; }
.page-in { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; display: flex; flex-direction: column; gap: 20px; }
.btn.sm, .icon-btn.sm { padding: 6px 10px; font-size: 13.5px; }
.icon-btn.sm { width: 32px; height: 32px; padding: 0; }
.input.sm { padding: 6px 8px; font-size: 14px; width: auto; }
select.input { appearance: auto; }
.nowrap { flex-wrap: nowrap; }
.full { grid-column: 1 / -1; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--hl) 28%, var(--surface)); color: color-mix(in srgb, var(--hl) 40%, var(--ink)); }
.pill.bad { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-size: 13px; }
.tag .x { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 2px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.form-err { color: var(--bad); font-weight: 700; font-size: 14px; }
.empty { text-align: center; align-items: center; padding: 40px 24px; max-width: 560px; margin: 40px auto; }
.big-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--pen-soft); color: var(--pen); margin: 0 auto; }
.big-ico .i { width: 28px; height: 28px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font: 700 12px var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.click { cursor: pointer; }
.table tr.click:hover, .table tr.open { background: var(--surface-2); }
.table tr.dead { opacity: .5; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions .icon-btn { display: inline-grid; }
.detail-row > td { background: var(--surface-2); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
code.sel { user-select: all; word-break: break-all; }
.plain { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }

/* Kopfzeile */
.menu-wrap { position: relative; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--pen); color: var(--pen-ink); font: 800 14px var(--f-display); display: grid; place-items: center; flex: none; }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 40; display: flex; flex-direction: column; }
.menu-h { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-h span { font-size: 13px; color: var(--muted); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; border: 0; background: none; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14.5px; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.back { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; max-width: 340px; }
.back > .i { flex: none; width: 22px; height: 22px; }
.back-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.back-t small { font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.back-t b { font: 800 16px var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-top { border-bottom-color: transparent; background: transparent; }
.auth-top .top-tools { margin-left: auto; }

/* Anmeldung */
.auth { display: grid; place-items: center; padding: 24px 16px 60px; }
.auth-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; max-width: 980px; width: 100%; }
.auth-side h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.02; letter-spacing: -.02em; margin-bottom: 14px; }
.auth-side h1::after { content: ""; display: block; width: 72px; height: 8px; border-radius: 4px; background: var(--hl); margin-top: 18px; }
.auth-side p { color: var(--muted); font-size: 17px; max-width: 42ch; }
.auth-feats { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; font-weight: 700; }
.auth-feats li { display: flex; align-items: center; gap: 10px; }
.auth-feats .i { color: var(--pen); }
.auth-card { padding: 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.auth-card .seg { display: flex; }
.auth-card .seg a { flex: 1; text-align: center; padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; }
.auth-card .seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #0002; }

/* Übersicht */
.dash-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dash-head > div { flex: 1; min-width: 220px; }
.dash-head h1 { font-size: clamp(30px, 4.4vw, 42px); }
.resume { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 10px 16px; box-shadow: var(--shadow); }
.resume-l { display: flex; flex-direction: column; }
.resume-l small { color: var(--muted); font-weight: 700; font-size: 12px; }
.mini-ring { --p: 0; --rc: var(--pen); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--rc) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.mini-ring span { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 700 11px var(--f-body); font-variant-numeric: tabular-nums; }
.subject { display: flex; flex-direction: column; gap: 12px; }
.subject-h { display: flex; align-items: center; gap: 12px; }
.subject-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--sc, var(--pen)) 16%, var(--surface)); color: var(--sc, var(--pen)); flex: none; }
.subject-ico .i { width: 22px; height: 22px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.set-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; border-top: 4px solid var(--sc, var(--pen)); transition: transform .15s, box-shadow .15s; }
.set-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.set-card h3 { font: 800 19px/1.2 var(--f-display); }
.set-card-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kind .i { width: 16px; height: 16px; }
.set-card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.set-card .bar i { background: var(--sc, var(--pen)); }

/* Lernset: Lernkarten */
.search { position: relative; flex: 1; min-width: 200px; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 40px; }
.lcards { display: flex; flex-direction: column; gap: 10px; }
.lcard { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); cursor: pointer; transition: border-color .15s; }
.lcard:hover { border-color: color-mix(in srgb, var(--pen) 50%, var(--line)); }
.lcard.sel { border-color: var(--pen); box-shadow: 0 0 0 3px var(--pen-soft); }
.lcard-h { display: flex; align-items: center; gap: 10px; }
.lcard-h h3 { flex: 1; font-size: 18px; font-weight: 800; }
.quote { margin: 0; padding: 12px 16px; border-left: 4px solid var(--hl); background: var(--surface-2); border-radius: 0 10px 10px 0; font-size: 16.5px; }
.masked { display: inline-block; min-width: 2.2em; border-bottom: 2px dotted var(--muted); color: transparent; }
.cat-opts { display: grid; gap: 8px; }
.cat-btn { justify-content: flex-start; padding: 14px 16px; font-size: 16px; }
.cat-btn.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface)); opacity: 1; }
.cat-btn.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); opacity: 1; }

/* Zuordnen */
.match { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 12px; }
.match-col { display: flex; flex-direction: column; gap: 8px; }
.m-item, .m-info { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; transition: border-color .12s, background .12s; }
.m-item { align-items: center; min-height: 48px; }
.m-item.active { border-color: var(--pen); box-shadow: 0 0 0 3px var(--pen-soft); }
.m-item.done .m-badge { background: var(--pen); color: var(--pen-ink); }
.m-item.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.m-item.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.m-badge { width: 26px; height: 26px; border-radius: 8px; border: 1.5px dashed var(--line); display: grid; place-items: center; font: 800 13px var(--f-display); flex: none; }
.m-item.done .m-badge { border: 0; }
.m-letter { width: 24px; height: 24px; border-radius: 6px; background: var(--surface-2); font: 800 13px var(--f-display); display: grid; place-items: center; flex: none; }
.m-info.used { border-color: color-mix(in srgb, var(--pen) 45%, var(--line)); }
.m-info.used .m-letter { background: var(--pen); color: var(--pen-ink); }
.m-info:disabled, .m-item:disabled { cursor: default; }

/* Bilder */
.dg-title { position: absolute; left: 12px; top: 12px; background: var(--surface); padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); }
#dg { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; }
#dg.picking { cursor: crosshair; }
.dpt { fill: var(--pen); stroke: #fff; cursor: pointer; }
.dpt.sel, .dpt.focus { fill: var(--hl); stroke: var(--ink); }
.dpt.reveal { fill: var(--ok); }
.label.dlabel { text-anchor: start; fill: #13202b; stroke: #ffffff; }

/* Verwaltung */
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.subtabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14.5px; }
.subtabs a:hover { background: var(--surface-2); color: var(--ink); }
.subtabs a[aria-current="page"] { background: var(--pen-soft); color: var(--pen); }
.count-badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: 12px; padding: 0 7px; line-height: 20px; }
.pend { border-left: 4px solid var(--hl); }
.user-detail { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; padding: 8px 4px; }
.prog-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 48px; gap: 10px; align-items: center; font-size: 14px; }
.prog-row b { text-align: right; font-variant-numeric: tabular-nums; }
.new-code { border: 2px dashed var(--pen); }
.code-big { font: 800 30px var(--f-display); letter-spacing: .08em; }
.subj-card { border-top: 4px solid var(--sc); }
.sets-admin .item { grid-template-columns: 34px 1fr auto; }
.add-set summary { cursor: pointer; font-weight: 700; color: var(--pen); display: inline-flex; gap: 6px; align-items: center; }
.add-set[open] summary { margin-bottom: 12px; }
details.card summary { cursor: pointer; }
details.card[open] summary { margin-bottom: 12px; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; margin-bottom: 10px; }
.ed-bar { position: sticky; top: 0; z-index: 6; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; margin: -10px -12px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-radius: 12px; }
.ed-items { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ed-item + .ed-item { border-top: 1px solid var(--line); }
.ed-item.open { background: var(--surface-2); }
.ed-item-h { display: flex; align-items: center; gap: 4px; padding: 4px 8px 4px 4px; }
.ed-toggle { flex: 1; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; min-width: 0; }
.ed-toggle:hover { background: var(--surface-2); }
.ed-item-b { padding: 4px 14px 16px; }
.diag-ed { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.dimg { position: relative; width: 100%; max-width: 820px; border-radius: 10px; overflow: hidden; cursor: crosshair; background: var(--surface-2); }
.dimg img { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
.pdot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--pen); border: 2px solid #fff; box-shadow: 0 1px 3px #0005; cursor: pointer; }
.pdot span { position: absolute; left: 14px; top: -4px; white-space: nowrap; font-size: 11.5px; font-weight: 700; color: #13202b; background: #ffffffd9; padding: 0 4px; border-radius: 4px; pointer-events: none; }
.pdot.on { background: var(--hl); width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 899px) {
  .page-in { padding: 20px 16px 40px; }
  .grid2, .two-col, .user-detail { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; gap: 24px; }
  .auth-side p, .auth-feats { display: none; }
  .back { max-width: 52vw; }
  .set-top .ring { margin-left: auto; }
  .set-top .top-tools { margin-left: 0; }
  .set-top #themeBtn { display: none; }
  .main-nav { display: flex; }
  .stage.solo .panel { padding: 18px 16px 28px; }
  .match { grid-template-columns: 1fr; }
  .menu { position: fixed; right: 12px; top: 58px; }
  .table { font-size: 13.5px; }
  .ed-bar { margin: 0; }
}

/* =================================================================== Frisch & verspielt (v2) */
/* Bewegung */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes jump { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-16px) scale(1.04, .96); } 55% { transform: translateY(0) scale(1.06, .92); } 75% { transform: translateY(-4px); } 100% { transform: none; } }
@keyframes droop { 0% { transform: rotate(0); } 30% { transform: rotate(-6deg) translateY(2px); } 60% { transform: rotate(4deg); } 100% { transform: none; } }
@keyframes wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(10deg); } }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes pop2 { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8); } }

.page-in > *, .panel > *:not(.fb-dock) { animation: rise .4s cubic-bezier(.2, .8, .3, 1) both; }
.page-in > *:nth-child(2), .panel > *:nth-child(2) { animation-delay: .04s; }
.page-in > *:nth-child(3), .panel > *:nth-child(3) { animation-delay: .08s; }
.page-in > *:nth-child(4), .panel > *:nth-child(4) { animation-delay: .12s; }
.page-in > *:nth-child(n+5), .panel > *:nth-child(n+5) { animation-delay: .16s; }

/* Maskottchen */
.mascot { display: inline-block; width: var(--ms, 96px); height: calc(var(--ms, 96px) * 1.23); flex: none; position: relative; }
.mascot-svg, .mascot-img { width: 100%; height: 100%; overflow: visible; display: block; }
.mascot-img { object-fit: contain; }
.mascot .body-g { transform-origin: 50% 90%; animation: bob 3.2s ease-in-out infinite; }
.mascot .blink { transform-origin: 100px 48px; transform: scaleY(0); animation: blink2 5s infinite; }
@keyframes blink2 { 0%, 93%, 100% { transform: scaleY(0); } 95.5% { transform: scaleY(1); } }
.mascot.m-cheer .body-g, .mascot.react.m-happy .body-g { animation: jump .7s cubic-bezier(.3, .7, .4, 1) 1, bob 3.2s .7s ease-in-out infinite; }
.mascot.m-sad .body-g { animation: droop .8s ease 1; }
.mascot.m-wave .arm-r { transform-origin: 170px 110px; animation: wave 1s ease-in-out 2; }
.mascot .sparkles path { transform-box: fill-box; transform-origin: center; animation: twinkle 1.2s ease-in-out infinite; }
.mascot .shadow { transform-origin: 100px 208px; }
.mascot-img { animation: bob 3.2s ease-in-out infinite; }
.mascot.react .mascot-img { animation: jump .7s 1, bob 3.2s .7s infinite; }
.bubble { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 12px 16px; box-shadow: 0 3px 0 var(--card-sh); }
.bubble::before { content: ""; position: absolute; left: -10px; top: 22px; width: 16px; height: 16px; background: inherit; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }
.bubble.big { font: 800 20px/1.25 var(--f-display); }

/* Knöpfe im „Drück-mich“-Stil */
.btn { border-width: 2px; border-radius: 14px; box-shadow: 0 3px 0 var(--card-sh); font-weight: 800; padding: 11px 18px; transition: transform .08s, box-shadow .08s, background .15s, filter .15s; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--card-sh); }
.btn.primary { border-color: var(--pen-dk); box-shadow: 0 4px 0 var(--pen-dk); }
.btn.primary:active { box-shadow: 0 1px 0 var(--pen-dk); transform: translateY(3px); }
.btn.ghost, .btn.ghost:active { box-shadow: none; border-color: transparent; }
.btn.sm { padding: 6px 12px; border-radius: 11px; box-shadow: 0 2px 0 var(--card-sh); }
.btn.primary.sm { box-shadow: 0 3px 0 var(--pen-dk); }
.btn:disabled { box-shadow: none; transform: none; }
.icon-btn { border-width: 2px; border-radius: 12px; }
.icon-btn.ghost { border-color: transparent; background: none; }
.input { border-width: 2px; border-radius: 14px; }
.input.shake { animation: shake .4s ease; }
.chip { border-width: 2px; padding: 6px 13px; }
.seg { border-radius: 14px; padding: 4px; }
.seg button { border-radius: 10px; }
.card { border-width: 2px; border-radius: 20px; box-shadow: 0 3px 0 var(--card-sh); }
.card.flat { box-shadow: none; }

/* Kopf & Übersicht */
.top { box-shadow: 0 1px 0 var(--line); border-bottom: 0; }
.hero-card { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--pen) 9%, var(--surface)), var(--surface) 60%); border: 2px solid var(--line); border-radius: 26px; padding: 20px 24px; box-shadow: 0 4px 0 var(--card-sh); }
.hero-main { display: flex; align-items: center; gap: 18px; flex: 1 1 420px; min-width: 0; }
.hero-text { display: flex; flex-direction: column; gap: 14px; min-width: 0; flex: 1; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.hs { display: flex; align-items: center; gap: 8px; }
.hs b { font: 800 22px/1 var(--f-display); display: block; font-variant-numeric: tabular-nums; }
.hs span:not(.hs-ico) { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.hs-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.hs-ico .i { width: 22px; height: 22px; }
.hs.hot .hs-ico { background: color-mix(in srgb, #ff8a1f 18%, var(--surface)); color: #ff8a1f; }
.hs-ico.blue { background: var(--pen-soft); color: var(--pen); }
.week { display: flex; gap: 6px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); }
.wd i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; background: var(--surface); }
.wd.on i { background: #ff8a1f; border-color: #e0700a; color: #fff; }
.wd.on i .i { width: 15px; height: 15px; stroke-width: 3; }
.wd.today { color: var(--ink); }
.wd.today i { border-color: var(--pen); }
.resume { gap: 12px; border-width: 2px; border-radius: 18px; box-shadow: 0 3px 0 var(--card-sh); }
.set-card { position: relative; border-width: 2px; border-top-width: 6px; border-radius: 20px; box-shadow: 0 4px 0 var(--card-sh); padding: 18px; gap: 10px; }
.set-card:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--card-sh); }
.set-card-link { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.set-card > *:not(.set-card-link) { position: relative; z-index: 1; pointer-events: none; }
.set-card .set-actions, .set-card .set-actions * { pointer-events: auto; }
.set-card-top .mini-ring { margin-left: auto; width: 42px; height: 42px; }
.set-card-top .mini-ring span { width: 32px; height: 32px; }
.set-card-foot { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.set-actions { display: flex; gap: 8px; }
.subject-h h2 { font-size: 24px; }
.auth-mascot { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.auth-mascot .bubble { font-weight: 700; }

/* Abfrage */
.q-top { display: flex; align-items: center; gap: 12px; }
.q-progress { flex: 1; height: 16px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 2px solid var(--line); }
.q-progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(180deg, #7ee06b, #4fbf4a); box-shadow: inset 0 -3px 0 #3ea23a, inset 0 3px 0 #ffffff55; transition: width .5s cubic-bezier(.3, .8, .3, 1); }
.q-streak { display: inline-flex; align-items: center; gap: 3px; font: 800 17px var(--f-display); color: var(--muted); min-width: 44px; }
.q-streak .i { width: 22px; height: 22px; }
.q-streak.on { color: #ff8a1f; }
.q-streak.on .i { fill: #ffb347; stroke: #ff8a1f; }
.q-streak.pop { animation: pop2 .45s ease; }
.q-meta { display: flex; gap: 12px; font-size: 13px; color: var(--muted); font-weight: 700; margin-top: -6px; padding-left: 50px; }
.q-hero { display: flex; align-items: flex-end; gap: 12px; }
.q-hero .bubble { flex: 1; min-width: 0; margin-bottom: 10px; }
.q-hero .bubble::before { top: auto; bottom: 18px; }
.q-hero .prompt { font-size: 21px; }
.q-hero .eyebrow { margin-bottom: 4px; }
.q-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.q-actions .btn.primary { min-width: 140px; }
.fb-dock { margin-top: auto; position: sticky; bottom: 0; z-index: 3; }
.fb-dock:empty { display: none; }
.panel { padding-bottom: 20px; }
.fb-sheet { border-radius: 22px 22px 0 0; margin: 0 -20px -20px; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; animation: sheet .3s cubic-bezier(.2, .8, .3, 1); border-top: 3px solid; max-height: 62dvh; overflow-y: auto; }
.fb-sheet.ok { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); border-color: var(--ok); }
.fb-sheet.part { background: color-mix(in srgb, var(--hl) 22%, var(--surface)); border-color: var(--hl); }
.fb-sheet.bad { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: var(--bad); }
.fb-head { display: flex; align-items: center; gap: 12px; }
.fb-head strong { display: block; font: 800 21px/1.15 var(--f-display); }
.fb-sheet.ok strong { color: var(--ok); } .fb-sheet.bad strong { color: var(--bad); } .fb-sheet.part strong { color: color-mix(in srgb, var(--hl) 45%, var(--ink)); }
.fb-sub { font-size: 14px; color: var(--muted); font-weight: 700; }
.fb-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); flex: none; }
.fb-badge .i { width: 24px; height: 24px; stroke-width: 3; }
.fb-sheet.ok .fb-badge { color: var(--ok); } .fb-sheet.bad .fb-badge { color: var(--bad); } .fb-sheet.part .fb-badge { color: color-mix(in srgb, var(--hl) 50%, var(--ink)); }
.fb-body { display: flex; flex-direction: column; gap: 4px; font-size: 15.5px; }
.fb-sheet.ok .fb-next { background: var(--ok); border-color: var(--ok-dk); box-shadow: 0 4px 0 var(--ok-dk); color: #fff; }
.fb-sheet.bad .fb-next { background: var(--bad); border-color: var(--bad-dk); box-shadow: 0 4px 0 var(--bad-dk); color: #fff; }
.fb-sheet.part .fb-next { background: var(--hl); border-color: #c98a00; box-shadow: 0 4px 0 #c98a00; color: #1d1600; }
.stage.solo .fb-sheet { margin: 0; border-radius: 22px; border-width: 3px; border-style: solid; }
.confirm .mascot { vertical-align: middle; margin-right: 8px; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; }

/* Ergebnis */
.result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-top: 8px; }
.result h1 { font-size: 32px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 460px; }
.tile { border: 2px solid var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 4px; align-items: center; background: var(--surface); box-shadow: 0 3px 0 var(--card-sh); }
.tile span { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tile span .i { width: 16px; height: 16px; }
.tile b { font: 800 28px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.tile b small { font-size: 16px; color: var(--muted); }
.tile.t-main { border-color: var(--pen); }
.tile.t-main.g1, .tile.t-main.g2 { border-color: var(--ok); color: var(--ok); }
.tile.t-main.g3 { border-color: var(--hl); }
.tile.t-main.g4, .tile.t-main.g5 { border-color: var(--bad); color: var(--bad); }
.tile.t-streak b { color: #ff8a1f; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.miss { justify-content: center; }
.miss button { border-width: 2px; border-radius: 10px; font-weight: 700; }

/* Übungsauswahl */
.ex-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.ex { border-width: 2px; border-radius: 18px; box-shadow: 0 3px 0 var(--card-sh); padding: 14px; transition: transform .12s, box-shadow .12s, border-color .15s; }
.ex:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--card-sh); }
.ex[aria-pressed="true"] { box-shadow: 0 3px 0 var(--pen-dk); }
.ex .ex-ico { border-radius: 14px; }
.lcard { border-width: 2px; border-radius: 18px; box-shadow: 0 3px 0 var(--card-sh); }
.lcard.sel { box-shadow: 0 3px 0 var(--pen-dk); }
.m-item, .m-info { border-width: 2px; border-radius: 14px; box-shadow: 0 2px 0 var(--card-sh); }
.cat-btn { border-radius: 16px; }

/* Vergleich */
.cmp-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cmp-fig { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cmp-fig figcaption { font: 800 15px var(--f-display); }
.cmp-img { cursor: default; border: 2px solid var(--line); border-radius: 16px; max-width: none; }
.cmp-img .pdot { cursor: default; animation: pop2 .5s ease; }
.cmp-none { position: absolute; inset: auto 8px 8px 8px; background: var(--surface); border: 2px solid var(--bad); color: var(--bad); border-radius: 10px; padding: 4px 8px; font-size: 13px; font-weight: 800; display: flex; gap: 6px; align-items: center; justify-content: center; }
.cmp-table td.c, .cmp-table th.c { text-align: center; width: 28%; }
.cmp-table tr.diff td:first-child { box-shadow: inset 4px 0 0 var(--hl); }
.cmp-table .yes { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 18%, var(--surface)); color: var(--ok); }
.cmp-table .yes .i { width: 17px; height: 17px; stroke-width: 3; }
.cmp-table .no { color: var(--muted); font-weight: 800; }

/* Verwaltung: Maskottchen */
.mood-row { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.mood-row figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 700; }

@media (max-width: 899px) {
  .hero-card { padding: 16px; border-radius: 22px; }
  .hero-main { flex-basis: 100%; gap: 10px; align-items: flex-start; }
  .hero-mascot .mascot { --ms: 84px !important; }
  .bubble.big { font-size: 17px; }
  .resume { width: 100%; }
  .resume .btn { margin-left: auto; }
  .q-hero .mascot { --ms: 56px !important; }
  .q-hero .prompt { font-size: 19px; }
  .fb-dock { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .fb-sheet { margin: 0 -16px; border-radius: 22px 22px 0 0; }
  .stage.solo .fb-sheet { margin: 0; }
  .cmp-figs { grid-template-columns: 1fr; }
  .q-meta { padding-left: 0; }
  .result h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .mascot *, .mascot-img { animation: none !important; } }

/* =================================================================== Spiel & Freunde (v3) */
/* Kopfzeile */
.gchips { display: flex; gap: 6px; align-items: center; }
.gchip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 12px; font: 800 15px var(--f-display); text-decoration: none; color: var(--muted); border: 2px solid transparent; transition: background .15s; }
.gchip:hover { background: var(--surface-2); }
.gchip .i { width: 20px; height: 20px; }
.gchip.streak.hot { color: #ff8a1f; } .gchip.streak.hot .i { fill: #ffb347; stroke: #ff8a1f; }
.gchip.streak.ice { color: #2f9ae0; background: #e2f4ff; } .gchip.streak.ice .i { stroke: #2f9ae0; }
.gchip.pud-chip { color: #a8740a; }
:root[data-theme="dark"] .gchip.streak.ice { background: #12324a; }
.bell-btn { position: relative; }
.badge { position: absolute; top: -2px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font: 800 11px/18px var(--f-body); text-align: center; border: 2px solid var(--surface); }
.tabs a { position: relative; }
.tabs a .badge { top: 2px; right: 4px; }
.avatar-btn { border: 0; background: none; padding: 0; border-radius: 50%; }
.bell-box { width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; right: -40px; }
.notif { display: flex !important; gap: 10px; align-items: flex-start !important; font-weight: 400 !important; }
.notif.new { background: var(--pen-soft); }
.notif small { display: block; color: var(--muted); font-size: 12px; }
.notif-t { font-size: 14px; line-height: 1.35; }
.notif-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.pud { display: inline-block; vertical-align: middle; flex: none; }
.pud-amt { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }

/* Avatar mit Streak-Abzeichen unten rechts (wie der Status bei Discord) */
.av { --as: 56px; position: relative; display: inline-grid; place-items: center; width: var(--as); height: var(--as); border-radius: 50%; background: var(--surface-2); flex: none; overflow: visible; }
.av-in { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.av-in .mascot { margin-top: calc(var(--as) * .02); }
.av-in .mascot .body-g { animation: none; }
.av-badge { position: absolute; right: calc(var(--as) * -.08); bottom: calc(var(--as) * -.06); display: inline-flex; align-items: center; gap: 1px; padding: 1px 6px 1px 3px; border-radius: 999px; background: var(--surface); border: 2.5px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); font: 800 calc(var(--as) * .2 + 3px)/1.2 var(--f-display); color: var(--muted); }
.av-badge .i { width: calc(var(--as) * .22 + 4px); height: calc(var(--as) * .22 + 4px); }
.av-badge.hot { color: #ff8a1f; } .av-badge.hot .i { fill: #ffb347; stroke: #ff8a1f; }
.av-badge.ice { color: #2f9ae0; background: #e2f4ff; } .av-badge.ice .i { stroke: #2f9ae0; }
.av.is-frozen .av-in { filter: saturate(.55) brightness(1.08) hue-rotate(-15deg); }
.av-ice { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #ffffffcc, transparent 30%), linear-gradient(160deg, #bfe8ff99, #7cc8ff55); border: 2px solid #9fd8ff; pointer-events: none; }
/* Rahmen */
.av.fr-gold { box-shadow: 0 0 0 3px #ffcf3f, 0 0 0 5px #a8740a; }
.av.fr-sterne { box-shadow: 0 0 0 3px #ffd23f, 0 0 0 5px #3f3fb8; }
.av.fr-sterne::after { content: "★"; position: absolute; top: -8px; left: -4px; color: #ffd23f; font-size: calc(var(--as) * .28); text-shadow: 0 0 3px #3f3fb8; }
.av.fr-feuer::before, .av.fr-regenbogen::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; z-index: -1; animation: spin 3s linear infinite; }
.av.fr-feuer::before { background: conic-gradient(#ff3d00, #ffb300, #ff6d00, #ffd600, #ff3d00); }
.av.fr-regenbogen::before { background: conic-gradient(#ff6b6b, #ffd23f, #5fcf5c, #3fa0ff, #b06bff, #ff6b6b); }
@keyframes spin { to { transform: rotate(360deg); } }
/* Hintergründe (Avatar, Profil- und Freundeskarte) */
.bg-ozean { background: linear-gradient(180deg, #7fd6ff, #1e6fd9) !important; }
.bg-wald { background: linear-gradient(180deg, #b6eaa0, #2e8b4e) !important; }
.bg-sonnenuntergang { background: linear-gradient(180deg, #ffb347, #ff5e7e 60%, #7b4bd6) !important; }
.bg-konfetti { background: radial-gradient(circle, #ff6b6b 2px, transparent 3px) 0 0 / 22px 22px, radial-gradient(circle, #3fa0ff 2px, transparent 3px) 11px 11px / 22px 22px, radial-gradient(circle, #ffd23f 2px, transparent 3px) 5px 15px / 26px 26px, #fffaf0 !important; }
.bg-weltraum { background: radial-gradient(circle, #fff 1px, transparent 1.6px) 0 0 / 28px 28px, radial-gradient(circle, #fff9 1px, transparent 1.6px) 14px 9px / 34px 34px, linear-gradient(180deg, #1a1446, #3a1c6e) !important; }

/* Frost über der ganzen Karte, wenn die Streak eingefroren ist */
.is-frozen { position: relative; }
.frost { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5; overflow: hidden;
  background: radial-gradient(circle at 12% 18%, #ffffffd0 0 6px, transparent 7px), radial-gradient(circle at 80% 30%, #ffffffb0 0 4px, transparent 5px), radial-gradient(circle at 60% 80%, #ffffffa0 0 5px, transparent 6px),
    linear-gradient(135deg, #d8f1ff8c, #a9dcff40 40%, #ffffff30 60%, #b8e4ff70);
  box-shadow: inset 0 0 0 3px #9fd8ff, inset 0 0 30px #ffffffaa; backdrop-filter: blur(.5px) saturate(.85); }
.frost::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 18px;
  background: linear-gradient(#ffffffee, #ffffffee) top / 100% 5px no-repeat, conic-gradient(from 150deg at 50% 0, #e6f6ff 0 60deg, transparent 60deg) 0 4px / 22px 14px repeat-x; filter: drop-shadow(0 2px 1px #7cc8ff88); }
.frost span { position: absolute; right: 12px; bottom: 10px; color: #4aa8e8; opacity: .8; }
.frost span .i { width: 28px; height: 28px; animation: spin 12s linear infinite; }
.pill.ice { background: #e2f4ff; color: #2f9ae0; }
.hs.ice .hs-ico { background: #e2f4ff; color: #2f9ae0; }
.hs-ico.lvl { background: color-mix(in srgb, #b06bff 18%, var(--surface)); color: #8a45e0; font: 800 14px var(--f-display); }

/* Startseite mit Seitenleiste */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dash-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }
.side-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.side-card h3 { display: flex; gap: 8px; align-items: center; font-size: 17px; font-weight: 800; }
.side-card h3 .i { color: var(--pen); }
.mission { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; }
.mission + .mission { border-top: 1px solid var(--line); padding-top: 10px; }
.mission p { margin: 0 0 4px; font-size: 14px; font-weight: 700; line-height: 1.25; }
.m-bar { position: relative; height: 18px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 2px solid var(--line); }
.m-bar i { display: block; height: 100%; background: linear-gradient(180deg, #ffd96b, #ffb020); transition: width .5s; }
.mission.t2 .m-bar i { background: linear-gradient(180deg, #c49bff, #9b5cff); }
.mission.t1 .m-bar i { background: linear-gradient(180deg, #8cc8ff, #4aa3ff); }
.mission.done .m-bar i { background: linear-gradient(180deg, #7ee06b, #4fbf4a); }
.m-bar span { position: absolute; inset: 0; display: grid; place-items: center; font: 800 11px var(--f-body); color: var(--ink); }
.m-claimed { width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 18%, var(--surface)); color: var(--ok); display: grid; place-items: center; }
.m-crate svg { display: block; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.btn.pulse { animation: pulse 1.2s ease-in-out infinite; }
.crates-row { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.crate-btn { border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 6px 8px 4px; display: flex; flex-direction: column; align-items: center; font: 800 12px var(--f-body); box-shadow: 0 3px 0 var(--card-sh); animation: bob 2.4s ease-in-out infinite; }
.mini-friends { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; }
.mini-f { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); font-size: 12.5px; font-weight: 700; border-radius: 12px; padding: 4px; }
.mini-f.is-frozen { background: linear-gradient(160deg, #dff3ff, #c2e6ff); }
.req-banner { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--pen-soft); color: var(--pen); font-weight: 800; text-decoration: none; }
.lb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lb li { display: grid; grid-template-columns: 44px auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); }
.lb li a { color: var(--ink); text-decoration: none; }
.lb li.me { background: var(--pen-soft); box-shadow: inset 0 0 0 2px var(--pen); }
.lb .rank { display: inline-flex; align-items: center; gap: 2px; font: 800 16px var(--f-display); color: var(--muted); }
.lb .rank .i { width: 18px; height: 18px; }
.lb .r1 { color: #e0a800; } .lb .r2 { color: #8a9aa8; } .lb .r3 { color: #c26a2e; }
.lb .xp { font: 800 14px var(--f-display); font-variant-numeric: tabular-nums; }
.lb.mini li { grid-template-columns: 26px auto 1fr auto; padding: 6px 8px; font-size: 14px; }
.news { display: flex; flex-direction: column; gap: 10px; }
.news h3 { display: flex; gap: 8px; align-items: center; font-size: 17px; font-weight: 800; }

/* Feed */
.feed { display: flex; flex-direction: column; gap: 12px; }
.feed-card { background: var(--surface); border: 2px solid var(--line); border-radius: 20px; padding: 14px 16px; box-shadow: 0 3px 0 var(--card-sh); display: flex; flex-direction: column; gap: 10px; animation: rise .4s both; }
.feed-h { display: flex; gap: 12px; align-items: center; }
.feed-t { flex: 1; min-width: 0; }
.feed-t p { margin: 0; line-height: 1.35; }
.feed-t a { color: var(--ink); text-decoration: none; }
.feed-t small { color: var(--muted); }
.feed-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.feed-card.hot .feed-ico { background: #fff1e0; color: #ff8a1f; } .feed-card.hot .feed-ico .i { fill: #ffb347; }
.feed-card.lvl .feed-ico { background: #f1e6ff; color: #8a45e0; }
.feed-card.ok .feed-ico { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
.feed-card.crate .feed-ico { background: #fff6d6; color: #c98a00; }
.feed-card.duel .feed-ico { background: #ffe6e6; color: #d33; }
.feed-card.ice .feed-ico { background: #e2f4ff; color: #2f9ae0; }
.feed-actions { display: flex; gap: 8px; padding-left: 58px; }
.feed-actions button { display: inline-flex; align-items: center; gap: 5px; border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font: 800 13px var(--f-body); color: var(--muted); }
.like.on { color: #ff4d6d; border-color: #ffb3c1; background: #fff0f3; } .like.on .i { fill: #ff4d6d; }
@keyframes burst { 0% { transform: scale(1); } 40% { transform: scale(1.4) rotate(-8deg); } 100% { transform: scale(1); } }
.like.burst .i { animation: burst .45s ease; }
.cmts { padding-left: 58px; display: flex; flex-direction: column; gap: 4px; }
.cmt { margin: 0; font-size: 14px; background: var(--surface-2); border-radius: 12px; padding: 6px 10px; }
.cmt a { color: var(--ink); text-decoration: none; } .cmt small { color: var(--muted); }
.cmt .x { border: 0; background: none; color: var(--muted); font-size: 16px; }
.cmt-form { display: flex; gap: 8px; padding-left: 58px; }
.cmt-form .input { flex: 1; }

/* Freunde */
.add-friend { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.req { display: flex; gap: 10px; align-items: center; padding: 10px 14px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.fcard { position: relative; border: 2px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 3px 0 var(--card-sh); padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.fcard[class*="bg-"] .fcard-t b, .fcard[class*="bg-"] .fcard-t small { color: #fff; text-shadow: 0 1px 3px #0008; }
.fcard-main { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.fcard-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fcard-t b { font: 800 17px var(--f-display); }
.fcard-t small { color: var(--muted); }
.fs-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.fs { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; color: #ff8a1f; background: #fff1e0; border-radius: 999px; padding: 2px 9px; }
.fs .i { width: 15px; height: 15px; fill: #ffb347; }
.fs.off { color: var(--muted); background: var(--surface-2); font-weight: 700; }
.fcard-act { display: flex; gap: 8px; position: relative; z-index: 6; }
.duel { display: flex; gap: 12px; align-items: center; padding: 12px 14px; flex-wrap: wrap; }
.duel-t { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.duel-score { font: 800 18px var(--f-display); }

/* Modal & Kisten */
.modal { position: fixed; inset: 0; z-index: 80; background: #0b1420b0; display: grid; place-items: center; padding: 16px; animation: fadeIn .2s; backdrop-filter: blur(3px); }
.modal.out { animation: fadeOut .2s forwards; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.modal-card { background: var(--surface); border-radius: 26px; padding: 24px; width: min(440px, 100%); max-height: 90dvh; overflow-y: auto; box-shadow: 0 20px 60px #0006; animation: pop .3s cubic-bezier(.2, .9, .3, 1.2); display: flex; flex-direction: column; gap: 12px; }
.modal.center .modal-card { align-items: center; text-align: center; }
.crate-modal .modal-card { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--hl) 25%, var(--surface)), var(--surface) 65%); }
.crate-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.crate-box { position: relative; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; filter: drop-shadow(0 10px 14px #0003); transition: transform .15s; }
.crate-box:hover { transform: scale(1.04); }
.crate-box:active { transform: scale(.96); }
@keyframes cshake { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-9deg) scale(1.05); } 35% { transform: rotate(8deg); } 55% { transform: rotate(-5deg); } 75% { transform: rotate(3deg); } }
.crate-box.shake { animation: cshake .5s ease; }
@keyframes cup { 0% { transform: scale(1); filter: brightness(1); } 40% { transform: scale(1.25); filter: brightness(1.8); } 100% { transform: scale(1); filter: brightness(1); } }
.crate-box.upgrade { animation: cup .7s ease; }
.crate-glow { position: absolute; inset: 15% 10%; border-radius: 50%; z-index: -1; background: radial-gradient(circle, #ffffffaa, transparent 70%); animation: pulse 1.6s infinite; }
.crate-box.t2 .crate-glow { background: radial-gradient(circle, #c49bffaa, transparent 70%); }
.crate-box.t3 .crate-glow { background: radial-gradient(circle, #ffd23fcc, transparent 70%); }
.crate-box.t4 .crate-glow { background: conic-gradient(#ff6b6b88, #ffd23f88, #5fcf5c88, #3fa0ff88, #ff6b6b88); filter: blur(10px); animation: spin 2s linear infinite; }
.crate-box.opening .lid { animation: lidoff .6s ease-in forwards; transform-box: fill-box; transform-origin: center; }
@keyframes lidoff { to { transform: translateY(-80px) rotate(-25deg); opacity: 0; } }
.crate-box.opened { cursor: default; animation: pop .4s; }
.crate-hint { font: 800 18px var(--f-display); min-height: 1.4em; }
.crate-hint b { color: #b06bff; }
.crate-dots { display: flex; gap: 8px; } .crate-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: background .2s; } .crate-dots i.on { background: var(--pen); }
.rewards { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.reward { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; min-width: 110px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--card-sh); animation: pop .4s both; }
.reward:nth-child(2) { animation-delay: .15s; } .reward:nth-child(3) { animation-delay: .3s; }
.reward b { font: 800 24px var(--f-display); } .reward span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.reward.item { border-color: #b06bff; }

/* Shop */
.shop-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.balance { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 10px 16px; box-shadow: 0 3px 0 var(--card-sh); font: 800 26px var(--f-display); color: #a8740a; }
.balance span:last-child { font-size: 14px; color: var(--muted); }
.freeze-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; background: linear-gradient(135deg, #e6f6ff, var(--surface) 70%); }
.freeze-art { animation: bob 3s ease-in-out infinite; }
.freeze-slots { display: flex; gap: 6px; }
.freeze-slots i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; border: 2px dashed #9fd8ff; color: #9fd8ff; }
.freeze-slots i.on { background: #2f9ae0; border: 2px solid #1d6fa8; color: #fff; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shop-item { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 10px; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 3px 0 var(--card-sh); text-align: center; transition: transform .12s; }
.shop-item:hover { transform: translateY(-2px); }
.si-prev { height: 104px; display: grid; place-items: center; }
.rar { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.shop-item.r-rare { border-color: #8cc8ff; } .shop-item.r-rare .rar { color: #2f86d6; }
.shop-item.r-epic { border-color: #c49bff; } .shop-item.r-epic .rar { color: #8a45e0; }
.shop-item.r-legendary { border-color: #ffcf3f; background: linear-gradient(180deg, #fff8dc, var(--surface)); } .shop-item.r-legendary .rar { color: #c98a00; }
.shop-item.owned { opacity: .9; }

/* Profil */
.profile-card { position: relative; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding: 26px; border-radius: 28px; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--card-sh); overflow: hidden; }
.profile-card.bg-default { background: linear-gradient(135deg, color-mix(in srgb, var(--pen) 14%, var(--surface)), var(--surface)); }
.profile-card[class*="bg-"]:not(.bg-default) .pc-info h1, .profile-card[class*="bg-"]:not(.bg-default) .pc-info p { color: #fff; text-shadow: 0 2px 4px #0008; }
.pc-info { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 220px; }
.pc-info h1 { font-size: 36px; }
.lvl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lvl-badge { background: #8a45e0; color: #fff; font: 800 15px var(--f-display); padding: 4px 10px; border-radius: 10px; box-shadow: 0 3px 0 #5a2aa8; }
.lvl-bar { flex: 1; min-width: 140px; max-width: 260px; height: 14px; border-radius: 999px; background: #ffffffaa; overflow: hidden; border: 2px solid #ffffff; box-shadow: 0 0 0 1px var(--line); }
.lvl-bar i { display: block; height: 100%; background: linear-gradient(180deg, #c49bff, #8a45e0); }
.lvl small { font-weight: 800; }
.frozen-note { display: inline-flex; gap: 6px; align-items: center; background: #e2f4ff; color: #2f9ae0 !important; text-shadow: none !important; padding: 6px 12px; border-radius: 12px; font-weight: 800; align-self: flex-start; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.stat-tiles .tile small { color: var(--muted); font-size: 12px; font-weight: 700; }
.tile.ice-t b { color: #2f9ae0; }
.inv { display: flex; flex-direction: column; gap: 12px; }
.inv-items { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-item { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 86px; padding: 6px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 11.5px; font-weight: 700; }
.inv-item.on { border-color: var(--pen); box-shadow: 0 0 0 3px var(--pen-soft); }
.inv-item .none { height: 66px; display: grid; place-items: center; color: var(--muted); }
.style-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: 280px; }
.style-pick input { position: absolute; opacity: 0; }
.style-pick span { width: 100%; text-align: center; font-weight: 800; }
.style-pick.on { border-color: var(--pen); box-shadow: 0 0 0 3px var(--pen-soft); }
.players .num { width: 86px; }
.user-game { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 12px 4px 4px; }
.sm-f { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.sm-f .input { width: 100px; }

/* 5er-Serie: Zwischenbildschirm */
.inter { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 20px 0; margin: auto 0; }
.inter h1 { font-size: 34px; }
.inter-glow { position: absolute; top: 0; left: 50%; width: 320px; height: 320px; margin-left: -160px; border-radius: 50%; background: conic-gradient(from 0deg, #ffb34733, transparent 20%, #ffb34733 40%, transparent 60%, #ffb34733 80%, transparent); animation: spin 8s linear infinite; z-index: -1; }
.inter-flame { display: inline-flex; align-items: center; gap: 4px; font: 800 54px/1 var(--f-display); color: #ff8a1f; animation: pop2 .6s ease; }
.inter-flame .i { width: 56px; height: 56px; fill: #ffb347; stroke: #ff8a1f; }
.inter .btn { max-width: 320px; margin-top: 10px; }
.gains { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.gain { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; text-decoration: none; animation: pop .4s both; }
.gain.xp { background: #f1e6ff; color: #8a45e0; }
.gain.duel { background: #e6eeff; color: #2a46c8; } .gain.duel.won { background: #e3f8e6; color: #1a8a3a; } .gain.duel.lost { background: #ffe6e6; color: #c22; }
.gain.mission { background: #fff6d6; color: #a8740a; }
.acc-hat .prop { transform-origin: 100px -3px; animation: prop .35s linear infinite; }
@keyframes prop { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }

@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
@media (max-width: 899px) {
  .main-nav .nav-admin { display: none; }
  .gchips { gap: 2px; } .gchip { padding: 4px 6px; font-size: 14px; }
  #soundBtn { display: none; }
  .bell-box { position: fixed; right: 8px; left: 8px; top: 58px; width: auto; }
  .feed-actions, .cmts, .cmt-form { padding-left: 0; }
  .pc-info h1 { font-size: 28px; }
  .profile-card { padding: 18px; justify-content: center; text-align: center; }
  .profile-card .lvl { justify-content: center; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inter h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { .av::before, .frost span .i, .crate-glow, .acc-hat .prop { animation: none !important; } }
/* Mobile: im Thema-Header nur das Nötigste */
@media (max-width: 640px) { .set-top #gChips, .set-top #soundBtn { display: none; } .set-top .top-tools { gap: 4px; } }

/* ===== v4: neue Cosmetics ===== */
@keyframes heli { 0% { transform: scaleX(1); } 50% { transform: scaleX(.12); } 100% { transform: scaleX(1); } }
.acc-hat.halo { animation: halo 2.6s ease-in-out infinite; }
@keyframes halo { 50% { transform: translateY(-4px); } }
.acc-back.wings > g:first-child, .acc-back.wings > path:first-child { transform-origin: 46px 100px; }
.acc-back.wings { animation: wings 1.8s ease-in-out infinite; transform-origin: 100px 100px; }
@keyframes wings { 50% { transform: scaleX(1.05) translateY(-2px); } }
.acc-back.jet .flame { transform-box: fill-box; transform-origin: 50% 0; animation: flame .18s ease-in-out infinite alternate; }
@keyframes flame { to { transform: scaleY(.7); opacity: .85; } }
.av-in .mascot .acc-back, .av-in .mascot .acc-hat { animation: none; }
/* Rahmen */
.av.fr-holz { box-shadow: 0 0 0 4px #b07a3e, 0 0 0 6px #5a3412; }
.av.fr-pixel { outline: 4px dashed #2340c8; outline-offset: 2px; border-radius: 6px; }
.av.fr-pixel .av-in { border-radius: 6px; }
.av.fr-herzen { box-shadow: 0 0 0 3px #ff6b9a, 0 0 0 5px #a3184a; }
.av.fr-herzen::after { content: "♥"; position: absolute; top: -9px; right: -2px; color: #ff4d8d; font-size: calc(var(--as) * .3); text-shadow: 0 0 2px #fff; }
.av.fr-neon { box-shadow: 0 0 0 3px #3ff5ff, 0 0 12px 3px #3ff5ffaa; animation: neon 1.6s ease-in-out infinite; }
@keyframes neon { 50% { box-shadow: 0 0 0 3px #ff4dff, 0 0 14px 4px #ff4dffaa; } }
.av.fr-eis { box-shadow: 0 0 0 3px #dff4ff, 0 0 0 6px #7cc8ff, 0 0 10px 4px #bfe8ff; }
.av.fr-blitz { box-shadow: 0 0 0 3px #ffe14d, 0 0 0 5px #3a2a00; animation: blitz 2.4s steps(1) infinite; }
@keyframes blitz { 0%, 86% { box-shadow: 0 0 0 3px #ffe14d, 0 0 0 5px #3a2a00; } 88%, 92% { box-shadow: 0 0 0 4px #fff, 0 0 18px 8px #ffe14d; } }
.av.fr-galaxie::before, .av.fr-diamant::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; z-index: -1; animation: spin 4s linear infinite; }
.av.fr-galaxie::before { background: conic-gradient(#1b0f4a, #b04bd6, #3fa0ff, #1b0f4a, #ff7ac8, #1b0f4a); }
.av.fr-diamant::before { background: conic-gradient(#fff, #9ee7ff, #fff, #e6d8ff, #fff, #aeeaff, #fff); }
.av.fr-diamant { box-shadow: 0 0 10px 2px #bfefff; }
/* Hintergründe */
.bg-wueste { background: radial-gradient(circle at 78% 22%, #fff3b0 0 8%, transparent 9%), linear-gradient(180deg, #ffd38a, #f2a95c 62%, #d9853a 62%) !important; }
.bg-schnee { background: radial-gradient(circle, #fff 1.5px, transparent 2.2px) 0 0 / 18px 18px, radial-gradient(circle, #fff 1px, transparent 1.6px) 9px 7px / 24px 24px, linear-gradient(180deg, #a9cdea, #e8f4ff) !important; }
.bg-candy { background: linear-gradient(135deg, #ffc4e1, #e0c8ff 50%, #c2f0ff) !important; }
.bg-polarlicht { background: radial-gradient(ellipse at 30% 30%, #3fffb0aa, transparent 50%), radial-gradient(ellipse at 70% 20%, #b04bffaa, transparent 50%), linear-gradient(180deg, #06142e, #0e2a4a) !important; }
.bg-unterwasser { background: radial-gradient(circle, #ffffff70 2px, transparent 3px) 10px 0 / 30px 40px, linear-gradient(180deg, #3fd0e0, #0a4a8a) !important; }
.bg-stadt { background: linear-gradient(0deg, #0b0f1e 0 18%, transparent 18%), repeating-linear-gradient(90deg, #141a33 0 22px, #1c2448 22px 30px, transparent 30px 44px) 0 100% / 100% 45% no-repeat, radial-gradient(circle, #fff 1px, transparent 1.5px) 0 0 / 30px 30px, linear-gradient(180deg, #1b1446, #3a2a7a) !important; }
.bg-kirschbluete { background: radial-gradient(circle, #ff9ac8 3px, transparent 4px) 0 0 / 34px 34px, radial-gradient(circle, #ffd0e4 2px, transparent 3px) 17px 12px / 28px 28px, linear-gradient(180deg, #fff0f6, #ffc4dc) !important; }
.bg-matrix { background: repeating-linear-gradient(90deg, transparent 0 14px, #00ff6620 14px 16px), repeating-linear-gradient(0deg, #00ff6618 0 2px, transparent 2px 10px), #031a0c !important; }
.bg-lava { background: radial-gradient(ellipse at 50% 120%, #ffb347, #ff4d00 35%, transparent 60%), linear-gradient(180deg, #2a0a06, #6a1408) !important; }
.bg-gewitter { background: linear-gradient(115deg, transparent 47%, #ffe14d 47% 49%, transparent 49%) 60% 0 / 60% 100% no-repeat, linear-gradient(180deg, #2a3040, #4a5468) !important; }
/* Lv-Symbol mittig */
.hs-ico { flex: none; text-align: center; justify-content: center; align-items: center; line-height: 1; }
.hs-ico.lvl { display: grid; place-items: center; padding: 0; }

/* ===== v4: Shop-Erweiterungen ===== */
.chip.on { border-color: var(--pen); color: var(--pen); background: var(--pen-soft); }
.shop-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.crate-card { display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, color-mix(in srgb, #b06bff 14%, var(--surface)), var(--surface)); }
.crate-card .crate-art { flex: none; animation: bobc 2.4s ease-in-out infinite; }
@keyframes bobc { 50% { transform: translateY(-5px) rotate(-2deg); } }
.freeze-art .freeze-ice { filter: drop-shadow(0 6px 10px #2f86cf40); }
.filter-chips { margin-top: 4px; }
.pill.lock { background: color-mix(in srgb, #ffcf3f 20%, var(--surface)); color: #8a6200; font-size: 11.5px; display: inline-flex; gap: 4px; align-items: center; text-align: center; white-space: normal; line-height: 1.2; }
.pill.lock .i { width: 13px; height: 13px; flex: none; }
.shop-item.r-admin { border-color: #2b3a55; background: linear-gradient(160deg, color-mix(in srgb, #ffcf3f 16%, var(--surface)), color-mix(in srgb, #2b3a55 16%, var(--surface))); }
.shop-item.r-admin .rar { color: #c98a00; }
.ag-prev { display: grid; place-items: center; min-height: 150px; }
.btn.admin-gift { border-color: #2b3a55; }
/* Ankündigungen */
.ann { position: relative; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 20px; border: 2px solid var(--line); background: var(--surface); box-shadow: 0 3px 0 var(--card-sh); margin-bottom: 12px; animation: pop .35s both; transition: opacity .25s, transform .25s; }
.ann.out { opacity: 0; transform: translateY(-6px) scale(.98); }
.ann-m { flex: none; }
.ann-b { flex: 1; min-width: 0; }
.ann-b h3 { font: 800 19px/1.2 var(--f-display); margin: 2px 0 4px; }
.ann-b p { margin: 0; line-height: 1.45; }
.ann-k { font: 800 12px var(--f-body) !important; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ann-k .i { width: 15px; height: 15px; }
.ann-x { position: absolute; top: 8px; right: 8px; }
.ann-info { border-color: color-mix(in srgb, var(--pen) 40%, var(--line)); background: linear-gradient(135deg, var(--pen-soft), var(--surface) 70%); }
.ann-info .ann-k { color: var(--pen); }
.ann-wichtig { border-color: #ff8a1f; background: linear-gradient(135deg, color-mix(in srgb, #ff8a1f 18%, var(--surface)), var(--surface) 70%); }
.ann-wichtig .ann-k { color: #d96a00; }
.ann-feier { border-color: #ffc22e; background: linear-gradient(135deg, color-mix(in srgb, #ffc22e 22%, var(--surface)), color-mix(in srgb, #ff6b9a 10%, var(--surface))); }
.ann-feier .ann-k { color: #b07a00; }
.ann-update { border-color: #b06bff; background: linear-gradient(135deg, color-mix(in srgb, #b06bff 16%, var(--surface)), var(--surface) 70%); }
.ann-update .ann-k { color: #8a45e0; }
.ann-pop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 420px; }
.ann-pop h2 { font: 800 24px/1.2 var(--f-display); margin: 0; }
.ann-pop p { margin: 0; }
.ann-admin { padding: 12px 14px; }
/* Einstellungen */
.set-layout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.set-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 76px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 700; }
.set-nav a:hover { background: var(--surface-2); color: var(--ink); }
.set-nav a[aria-current="page"] { background: var(--pen-soft); color: var(--pen); }
.set-nav .i { width: 18px; height: 18px; }
.field-row { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.field-row .field { min-width: 170px; flex: 1 1 170px; }
.field-row .field > span { font: 700 13px var(--f-body); color: var(--muted); }
.field-row .field small { font-size: 12px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.feat { display: flex; gap: 12px; align-items: center; padding: 12px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); }
.feat.on { border-color: color-mix(in srgb, var(--pen) 50%, var(--line)); background: var(--pen-soft); }
.feat input { position: absolute; opacity: 0; pointer-events: none; }
.feat .tgl { flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.feat .tgl::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; transition: transform .2s; }
.feat.on .tgl { background: var(--pen); }
.feat.on .tgl::after { transform: translateX(18px); }
.feat input:focus-visible + .tgl { outline: 3px solid var(--hl); outline-offset: 2px; }
.feat b { display: block; }
.feat small { color: var(--muted); font-size: 12.5px; }
.crate-tbl td .input { width: 90px; }
.mis-row { gap: 8px; }
.mis-row select { flex: 1; min-width: 0; }
.mis-row .num { width: 90px; }
.snd-list { display: flex; flex-direction: column; gap: 8px; }
.snd-row { display: grid; grid-template-columns: 170px minmax(140px, 220px) auto auto 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.snd-row [data-play] { justify-self: start; }
.item-tbl { display: flex; flex-direction: column; }
.item-row { display: grid; grid-template-columns: 60px 1fr 160px 90px; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.item-row.off { opacity: .5; }
.ir-name { display: flex; flex-direction: column; }
.ir-name small { font-weight: 700; font-size: 12px; }
.rar-rare { color: #2f7fd6; } .rar-epic { color: #8a45e0; } .rar-legendary { color: #c98a00; }
.ir-price { display: flex; align-items: center; gap: 6px; }
.ir-price .input { width: 100px; }
.inter-prev { display: flex; gap: 14px; align-items: center; }
.inter-flame.sm { font-size: 22px; display: inline-flex; gap: 4px; align-items: center; color: #ff8a1f; }
input[type="range"] { accent-color: var(--pen); width: 100%; max-width: 360px; }
@media (max-width: 860px) {
  .set-layout { grid-template-columns: 1fr; }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .set-nav a { white-space: nowrap; }
  .snd-row { grid-template-columns: 1fr auto; }
  .snd-row b { grid-column: 1 / -1; }
  .item-row { grid-template-columns: 50px 1fr; }
  .item-row .ir-price, .item-row .switch { grid-column: 2; }
  .ann { padding: 12px; } .ann-m .mascot { --ms: 52px !important; }
  .crate-card, .freeze-card { flex-direction: column; text-align: center; }
}
/* Lernset-Assistent & Import */
.add-set-quick { margin-top: 4px; }
.wiz { max-width: 860px; }
.wiz-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; counter-reset: s; flex-wrap: wrap; }
.wiz-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 14px; }
.wiz-steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 13px; }
.wiz-steps li span .i { width: 15px; height: 15px; }
.wiz-steps li.on { background: var(--pen); color: var(--pen-ink); }
.wiz-steps li.on span { color: var(--pen); }
.wiz-steps li.done { background: var(--pen-soft); color: var(--pen); }
.imp-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.imp-opt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 3px 0 var(--card-sh); cursor: pointer; font: inherit; color: var(--ink); }
.imp-opt:hover { border-color: var(--pen); }
.imp-opt.rec { border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); }
.imp-opt > .i { width: 28px; height: 28px; color: var(--pen); }
.imp-opt small { color: var(--muted); }
.imp-opt .pill { position: absolute; top: 10px; right: 10px; }
.wiz-items { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.wiz-item { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 6px; align-items: center; }
.wiz-item.add { margin-top: 6px; }
.wiz-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 12px; }
.wiz-cat label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; }
.wiz-sum { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.wiz-sum p { margin: 0; }
.imp-modal .modal-card { width: min(860px, 100%); max-height: 92vh; overflow: auto; }
.imp { display: flex; flex-direction: column; gap: 10px; }
.imp h2 { display: flex; gap: 8px; align-items: center; margin: 0; }
.imp-tbl select { min-width: 140px; }
.imp-tbl td { font-size: 13.5px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-foot { flex-wrap: wrap; }
@media (max-width: 600px) { .wiz-item { grid-template-columns: 1fr auto; } .wiz-item input:nth-child(2) { grid-column: 1; } }
.ann-pop, .ann-pop.ann-feier, .ann-pop.ann-info, .ann-pop.ann-wichtig, .ann-pop.ann-update { background: none; border: 0; }
/* Eigene Cosmetics */
.ci-ed { display: flex; flex-direction: column; gap: 12px; }
.ci-ed h2 { display: flex; gap: 8px; align-items: center; margin: 0; }
.ci-grid { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.ci-prev { display: grid; place-items: center; min-height: 290px; border-radius: 18px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 22px 22px; border: 2px dashed var(--line); }
.ci-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); }
.ci-empty .i { width: 40px; height: 40px; }
.ci-sl { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.ci-bgprev { width: 220px; height: 90px; border-radius: 12px; }
@media (max-width: 700px) { .ci-grid { grid-template-columns: 1fr; } }
.acc-back.spear .spear-glint { animation: twinkle 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
/* v5: Speichern-Leiste (hell, passend zum Rest) */
.item-row { grid-template-columns: 56px minmax(140px, 1fr) 150px 150px 80px; }
.ir-name .input { width: 100%; }
@media (max-width: 860px) { .item-row { grid-template-columns: 50px 1fr; } .item-row > select, .item-row .ir-price, .item-row .switch { grid-column: 2; } }
/* Mitglieder, Einladungs-Auswahl, KI */
.members { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.member .m-n { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.choice-box { padding: 12px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.inv-choices { display: flex; flex-direction: column; gap: 8px; }
.inv-choice { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); }
.inv-choice:has(input:checked) { border-color: var(--pen); background: var(--pen-soft); }
.inv-choice small { display: block; color: var(--muted); }
.ki-steps { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.ki-steps ol { margin: 6px 0; padding-left: 20px; }
.photo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-row img { width: 86px; height: 86px; object-fit: cover; border-radius: 12px; border: 2px solid var(--line); }
.ai-busy { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--pen-soft); color: var(--pen); font-weight: 700; }
.photo-row .ph { position: relative; }
.photo-row .ph .x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); font-weight: 800; cursor: pointer; }
.imp-opt.ai { border-color: color-mix(in srgb, #b06bff 55%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, #b06bff 12%, var(--surface)), var(--surface)); }
.imp-opt.ai > .i { color: #8a45e0; }

/* Speichern-Leiste: hell, mittig, ohne verschobene Animation */
.save-bar { position: fixed; left: 0; right: 0; bottom: 18px; margin: 0 auto; width: max-content; max-width: calc(100vw - 32px); display: none; gap: 10px; align-items: center; padding: 10px 10px 10px 16px; border-radius: 18px; background: var(--surface); color: var(--ink); border: 2px solid var(--pen); box-shadow: 0 4px 0 var(--card-sh), 0 12px 32px #0002; z-index: 60; font-weight: 700; }
.save-bar.show { display: flex; animation: saveIn .25s ease-out both; }
@keyframes saveIn { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
.save-bar span { display: flex; gap: 8px; align-items: center; color: var(--pen); white-space: nowrap; }
.save-bar .btn.ghost { color: var(--muted); }
@media (max-width: 600px) { .save-bar { width: auto; left: 12px; right: 12px; bottom: 80px; } .save-bar span { flex: 1; white-space: normal; font-size: 13px; } }
.set-body { min-width: 0; }
.set-layout { min-width: 0; }
.crate-tbl { min-width: 0; }
@media (max-width: 600px) { .save-bar { gap: 6px; padding: 8px 8px 8px 12px; } .save-bar span { min-width: 0; font-size: 12.5px; } .save-bar span .i { display: none; } .save-bar .btn { padding-inline: 10px; } }
/* Mobile: 5er-Serie füllt den ganzen Bildschirm, „Weiter“ schließt */
@media (max-width: 899px) {
  .inter { position: fixed; inset: 0; z-index: 95; margin: 0; justify-content: center; padding: 24px 20px calc(28px + env(safe-area-inset-bottom)); overflow: hidden;
    background: radial-gradient(circle at 50% 38%, color-mix(in srgb, #ffb347 22%, var(--bg)), var(--bg) 70%); animation: interIn .3s ease-out both; }
  .inter .inter-glow { top: 12%; }
  .inter h1 { font-size: 32px; }
  .inter .btn { position: absolute; left: 20px; right: 20px; bottom: calc(24px + env(safe-area-inset-bottom)); max-width: none; margin: 0; }
}
@keyframes interIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

.site-foot { display: flex; justify-content: center; gap: 8px; padding: 18px 16px 26px; font-size: 13px; color: var(--muted); }
.site-foot a { color: var(--muted); text-decoration: none; } .site-foot a:hover { color: var(--ink); text-decoration: underline; }
body.on-set .site-foot { display: none; }
@media (max-width: 899px) { .site-foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } }
.legal-text { max-width: 760px; line-height: 1.6; }
.legal-text h2 { font-size: 22px; margin: 6px 0 4px; } .legal-text h3 { font-size: 17px; margin: 14px 0 2px; }
.legal-text p { margin: 4px 0; } .legal-text ul { margin: 4px 0 8px; padding-left: 22px; }

.beta-banner { position: sticky; top: 0; z-index: 70; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 6px 12px; background: repeating-linear-gradient(135deg, #ffcf3f 0 14px, #ffe27a 14px 28px); color: #3a2a00; font-size: 13px; font-weight: 700; text-align: center; }
.beta-banner .i { width: 16px; height: 16px; }
.rel-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.beta-card { border-color: #ffcf3f; background: linear-gradient(135deg, color-mix(in srgb, #ffcf3f 14%, var(--surface)), var(--surface)); }
.warn-card { border-color: #ff8a1f; }
.rel-item .t span { white-space: normal; }
.rel-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; } .rel-bar i { display: block; height: 100%; background: var(--pen); transition: width .2s; }
.rel-status { margin-bottom: 14px; } #relUp { margin-bottom: 14px; }

/* ===== v6: Fragen, Sprache, Listening ===== */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .grid3 { grid-template-columns: 1fr; } }
.opts-list { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 3px 0 var(--card-sh); font: inherit; color: var(--ink); cursor: pointer; transition: transform .1s; }
.opt:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--card-sh); }
.opt-dot, .opt-box { flex: none; width: 22px; height: 22px; border: 2.5px solid var(--line); border-radius: 50%; display: grid; place-items: center; }
.opt-box { border-radius: 6px; }
.opt.on { border-color: var(--pen); background: var(--pen-soft); }
.opt.on .opt-dot, .opt.on .opt-box { border-color: var(--pen); background: var(--pen); box-shadow: inset 0 0 0 3px var(--surface); }
.opt.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.opt.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.opt.miss { border-color: var(--ok); border-style: dashed; }
.opt:disabled { cursor: default; }
.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tf-row .btn { padding: 16px; font-size: 17px; }
.tf-row .btn.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, var(--surface)); }
.tf-row .btn.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, var(--surface)); }
.num-row { display: flex; gap: 8px; align-items: center; } .num-row .input { max-width: 220px; } .unit { font-weight: 800; font-size: 18px; }
.cloze { line-height: 2.4; font-size: 17px; } .cloze.big { font-size: 19px; }
.cloze-gap { display: inline-block; padding: 4px 8px; height: auto; min-width: 4ch; margin: 0 2px; vertical-align: baseline; }
.cloze-gap.ok { border-color: var(--ok); } .cloze-gap.bad { border-color: var(--bad); }
.qmatch { display: flex; flex-direction: column; gap: 8px; }
.qm-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px; font-weight: 700; }
.qm-row select.ok { border-color: var(--ok); } .qm-row select.bad { border-color: var(--bad); }
@media (max-width: 600px) { .qm-row { grid-template-columns: 1fr; } }
.qorder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qorder li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); }
.qorder li.ok { border-color: var(--ok); } .qorder li.bad { border-color: var(--bad); }
.qo-n { width: 26px; height: 26px; border-radius: 50%; background: var(--pen-soft); color: var(--pen); display: grid; place-items: center; font-weight: 800; flex: none; }
.qo-t { flex: 1; } .qo-b { display: flex; gap: 4px; }
.q-img { max-width: 100%; max-height: 260px; border-radius: 14px; border: 2px solid var(--line); }
.q-listen { margin-bottom: 4px; }
.hear-box { display: flex; justify-content: center; padding: 10px 0 4px; }
.speak-wrap { display: inline-flex; gap: 6px; align-items: center; } .speak-wrap.inline { margin-left: 6px; vertical-align: middle; }
.speak-wrap.inline .btn { padding: 4px 10px; font-size: 13px; }
.speak-btn.playing, [data-say].playing, [data-lplay].playing { border-color: var(--pen); color: var(--pen); animation: pulse 1s ease-in-out infinite; }
.lcard-h .say { margin-left: auto; margin-right: 6px; }
.ex-sents p { margin: 4px 0; }
.rec { display: flex; align-items: center; gap: 14px; padding: 14px; border: 2px dashed var(--line); border-radius: 18px; }
.rec-btn { flex: none; width: 68px; height: 68px; border-radius: 50%; border: 0; background: var(--pen); color: var(--pen-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 0 var(--pen-dk); }
.rec-btn .i { width: 30px; height: 30px; }
.rec-btn.on { background: #e5484d; box-shadow: 0 4px 0 #8a1c1f, 0 0 0 0 #e5484d88; animation: recPulse 1.2s infinite; }
@keyframes recPulse { 0% { box-shadow: 0 4px 0 #8a1c1f, 0 0 0 0 #e5484d88; } 100% { box-shadow: 0 4px 0 #8a1c1f, 0 0 0 18px #e5484d00; } }
.rec-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); }
.lp-bar { flex: 1; min-width: 80px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; } .lp-bar i { display: block; height: 100%; background: var(--pen); transition: width .3s; }
.lp-rate { width: auto; }
.lp-text { margin-top: 6px; } .lp-text summary { cursor: pointer; font-weight: 700; color: var(--muted); font-size: 14px; }
.lp-text p { line-height: 1.7; } .lp-text span.on { background: var(--pen-soft); border-radius: 4px; }
.listen-ed { border: 2px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.q-add { flex-wrap: wrap; gap: 6px; }
.qprev { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.imp-pick.two { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.qcard h3 .pill { font-size: 11px; vertical-align: middle; }
.ex-sents .say { display: inline-grid; vertical-align: middle; margin-left: 6px; width: 28px; height: 28px; }
.ex-sents { padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }

/* ---- Web-App (PWA) ---- */
.pwa-ic { border-radius: 22%; box-shadow: 0 3px 10px rgb(0 0 0 / .18); flex: none; }
.pwa-ic.sm { width: 48px; height: 48px; }
.pwa-ann { padding-right: 44px; }
@media (max-width: 520px) { .pwa-ann { flex-wrap: wrap; } .pwa-ann .ann-b { flex-basis: calc(100% - 62px); } .pwa-ann .btn { width: 100%; justify-content: center; } }
.pwa-sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; background: rgb(8 14 20 / .5); backdrop-filter: blur(3px); animation: pop .2s both; }
@media (min-width: 600px) { .pwa-sheet { place-items: center; } }
.pwa-card { position: relative; width: min(440px, 100%); background: var(--surface); color: var(--ink); border-radius: 24px 24px 0 0; padding: 28px 22px calc(22px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; justify-items: center; text-align: center; box-shadow: var(--shadow); }
@media (min-width: 600px) { .pwa-card { border-radius: 24px; } }
.pwa-card h2 { margin: 0; }
.pwa-card .btn { width: 100%; justify-content: center; }
.pwa-x { position: absolute; top: 10px; right: 10px; }
.pwa-steps { text-align: left; margin: 0; padding-left: 22px; display: grid; gap: 8px; justify-self: stretch; }
.pwa-steps .i { width: 18px; height: 18px; vertical-align: -3px; color: var(--pen, #2340c8); }

/* Mobile: Kopfleiste bleibt beim Scrollen sichtbar */
@media (max-width: 899px) {
  .app { padding-top: 0; }
  .top { position: sticky; z-index: 40; padding-top: env(safe-area-inset-top, 0px); height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); top: 0; }
}
/* Mobile: Lektions-Ende füllt den ganzen Bildschirm (wie die 5er-Serie) */
.result { position: relative; }
.result .inter-glow { display: none; }
@media (max-width: 899px) {
  .result:not(.docked) { position: fixed; inset: 0; z-index: 95; overflow-y: auto; overscroll-behavior: contain; justify-content: flex-start; gap: 10px;
    padding: calc(28px + env(safe-area-inset-top, 0px)) 18px calc(96px + env(safe-area-inset-bottom, 0px));
    background: radial-gradient(circle at 50% 22%, color-mix(in srgb, var(--pen) 16%, var(--bg)), var(--bg) 62%); animation: interIn .3s ease-out both; }
  .result.r-top:not(.docked) { background: radial-gradient(circle at 50% 22%, color-mix(in srgb, #ffb347 26%, var(--bg)), var(--bg) 62%); }
  .result:not(.docked) .inter-glow { display: block; top: calc(8px + env(safe-area-inset-top, 0px)); position: absolute; }
  .result.r-low:not(.docked) .inter-glow { display: none; }
  .result:not(.docked) > *:first-child + * { margin-top: auto; }
  .result:not(.docked) > :nth-last-child(2) { margin-bottom: auto; }
  .result:not(.docked) .result-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
  .result:not(.docked) .result-actions .btn { flex: 1 1 0; min-width: 0; padding-inline: 10px; justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .result:not(.docked) .result-actions .btn[hidden] { display: none; }
  .result:not(.docked) .result-actions .btn.primary { grid-column: 1 / -1; }
  .result:not(.docked) { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  .result:not(.docked) .tiles { margin-top: 4px; }
}

/* ================================================================ Live-Duelle */
.duel-lobby { max-width: 560px; margin: 4vh auto 0; display: grid; justify-items: center; text-align: center; gap: 10px; padding: 28px 22px; }
.duel-lobby h2 { margin: 0; }
.duel-lobby .eyebrow { display: inline-flex; gap: 6px; align-items: center; }
.duel-lobby .eyebrow .i { width: 15px; height: 15px; }
.row.center { justify-content: center; }
.dv { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 6px; }
.dv-p { display: grid; justify-items: center; gap: 6px; position: relative; animation: dvIn .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.dv-p.them { animation-name: dvIn2; }
.dv-p b { font: 800 15px var(--f-display); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-p.waiting .av { opacity: .55; filter: grayscale(.6); animation: breathe 1.6s ease-in-out infinite; }
.dv-p.off .av { opacity: .4; filter: grayscale(1); }
.dv-x { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #ff4d6d, #ff8a1f); color: #fff; font: 800 20px var(--f-display); box-shadow: 0 4px 0 #b3262f, 0 8px 20px #ff4d6d55; transform: rotate(-8deg); animation: vsPop .6s .25s cubic-bezier(.2, 1.6, .4, 1) both; }
.dv-dots { display: inline-flex; gap: 4px; position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%); }
.dv-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: dot 1.2s infinite; }
.dv-dots i:nth-child(2) { animation-delay: .15s; } .dv-dots i:nth-child(3) { animation-delay: .3s; }
.dv-prog { position: absolute; top: -6px; right: -10px; background: var(--pen); color: #fff; font: 800 12px var(--f-body); padding: 3px 7px; border-radius: 99px; }
@keyframes dvIn { from { opacity: 0; transform: translateX(-40px) scale(.8); } }
@keyframes dvIn2 { from { opacity: 0; transform: translateX(40px) scale(.8); } }
@keyframes vsPop { from { opacity: 0; transform: scale(0) rotate(-90deg); } }
@keyframes breathe { 50% { transform: scale(.95); } }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-6px); opacity: 1; } }

/* Vollbild-Ebenen (Countdown, Warten, Ergebnis) */
.duel-ov { position: fixed; inset: 0; z-index: 120; display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px; padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--bg); overflow: hidden; animation: interIn .25s ease-out both; }
.duel-ov h2 { margin: 0; }
body.duel-open { overflow: hidden; }
.duel-ov.count { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--pen) 22%, var(--bg)), var(--bg) 70%); }
.cd-n { height: 150px; display: grid; place-items: center; }
.cd-n span { font: 800 130px/1 var(--f-display); color: var(--pen); text-shadow: 0 6px 0 color-mix(in srgb, var(--pen) 35%, transparent); animation: cdPop .9s cubic-bezier(.2, 1.4, .4, 1) both; }
.cd-n span.ready { font-size: 46px; animation: none; color: var(--ink); text-shadow: none; }
.cd-n span.go { color: #2fbf71; font-size: 104px; animation: goPop .5s cubic-bezier(.2, 1.8, .4, 1) both; }
.cd-t { color: var(--muted); font-weight: 700; margin: 0; }
@keyframes cdPop { 0% { transform: scale(2.2); opacity: 0; } 35% { transform: scale(1); opacity: 1; } 80% { transform: scale(.9); opacity: 1; } 100% { transform: scale(.6); opacity: 0; } }
@keyframes goPop { from { transform: scale(.2) rotate(-12deg); opacity: 0; } }
.duel-ov.wait .wait-bar { width: min(320px, 80vw); height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 2px var(--line); }
.duel-ov.wait .wait-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pen), #7d97ff); border-radius: inherit; transition: width .5s; }

/* Live-Anzeige oben während des Duells */
.duel-hud { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); top: calc(var(--top-h) + 8px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); box-shadow: 0 6px 24px #0002, 0 0 0 1px var(--line); width: min(460px, calc(100vw - 24px)); animation: hudIn .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.duel-hud .av { flex: none; }
.dh-p { display: inline-flex; align-items: center; gap: 6px; font: 800 15px var(--f-display); position: relative; flex: none; }
.dh-bar { flex: 1; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--line); }
.dh-bar i { display: block; height: 100%; border-radius: inherit; transition: width .5s cubic-bezier(.2, 1.2, .4, 1); }
.dh-bar.me i { background: linear-gradient(90deg, #4b6bff, var(--pen)); }
.dh-bar.them { transform: scaleX(-1); }
.dh-bar.them i { background: linear-gradient(90deg, #ff8a1f, #ff4d6d); }
.dh-vs .i { width: 18px; height: 18px; color: var(--muted); }
.dh-on { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: #9aa3ad; box-shadow: 0 0 0 2px var(--surface); }
.dh-on.on { background: #2fbf71; }
body.duel-live .panel { padding-top: 58px; }
@keyframes hudIn { from { opacity: 0; transform: translate(-50%, -20px); } }

/* Einladungs-Pop-up */
.duel-pop { position: fixed; z-index: 110; right: 18px; top: calc(var(--top-h) + 14px); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--surface); box-shadow: 0 14px 40px #0003, 0 0 0 2px #ff8a1f; max-width: 420px; animation: popIn .45s cubic-bezier(.2, 1.4, .4, 1) both; transition: opacity .25s, transform .25s; }
.duel-pop.out { opacity: 0; transform: translateY(-10px) scale(.97); }
.dp-t { display: grid; min-width: 0; }
.dp-t small { display: inline-flex; gap: 4px; align-items: center; color: #e06a00; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.dp-t small .i { width: 13px; height: 13px; }
.dp-a { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 899px) { .duel-pop { left: 12px; right: 12px; top: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); max-width: none; } .dp-a { flex-direction: row; } .duel-pop { flex-wrap: wrap; } .dp-t { flex: 1; } .dp-a { width: 100%; } .dp-a .btn { flex: 1; justify-content: center; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-16px) scale(.95); } }

/* Sieg / Niederlage / Unentschieden */
.duel-ov.end { place-content: stretch; display: block; padding: 0; }
.de-bg { position: absolute; inset: 0; }
.end.win .de-bg { background: radial-gradient(circle at 50% 30%, #ffe27a, #ffb21f 38%, #ff7a1f 70%, #c2410c); }
.end.lose .de-bg { background: radial-gradient(circle at 50% 30%, #5b6b8c, #2b3550 55%, #151b2b); }
.end.draw .de-bg { background: radial-gradient(circle at 50% 30%, #c6d3ff, #7d97ff 50%, #3a4fbf); }
.de-rays { position: absolute; left: 50%; top: 30%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; background: repeating-conic-gradient(#fff3 0 9deg, transparent 9deg 22.5deg); animation: spin 22s linear infinite; mask: radial-gradient(circle, #000 10%, transparent 55%); -webkit-mask: radial-gradient(circle, #000 10%, transparent 55%); }
.de-rain i { position: absolute; top: -10%; left: var(--x); width: 2px; height: 26px; border-radius: 2px; background: linear-gradient(transparent, #a9c4ff99); animation: rain var(--s) linear var(--d) infinite; }
@keyframes rain { to { transform: translateY(120vh); } }
.de-in { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px)); color: #fff; overflow-y: auto; }
.de-trophy { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c2, #ffcf3f 55%, #e8a800); box-shadow: 0 6px 0 #a87400, 0 0 0 6px #fff5, 0 10px 40px #7a3a0080; animation: trophy .9s cubic-bezier(.2, 1.6, .4, 1) .1s both; }
.de-trophy .i { width: 46px; height: 46px; color: #7a4a00; stroke-width: 2.4; }
@keyframes trophy { from { transform: translateY(-120px) scale(.4) rotate(-30deg); opacity: 0; } }
.de-title { margin: 0; font: 800 clamp(48px, 13vw, 92px)/1 var(--f-display); letter-spacing: -.02em; display: flex; }
.de-title span { display: inline-block; animation: slam .55s cubic-bezier(.2, 1.6, .4, 1) calc(.25s + var(--i) * .06s) both; }
.end.win .de-title { color: #fff; text-shadow: 0 4px 0 #b4530a, 0 8px 0 #7a3305, 0 14px 30px #0005; }
.end.lose .de-title { color: #dbe4ff; text-shadow: 0 4px 0 #1b2338, 0 12px 30px #0006; }
.end.lose .de-title span { animation-name: drop; animation-timing-function: cubic-bezier(.3, 1.5, .5, 1); }
.end.draw .de-title { text-shadow: 0 4px 0 #24318a, 0 12px 30px #0004; }
@keyframes slam { 0% { transform: scale(3) translateY(-20px); opacity: 0; } 60% { transform: scale(.9); opacity: 1; } }
@keyframes drop { 0% { transform: translateY(-80px) rotate(-8deg); opacity: 0; } 70% { transform: translateY(6px) rotate(3deg); opacity: 1; } 85% { transform: translateY(0) rotate(-1deg); } }
.de-sub { margin: 0; font-weight: 700; font-size: 18px; opacity: .92; animation: fadeUp .5s .8s both; }
.de-vs { display: flex; align-items: center; gap: clamp(10px, 4vw, 28px); margin-top: 6px; animation: fadeUp .5s .95s both; }
.de-p { display: grid; justify-items: center; gap: 6px; position: relative; }
.de-p b { font: 800 15px var(--f-display); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.de-p .av { background: #ffffff30; border-radius: 50%; box-shadow: 0 0 0 4px #ffffff50; }
.de-p.w .av { box-shadow: 0 0 0 4px #ffe066, 0 0 30px #fff8; animation: bounceW 1.2s 1.3s ease-in-out infinite; }
.de-p.l .av { filter: saturate(.6) brightness(.9); transform: scale(.9); }
.de-crown { position: absolute; top: -26px; z-index: 2; width: 46px; height: 32px; background: linear-gradient(#ffe066, #ffb21f); clip-path: polygon(0 100%, 0 25%, 25% 60%, 50% 0, 75% 60%, 100% 25%, 100% 100%); filter: drop-shadow(0 2px 0 #a86a00); animation: crown .6s cubic-bezier(.2, 1.8, .4, 1) 1.4s both; }
@keyframes crown { from { transform: translateY(-40px) scale(0); opacity: 0; } }
@keyframes bounceW { 50% { transform: translateY(-6px); } }
.de-score { display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 4px 8px; text-align: center; }
.de-score b { font: 800 46px/1 var(--f-display); font-variant-numeric: tabular-nums; text-shadow: 0 3px 0 #0003; }
.de-score i { font: 800 36px/1 var(--f-display); opacity: .7; font-style: normal; }
.de-score small { grid-column: 1 / -1; opacity: .8; font-weight: 700; font-size: 12.5px; }
.de-reward { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; background: #ffffff2a; box-shadow: inset 0 0 0 2px #ffffff40; font-weight: 700; animation: fadeUp .5s 1.2s both, pulse 1.8s 2s ease-in-out infinite; }
.de-reward b { font: 800 22px var(--f-display); }
.de-act { width: min(360px, 100%); margin-top: 8px; animation: fadeUp .5s 1.4s both; }
.de-act .btn { width: 100%; justify-content: center; background: #fff; color: #13202b; box-shadow: 0 4px 0 #0003; border: 0; }
.end.win .de-act .btn { color: #b4530a; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
@keyframes pulse { 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .de-rays, .de-rain i, .de-p.w .av, .de-reward { animation: none !important; } }
@media (min-width: 900px) { .duel-hud { left: auto; right: 14px; transform: none; width: calc(var(--panel-w) - 28px); animation-name: hudInD; } }
@keyframes hudInD { from { opacity: 0; transform: translateY(-20px); } }

/* Namen & Design (Admin) */
.ir-prev { position: relative; }
.ir-tex { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; padding: 0; transition: transform .15s, color .15s, border-color .15s; }
.ir-tex .i { width: 14px; height: 14px; }
.ir-tex:hover { transform: scale(1.1); color: var(--pen); border-color: var(--pen); }
.ir-tex.on { background: var(--pen); border-color: var(--pen); color: #fff; }
.logo-pick { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-prev { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 24px; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--line); flex: none; }
.logo-prev img { max-width: 80px; max-height: 80px; }
.logo-prev .brand-mark { width: 64px; height: 64px; }
.mc-grid { display: flex; gap: 14px; flex-wrap: wrap; }
.mc-f { display: grid; justify-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.mc-f input { width: 54px; height: 54px; border: 0; border-radius: 16px; padding: 0; background: none; cursor: pointer; }
.mc-f input::-webkit-color-swatch-wrapper { padding: 0; } .mc-f input::-webkit-color-swatch { border: 3px solid var(--line); border-radius: 16px; }
.names-tbl td { vertical-align: middle; } .names-tbl input { width: 100%; }
.brand-img { width: 32px; height: 32px; object-fit: contain; }

/* ================================================================ Feinschliff v7: sauberer & lebendiger */
:root { --ease-spring: cubic-bezier(.2, 1.4, .4, 1); --ease-out: cubic-bezier(.2, .8, .3, 1); }
/* Karten heben sich beim Überfahren leicht an */
@media (hover: hover) {
  .set-card, .shop-item, .duel.card, .ex, .mission, .fcard { transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), border-color .15s; }
  .set-card:hover, .shop-item:hover, .duel.card:hover, .fcard:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--card-sh), 0 14px 28px -12px #0003; }
  .btn.primary:not(:disabled):hover { filter: brightness(1.07) saturate(1.05); }
}
/* Primär-Knöpfe: dezenter Glanz */
/* Fokus deutlich, aber schön */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--pen) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
/* Fortschrittsbalken: wandernder Glanz */
.q-progress i { position: relative; overflow: hidden; }
@keyframes shimmer { 60%, 100% { transform: translateX(100%); } }
/* Antwort richtig: Maskottchen hüpft · falsch: Eingabe wackelt */
.panel:has(.fb-sheet.ok) .q-hero .mascot { animation: jump .6s var(--ease-out); }
.panel:has(.fb-sheet.bad) .q-hero .mascot { animation: droop .6s ease; }
.panel:has(.fb-sheet.bad) .q-form .input, .panel:has(.fb-sheet.bad) .opts, .panel:has(.fb-sheet.bad) #qForm .input { animation: shake .42s ease; }
@keyframes shake { 15%, 55% { transform: translateX(-7px); } 35%, 75% { transform: translateX(7px); } 90% { transform: translateX(-2px); } }
.fb-sheet .fb-badge { animation: popBadge .45s var(--ease-spring) .05s both; }
@keyframes popBadge { from { transform: scale(0) rotate(-40deg); } }
/* Handy: Rückmeldung als echtes Bottom-Sheet über der Leiste */
@media (max-width: 899px) {
  .fb-dock:not(:empty) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; }
  .fb-dock .fb-sheet, .stage.solo .fb-dock .fb-sheet { margin: 0; border-radius: 26px 26px 0 0; border-width: 3px 0 0; border-style: solid; padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -12px 34px -10px #0003; animation: sheetUp .34s var(--ease-out) both; max-height: 70dvh; }
  .panel:has(.fb-dock:not(:empty)) { padding-bottom: 260px; }
  .fb-dock .fb-next { width: 100%; justify-content: center; }
}
@keyframes sheetUp { from { transform: translateY(100%); } }
/* Kopfleiste am Handy: leichtes Glas beim Scrollen */
@media (max-width: 899px) { .top { background: transparent; isolation: isolate; } .top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 1px 0 var(--line); } }
/* Lade-Platzhalter statt „Lädt …“ */
.skel { display: grid; gap: 14px; }
.skel i { display: block; height: 18px; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 40%, var(--surface)) 50%, var(--surface-2) 75%); background-size: 300% 100%; animation: skel 1.2s linear infinite; }
.skel i.h { height: 34px; width: 55%; } .skel i.b { height: 120px; border-radius: 20px; } .skel i.s { width: 70%; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -200% 0; } }
/* Toast: weich von unten */
.toast { animation: toastIn .35s var(--ease-spring); border-radius: 14px; box-shadow: 0 10px 30px -8px #0005; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }
/* Navigation: aktiver Reiter federt rein */
@keyframes navPop { from { transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
@media (max-width: 899px) { .app { align-content: start; } }
@media (max-width: 899px) { body:has(#panel .q-top) .top .tabs { display: none; } body:has(#panel .q-top) .app { padding-bottom: env(safe-area-inset-bottom, 0px); } }

/* Logo */
.brand .logo-mark { flex: none; filter: drop-shadow(0 2px 0 #0b124022); transition: transform .3s var(--ease-spring); }
.brand:hover .logo-mark { transform: rotate(-6deg) scale(1.08); }
.brand-img { width: 34px; height: 34px; }
.logo-lock { display: inline-flex; align-items: center; gap: 12px; }
.logo-lock.la > svg { width: 100%; max-width: 340px; height: auto; display: block; }
.logo-lock.la { display: block; width: 100%; max-width: 340px; }
.lb-t { font: 800 44px/1 var(--f-display); letter-spacing: -.03em; color: var(--ink); }
.lb-t em { font-style: normal; color: var(--pen); }
.logo-lock.lb .logo-mark { filter: drop-shadow(0 4px 10px #2340c855); }
.lc-t { font: 800 34px/1 var(--f-display); letter-spacing: .04em; color: #fff; background: #ff3d6e; padding: 8px 16px 10px; border-radius: 12px; border: 4px solid #0b1240; box-shadow: 0 4px 0 #0b1240; transform: rotate(-3deg); text-shadow: 0 2px 0 #0b1240; }
.auth-logo { margin-bottom: 14px; animation: logoIn .7s var(--ease-spring) both; }
.auth-logo-img { width: 72px; height: 72px; vertical-align: middle; margin-right: 10px; }
.auth-logo b { font: 800 34px var(--f-display); vertical-align: middle; }
@keyframes logoIn { from { opacity: 0; transform: translateY(-14px) scale(.92); } }
.logo-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.logo-style { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 10px; border: 2px solid var(--line); border-radius: 18px; cursor: pointer; background: var(--surface); box-shadow: 0 3px 0 var(--card-sh); transition: border-color .15s, transform .15s; }
.logo-style input { position: absolute; opacity: 0; pointer-events: none; }
.logo-style.on { border-color: var(--pen); box-shadow: 0 3px 0 var(--pen-dk); }
.logo-style:hover { transform: translateY(-2px); }
.ls-prev { height: 96px; display: grid; place-items: center; width: 100%; overflow: hidden; }
.ls-prev .logo-lock.la { max-width: 210px; }
.ls-prev .lb-t { font-size: 28px; } .ls-prev .logo-lock.lb .logo-mark { width: 52px; height: 52px; }
.ls-prev .lc-t { font-size: 20px; padding: 5px 10px 6px; border-width: 3px; } .ls-prev .logo-lock.lc .logo-mark { width: 70px; height: 70px; }
@media (max-width: 899px) { .brand .logo-mark { width: 30px; height: 30px; } }


/* ================================================================ CLEAN (v7.1): weiche Schatten, feine Linien, ruhige Bewegung */
:root { --card-sh: transparent; --line: #e3e8ec; --bg: #f4f6f8; --soft: 0 1px 2px #0f1d2b0f, 0 6px 20px -10px #0f1d2b26; --soft-hover: 0 2px 4px #0f1d2b12, 0 14px 30px -12px #0f1d2b33; --r-card: 18px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --line: #222d38; --bg: #0b1016; --soft: 0 1px 2px #0008, 0 8px 24px -12px #000a; --soft-hover: 0 2px 4px #0009, 0 16px 34px -12px #000c; } }
:root[data-theme="dark"] { --line: #222d38; --bg: #0b1016; --soft: 0 1px 2px #0008, 0 8px 24px -12px #000a; --soft-hover: 0 2px 4px #0009, 0 16px 34px -12px #000c; }

/* Flächen */
.card, .hero-card, .set-card, .shop-item, .tile, .ex, .duel.card, .mission, .fcard, .ann, .logo-style, .bubble, .auth-card, .duel-lobby, .item-row.card { border-width: 1px !important; box-shadow: var(--soft); }
.card, .set-card, .ex, .shop-item, .tile, .ann { border-radius: var(--r-card); }
.hero-card { border-radius: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--pen) 6%, var(--surface)), var(--surface) 55%); }
.set-card { border-top-width: 1px !important; padding-top: 20px; overflow: hidden; }
.set-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--sc, var(--pen)); }
.bubble { box-shadow: 0 1px 2px #0f1d2b0d, 0 4px 14px -8px #0f1d2b26; }
.bubble::before { border-left-width: 1px; border-bottom-width: 1px; }
.card.flat { box-shadow: none; }
@media (hover: hover) {
  .set-card:hover, .shop-item:hover, .duel.card:hover, .fcard:hover, .ex:hover, .logo-style:hover { transform: translateY(-2px); box-shadow: var(--soft-hover); }
}
.ex[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--pen), var(--soft); border-color: var(--pen); }
.logo-style.on { box-shadow: 0 0 0 2px var(--pen), var(--soft); }

/* Knöpfe: flach, klar, sanftes Drücken */
.btn { border-width: 1px; border-radius: 12px; box-shadow: 0 1px 2px #0f1d2b14; font-weight: 700; transition: transform .12s ease, box-shadow .15s ease, background .15s, filter .15s, border-color .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--ink) 18%, var(--line)); }
.btn:active, .btn.primary:active { transform: scale(.97); box-shadow: none; }
.btn.primary, .btn.primary.sm { border-color: transparent; box-shadow: 0 1px 2px #0f1d2b26, 0 6px 16px -8px color-mix(in srgb, var(--pen) 70%, transparent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.sm { border-radius: 10px; box-shadow: 0 1px 2px #0f1d2b10; }
.btn.ghost { box-shadow: none; }
.fb-sheet .fb-next { border-color: transparent !important; box-shadow: 0 6px 16px -8px #0006 !important; }
.chip { border-width: 1px; }
.chip.on, .chip[aria-pressed="true"] { box-shadow: none; }
.input { border-width: 1px; border-radius: 12px; background: var(--surface); }
.input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--pen) 16%, transparent); }
.seg button[aria-pressed="true"] { box-shadow: 0 1px 3px #0f1d2b1f; }

/* Kopfzeile & Navigation */
.top { border-bottom: 1px solid var(--line); box-shadow: none; }
.tabs a[aria-current="page"] { box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--pen) 80%, transparent); }
@media (max-width: 899px) { .tabs a[aria-current="page"] { box-shadow: none; } .tabs { box-shadow: 0 -1px 0 var(--line); border-top: 0; } }

/* Fortschritt: ruhig, einfarbig */
.q-progress { height: 12px; border-width: 0; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.q-progress i { background: var(--ok); box-shadow: none; }
.bar { background: color-mix(in srgb, var(--ink) 8%, transparent); }

/* Rückmeldung: klar statt knallig */
.fb-sheet { border-top-width: 2px; }
.stage.solo .fb-sheet { border-width: 1px; box-shadow: var(--soft); }

/* Bewegung: kürzer, ohne Überschwingen */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-in > *, .panel > *:not(.fb-dock) { animation-duration: .3s; animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
.panel:has(.fb-sheet.ok) .q-hero .mascot { animation: hopSoft .45s ease-out; }
@keyframes hopSoft { 40% { transform: translateY(-8px); } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.fb-sheet .fb-badge { animation: fadeScale .25s ease-out both; }
@keyframes fadeScale { from { opacity: 0; transform: scale(.7); } }
.toast { animation: toastIn .25s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.brand:hover .logo-mark { transform: none; }
.dv-p, .dv-x { animation-timing-function: ease-out; }
.auth-side:has(.auth-logo .logo-lock) .auth-mascot { display: none; }
.auth-logo .logo-lock.lb { gap: 14px; }
@media (max-width: 899px) { .auth-logo .logo-lock.lb .logo-mark { width: 56px; height: 56px; } .auth-logo .lb-t { font-size: 36px; } }
.auth-logo .logo-lock.lb { display: flex !important; flex-direction: row !important; align-items: center; flex-wrap: nowrap; width: auto; } .auth-logo { display: block; } .auth-logo .lb-t { font-size: 40px; }
