:root {
  --bg: #131f24;
  --bg-2: #1a2a31;
  --card: #202f36;
  --border: #37464f;
  --text: #f1f7fb;
  --muted: #8a9ba3;
  --faint: #52656d;
  --green: #58cc02; --green-d: #58a700; --green-bg: #203b16;
  --blue: #1cb0f6; --blue-d: #1899d6; --blue-bg: #19344a;
  --red: #ff4b4b; --red-d: #ea2b2b; --red-bg: #3f2226;
  --yellow: #ffc800; --yellow-d: #e5a400;
  --orange: #ff9600; --orange-d: #e57d00;
  --purple: #ce82ff; --purple-d: #a560d8;
  --teal: #00cd9c;
  --font: 'Nunito', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --radius: 16px;
}

/* Scrollleiste passend zum dunklen Design: schmal, abgerundet, ohne Pfeile */
html { color-scheme: dark; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background-color: #4b5d67; }
::-webkit-scrollbar-thumb:active { background-color: var(--faint); }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
@supports (-moz-appearance: none) { html { scrollbar-width: thin; scrollbar-color: var(--border) transparent; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 700; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
button { font-family: inherit; }
a { color: var(--blue); text-decoration: none; }
input, select { font-family: inherit; }
::selection { background: var(--blue); color: #fff; }
.hidden { display: none !important; }

/* ───────── Buttons ───────── */
.btn {
  --c: var(--green); --cd: var(--green-d); --fg: #131f24;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 16px;
  background: var(--c); color: var(--fg); box-shadow: 0 4px 0 var(--cd);
  font-size: 15px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  cursor: pointer; transition: filter .1s, transform .05s; user-select: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: none; }
.btn:disabled, .btn.disabled { --c: #37464f; --cd: #37464f; --fg: #52656d; cursor: default; filter: none; transform: none; box-shadow: 0 4px 0 var(--cd); }
.btn.blue { --c: var(--blue); --cd: var(--blue-d); }
.btn.red { --c: var(--red); --cd: var(--red-d); --fg: #fff; }
.btn.white { --c: #fff; --cd: #d0dbe0; --fg: var(--x, #58cc02); }
.btn.ghost { --c: transparent; --cd: var(--border); --fg: var(--blue); border: 2px solid var(--border); box-shadow: 0 4px 0 var(--border); }
.btn.ghost.muted { --fg: var(--muted); }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.link-btn { background: none; border: 0; color: var(--blue); font-weight: 800; letter-spacing: .6px; text-transform: uppercase; font-size: 14px; cursor: pointer; padding: 6px; }

/* ───────── App-Layout ───────── */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 256px; padding: 24px 16px;
  border-right: 2px solid var(--border); background: var(--bg); z-index: 20;
  display: flex; flex-direction: column; gap: 4px;
}
.logo { display: flex; align-items: center; gap: 8px; padding: 8px 16px 28px; font-size: 30px; font-weight: 900; color: var(--purple); letter-spacing: -1px; cursor: pointer; }
.logo svg { width: 38px; height: 38px; }
.nav-item {
  display: flex; align-items: center; gap: 20px; padding: 10px 16px; border-radius: 12px; border: 2px solid transparent;
  color: var(--muted); font-size: 15px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; cursor: pointer; text-align: left; background: none;
}
.nav-item svg { width: 32px; height: 32px; flex: none; }
.nav-item:hover { background: var(--bg-2); }
.nav-item.active { background: var(--blue-bg); border-color: #3f85a7; color: var(--blue); }
.main { flex: 1; margin-left: 256px; display: flex; justify-content: center; gap: 48px; padding: 24px 24px 64px; }
.center { width: 100%; max-width: 600px; }
.side-col { width: 368px; flex: none; position: sticky; top: 24px; align-self: flex-start; display: flex; flex-direction: column; gap: 22px; }
.mobile-top, .bottom-nav { display: none; }

/* Statusleiste */
.stats-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.stat { position: relative; display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; padding: 8px 10px; border-radius: 12px; cursor: pointer; background: none; border: 0; color: var(--text); }
.stat:hover { background: var(--bg-2); }
.stat svg { width: 28px; height: 28px; }
.stat.streak { color: var(--orange); } .stat.streak.off { color: var(--faint); }
.stat.gems { color: var(--blue); } .stat.hearts { color: var(--red); }
.course-badge { width: 34px; height: 28px; border-radius: 8px; border: 2px solid var(--border); display: grid; place-items: center; background: #2b1d0a; }
.course-badge svg { width: 22px; height: 22px; }

.panel { border: 2px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.panel h3 { margin: 0; font-size: 20px; font-weight: 800; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel .row { display: flex; gap: 16px; align-items: center; }
.panel p { margin: 4px 0; color: var(--muted); font-weight: 700; line-height: 1.45; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; color: var(--faint); font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }

.progress { position: relative; height: 16px; border-radius: 99px; background: var(--border); overflow: hidden; }
.progress > i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--c, var(--yellow)); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.progress > i::after { content: ''; position: absolute; left: 8px; right: 8px; top: 4px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); }
.progress > span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: rgba(0,0,0,.45); }

.mission-mini { display: flex; gap: 14px; align-items: center; padding: 8px 0; }
.mission-mini + .mission-mini { border-top: 2px solid var(--border); padding-top: 16px; margin-top: 8px; }
.mission-mini .ic { width: 44px; height: 44px; flex: none; }
.mission-mini .body { flex: 1; }
.mission-mini .t { font-size: 16px; font-weight: 800; margin-bottom: 8px; }

/* ───────── Lernpfad ───────── */
.unit { margin-bottom: 40px; }
.unit-banner {
  position: sticky; top: 16px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 16px 16px 18px; border-radius: 14px; background: var(--uc); box-shadow: 0 4px 0 var(--ucd); color: #fff;
}
.unit-banner .kicker { font-size: 13px; font-weight: 800; letter-spacing: .6px; opacity: .8; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.unit-banner h2 { margin: 4px 0 0; font-size: 21px; font-weight: 800; }
.guide-btn { display: flex; align-items: center; gap: 10px; flex: none; padding: 12px 16px; border-radius: 14px; border: 2px solid rgba(0,0,0,.2); background: transparent; box-shadow: 0 3px 0 rgba(0,0,0,.2); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; cursor: pointer; }
.guide-btn:hover { background: rgba(255,255,255,.1); }
.guide-btn svg { width: 22px; height: 22px; }
.unit-divider { display: flex; align-items: center; gap: 16px; margin: 36px 0 12px; color: var(--faint); font-size: 17px; font-weight: 800; }
.unit-divider::before, .unit-divider::after { content: ''; flex: 1; height: 2px; background: var(--border); }
.path { position: relative; display: flex; flex-direction: column; align-items: center; padding: 30px 0 10px; }
.node-wrap { position: relative; margin: 10px 0; z-index: 1; transform: translateX(var(--x, 0)); }
.node-wrap.open { z-index: 40; }
.node-wrap.current { margin-top: 48px; }
.node {
  --c: var(--uc); --cd: var(--ucd);
  position: relative; width: 70px; height: 64px; border: 0; border-radius: 50%; background: var(--c);
  box-shadow: 0 8px 0 var(--cd); cursor: pointer; display: grid; place-items: center; color: #fff; transition: transform .1s;
}
.node svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.15)); }
.node:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--cd); }
.node.locked { --c: #37464f; --cd: #2a383f; color: #52656d; }
.node.locked svg { filter: none; }
.node.chest, .node.chest.locked { background: none; box-shadow: none; width: 84px; height: 76px; }
.node.chest svg { width: 84px; height: 76px; filter: none; }
.chest-svg:not(.open) .c-open, .chest-svg.open .c-closed, .chest-svg .c-rays { display: none; }
.node.chest.locked { opacity: .55; }
.node-ring { position: absolute; left: 50%; top: 50%; width: 100px; height: 100px; transform: translate(-50%, -46%); border-radius: 50%; pointer-events: none; }
.start-bubble {
  position: absolute; left: 50%; bottom: calc(100% + 14px); transform: translateX(-50%);
  padding: 10px 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--bg); color: var(--uc);
  font-size: 15px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; animation: bob 1.2s ease-in-out infinite; z-index: 2;
}
.start-bubble::after { content: ''; position: absolute; left: 50%; top: 100%; width: 12px; height: 12px; background: var(--bg); border: 2px solid var(--border); border-top: 0; border-left: 0; transform: translate(-50%, -5px) rotate(45deg); }
.start-bubble.new-bubble { bottom: auto; top: 50%; left: calc(100% + 8px); transform: translateY(-50%); padding: 4px 9px; font-size: 12px; border-radius: 10px; animation: none; color: var(--yellow); border-color: rgba(255,200,0,.5); }
.start-bubble.new-bubble::after { display: none; }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
.popover {
  position: absolute; left: 50%; top: calc(100% + 18px); transform: translateX(-50%); width: 300px; z-index: 30;
  padding: 18px; border-radius: 16px; background: var(--uc); color: #fff; animation: pop .15s ease-out;
}
.popover::before { content: ''; position: absolute; left: 50%; top: -8px; width: 16px; height: 16px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.popover.locked { background: var(--bg); border: 2px solid var(--border); color: var(--muted); }
.popover.locked::before { border: 2px solid var(--border); border-right: 0; border-bottom: 0; top: -10px; }
.popover h4 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.popover p { margin: 0 0 16px; font-size: 15px; opacity: .9; }
.popover .btn.white { --x: var(--uc); width: 100%; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -12px) scale(.8); } }
.popover { transform-origin: 50% 0; animation: pop .32s cubic-bezier(.34,1.56,.64,1); }
.mascot-side { position: absolute; top: 120px; width: 150px; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.mascot-side.left { left: 30px; } .mascot-side.right { right: 30px; }
.path-end { text-align: center; padding: 40px 20px; color: var(--muted); }
.path-end svg { width: 110px; height: 110px; }
.path-end h3 { color: var(--text); font-size: 22px; margin: 10px 0 6px; }

/* ───────── Modal ───────── */
.modal-bg { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.6); animation: fade .15s; }
.modal { width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; border-radius: 20px; background: var(--bg); border: 2px solid var(--border); padding: 28px; text-align: center; }
.modal h2 { margin: 12px 0 8px; font-size: 24px; font-weight: 800; }
.modal p { color: var(--muted); margin: 0 0 22px; line-height: 1.5; }
.modal .actions { display: flex; flex-direction: column; gap: 14px; }
.modal.wide { max-width: 760px; text-align: left; }
.modal .close-x { float: right; background: none; border: 0; color: var(--faint); cursor: pointer; padding: 4px; }
.modal .close-x svg { width: 26px; height: 26px; }
@keyframes fade { from { opacity: 0; } }

/* Guidebook */
.guide h2 { font-size: 20px; margin: 26px 0 10px; color: var(--uc, var(--text)); }
.guide h2:first-child { margin-top: 4px; }
.guide p, .guide li { color: #d5e2e8; line-height: 1.6; font-weight: 600; }
.guide ul { padding-left: 22px; }

/* ───────── Code ───────── */
.code {
  margin: 0; padding: 16px 18px; border-radius: 14px; border: 2px solid var(--border); background: #0d171b;
  font-family: var(--mono); font-size: 14.5px; line-height: 1.65; font-weight: 500; color: #d7e3e8; overflow-x: auto; white-space: pre; text-align: left; tab-size: 4;
}
.md code, .inline-code, .opt code { font-family: var(--mono); font-size: .9em; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: #0d171b; border: 1px solid var(--border); color: #7ee0ff; white-space: pre-wrap; }
.challenge h1 code { font-family: var(--mono); font-size: .8em; font-weight: 600; padding: 1px 9px 2px; margin: 0 1px; border-radius: 9px; background: #0d171b; border: 2px solid var(--border); color: #d7e3e8; white-space: pre-wrap; vertical-align: 2px; }
.tk-kw { color: #ff7ab2; } .tk-type { color: #7ee0ff; } .tk-fn { color: #ffd166; } .tk-str { color: #a5e075; } .tk-num { color: #ce82ff; }
.tk-com { color: #6a7f88; font-style: italic; } .tk-ann { color: #ff9600; } .tk-const { color: #ce82ff; } .tk-key { color: #7ee0ff; } .tk-bool { color: #ff9600; }
.md p { margin: 0 0 12px; line-height: 1.6; }
.md p:last-child { margin-bottom: 0; }
.md strong { color: #fff; font-weight: 900; }

/* ───────── Lektion ───────── */
.lesson { min-height: 100vh; display: flex; flex-direction: column; }
.lesson-top { display: flex; align-items: center; gap: 20px; width: 100%; max-width: 1040px; margin: 0 auto; padding: 40px 24px 0; }
.icon-btn { background: none; border: 0; color: var(--faint); cursor: pointer; padding: 4px; display: grid; place-items: center; }
.icon-btn:hover { color: var(--muted); }
.icon-btn svg { width: 26px; height: 26px; }
.lesson-top .progress { flex: 1; }
.lesson-top .progress > i { --c: var(--green); }
.hearts-pill { display: flex; align-items: center; gap: 8px; color: var(--red); font-weight: 800; font-size: 18px; }
.hearts-pill svg { width: 30px; height: 30px; }
.hearts-pill.shake { animation: shake .4s; }
.combo { color: var(--orange); font-size: 14px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; margin: 0 auto; max-width: 600px; width: 100%; padding: 0 24px; height: 18px; margin-top: 14px; }
.lesson-body { flex: 1; display: flex; justify-content: center; padding: 30px 24px 180px; }
.challenge { width: 100%; max-width: 640px; animation: slidein .25s ease-out; }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } }
.challenge h1 { font-size: 30px; font-weight: 800; margin: 0 0 24px; line-height: 1.25; }
.challenge .kicker { display: flex; align-items: center; gap: 8px; color: var(--purple); font-size: 15px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; margin-bottom: 10px; }
.challenge .kicker svg { width: 22px; height: 22px; }
.challenge .code { margin-bottom: 24px; }
.speech { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 26px; }
.speech .mascot { width: 110px; flex: none; }
.bubble { position: relative; padding: 14px 18px; border: 2px solid var(--border); border-radius: 16px; font-size: 17px; line-height: 1.45; }
.bubble::before { content: ''; position: absolute; left: -9px; bottom: 22px; width: 14px; height: 14px; background: var(--bg); border-left: 2px solid var(--border); border-bottom: 2px solid var(--border); transform: rotate(45deg); }

.learn-card { border: 2px solid var(--border); border-radius: 20px; padding: 24px; background: var(--bg-2); }
.learn-card .md { font-size: 17px; color: #d5e2e8; font-weight: 600; margin-bottom: 18px; }
.learn-card .code { margin: 0; }

.options { display: grid; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 60px; padding: 12px 16px; text-align: left;
  border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 14px; background: none; color: var(--text); font-size: 17px; font-weight: 700; cursor: pointer;
}
.opt:hover { background: var(--bg-2); }
.opt .key { flex: none; width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--border); display: grid; place-items: center; font-size: 13px; color: var(--faint); }
.opt.sel { border-color: #3f85a7; background: var(--blue-bg); color: var(--blue); }
.opt.sel .key { border-color: #3f85a7; color: var(--blue); }
.opt.right { border-color: var(--green-d); background: var(--green-bg); color: var(--green); }
.opt.wrong { border-color: var(--red-d); background: var(--red-bg); color: var(--red); }
.opt:disabled { cursor: default; }

.slot { display: inline-block; min-width: 72px; height: 1.55em; vertical-align: bottom; margin: 0 2px; border-bottom: 2px solid var(--faint); text-align: center; cursor: pointer; }
.slot.filled { border: 2px solid var(--border); border-bottom-width: 3px; border-radius: 8px; padding: 0 8px; background: var(--card); color: var(--text); min-width: 0; line-height: 1.35; }
.slot.active { border-bottom-color: var(--blue); }
.slot.right { border-color: var(--green-d); color: var(--green); }
.slot.wrong { border-color: var(--red-d); color: var(--red); }
.slot-input { display: inline-block; font-family: var(--mono); font-size: 14.5px; color: var(--text); background: var(--card); border: 2px solid var(--border); border-radius: 8px; padding: 1px 8px; min-width: 120px; outline: none; }
.slot-input:focus { border-color: var(--blue); }
.slot-input.wide { width: 100%; min-width: 0; }

.bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.tile {
  position: relative; padding: 10px 16px; border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 12px; background: none; color: var(--text);
  font-family: var(--mono); font-size: 15px; font-weight: 600; cursor: pointer; white-space: pre; text-align: left;
}
.tile:hover { background: var(--bg-2); }
.tile.used { color: transparent; background: var(--border); border-color: var(--border); cursor: default; }
.order-answer { min-height: 180px; padding: 12px; border-radius: 16px; border: 2px dashed var(--border); display: flex; flex-direction: column; gap: 8px; }
.order-answer:empty::before { content: 'Tippe die Zeilen in der richtigen Reihenfolge an'; color: var(--faint); margin: auto; font-size: 15px; }
.order-answer .tile { width: 100%; border-color: #3f4f58; }
.order-bank { flex-direction: column; align-items: stretch; }
.order-bank .tile { width: 100%; }

.match { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.match .col { display: flex; flex-direction: column; gap: 14px; }
.match .opt { justify-content: flex-start; min-height: 56px; font-family: var(--mono); font-size: 15px; }
.match .col.r .opt { font-family: var(--font); }
.match .opt.done { opacity: .35; border-color: var(--border); background: none; color: var(--muted); }
.match .opt.flash-wrong { animation: shake .35s; border-color: var(--red-d); color: var(--red); }
.match .opt.flash-right { border-color: var(--green-d); color: var(--green); background: var(--green-bg); }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.lesson-foot { position: fixed; left: 0; right: 0; bottom: 0; border-top: 2px solid var(--border); background: var(--bg); z-index: 10; }
.lesson-foot.right { background: var(--green-bg); border-color: var(--green-bg); }
.lesson-foot.wrong { background: var(--red-bg); border-color: var(--red-bg); }
.foot-inner { max-width: 1040px; margin: 0 auto; min-height: 140px; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.foot-inner .btn { min-width: 160px; }
.feedback { display: flex; align-items: center; gap: 18px; flex: 1; min-width: 0; animation: slideup .2s ease-out; }
@keyframes slideup { from { opacity: 0; transform: translateY(12px); } }
.feedback .badge { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, currentColor 16%, transparent); border: 3px solid color-mix(in srgb, currentColor 45%, transparent); }
.feedback .badge svg { width: 38px; height: 38px; }
.feedback h3 { margin: 0 0 6px; font-size: 24px; font-weight: 900; }
.feedback .sol { font-family: var(--mono); white-space: pre-wrap; font-size: 14px; font-weight: 600; margin-bottom: 6px; max-height: 120px; overflow: auto; }
.feedback .exp { font-size: 15px; font-weight: 700; opacity: .9; }
.lesson-foot.hint { background: #3a3317; border-color: #3a3317; }
.lesson-foot.hint .feedback { color: var(--yellow); }
.lesson-foot.hint .btn { --c: var(--yellow); --cd: var(--yellow-d); }
.feedback .hint-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; }
.feedback .hint-line svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--yellow); }
.feedback .hint-line code { font-family: var(--mono); background: rgba(0,0,0,.25); padding: 1px 6px; border-radius: 6px; }
.opt.out { opacity: .3; text-decoration: line-through; cursor: not-allowed; }
.lesson-foot.right .feedback { color: var(--green); }
.lesson-foot.wrong .feedback { color: var(--red); }
.lesson-foot.right .btn { --c: var(--green); --cd: var(--green-d); }
.lesson-foot.wrong .btn { --c: var(--red); --cd: var(--red-d); --fg: #fff; }

/* Ergebnis-Screen */
.result { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 24px 160px; }
.result .mascot { width: 180px; animation: jump .8s ease-in-out infinite alternate; }
@keyframes jump { to { transform: translateY(-10px) rotate(-3deg); } }
.result h1 { font-size: 34px; font-weight: 900; color: var(--yellow); margin: 24px 0 8px; }
.result .sub { color: var(--muted); font-size: 18px; margin-bottom: 30px; }
.result-stats { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.rstat { width: 150px; border-radius: 16px; border: 2px solid var(--c); background: var(--c); overflow: hidden; animation: pop2 .4s both; }
.rstat:nth-child(2) { animation-delay: .12s; } .rstat:nth-child(3) { animation-delay: .24s; }
@keyframes pop2 { from { opacity: 0; transform: scale(.7); } }
.rstat .l { padding: 6px; font-size: 13px; font-weight: 900; letter-spacing: .6px; color: #131f24; text-transform: uppercase; }
.rstat .v { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 14px; background: var(--bg); color: var(--c); font-size: 22px; font-weight: 900; }
.rstat .v svg { width: 24px; height: 24px; }
.big-flame { width: 180px; height: 180px; color: var(--orange); animation: pop2 .5s both; }
.streak-num { font-size: 96px; font-weight: 900; color: var(--orange); line-height: 1; margin-top: -10px; }
.week-dots { display: flex; gap: 12px; justify-content: center; margin: 24px 0; padding: 16px 20px; border: 2px solid var(--border); border-radius: 16px; }
.week-dots div { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.week-dots i { width: 30px; height: 30px; border-radius: 50%; background: var(--border); display: grid; place-items: center; }
.week-dots i.on { background: var(--orange); }
.week-dots i svg { width: 16px; height: 16px; color: #fff; }

/* ───────── Seiten ───────── */
.page-title { font-size: 30px; font-weight: 900; margin: 8px 0 6px; }
.page-sub { color: var(--muted); font-size: 17px; margin: 0 0 28px; line-height: 1.5; }
.hero-card { display: flex; gap: 24px; align-items: center; border: 2px solid var(--border); border-radius: 20px; padding: 24px; margin-bottom: 24px; }
.hero-card .mascot, .hero-card > svg { width: 110px; flex: none; }
.hero-card h2 { margin: 0 0 6px; font-size: 22px; }
.hero-card p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.list-card { border: 2px solid var(--border); border-radius: 20px; overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.list-row + .list-row { border-top: 2px solid var(--border); }
.list-row .ic { width: 52px; height: 52px; flex: none; display: grid; place-items: center; }
.list-row .ic svg { width: 48px; height: 48px; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.list-row .d { color: var(--muted); font-size: 15px; }

.leagues { display: flex; justify-content: center; gap: 12px; margin: 10px 0 20px; }
.leagues svg { width: 54px; height: 60px; opacity: .3; }
.leagues svg.cur { opacity: 1; transform: scale(1.3); margin: 0 10px; }
.lb-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 14px; }
.lb-row.me { background: var(--bg-2); border: 2px solid var(--border); }
.lb-rank { width: 34px; text-align: center; font-size: 18px; font-weight: 900; color: var(--muted); }
.lb-rank.r1 { color: var(--yellow); } .lb-rank.r2 { color: #c0c0c0; } .lb-rank.r3 { color: #cd7f32; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ac, var(--blue)); display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 900; text-transform: uppercase; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.avatar.lg { width: 120px; height: 120px; font-size: 52px; box-shadow: inset 0 -8px 0 rgba(0,0,0,.18); }
.lb-name { flex: 1; font-size: 17px; font-weight: 800; }
.lb-name small { display: block; color: var(--muted); font-size: 13px; }
.lb-xp { color: var(--muted); font-weight: 800; }

.profile-head { display: flex; gap: 28px; align-items: center; padding-bottom: 28px; border-bottom: 2px solid var(--border); margin-bottom: 28px; }
.profile-head h1 { margin: 0; font-size: 30px; }
.profile-head .u { color: var(--muted); margin: 4px 0 10px; }
.profile-head .since { color: var(--muted); font-size: 15px; display: flex; gap: 8px; align-items: center; }
.section-title { font-size: 22px; font-weight: 800; margin: 32px 0 14px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-box { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.stat-box svg { width: 28px; height: 28px; flex: none; margin-top: 2px; }
.stat-box .v { font-size: 20px; font-weight: 900; }
.stat-box .l { color: var(--muted); font-size: 14px; }
.chart { display: flex; align-items: flex-end; gap: 12px; height: 180px; padding: 20px 20px 0; border: 2px solid var(--border); border-radius: 16px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.chart .bar i { width: 100%; max-width: 44px; border-radius: 8px 8px 4px 4px; background: var(--yellow); min-height: 4px; transition: height .6s; }
.chart .bar i.zero { background: var(--border); }
.chart .bar span { color: var(--muted); font-size: 12px; padding-bottom: 12px; }
.chart .bar b { font-size: 12px; color: var(--text); }
.ach { display: flex; gap: 18px; align-items: center; padding: 18px 20px; }
.ach + .ach { border-top: 2px solid var(--border); }
.ach-ic { position: relative; width: 70px; height: 78px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--c, var(--border)); box-shadow: 0 4px 0 rgba(0,0,0,.25); color: #fff; }
.ach-ic.off { --c: #37464f; color: #52656d; }
.ach-ic svg { width: 36px; height: 36px; }
.ach-ic small { position: absolute; bottom: 6px; font-size: 11px; font-weight: 900; }
.settings { display: grid; gap: 18px; }
.field label { display: block; font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.input, .field select {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--border); background: var(--bg-2); color: var(--text); font-size: 16px; font-weight: 700; outline: none;
}
.input:focus, .field select:focus { border-color: var(--blue); }
.colors { display: flex; gap: 10px; flex-wrap: wrap; }
.colors button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.colors button.on { border-color: #fff; }
.toggle { display: flex; align-items: center; justify-content: space-between; }
.switch { width: 52px; height: 30px; border-radius: 99px; background: var(--border); position: relative; border: 0; cursor: pointer; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--blue); }
.switch.on::after { left: 26px; }

.shop-item { display: flex; gap: 20px; align-items: center; padding: 22px 0; border-top: 2px solid var(--border); }
.shop-item .ic svg { width: 64px; height: 64px; }
.shop-item .grow { flex: 1; }
.shop-item h3 { margin: 0 0 4px; font-size: 19px; }
.shop-item p { margin: 0; color: var(--muted); }
.shop-item small { color: var(--faint); }
.price { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); }
.price svg { width: 20px; height: 20px; }

/* ───────── Landing / Onboarding ───────── */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.landing header { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1000px; margin: 0 auto; padding: 16px 24px; }
.landing .hero { flex: 1; display: flex; align-items: center; justify-content: center; gap: 70px; padding: 40px 24px; }
.landing .hero .art { width: 360px; max-width: 70vw; }
.landing .hero .copy { max-width: 420px; text-align: center; }
.landing .hero h1 { font-size: 32px; line-height: 1.3; font-weight: 800; margin: 0 0 36px; }
.landing .hero .btn { width: 100%; margin-bottom: 14px; }
.landing .langs { border-top: 2px solid var(--border); display: flex; justify-content: center; gap: 36px; padding: 20px; flex-wrap: wrap; }
.landing .langs span { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.landing .langs svg { width: 32px; height: 32px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1000px; margin: 0 auto; padding: 50px 24px 70px; }
.feature { border: 2px solid var(--border); border-radius: 20px; padding: 24px; }
.feature svg { width: 44px; height: 44px; }
.feature h3 { margin: 12px 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.5; }

.onb { min-height: 100vh; display: flex; flex-direction: column; }
.onb-top { display: flex; align-items: center; gap: 20px; width: 100%; max-width: 1080px; margin: 0 auto; padding: 36px 24px 0; }
.onb-top .progress { flex: 1; }
.onb-top .progress > i { --c: var(--green); }
.onb-body { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 40px 24px 160px; }
.onb-body .speech { margin-bottom: 44px; }
.onb-body .speech .mascot { width: 100px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; margin: 0 auto; }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); max-width: 900px; }
.choice-grid.four { grid-template-columns: repeat(4, 1fr); max-width: 1040px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-align: left;
  border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 16px; background: none; color: var(--text); font-size: 17px; font-weight: 800; cursor: pointer;
}
.choice:hover { background: var(--bg-2); }
.choice .ci { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: 30px; }
.choice .ci svg { width: 40px; height: 40px; }
.choice small { display: block; color: var(--muted); font-size: 14px; font-weight: 700; margin-top: 3px; }
.choice.sel { border-color: #3f85a7; background: var(--blue-bg); color: var(--blue); }
.choice.soon { opacity: .45; cursor: not-allowed; }
.choice .soon-tag { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); border: 2px solid var(--border); border-radius: 8px; padding: 2px 6px; }
.choice.big { flex-direction: column; text-align: center; padding: 28px 20px; }
.choice.big .ci { width: 80px; height: 80px; }
.choice.big .ci svg { width: 80px; height: 80px; }
.goal-list { display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; border: 2px solid var(--border); border-radius: 16px; overflow: hidden; }
.goal-list button { display: flex; justify-content: space-between; padding: 18px 22px; background: none; border: 0; color: var(--text); font-size: 18px; font-weight: 800; cursor: pointer; }
.goal-list button + button { border-top: 2px solid var(--border); }
.goal-list button span { color: var(--muted); font-weight: 700; }
.goal-list button.sel { background: var(--blue-bg); color: var(--blue); }
.goal-list button.sel span { color: var(--blue); }
.auth-card { width: 100%; max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { text-align: center; font-size: 26px; margin: 0 0 10px; }
.auth-card .err { color: var(--red); text-align: center; min-height: 20px; font-size: 15px; }
.auth-card .hint { color: var(--faint); text-align: center; font-size: 14px; line-height: 1.5; }
.onb-foot { position: fixed; left: 0; right: 0; bottom: 0; border-top: 2px solid var(--border); background: var(--bg); }
.onb-foot .foot-inner { justify-content: flex-end; min-height: 120px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; padding: 14px 22px; border-radius: 14px; background: var(--card); border: 2px solid var(--border); font-weight: 800; animation: slideup .2s; max-width: calc(100% - 32px); }
.toast.err { border-color: var(--red-d); color: var(--red); }
/* Ladebalken oben beim Seitenwechsel (statt die Seite durch einen Ladekreis zu ersetzen) */
body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1200; pointer-events: none; background: linear-gradient(90deg, transparent, var(--green), #89e219, transparent); background-size: 50% 100%; background-repeat: no-repeat; opacity: 0; transition: opacity .2s; }
body.page-loading::before { opacity: 1; animation: pageLoad 1s linear infinite; }
@keyframes pageLoad { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--green); animation: spin .8s linear infinite; margin: 30vh auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 30px; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

/* ───────── Responsive ───────── */
@media (max-width: 1160px) {
  .side-col { display: none; }
  .sidebar { width: 88px; padding: 24px 12px; }
  .sidebar .logo span, .nav-item span { display: none; }
  .logo { padding: 8px 8px 28px; }
  .nav-item { justify-content: center; padding: 10px; }
  .main { margin-left: 88px; }
}
@media (max-width: 720px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 76px 16px 100px; }
  .mobile-top { display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 25; background: var(--bg); border-bottom: 2px solid var(--border); padding: 8px 12px; }
  .mobile-top .stats-bar { width: 100%; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; background: var(--bg); border-top: 2px solid var(--border); justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 4px; }
  .bottom-nav .nav-item { flex-direction: column; gap: 3px; padding: 7px 2px 5px; border-radius: 14px; flex: 1 1 0; min-width: 0; max-width: 96px; justify-content: center; }
  .bottom-nav .nav-item span { display: block; font-size: 11px; letter-spacing: .3px; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav .nav-item svg, .bottom-nav .nav-item .avatar { width: 30px; height: 30px; }
  .bottom-nav .nav-badge { left: 50%; margin-left: 6px; top: 2px; }
  .mascot-side { display: none; }
  .unit-banner { top: 72px; }
  .unit-banner h2 { font-size: 18px; }
  .guide-btn span { display: none; }
  .challenge h1 { font-size: 23px; }
  .foot-inner { flex-direction: column; align-items: stretch; min-height: 0; padding: 16px; gap: 14px; }
  .foot-inner .btn { width: 100%; }
  .feedback .badge { display: none; }
  .lesson-top { padding: 20px 16px 0; gap: 12px; }
  .lesson-body { padding: 20px 16px 220px; }
  .match { gap: 10px; }
  .match .col { gap: 10px; }
  .match .opt { font-size: 13px; padding: 10px; }
  .opt .key { display: none; }
  .choice-grid, .choice-grid.three, .choice-grid.four { grid-template-columns: 1fr; }
  .landing .hero { flex-direction: column; gap: 30px; }
  .landing .hero .art { width: 220px; }
  .features { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; text-align: center; }
  .stat-grid { grid-template-columns: 1fr; }
  .hero-card { flex-direction: column; text-align: center; }
  .onb-body { padding: 24px 16px 160px; }
  .speech .mascot, .onb-body .speech .mascot { width: 72px; }
  .popover { width: 260px; }
}

/* ═════════════════════ Animationen ═════════════════════ */
:root { --spring: cubic-bezier(.34, 1.56, .64, 1); --out: cubic-bezier(.2, .8, .2, 1); }

/* Seitenwechsel */
.main .center { animation: pageIn .4s var(--out) both; }
.side-col { animation: pageIn .4s .08s var(--out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } }
.modal { animation: modalIn .38s var(--spring); }
@keyframes modalIn { from { opacity: 0; transform: scale(.82) translateY(20px); } }
.toast { animation: toastIn .4s var(--spring); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 24px) scale(.9); } }
.btn { transition: filter .1s, transform .08s, box-shadow .08s, background-color .2s, color .2s; }

/* Fortschrittsbalken füllen sich beim Laden */
.progress > i { animation: grow 1s var(--out) both; }
@keyframes grow { from { width: 0; } }

/* Lernpfad */
.node-wrap { animation: nodeIn .55s var(--spring) both; animation-delay: calc(var(--i, 0) * 60ms + 80ms); }
@keyframes nodeIn { from { opacity: 0; transform: translateX(var(--x, 0)) translateY(16px) scale(.4); } }
.node { transition: transform .12s, box-shadow .12s, filter .15s; }
.node:hover { filter: brightness(1.1); }
.ring-fill { stroke-dasharray: 100; stroke-dashoffset: 100; animation: ringFill 1.2s .5s var(--out) forwards; }
@keyframes ringFill { to { stroke-dashoffset: calc(100 - var(--p, 0)); } }
.node-wrap.cur .node.chest { animation: wiggle 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes wiggle { 0%, 70%, 100% { rotate: 0deg; } 76% { rotate: -9deg; } 82% { rotate: 8deg; } 88% { rotate: -5deg; } 94% { rotate: 3deg; } }
.unit-banner { animation: pageIn .45s var(--out) both; }
.guide-btn { transition: background .15s, transform .1s; }
.guide-btn:active { transform: translateY(3px); box-shadow: none; }

/* Maskottchen lebt: blinzeln, umschauen, schweben */
.mascot .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.08); } }
.mascot-side .mascot, .landing .art .mascot, .hero-card .mascot { animation: float 3.4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-2deg); } }
.mascot-side .pupils, .landing .art .pupils { animation: look 7s ease-in-out infinite; }
@keyframes look { 0%, 30%, 100% { transform: translate(0, 0); } 38%, 55% { transform: translate(-4px, -1px); } 63%, 85% { transform: translate(4px, 1px); } }
.speech .mascot { animation: hop .55s var(--spring) both; }
@keyframes hop { 0% { transform: translateY(20px) scale(.7); opacity: 0; } 60% { transform: translateY(-6px) scale(1.04); } }
.bubble { transform-origin: 0 100%; animation: bubbleIn .4s .12s var(--spring) both; }
@keyframes bubbleIn { from { opacity: 0; transform: scale(.6); } }

/* Gestaffeltes Einblenden */
.options .opt, .match .opt, .bank .tile { animation: rise .42s var(--spring) both; animation-delay: calc(var(--d, 0) * 55ms + 120ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.choice, .list-row, .lb-row, .shop-item, .ach, .stat-box, .feature { animation: rise .45s var(--spring) both; }
:is(.choice, .list-row, .lb-row, .shop-item, .ach, .stat-box, .feature):nth-child(2) { animation-delay: .05s; }
:is(.choice, .list-row, .lb-row, .shop-item, .ach, .stat-box, .feature):nth-child(3) { animation-delay: .1s; }
:is(.choice, .list-row, .lb-row, .shop-item, .ach, .stat-box, .feature):nth-child(4) { animation-delay: .15s; }
:is(.choice, .list-row, .lb-row, .shop-item, .ach, .stat-box, .feature):nth-child(5) { animation-delay: .2s; }
:is(.choice, .list-row, .lb-row, .shop-item, .ach, .stat-box, .feature):nth-child(6) { animation-delay: .25s; }
:is(.choice, .list-row, .lb-row, .shop-item, .ach, .stat-box, .feature):nth-child(n+7) { animation-delay: .3s; }
.choice { transition: background .15s, border-color .15s, color .15s, transform .1s; }
.choice:active, .opt:active { transform: translateY(2px); }
.choice.sel, .opt.sel { animation: selPop .28s var(--spring); }
@keyframes selPop { 40% { transform: scale(1.035); } }
.chart .bar i { transform-origin: bottom; animation: barUp .8s var(--spring) both; }
.chart .bar:nth-child(2) i { animation-delay: .05s; } .chart .bar:nth-child(3) i { animation-delay: .1s; } .chart .bar:nth-child(4) i { animation-delay: .15s; }
.chart .bar:nth-child(5) i { animation-delay: .2s; } .chart .bar:nth-child(6) i { animation-delay: .25s; } .chart .bar:nth-child(7) i { animation-delay: .3s; }
@keyframes barUp { from { transform: scaleY(0); } }

/* Lektion */
.challenge { animation: slidein .38s var(--out); }
@keyframes slidein { from { opacity: 0; transform: translateX(48px); } }
.challenge.leaving { animation: slideout .18s ease-in forwards; }
@keyframes slideout { to { opacity: 0; transform: translateX(-48px); } }
.learn-card { animation: cardIn .5s .08s var(--spring) both; }
@keyframes cardIn { from { opacity: 0; transform: scale(.94) translateY(12px); } }
.challenge .kicker svg { animation: sparkle 1.8s ease-in-out infinite; }
@keyframes sparkle { 50% { transform: rotate(-12deg) scale(1.2); filter: drop-shadow(0 0 6px var(--purple)); } }
.opt { transition: background .15s, border-color .15s, color .15s, transform .1s; }
.options .opt.right { animation: rightBounce .5s var(--spring); }
@keyframes rightBounce { 35% { transform: scale(1.04); } }
.options .opt.wrong { animation: shake .42s; }
.bank .tile { transition: transform .12s, background .15s; }
.bank .tile:not(.used):hover { transform: translateY(-2px); }
.bank .tile:not(.used):active { transform: translateY(2px); }
.tile.ghost { display: flex; align-items: center; background: var(--card); border-color: #4b5d66; color: var(--text); padding: 0 10px; white-space: pre; font-size: 15px; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.slot.right, .slot.wrong { animation: rightBounce .45s var(--spring); }
.order-answer { transition: border-color .2s; }
.lesson-top .progress > i { transition: width .7s var(--spring), background .4s; }
.progress.hot > i { background: linear-gradient(90deg, var(--yellow), var(--orange)); box-shadow: 0 0 14px rgba(255,150,0,.55); }
.progress.boost > i { animation: boost .7s ease-out; }
@keyframes boost { 0% { filter: brightness(1); } 30% { filter: brightness(1.5); } 100% { filter: brightness(1); } }
.combo.pop { animation: comboPop .5s var(--spring); }
@keyframes comboPop { from { opacity: 0; transform: scale(.5) translateY(6px); } }
.lesson-foot { transition: background-color .25s, border-color .25s; }
.feedback .badge { animation: badgePop .5s var(--spring); }
@keyframes badgePop { from { transform: scale(0) rotate(-40deg); } }
.feedback .badge path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .4s .15s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lesson-foot .foot-inner > .btn { animation: rise .35s var(--spring) both; }
.heart-half { position: fixed; z-index: 500; color: var(--red); pointer-events: none; }
.heart-half svg { width: 100%; height: 100%; }
.heart-half.l { clip-path: inset(0 50% 0 0); animation: halfL .9s cubic-bezier(.5,0,.8,.6) forwards; }
.heart-half.r { clip-path: inset(0 0 0 50%); animation: halfR .9s cubic-bezier(.5,0,.8,.6) forwards; }
@keyframes halfL { 20% { transform: translate(-4px, -6px) rotate(-12deg); } to { transform: translate(-22px, 60px) rotate(-50deg); opacity: 0; } }
@keyframes halfR { 20% { transform: translate(4px, -6px) rotate(12deg); } to { transform: translate(22px, 60px) rotate(50deg); opacity: 0; } }
.hearts-pill svg { transition: transform .2s; }
.hearts-pill.shake svg { animation: heartThump .45s var(--spring); }
@keyframes heartThump { 30% { transform: scale(.6); } }
.match .opt.flash-right { animation: rightBounce .35s var(--spring); }
.match .opt.done { transition: opacity .35s, transform .35s; transform: scale(.97); }

/* Ergebnis & Streak */
.result .mascot { animation: resultIn .7s var(--spring) both, jump .8s .7s ease-in-out infinite alternate; }
@keyframes resultIn { from { opacity: 0; transform: scale(.3) translateY(60px); } }
.result h1 { animation: titleIn .55s .25s var(--spring) both; }
@keyframes titleIn { from { opacity: 0; transform: scale(.4); } }
.result .sub { animation: pageIn .45s .4s var(--out) both; }
.rstat { animation: pop2 .5s .5s var(--spring) both; }
.rstat:nth-child(2) { animation-delay: .62s; } .rstat:nth-child(3) { animation-delay: .74s; }
@keyframes pop2 { from { opacity: 0; transform: scale(.5) translateY(20px); } }
.big-flame { animation: pop2 .6s var(--spring) both; }
.big-flame svg { width: 100%; height: 100%; transform-origin: 50% 100%; animation: flicker 1.3s ease-in-out infinite; filter: drop-shadow(0 0 24px rgba(255,150,0,.45)); }
@keyframes flicker { 0%, 100% { transform: scale(1, 1); } 33% { transform: scale(1.05, .95) skewX(-2deg); } 66% { transform: scale(.96, 1.06) skewX(2deg); } }
.streak-num { height: 1em; overflow: hidden; }
.streak-num .roll { display: inline-block; position: relative; animation: roll .7s .7s var(--spring) both; }
.streak-num .roll::before { content: attr(data-old); position: absolute; left: 0; right: 0; bottom: 100%; }
@keyframes roll { from { transform: translateY(100%); } }
.week-dots i { transition: background .3s; }
.week-dots i.today { animation: dotPop .6s 1.3s var(--spring) both; }
@keyframes dotPop { from { transform: scale(0); } }

/* Truhe */
.chest-anim { position: relative; width: 170px; margin: 0 auto; }
.chest-anim > svg { width: 170px; height: auto; display: block; overflow: visible; }
.chest-anim:not(.opened) > svg { animation: chestShake .9s ease-in-out; transform-origin: 50% 90%; }
@keyframes chestShake { 0% { transform: scale(.5); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 40% { rotate: -6deg; } 55% { rotate: 7deg; } 70% { rotate: -9deg; } 85% { rotate: 10deg; } 100% { rotate: 0deg; } }
.chest-anim.opened > svg { animation: chestOpen .55s var(--spring); transform-origin: 50% 90%; }
@keyframes chestOpen { 0% { transform: scale(1, 1); } 25% { transform: scale(1.12, .88); } 60% { transform: scale(.95, 1.08); } 100% { transform: scale(1); } }
/* Öffnen: Schloss fällt ab, Deckel klappt nach hinten auf, Licht strahlt heraus */
.chest-anim .chest-svg .c-open, .chest-anim .chest-svg .c-closed { display: inline; }
.chest-anim .c-lid, .chest-anim .c-lid-open, .chest-anim .c-lock, .chest-anim .c-inside > * { transform-box: fill-box; }
.chest-anim:not(.opened) .c-open { opacity: 0; }
.chest-anim.opened rect.c-open { animation: fadeIn .15s .28s both; }
.chest-anim.opened .c-lock { transform-origin: 50% 0; animation: lockFall .55s ease-in forwards; }
@keyframes lockFall { 30% { transform: translateY(-4px) rotate(-12deg); } 100% { transform: translate(10px, 42px) rotate(70deg); opacity: 0; } }
.chest-anim.opened .c-lid { transform-origin: 50% 100%; animation: lidUp .22s .1s ease-in forwards; }
@keyframes lidUp { to { transform: translateY(-4px) scaleY(0); } }
.chest-anim.opened .c-lid-open { transform-origin: 50% 100%; transform: scaleY(0); animation: lidOpen .5s .3s var(--spring) forwards; }
@keyframes lidOpen { to { transform: scaleY(1); } }
.chest-anim.opened .c-inside { animation: fadeIn .2s .28s both; }
.chest-anim.opened .c-inside > * { transform-origin: 50% 100%; animation: lootPop .5s var(--spring) both; animation-delay: .35s; }
.chest-anim.opened .c-inside > :nth-child(2n) { animation-delay: .45s; }
@keyframes lootPop { from { transform: translateY(8px) scale(.3); } }
.chest-anim.opened .c-glow { transform-origin: 50px 38px; animation: glowIn .5s .3s ease-out both, glowPulse 1.6s .8s ease-in-out infinite; }
@keyframes glowIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: .6; } }
@keyframes glowPulse { 0%, 100% { transform: scale(1); opacity: .6; } 50% { transform: scale(1.15, 1.5); opacity: .35; } }
.chest-anim.opened .c-rays { display: inline; transform-origin: 50px 40px; animation: raysIn .6s .3s ease-out both, raysSpin 9s .3s linear infinite; }
@keyframes raysIn { from { opacity: 0; scale: .2; } to { opacity: .28; scale: 1; } }
@keyframes raysSpin { to { rotate: 360deg; } }
@keyframes fadeIn { from { opacity: 0; } }
.gem-burst { position: absolute; left: 50%; top: 40%; width: 26px; height: 26px; margin: -13px 0 0 -13px; color: var(--blue); opacity: 0; pointer-events: none; }
.gem-burst svg { width: 100%; height: 100%; }
.chest-anim.opened .gem-burst { animation: burst 1s var(--d) var(--out) forwards; }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(.3); } 70% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-110px) scale(1.1); } }
.float-text { position: fixed; z-index: 500; transform: translateX(-50%); font-size: 22px; font-weight: 900; pointer-events: none; animation: floatUp 1.1s var(--out) forwards; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
@keyframes floatUp { from { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); } to { opacity: 0; transform: translate(-50%, -60px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ═════════════════════ Eigenes Select-Menü ═════════════════════ */
.csel { position: relative; }
.csel-btn {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; cursor: pointer;
  border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 14px; background: var(--bg-2); color: var(--text);
  font-family: inherit; font-size: 16px; font-weight: 800; transition: border-color .15s, background .15s, transform .08s;
}
.csel-btn:hover { background: #1f3139; }
.csel-btn:active { transform: translateY(2px); }
.csel.open .csel-btn, .csel-btn:focus-visible { border-color: #3f85a7; outline: none; }
.csel-label { flex: 1; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.csel-t { white-space: nowrap; }
.csel-s { color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csel-chev { width: 22px; height: 22px; flex: none; color: var(--muted); transition: transform .25s var(--spring); }
.csel.open .csel-chev { transform: rotate(180deg); color: var(--blue); }
.csel-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; padding: 6px;
  border: 2px solid var(--border); border-radius: 16px; background: var(--bg); box-shadow: 0 16px 40px rgba(0,0,0,.45);
  display: flex; flex-direction: column; gap: 4px;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97); transform-origin: 50% 0;
  transition: opacity .18s, transform .25s var(--spring), visibility 0s .25s;
}
.csel.open .csel-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .25s var(--spring), visibility 0s; }
.csel-opt {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid transparent; border-radius: 12px;
  background: none; color: var(--text); font-family: inherit; font-size: 16px; font-weight: 800; text-align: left; cursor: pointer;
}
.csel-opt .csel-t { min-width: 90px; }
.csel-opt .csel-s { flex: 1; }
.csel-opt:hover, .csel-opt:focus-visible { background: var(--bg-2); outline: none; }
.csel-opt.on { background: var(--blue-bg); border-color: #3f85a7; color: var(--blue); }
.csel-opt.on .csel-s { color: #7fc9ee; }
.csel-check { width: 20px; height: 20px; flex: none; opacity: 0; transform: scale(.4); transition: opacity .15s, transform .25s var(--spring); }
.csel-opt.on .csel-check { opacity: 1; transform: none; }
.csel.open .csel-opt { animation: rise .3s var(--spring) both; animation-delay: calc(var(--d, 0) * 35ms); }
.csel-menu { max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.csel.grid .csel-menu { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 3px; right: auto; width: max-content; min-width: 100%; max-width: calc(100vw - 32px); }
.csel.grid.align-right .csel-menu { left: auto; right: 0; }
.csel.grid .csel-opt { justify-content: center; padding: 9px 8px; font-size: 15px; }
.csel.grid .csel-opt[hidden] { display: none; }
.csel.grid .csel-opt .csel-t { min-width: 0; }
.csel.grid .csel-check { display: none; }
.csel.grid.open .csel-opt { animation-delay: calc(var(--d, 0) * 6ms); }

/* ═════════════════════ Avatar-Farbwahl ═════════════════════ */
.color-row { display: flex; align-items: center; gap: 18px; }
.avatar { transition: background-color .35s ease; }
.colors button {
  width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c);
  box-shadow: 0 0 0 0 var(--bg), 0 0 0 0 var(--c), inset 0 -3px 0 rgba(0,0,0,.2);
  transition: box-shadow .2s ease, transform .15s ease;
}
.colors button:hover { transform: translateY(-2px); }
.colors button.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--c), inset 0 -3px 0 rgba(0,0,0,.2); }
.colors button:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.colors { gap: 16px; padding: 6px; }

/* ═════════════════════ Shop ═════════════════════ */
.wallet { display: inline-flex; align-items: center; gap: 14px; padding: 14px 22px; margin: 6px 0 12px; border: 2px solid var(--border); border-radius: 16px; color: var(--blue); }
.wallet svg { width: 40px; height: 40px; }
.wallet-v { font-size: 26px; font-weight: 900; line-height: 1; }
.wallet-l { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.shop-buy { min-width: 120px; gap: 6px; }
.shop-buy svg { width: 20px; height: 20px; }
.shop-buy.locked { --c: var(--card); --cd: #2a383f; --fg: var(--muted); border: 2px solid var(--border); cursor: not-allowed; }
.shop-status { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--faint); }
.shop-status.warn { color: var(--orange); }
.shop-status.ok { color: var(--green); }
.list-row .ic > svg { width: 44px; height: 44px; }

/* ═════════════════════ Profilbilder ═════════════════════ */
.avatar.has-img { overflow: hidden; box-shadow: none; }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.avatar.lg-sm { width: 72px; height: 72px; font-size: 30px; }
.avatar.nav { width: 32px; height: 32px; font-size: 14px; flex: none; box-shadow: 0 0 0 2px var(--border); }
.avatar.pop-in { animation: modalIn .4s var(--spring); }
.avatar-edit { position: relative; flex: none; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.avatar-edit .avatar { transition: filter .2s, background-color .35s; }
.avatar-edit:hover .avatar { filter: brightness(.8); }
.avatar-cam { position: absolute; right: 0; bottom: 4px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #131f24; border: 3px solid var(--bg); transition: transform .2s var(--spring); }
.avatar-cam svg { width: 20px; height: 20px; }
.avatar-edit:hover .avatar-cam { transform: scale(1.12); }
.color-row { align-items: flex-start; }
.avatar-actions { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.avatar-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.avatar-btns .btn svg { flex: none; }
.colors-label { color: var(--muted); font-size: 13px; font-weight: 800; margin-top: 4px; }
.colors { padding: 6px 6px 6px 0; }

/* Zuschneide-Fenster */
.crop-stage { position: relative; width: 280px; height: 280px; margin: 4px auto 18px; border-radius: 20px; overflow: hidden; background: #0d171b; }
.crop-stage canvas { width: 280px; height: 280px; display: block; cursor: grab; touch-action: none; }
.crop-stage canvas.dragging { cursor: grabbing; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; border-radius: 20px; background: radial-gradient(circle at center, transparent 139px, rgba(13,23,27,.72) 140px); }
.crop-mask::after { content: ''; position: absolute; inset: 0; margin: auto; width: 280px; height: 280px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.crop-zoom { display: flex; align-items: center; gap: 14px; max-width: 300px; margin: 0 auto 22px; color: var(--muted); font-size: 22px; font-weight: 900; }
.range { -webkit-appearance: none; appearance: none; flex: 1; height: 12px; border-radius: 99px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--blue) var(--p, 0%), var(--border) var(--p, 0%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 4px solid var(--blue); box-shadow: 0 3px 0 rgba(0,0,0,.25); transition: transform .15s var(--spring); }
.range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--blue); }
@media (max-width: 720px) { .color-row { flex-direction: column; } }
/* Eigene Bilder: transparenter Hintergrund */
.avatar.has-img { background: transparent !important; }
/* Schachbrett im Zuschneider zeigt, wo das Bild durchsichtig ist */
.crop-stage.checker { background-color: #1a2a31; background-image: linear-gradient(45deg, #22343c 25%, transparent 25%), linear-gradient(-45deg, #22343c 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #22343c 75%), linear-gradient(-45deg, transparent 75%, #22343c 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }

/* ═════════════════════ Admin-Panel ═════════════════════ */
.adm-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.adm-head > svg { width: 56px; height: 56px; flex: none; }
#adm-q { margin-bottom: 16px; }
.adm-list .avatar { width: 52px; height: 52px; }
.adm-row { align-items: center; }
.adm-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-weight: 900; font-size: 15px; }
.adm-stats span { display: inline-flex; align-items: center; gap: 5px; }
.adm-stats svg { width: 18px; height: 18px; }
.adm-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; background: #3a3317; color: var(--yellow); vertical-align: middle; }
.adm-badge svg { width: 14px; height: 14px; }
.adm-badge.me { background: var(--blue-bg); color: var(--blue); }
.adm-target { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; }
.adm-target .d, .adm-logrow .d { color: var(--muted); font-size: 14px; }
#adm-cur .adm-stats { padding: 12px 16px; border: 2px solid var(--border); border-radius: 14px; font-size: 17px; gap: 8px 20px; margin: 0 0 8px; }
#adm-cur .adm-stats svg { width: 22px; height: 22px; }
.adm-sec { padding: 14px 0; border-top: 2px solid var(--border); }
.adm-sec:first-of-type { border-top: 0; }
.adm-sec-h { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 16px; margin-bottom: 10px; }
.adm-sec-h svg { width: 22px; height: 22px; }
.adm-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.adm-btns .btn.small { min-width: 58px; }
.adm-custom { display: flex; gap: 8px; margin-left: auto; }
.adm-custom .input { width: 110px; padding: 8px 12px; font-size: 15px; }
.adm-custom .input::-webkit-inner-spin-button { opacity: .4; }
.adm-logrow { font-size: 15px; font-weight: 700; padding: 12px 20px; }
.adm-val { color: var(--green); font-weight: 900; }
.adm-val.neg { color: var(--red); }
.pop-in { animation: modalIn .35s var(--spring); }
@media (max-width: 720px) { .adm-custom { margin-left: 0; width: 100%; } .adm-custom .input { flex: 1; width: auto; } .adm-row { flex-wrap: wrap; } }

/* ═════════════════════ Syntax-Hilfe ═════════════════════ */
/* Klappt unterhalb der Aufgabe auf (im Seitenfluss) und verdeckt nichts */
.help-sheet { margin-top: 28px; animation: sheetIn .32s var(--spring); transform-origin: 50% 0; }
.help-sheet.closing { animation: sheetOut .2s ease-in forwards; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(-6px) scale(.98); } }
.help-inner { padding: 16px 20px 14px; border: 2px solid #2d5f78; border-left-width: 6px; border-radius: 16px; background: #15262e; }
.help-head { display: flex; justify-content: space-between; align-items: center; }
.help-head .kicker { display: flex; align-items: center; gap: 8px; color: var(--blue); font-size: 13px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; }
.help-head .kicker svg { width: 20px; height: 20px; }
.help-head .icon-btn svg { width: 22px; height: 22px; }
.help-inner h3 { margin: 4px 0 6px; font-size: 18px; }
.help-inner .md { color: #d5e2e8; font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.help-inner .code { font-size: 13.5px; margin: 0; }
.help-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
#help { gap: 8px; }
#help.on { --fg: var(--blue); border-color: #3f85a7; background: var(--blue-bg); }
/* Einzelmarkierung beim Code-Sortieren */
.order-answer .tile.right { border-color: var(--green-d); color: var(--green); background: var(--green-bg); }
.order-answer .tile.wrong { border-color: var(--red-d); color: var(--red); background: var(--red-bg); }
.help-sheet .kicker svg { animation: none; }
.help-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 10px; }
.help-rule { padding: 12px; border-radius: 12px; background: rgba(0,0,0,.18); border: 1px solid #27414d; display: flex; flex-direction: column; }
.help-rule h4 { margin: 0 0 4px; font-size: 15px; color: #fff; }
.help-rule .md { font-size: 13.5px; margin-bottom: 10px; flex: 1; }
.help-rule .code { font-size: 12.5px; padding: 10px 12px; white-space: pre; }
.help-rules { grid-template-columns: 1fr; gap: 10px; }
.help-rule { display: grid; grid-template-columns: 1fr 1.15fr; gap: 6px 16px; align-items: center; }
.help-rule h4 { grid-column: 1; }
.help-rule .md { grid-column: 1; margin: 0; }
.help-rule .code { grid-column: 2; grid-row: 1 / span 2; overflow-x: auto; }
@media (max-width: 720px) { .help-rule { grid-template-columns: 1fr; } .help-rule .code { grid-column: 1; grid-row: auto; } }

/* ═════════════════════ Tippen mit Syntax-Farben ═════════════════════ */
.type-wrap { position: relative; display: inline-block; vertical-align: bottom; border-radius: 8px; background: var(--card); }
.type-wrap.wide { display: block; width: 100%; }
.slot-input.hl, .type-hl {
  box-sizing: border-box; font-family: var(--mono); font-size: 14.5px; font-weight: 500; line-height: 1.55;
  letter-spacing: 0; padding: 1px 8px; border: 2px solid transparent; border-radius: 8px; tab-size: 4;
}
.type-hl { position: absolute; inset: 0; white-space: pre; overflow: hidden; pointer-events: none; color: #d7e3e8; }
.slot-input.hl { position: relative; background: transparent; color: transparent; caret-color: #fff; border-color: var(--border); }
.slot-input.hl:focus { border-color: var(--blue); }
.slot-input.hl::placeholder { color: var(--faint); }
.slot-input.hl::selection { background: rgba(28,176,246,.35); color: transparent; }
.slot-input.hl:disabled { color: transparent; }

/* ═════════════════════ Gedächtnisstütze ═════════════════════ */
.help-shape { margin-top: 10px; padding: 14px; border-radius: 12px; background: rgba(0,0,0,.18); border: 1px solid #27414d; }
.help-shape h4 { margin: 0 0 8px; font-size: 15px; color: #fff; }
.shape-code { margin: 0 0 10px; font-size: 16px; letter-spacing: .5px; }
.shape-steps { margin: 0 0 12px; padding-left: 22px; color: #d5e2e8; font-size: 14px; font-weight: 600; line-height: 1.6; }
.shape-steps code { font-family: var(--mono); font-size: .9em; padding: 1px 5px; border-radius: 5px; background: #0d171b; border: 1px solid var(--border); color: #7ee0ff; }
.help-sub { margin: 16px 0 0; color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; }
#shape-letters { gap: 6px; }
.mc-disclaimer { margin: 14px auto 0; max-width: 520px; text-align: center; color: var(--faint); font-size: 12px; font-weight: 700; line-height: 1.5; }

/* ═════════════════════ Passwort vergessen ═════════════════════ */
.auth-mascot { width: 110px; margin: 0 auto -4px; }
.auth-card p.hint b { color: var(--text); }
.code-boxes { display: flex; justify-content: center; gap: 8px; margin: 4px 0; }
.code-box { width: 48px; height: 60px; border-radius: 14px; border: 2px solid var(--border); border-bottom-width: 4px; background: var(--bg-2); color: var(--text); text-align: center; font-family: var(--mono); font-size: 26px; font-weight: 800; outline: none; transition: border-color .15s, transform .12s var(--spring); }
.code-box:focus { border-color: var(--blue); transform: translateY(-2px); }
.auth-card .link-btn:disabled { color: var(--faint); cursor: default; }

/* ═════════════════════ Impressum ═════════════════════ */
.legal { min-height: 100vh; }
.legal-top { display: flex; align-items: center; gap: 16px; max-width: 760px; margin: 0 auto; padding: 28px 24px 0; }
.legal-top .logo { font-size: 26px; }
.legal-body { max-width: 760px; margin: 0 auto; padding: 12px 24px 80px; animation: pageIn .4s var(--out) both; }
.legal-body h1 { font-size: 34px; margin: 18px 0 8px; }
.legal-body h2 { font-size: 19px; margin: 28px 0 8px; color: var(--text); }
.legal-body p { color: #c7d5db; font-weight: 600; line-height: 1.65; margin: 0; }
.legal-body a { color: var(--blue); }
.legal-body .ph { background: #3a3317; color: var(--yellow); padding: 1px 6px; border-radius: 6px; font-weight: 800; }
.legal-warn { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 6px; padding: 14px 16px; border-radius: 14px; background: #3a3317; color: var(--yellow); font-weight: 700; line-height: 1.5; }
.legal-warn code { font-family: var(--mono); background: rgba(0,0,0,.25); padding: 1px 5px; border-radius: 5px; }
.legal-foot { text-align: center; padding: 16px; }
.legal-foot a, .footer-links a { color: var(--faint); cursor: pointer; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; font-size: 12px; }
.legal-foot a:hover, .footer-links a:hover { color: var(--muted); }

/* ═════════════════════ Streak-Flamme ═════════════════════ */
.stat.streak.off .flame-ic .fl-mid, .stat.streak.off .flame-ic .fl-core { fill: #6b7d85; }
.stat.streak.off .flame-ic .fl-shine { opacity: 0; }
.flame-big { width: 100%; height: 100%; overflow: visible; }
.flame-big .fl-l1, .flame-big .fl-l2, .flame-big .fl-l3 { transform-box: fill-box; transform-origin: 50% 100%; }
.flame-big .fl-l1 { animation: flick1 1.6s ease-in-out infinite; }
.flame-big .fl-l2 { animation: flick2 1.2s ease-in-out infinite; }
.flame-big .fl-l3 { animation: flick3 .9s ease-in-out infinite; }
.flame-big .fl-glow { transform-box: fill-box; transform-origin: center; animation: glow 2s ease-in-out infinite; }
.flame-big .fl-face { transform-box: fill-box; transform-origin: center; animation: faceBob 1.6s ease-in-out infinite; }
@keyframes flick1 { 0%, 100% { transform: scale(1, 1) skewX(0); } 30% { transform: scale(1.03, .97) skewX(-2deg); } 65% { transform: scale(.98, 1.04) skewX(2deg); } }
@keyframes flick2 { 0%, 100% { transform: scale(1, 1) skewX(0); } 40% { transform: scale(.96, 1.06) skewX(3deg); } 75% { transform: scale(1.04, .96) skewX(-2deg); } }
@keyframes flick3 { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.92, 1.1); } }
@keyframes glow { 50% { transform: scale(1.08); opacity: .8; } }
@keyframes faceBob { 50% { transform: translateY(-1.5px); } }
.modal .streak-modal-flame { width: 110px; height: 128px; margin: 0 auto; }

/* ═════════════════════ Streak-Feier ═════════════════════ */
.streak-cel { position: fixed; inset: 0; z-index: 250; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(circle at 50% 38%, #3a2208 0%, #1a1712 38%, #0e1417 75%); color: var(--text); text-align: center; animation: fade .3s ease-out; overflow: hidden; }
.streak-cel.closing { animation: fadeOut .25s ease-in forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.sc-stage { position: relative; width: 220px; height: 240px; display: grid; place-items: center; }
.sc-ember { position: absolute; bottom: 30px; width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle, #ffb020 0%, #ff4b2b 45%, transparent 70%); filter: blur(4px); animation: ember .6s ease-in both, emberPulse 1.4s .6s ease-in-out infinite; }
@keyframes ember { from { transform: scale(.2); opacity: 0; } to { transform: scale(1.4); opacity: .9; } }
@keyframes emberPulse { 50% { transform: scale(1.6); opacity: .6; } }
.sc-flame { position: relative; width: 170px; height: 198px; animation: ignite .9s .25s cubic-bezier(.34,1.56,.64,1) both; filter: drop-shadow(0 0 30px rgba(255,150,0,.55)); }
@keyframes ignite { 0% { transform: scale(0) translateY(60px); opacity: 0; } 60% { transform: scale(1.18) translateY(-6px); opacity: 1; } 100% { transform: scale(1); } }
.sc-wave { position: absolute; left: 50%; top: 58%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 4px solid #ffb020; opacity: 0; animation: wave 1s .45s ease-out forwards; }
.sc-wave.w2 { animation-delay: .65s; border-color: #ff7a00; }
@keyframes wave { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
.sc-sparks { position: absolute; left: 50%; bottom: 40px; width: 0; height: 0; }
.sc-sparks i { position: absolute; left: 0; bottom: 0; width: 7px; height: 7px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 8px #ff9600; opacity: 0;
  animation: spark calc(1.6s * var(--s)) calc(.6s + var(--d)) ease-out infinite; }
@keyframes spark { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--x), -190px) scale(.2); opacity: 0; } }
.sc-num { position: relative; margin-top: 4px; font-size: 104px; font-weight: 900; line-height: 1; color: #ff9600; text-shadow: 0 0 30px rgba(255,150,0,.5); height: 1em; overflow: visible; }
/* Zahl rollt: Das äußere Kästchen schneidet ab, innen liegt die alte Zahl über der neuen */
.sc-roll-box { display: inline-block; height: 1.04em; overflow: hidden; vertical-align: top; }
.sc-roll { display: block; position: relative; transform: translateY(100%); transition: transform .7s cubic-bezier(.34,1.56,.64,1); }
.sc-roll::before { content: attr(data-old); position: absolute; left: 0; right: 0; bottom: 100%; }
.streak-cel.counted .sc-roll { transform: translateY(0); }
.sc-plus { position: absolute; right: -54px; top: 4px; font-size: 32px; color: #ffc800; opacity: 0; }
.streak-cel.counted .sc-plus { animation: plusUp 1.1s ease-out forwards; }
@keyframes plusUp { 0% { opacity: 0; transform: translateY(10px) scale(.6); } 25% { opacity: 1; transform: translateY(-6px) scale(1.15); } 100% { opacity: 0; transform: translateY(-40px); } }
.sc-title { margin: 8px 0 18px; font-size: 32px; font-weight: 900; color: #ff9600; animation: pageIn .5s 1.1s var(--out) both; }
.sc-week { display: flex; gap: 12px; padding: 16px 20px; border: 2px solid #3a2a1a; border-radius: 18px; background: rgba(0,0,0,.25); animation: pageIn .5s 1.3s var(--out) both; }
.sc-week div { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
.sc-week div.today span { color: #ff9600; }
.sc-week i { width: 32px; height: 32px; border-radius: 50%; background: #2c3438; display: grid; place-items: center; transition: background .3s; }
.sc-week i svg { width: 16px; height: 16px; color: #fff; opacity: 0; }
.sc-week i.on { background: linear-gradient(180deg, #ffc800, #ff7a00); box-shadow: 0 0 12px rgba(255,150,0,.5); }
.sc-week i.on svg { opacity: 1; }
.sc-week .today i.on { animation: dotIgnite .6s cubic-bezier(.34,1.56,.64,1); }
@keyframes dotIgnite { 0% { transform: scale(.3); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.sc-msg { max-width: 380px; margin: 18px 0 0; color: #c7b9a6; font-weight: 700; line-height: 1.5; animation: pageIn .5s 1.6s var(--out) both; }
.sc-test { margin: 10px 0 0; color: var(--yellow); font-size: 13px; font-weight: 800; }
.sc-btn { margin-top: 26px; min-width: 220px; --c: var(--orange); --cd: var(--orange-d); animation: pageIn .4s 2.1s var(--out) both; }
@media (max-width: 720px) { .sc-num { font-size: 84px; } .sc-week { gap: 6px; padding: 12px; } .sc-week i { width: 28px; height: 28px; } }
.sc-num { text-shadow: none; filter: drop-shadow(0 0 22px rgba(255,150,0,.55)); }

/* ═════════════════════ Neue Flamme (ohne Gesicht) ═════════════════════ */
.flame-big .fl-tongue-l, .flame-big .fl-tongue-r, .flame-big .fl-blur { transform-box: fill-box; }
.flame-big .fl-tongue-l { transform-origin: 100% 100%; animation: tongueL 1.3s ease-in-out infinite; }
.flame-big .fl-tongue-r { transform-origin: 0% 100%; animation: tongueR 1.1s ease-in-out infinite; }
.flame-big .fl-blur { transform-origin: 50% 100%; animation: flick1 1.6s ease-in-out infinite; }
.flame-big .fl-hl { animation: hl 1.6s ease-in-out infinite; }
@keyframes tongueL { 0%, 100% { transform: rotate(0) scale(1); } 40% { transform: rotate(-8deg) scale(1.08, .94); } 70% { transform: rotate(5deg) scale(.95, 1.08); } }
@keyframes tongueR { 0%, 100% { transform: rotate(0) scale(1); } 35% { transform: rotate(9deg) scale(.94, 1.1); } 75% { transform: rotate(-5deg) scale(1.05, .95); } }
@keyframes hl { 50% { opacity: .12; } }

/* ═════════════════════ Streak-Feier v2 (Phasen per Klasse: lit → counted → details) ═════════════════════ */
.streak-cel { background: radial-gradient(circle at 50% 36%, #2a1a0a 0%, #151514 40%, #0b1013 78%); }
.sc-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.sc-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.sc-flash { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 34%, rgba(255,245,210,.95) 0%, rgba(255,160,40,.55) 25%, transparent 60%); }
.streak-cel.lit .sc-flash { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.streak-cel.lit .sc-content { animation: shake .45s ease-out; }

/* Glut lädt sich auf, bis die Flamme zündet */
.sc-ember { bottom: 36px; width: 46px; height: 46px; animation: none; opacity: .9; transform: scale(calc(.5 + var(--charge, 0) * 1.3)); transition: transform .2s var(--spring);
  background: radial-gradient(circle, #fff6d0 0%, #ffb020 30%, #ff4b2b 60%, transparent 72%); filter: blur(1.5px); }
.sc-ember.hit { animation: emberHit .25s ease-out; }
@keyframes emberHit { 50% { filter: blur(1px) brightness(1.8); } }
.streak-cel.lit .sc-ember { animation: emberOut .5s ease-out forwards; }
@keyframes emberOut { to { transform: scale(3); opacity: 0; } }

/* Flamme erscheint erst bei der Zündung */
.sc-flame { animation: none; opacity: 0; transform: scale(0) translateY(40px); width: 180px; height: 225px; }
.streak-cel.lit .sc-flame { animation: igniteV2 .95s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes igniteV2 { 0% { opacity: 1; transform: scale(0) translateY(40px); } 45% { transform: scale(1.3, 1.15) translateY(-10px); } 70% { transform: scale(.94, 1.04); } 100% { opacity: 1; transform: scale(1); } }
.sc-stage { width: 240px; height: 250px; }
.sc-wave { animation: none; }
.streak-cel.lit .sc-wave { animation: wave 1s ease-out forwards; }
.streak-cel.lit .sc-wave.w2 { animation: wave 1.1s .15s ease-out forwards; }

/* Zahl: erscheint mit der Zündung (alter Wert), rollt dann hoch und pulsiert */
.sc-num { opacity: 0; transform: scale(.6); transition: opacity .3s, transform .45s var(--spring); }
.streak-cel.lit .sc-num { opacity: 1; transform: scale(1); }
.streak-cel.counted .sc-num { animation: numPulse .6s .25s var(--spring); }
@keyframes numPulse { 40% { transform: scale(1.22); filter: drop-shadow(0 0 40px rgba(255,180,0,.9)); } }

/* Rest erscheint erst in der letzten Phase */
.sc-title, .sc-week, .sc-msg, .sc-test, .sc-btn { opacity: 0; animation: none; }
.streak-cel.details .sc-title { animation: pageIn .5s var(--out) forwards; }
.streak-cel.details .sc-week { animation: pageIn .5s .12s var(--out) forwards; }
.streak-cel.details .sc-msg, .streak-cel.details .sc-test { animation: pageIn .5s .3s var(--out) forwards; }
.streak-cel.details .sc-btn { animation: pageIn .4s .6s var(--out) forwards; }
@keyframes revealIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.streak-cel.details .sc-title { animation: revealIn .5s var(--out) forwards; }
.streak-cel.details .sc-week { animation: revealIn .5s .12s var(--out) forwards; }
.streak-cel.details .sc-msg, .streak-cel.details .sc-test { animation: revealIn .5s .3s var(--out) forwards; }
.streak-cel.details .sc-btn { animation: revealIn .4s .6s var(--out) forwards; }
/* Admin-Protokoll: fester Scrollbereich statt endlos langer Seite */
.adm-log-list { max-height: 340px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.adm-more { display: block; margin: 10px auto 12px; }
#adm-log .empty { padding: 20px; }

/* Profil: Account löschen */
.danger-zone { display: flex; align-items: center; gap: 16px; margin-top: 36px; padding: 18px 20px; border: 2px solid rgba(255,75,75,.35); border-radius: 16px; }
.danger-zone > div { flex: 1; }
.danger-zone .t { font-size: 17px; font-weight: 800; color: var(--red); }
.danger-zone .d { color: var(--muted); font-weight: 600; margin-top: 4px; line-height: 1.45; }
@media (max-width: 560px) { .danger-zone { flex-direction: column; align-items: stretch; } }

/* Sprachumschalter (Startseite / Anmelden) */
.landing-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { min-width: 44px; height: 36px; padding: 0 10px; border-radius: 12px; border: 2px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-weight: 900; font-size: 13px; letter-spacing: .8px; cursor: pointer; transition: color .15s, border-color .15s, transform .08s; }
.lang-switch:hover { color: var(--text); border-color: var(--muted); }
.lang-switch:active { transform: translateY(2px); }
.onb-top .lang-switch { margin-right: 10px; }

/* Keine Ligaturen: JetBrains Mono würde sonst != als ≠, <= als ≤ und -> als Pfeil zeichnen.
   Im Code müssen genau die Zeichen zu sehen sein, die man auch tippt. */
html, input, textarea, button, select { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }

/* Rückblick in der Lektion */
.lesson-top .prev-btn:disabled { opacity: .25; cursor: default; }
.lesson-top .prev-btn:disabled:hover { color: var(--faint); }
.review-banner { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; padding: 8px 12px; border-radius: 14px; background: rgba(28,176,246,.12); color: var(--blue); font-weight: 800; font-size: 14px; letter-spacing: .4px; text-transform: uppercase; }
.review-banner .icon-btn { color: var(--blue); padding: 2px; }
.review-banner .icon-btn svg { width: 20px; height: 20px; }
.review-banner .icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn.flip svg { transform: scaleX(-1); }
.rv-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.rv-actions .btn { min-width: 140px; }
@media (max-width: 700px) { .rv-actions { width: 100%; } .rv-actions .btn { flex: 1; min-width: 0; } }

/* Lange Codezeilen in Kacheln umbrechen statt über den Rand zu laufen (Einrückung bleibt erhalten) */
.tile { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.order-answer .tile { align-self: stretch; }

/* Seitenleiste unten: Sprache & Abmelden */
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 2px solid var(--border); }
.sidebar-foot .nav-item { font-size: 13px; }
.sidebar-foot .nav-item svg { width: 26px; height: 26px; margin: 0 3px; }
.lang-pick { position: relative; }
.lang-pick > .nav-item { width: 100%; }
.lang-menu { position: absolute; left: 0; bottom: calc(100% + 6px); min-width: 180px; padding: 6px; border-radius: 14px; border: 2px solid var(--border); background: var(--bg); box-shadow: 0 10px 30px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 2px; opacity: 0; transform: translateY(6px) scale(.97); transform-origin: bottom left; pointer-events: none; transition: opacity .15s, transform .18s var(--out); z-index: 30; }
.lang-pick.open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-weight: 800; cursor: pointer; text-align: left; }
.lang-menu button:hover { background: var(--bg-2); }
.lang-menu button.on { color: var(--blue); }
.lang-menu button svg { width: 18px; height: 18px; }
.mobile-only { display: none; }
@media (max-width: 720px) { .mobile-only { display: block; } .settings .btn.mobile-only { display: flex; } }

/* Admin: Sperren */
.adm-badge.banned { background: rgba(255,75,75,.15); color: var(--red); }
.adm-badge.banned svg { width: 14px; height: 14px; }
.adm-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; margin-left: 6px; border-radius: 13px; background: var(--red); color: #fff; font-size: 14px; vertical-align: middle; }
.adm-count:empty { display: none; }
.ban-reason { margin-top: 4px; color: var(--muted); font-style: italic; font-weight: 600; overflow-wrap: anywhere; }
.adm-ban-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ban-form { display: grid; grid-template-columns: 1fr 180px auto; gap: 10px; align-items: center; }
.ban-form .input { min-width: 0; }
.ban-box { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 2px solid rgba(255,75,75,.35); background: rgba(255,75,75,.07); }
.adm-note { margin: 8px 0 0; color: var(--faint); font-size: 14px; font-weight: 600; line-height: 1.45; }
@media (max-width: 640px) { .ban-form { grid-template-columns: 1fr; } }

/* Rollen */
.role-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 2px 8px 2px 6px; border-radius: 8px; font-size: 11px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; vertical-align: middle; color: var(--rc); background: color-mix(in srgb, var(--rc) 16%, transparent); border: 1.5px solid color-mix(in srgb, var(--rc) 45%, transparent); line-height: 1.4; }
.role-badge svg { width: 12px; height: 12px; }
.profile-head h1 .role-badge { font-size: 13px; padding: 3px 10px 3px 8px; }
.lb-name .role-badge { margin-left: 6px; }
.vip-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 14px 18px; border-radius: 16px; background: rgba(255,200,0,.1); border: 2px solid rgba(255,200,0,.35); color: var(--yellow); font-weight: 800; line-height: 1.4; }
.vip-banner .role-badge { margin-left: 0; flex: none; }
.old-price { opacity: .6; margin-right: 6px; font-weight: 700; }
.role-card { margin-bottom: 14px; }
.role-card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 2px solid var(--border); }
.role-card-head .role-badge { margin-left: 0; font-size: 13px; padding: 3px 10px 3px 8px; }
.role-card-head .d { flex: 1; color: var(--muted); font-weight: 700; }
.role-count { background: var(--rc); color: #131f24; margin-left: 0; }
.role-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border-radius: 12px; color: var(--rc); background: color-mix(in srgb, var(--rc) 12%, transparent); border: 2px solid color-mix(in srgb, var(--rc) 40%, transparent); }
.role-chip svg { width: 14px; height: 14px; }
.role-chip small { color: var(--muted); font-weight: 700; }
.role-chip button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.role-chip button:hover { background: rgba(255,255,255,.08); color: var(--red); }
.role-chip button svg { width: 14px; height: 14px; }
.role-form { display: grid; grid-template-columns: 1fr 160px auto; gap: 10px; align-items: center; }
@media (max-width: 640px) { .role-form { grid-template-columns: 1fr; } }


/* Kursauswahl (Menü unter dem Kurs-Symbol in der Statusleiste) */
.stat.course { gap: 4px; padding-right: 6px; }
.stat.course .course-badge { background: var(--bg-2); }
.stat.course .course-chev { width: 16px; height: 16px; color: var(--faint); transition: transform .2s; }
.stat.course.open .course-chev { transform: rotate(180deg); }
.stat.course.open { background: var(--bg-2); }
.course-pop { position: fixed; z-index: 90; width: 320px; max-height: min(480px, calc(100vh - 100px)); display: flex; flex-direction: column; border-radius: 18px; border: 2px solid var(--border); background: var(--bg); box-shadow: 0 16px 40px rgba(0,0,0,.45); animation: cpIn .18s var(--out) both; transform-origin: top left; }
.course-pop.closing { animation: cpOut .15s ease-in both; }
@keyframes cpIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes cpOut { to { opacity: 0; transform: translateY(-6px) scale(.97); } }
.cp-head { padding: 14px 18px 10px; font-size: 13px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: var(--faint); }
.cp-body { overflow-y: auto; padding: 0 8px 10px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.cp-group + .cp-group { margin-top: 6px; padding-top: 6px; border-top: 2px solid var(--border); }
.cp-course { display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px; color: var(--muted); font-weight: 900; font-size: 14px; }
.cp-course svg { width: 20px; height: 20px; }
.cp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 2px solid transparent; border-radius: 14px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cp-row:not(:disabled):hover { background: var(--bg-2); }
.cp-row.on { background: var(--blue-bg); border-color: #3f85a7; }
.cp-row:disabled, .cp-row.soon { cursor: default; opacity: .45; }
.cp-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--bg-2); }
.cp-ic svg { width: 26px; height: 26px; }
.cp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cp-txt b { font-weight: 800; }
.cp-txt small { color: var(--muted); font-weight: 700; font-size: 12px; }
.cp-prog { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.cp-prog i { display: block; height: 100%; border-radius: 3px; background: var(--green); }
.cp-check { color: var(--blue); flex: none; }
.cp-check svg { width: 22px; height: 22px; }
.course-pop.sheet { left: 12px !important; right: 12px; top: 64px !important; width: auto; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 6px; }
.cp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 7px; border-radius: 10px; background: var(--bg-2); color: var(--faint); font-size: 13px; font-weight: 800; }
.cp-chip svg { width: 18px; height: 18px; opacity: .7; }

/* Freunde */
.nav-item { position: relative; }
.nav-badge { position: absolute; top: 6px; left: 38px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 900; display: grid; place-items: center; line-height: 1; border: 2px solid var(--bg); }
.friend-search { position: relative; margin-bottom: 8px; }
.fr-results { margin-top: 10px; }
.fr-results .empty { padding: 18px; }
.friend-row { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s; }
.friend-row:hover { background: var(--bg-2); }
.fr-ok { color: var(--green); }
.fr-count { color: var(--faint); font-size: 18px; margin-left: 4px; }
.fr-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fr-tag { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 10px; background: var(--bg-2); color: var(--muted); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.fr-tag.ok { color: var(--green); }
.fr-tag svg { width: 16px; height: 16px; }
.fr-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 24px; text-align: center; }
.fr-empty svg { width: 56px; height: 56px; opacity: .8; }
.fr-empty p { margin: 0; color: var(--muted); font-weight: 700; line-height: 1.5; }
.fstreak { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px 6px 8px; border-radius: 12px; border: 2px solid var(--border); color: var(--faint); font-weight: 900; font-size: 16px; }
.fstreak svg { width: 22px; height: 22px; filter: grayscale(1) opacity(.5); }
.fstreak.on { color: var(--orange); border-color: rgba(255,150,0,.4); background: rgba(255,150,0,.08); }
.fstreak.on svg { filter: none; }
.fstreak.risk { animation: frRisk 1.6s ease-in-out infinite; }
@keyframes frRisk { 50% { border-color: rgba(255,150,0,.95); box-shadow: 0 0 0 3px rgba(255,150,0,.15); } }
.fm-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.fm-head h2 { margin: 0 0 2px; }
.fm-streak { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px; border: 2px solid var(--border); margin-bottom: 10px; }
.fm-streak.on { border-color: rgba(255,150,0,.45); background: rgba(255,150,0,.08); }
.fm-flame svg { width: 48px; height: 48px; }
.fm-streak:not(.on) .fm-flame svg { filter: grayscale(1) opacity(.5); }
.fm-num { font-size: 22px; font-weight: 900; color: var(--orange); }
.fm-streak:not(.on) .fm-num { color: var(--muted); }
.fm-today { margin: 4px 0 16px !important; color: var(--muted); font-weight: 700; }
.fm-today.ok { color: var(--green); }
.fm-track { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); color: var(--muted); font-weight: 800; }
.fm-track svg { width: 24px; height: 24px; }
.fs-result { display: inline-flex; align-items: center; gap: 8px; margin: -18px auto 26px; padding: 8px 16px; border-radius: 14px; background: rgba(255,150,0,.1); color: var(--orange); font-weight: 900; }
.fs-result svg { width: 22px; height: 22px; }
@media (max-width: 1160px) { .nav-badge { left: 44px; } }
.fr-pending { min-width: 150px; }
.fr-pending svg { width: 16px; height: 16px; }
.fr-pending .fp-a, .fr-pending .fp-b { display: inline-flex; align-items: center; gap: 6px; }
.fr-pending .fp-b { display: none; }
.fr-pending:hover .fp-a, .fr-pending:focus-visible .fp-a { display: none; }
.fr-pending:hover .fp-b, .fr-pending:focus-visible .fp-b { display: inline-flex; color: var(--red); }
@media (hover: none) { .fr-pending .fp-a { display: none; } .fr-pending .fp-b { display: inline-flex; color: var(--red); } }

/* ───────── Schachbrett ───────── */
.cb { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; box-shadow: 0 6px 0 #0b1418; }
.cb-squares { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.cb-sq { position: relative; }
.cb-sq.l { background: #eeeed2; } .cb-sq.d { background: #769656; }
.cb-sq.last.l { background: #f6f68a; } .cb-sq.last.d { background: #bbcb44; }
.cb-sq.sel.l { background: #f7ec74; } .cb-sq.sel.d { background: #dac431; }
.cb-sq.check { background: radial-gradient(circle, #ff3b3b 0%, #e62b2b 30%, rgba(169,0,0,.4) 70%, transparent 90%), var(--sqc, #eeeed2); }
.cb-sq.check.d { --sqc: #769656; }
.cb-sq.dest::after { content: ''; position: absolute; inset: 36%; border-radius: 50%; background: rgba(0,0,0,.18); }
.cb-sq.cap::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 6px solid rgba(0,0,0,.18); }
.cb-sq.hover { box-shadow: inset 0 0 0 4px rgba(255,255,255,.75); }
.cb-sq.good { box-shadow: inset 0 0 0 5px #58cc02; } .cb-sq.bad { box-shadow: inset 0 0 0 5px #ff4b4b; } .cb-sq.hint { box-shadow: inset 0 0 0 5px #1cb0f6; }
.cb-file, .cb-rank { position: absolute; font-size: clamp(8px, 1.7vw, 12px); font-weight: 900; line-height: 1; pointer-events: none; }
.cb-file { right: 4%; bottom: 3%; } .cb-rank { left: 4%; top: 4%; }
.cb-sq.l .cb-file, .cb-sq.l .cb-rank { color: #769656; } .cb-sq.d .cb-file, .cb-sq.d .cb-rank { color: #eeeed2; }
.cb-arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.cb-pieces { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cb-p { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; background-size: 100%; background-repeat: no-repeat; will-change: transform; }
.cb-p.anim { transition: transform .2s cubic-bezier(.25,.8,.3,1); }
.cb-p.dragging { z-index: 5; transition: none; filter: drop-shadow(0 8px 6px rgba(0,0,0,.35)); }
.cb-p.fade-in { animation: cbIn .22s ease-out; }
.cb-p.gone { transition: opacity .2s, transform .2s; opacity: 0; }
@keyframes cbIn { from { opacity: 0; } }
.cb.can-move .cb-squares { cursor: pointer; }
.cb-promo { position: absolute; z-index: 6; width: 25%; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45); overflow: hidden; }
.cb-promo.hidden { display: none; }
.cb-promo button { aspect-ratio: 1; border: 0; background: #f2f2f2 center/88% no-repeat; cursor: pointer; transition: background-color .15s; }
.cb-promo button:hover { background-color: #bfe39a; }
.cb-diagram { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; max-width: 300px; aspect-ratio: 1; margin: 14px auto 4px; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 0 #0b1418; }
.cb-diagram .cb-sq i { position: absolute; inset: 0; background-size: 100%; }
.cb-diagram .cb-sq.mark::before { content: ''; position: absolute; inset: 0; background: rgba(28,176,246,.45); }

/* ───────── Schach-Seiten ───────── */
.center.wide { max-width: 1360px; }
.chess-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.chess-hero > svg { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 4px 0 rgba(0,0,0,.3)); }
.chess-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chess-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; border-radius: 20px; border: 2px solid var(--border); }
.chess-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 19px; }
.chess-card h3 svg { width: 26px; height: 26px; }
.chess-card label { font-size: 13px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.ch-custom { display: flex; align-items: flex-start; gap: 10px; }
.ch-custom[hidden] { display: none; }
.ch-custom > div { flex: 0 1 140px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ch-custom input { width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; font-weight: 800; text-align: center; color: var(--text); background: var(--bg-2, #0d171b); border: 2px solid var(--border); border-radius: 12px; padding: 9px 8px; -moz-appearance: textfield; }
.ch-custom input::-webkit-inner-spin-button, .ch-custom input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ch-custom input:focus { outline: none; border-color: var(--blue); }
.ch-custom span { font-size: 12px; font-weight: 800; color: var(--faint); text-align: center; }
.chess-card-btns { display: flex; gap: 10px; margin-top: auto; padding-top: 12px; }
.chess-card-btns .btn { flex: 1; }
.chess-empty { color: var(--muted); font-weight: 700; line-height: 1.5; margin: 4px 0; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills button { flex: 1 0 auto; padding: 9px 8px; border-radius: 12px; border: 2px solid var(--border); border-bottom-width: 4px; background: none; color: var(--muted); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.pills button:hover { color: var(--text); }
.pills button.on { color: var(--blue); border-color: #3f85a7; background: var(--blue-bg); }
.chess-row { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chess-row:hover { background: var(--bg-2); }
.chess-row.my-turn { box-shadow: inset 4px 0 0 var(--green); }
.turn-badge { flex: none; padding: 6px 10px; border-radius: 10px; background: var(--green); color: #131f24; font-size: 12px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; animation: frRisk 1.6s ease-in-out infinite; }
.res-badge { flex: none; padding: 6px 10px; border-radius: 10px; font-size: 12px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; background: var(--bg-2); color: var(--muted); }
.res-badge.win { color: var(--green); } .res-badge.loss { color: var(--red); } .res-badge.draw { color: var(--yellow); }
.chess-learn { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 18px 20px; border-radius: 20px; background: var(--bg-2); }
.chess-learn .t { font-weight: 900; font-size: 17px; } .chess-learn .d { color: var(--muted); font-weight: 700; margin-top: 2px; }

.chess-game { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.cg-main { display: flex; flex-direction: column; gap: 10px; max-width: max(420px, min(920px, calc(100vh - 136px))); width: 100%; margin: 0 auto; }
.cg-player { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.cg-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cg-who .avatar { width: 40px; height: 40px; font-size: 18px; }
.cg-who b { display: block; font-weight: 900; } .cg-who small { color: var(--muted); font-weight: 700; }
.bot-avatar { background: var(--bg-2) !important; display: grid; place-items: center; }
.bot-avatar svg { width: 30px; height: 30px; }
.cg-mat { flex: 1; display: flex; align-items: center; flex-wrap: wrap; min-width: 0; }
.cg-mat i { width: 18px; height: 18px; margin-right: -5px; background-size: 100%; opacity: .9; }
.cg-mat b { margin-left: 10px; color: var(--muted); font-size: 14px; }
.cg-clock { flex: none; min-width: 96px; padding: 8px 12px; border-radius: 12px; background: var(--bg-2); color: var(--muted); font-family: var(--mono); font-size: 22px; font-weight: 800; text-align: right; transition: background .2s, color .2s; }
.cg-clock.run { background: #e8f0f3; color: #131f24; }
.cg-clock.low.run { background: var(--red); color: #fff; }
.cg-clock.hidden { display: none; }
.cg-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 24px; }
.cg-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
.cg-status { padding: 14px 16px; border-radius: 16px; background: var(--bg-2); font-weight: 900; font-size: 17px; text-align: center; }
.cg-status.mine { background: var(--green-bg); color: var(--green); }
.cg-status .dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.cg-banner { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--yellow); background: rgba(255,200,0,.08); font-weight: 800; }
.cg-banner.hidden { display: none; }
.cg-banner > div { display: flex; gap: 8px; } .cg-banner .btn { flex: 1; }
.cg-moves { max-height: 300px; min-height: 120px; overflow-y: auto; border-radius: 16px; border: 2px solid var(--border); padding: 8px; scrollbar-width: thin; }
.cg-moves ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
.cg-moves li { display: grid; grid-template-columns: 38px 1fr 1fr; gap: 4px; padding: 3px 6px; border-radius: 8px; font-family: var(--mono); font-weight: 700; font-size: 15px; }
.cg-moves li:nth-child(odd) { background: rgba(255,255,255,.03); }
.cg-moves .n { color: var(--faint); }
.cg-moves .cur { color: var(--blue); }
.cg-nomoves { color: var(--faint); font-weight: 700; text-align: center; padding: 30px 0; }
.cg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cg-actions .btn { min-width: 0; }
.go-icon { width: 90px; height: 90px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--bg-2); }
.go-icon svg { width: 56px; height: 56px; }
.go-icon.win { background: rgba(255,200,0,.15); color: var(--yellow); } .go-icon.loss { background: rgba(255,75,75,.12); color: var(--red); }
@media (max-width: 980px) {
  .chess-game { grid-template-columns: 1fr; }
  .cg-side { position: static; }
  .cg-main { max-width: min(720px, calc(100vh - 120px)); min-width: min(100%, 340px); }
}
@media (max-width: 560px) {
  .chess-hero ~ .list-card .list-row { flex-wrap: wrap; }
  .chess-hero ~ .list-card .list-row .grow { flex: 1 1 calc(100% - 80px); }
  .chess-hero ~ .list-card .list-row > .fr-btns, .chess-hero ~ .list-card .list-row > .btn, .chess-hero ~ .list-card .list-row > .turn-badge, .chess-hero ~ .list-card .list-row > .fr-tag, .chess-hero ~ .list-card .list-row > .res-badge { margin-left: 64px; }
}
@media (max-width: 640px) { .chess-cards { grid-template-columns: 1fr; } .cg-clock { font-size: 18px; min-width: 80px; } }
/* Schach-Aufgaben in Lektionen */
.lesson-board-wrap { width: min(520px, 100%, calc(100vh - 330px)); min-width: min(100%, 300px); margin: 8px auto 0; }
.lb-info { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; min-height: 30px; }
.lb-turn { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--muted); }
.lb-turn i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); }
.lb-turn.w i { background: #fff; } .lb-turn.b i { background: #111; }

/* Einladungs-Pop-up (Schach) */
.inv-pop .inv-ava { position: relative; width: 84px; margin: 0 auto 12px; }
.inv-pop .inv-ava .avatar { width: 84px; height: 84px; font-size: 36px; }
.inv-pop .inv-knight { position: absolute; right: -8px; bottom: -6px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); animation: invBounce 1.2s var(--spring) infinite alternate; }
.inv-pop .inv-knight svg { width: 26px; height: 26px; }
.inv-pop p { color: var(--muted); font-weight: 700; margin: 6px 0 18px; }
.inv-pop .actions { display: flex; flex-direction: column; gap: 10px; }
@keyframes invBounce { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-4px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .inv-pop .inv-knight { animation: none; } }

/* Ranglisten: Reiter Liga / Spielzeit */
.lb-tabs { display: flex; gap: 8px; justify-content: center; margin: 4px 0 18px; }
.lb-tabs button { display: flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 14px; border: 2px solid var(--border); border-bottom-width: 4px; background: none; color: var(--muted); font: inherit; font-weight: 800; font-size: 15px; letter-spacing: .5px; text-transform: uppercase; cursor: pointer; }
.lb-tabs button svg { width: 22px; height: 22px; }
.lb-tabs button:hover { color: var(--text); }
.lb-tabs button.on { color: var(--blue); border-color: #3f85a7; background: var(--blue-bg); }
.pt-period { max-width: 320px; margin: 4px auto 16px; }
.pt-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; margin-bottom: 8px; }
.pt-cat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--border); border-bottom-width: 4px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.pt-cat:hover { background: var(--bg-2); }
.pt-cat.on { border-color: #3f85a7; background: var(--blue-bg); }
.pt-cat .pt-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-2); color: var(--yellow); }
.pt-cat .pt-ic svg { width: 22px; height: 22px; }
.pt-cat .pt-txt { display: flex; flex-direction: column; min-width: 0; }
.pt-cat b { font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.pt-cat small { color: var(--muted); font-weight: 700; font-size: 12px; }
.pt-cat.on small { color: var(--blue); }
.pt-time { white-space: nowrap; }
.lb-gap { text-align: center; color: var(--faint); font-weight: 900; letter-spacing: 4px; padding: 4px 0; }
.chest-heart { display: inline-block; width: 22px; height: 22px; vertical-align: -5px; color: var(--red); animation: invBounce .6s var(--spring) 3 alternate; }
.chest-heart svg { width: 100%; height: 100%; }

/* Lager: hochkante Karten mit Anzahl */
.inventory { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; }
.modal .inventory { justify-content: center; margin: 14px 0 6px; }
.inv-card { position: relative; width: 118px; min-height: 164px; padding: 16px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: 16px; border: 2px solid var(--border); border-bottom-width: 5px; background: var(--bg-2); text-align: center; }
.inv-card.empty .inv-ic { filter: grayscale(1) opacity(.45); }
.inv-count { position: absolute; top: -10px; right: -10px; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 16px; display: grid; place-items: center; background: var(--blue); color: #fff; font-weight: 900; font-size: 17px; border: 3px solid var(--bg); }
.inv-card.empty .inv-count { background: var(--border); color: var(--muted); }
.inv-ic { width: 52px; height: 52px; color: var(--red); }
.inv-ic svg { width: 100%; height: 100%; }
.inv-name { font-weight: 800; font-size: 14px; line-height: 1.2; }
.inv-max { color: var(--faint); font-weight: 700; font-size: 12px; }
.inv-card .btn { margin-top: auto; width: 100%; padding-left: 6px; padding-right: 6px; font-size: 12px; }
.inv-auto { margin-top: auto; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--blue); }
.inv-hint { color: var(--muted); font-size: 14px; margin: 4px 0 0; }

/* Schach-Elo */
.elo-strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 18px; border-radius: 16px; border: 2px solid var(--border); background: var(--bg-2); }
.elo-strip small { display: block; color: var(--muted); font-weight: 800; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; }
.elo-strip b { font-size: 20px; font-weight: 900; }
.elo-main b { font-size: 30px; color: var(--yellow); }
.elo-strip .w { color: var(--green); } .elo-strip .l { color: var(--red); }
.elo-strip .btn { margin-left: auto; }
.elo-note { color: var(--muted); font-size: 14px; margin: -8px 0 18px; }
.cg-elo { color: var(--muted); font-weight: 800; font-size: .85em; }
.elo-num { color: var(--yellow); font-size: 18px; }
.res-badge i { font-style: normal; opacity: .8; margin-left: 4px; }
@media (max-width: 480px) { .elo-strip { gap: 12px; } .elo-strip .btn { margin-left: 0; width: 100%; } }

/* Online-Status */
.ava-wrap { position: relative; display: inline-flex; flex: none; }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 15px; height: 15px; border-radius: 50%; background: var(--green); border: 3px solid var(--bg); }
.online-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px; background: rgba(88,204,2,.15); color: var(--green); font-size: 11px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; vertical-align: 2px; }
.weekly-hero { background: linear-gradient(135deg, #ce82ff, #a560e8); border: 0; margin-top: 28px; }
.toggle-hint { display: block; margin-top: 2px; color: var(--faint); font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.fm-hidden { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; color: var(--muted); }
.fm-hidden svg { width: 16px; height: 16px; }

/* Züge nachschauen (⏮ ◀ ▶ ⏭) */
.cg-nav { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 14px; border: 2px solid var(--border); background: var(--bg-2); }
.cg-nav button { flex: 1; height: 42px; display: grid; place-items: center; border-radius: 10px; border: 0; border-bottom: 3px solid rgba(0,0,0,.25); background: var(--border); color: var(--text); cursor: pointer; }
.cg-nav button:hover:not(:disabled) { background: #4a5b63; }
.cg-nav button:disabled { opacity: .35; cursor: default; }
.cg-nav button svg { width: 22px; height: 22px; }
.cg-nav-label { flex: 1.6; text-align: center; font-weight: 800; font-size: 13px; color: var(--muted); white-space: nowrap; }
.cg-nav.viewing { border-color: #ffaa00; }
.cg-nav.viewing .cg-nav-label { color: #ffaa00; }
/* Brett beim Nachschauen leicht abgedunkelt umrandet; eigene Feld-Markierungen (Rechtsklick) */
.cb.viewing { box-shadow: 0 0 0 4px #ffaa00; }
.cb-sq.umark::after { content: ''; position: absolute; inset: 0; background: rgba(235, 97, 80, .78); pointer-events: none; }

/* Einstiegsfragen beim ersten Wechsel in einen Bereich */
.ask-profile { text-align: left; }
.ask-profile .ap-step { color: var(--muted); font-weight: 800; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; margin-bottom: 10px; }
.ask-profile .speech { margin-bottom: 18px; }
.ask-profile .speech .mascot { width: 72px; }
.ask-profile .choice-grid { max-width: none !important; }

/* Admin: E-Mail-Versand */
.mail-card { margin-bottom: 16px; }
.mail-dot { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 4px rgba(255,255,255,.05); }
.mail-dot.ok { background: var(--green); } .mail-dot.err { background: var(--red); } .mail-dot.off { background: var(--orange); }
.mail-err { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(255,75,75,.1); color: var(--red); font-family: ui-monospace, monospace; font-size: 13px; word-break: break-word; }
.mail-result { margin-top: 6px; font-weight: 700; font-size: 14px; }
.mail-result.ok { color: var(--green); } .mail-result.err { color: var(--red); word-break: break-word; }
.mail-dns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mail-dns > span { padding: 2px 9px; border-radius: 8px; font-weight: 900; font-size: 12px; }
.mail-dns > span.ok { background: rgba(88,204,2,.15); color: var(--green); }
.mail-dns > span.bad { background: rgba(255,75,75,.12); color: var(--red); }
.mail-warn { width: 100%; padding: 8px 10px; border-radius: 10px; background: rgba(255,150,0,.1); color: var(--orange); font-size: 13px; font-weight: 700; }
.mail-testrow { display: flex; gap: 8px; margin: 10px 0 4px; }
.mail-testrow .input { flex: 1; min-width: 0; padding: 8px 12px; }
.mail-result small { display: block; margin-top: 4px; color: var(--muted); font-weight: 600; font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
.mail-log { margin-top: 10px; }
.mail-log summary { cursor: pointer; font-weight: 800; color: var(--blue); }
.ml-row { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.ml-row small { display: block; color: var(--muted); font-family: ui-monospace, monospace; word-break: break-all; }
.ml-row.err small { color: var(--red); }
.ml-time { color: var(--faint); margin-right: 8px; }
.cg-status.offline { color: var(--orange); background: rgba(255,150,0,.1); border-color: rgba(255,150,0,.35); animation: pulseSoft 1.6s ease-in-out infinite; }
@keyframes pulseSoft { 50% { opacity: .65; } }
.mail-type { flex: none; width: auto; padding: 8px 10px; }
@media (max-width: 640px) { .mail-testrow { flex-wrap: wrap; } .mail-testrow .input:first-child { flex-basis: 100%; } }
.mail-compact > summary { list-style: none; cursor: pointer; }
.mail-compact > summary::-webkit-details-marker { display: none; }
.mail-compact .mail-dns { margin-top: 0; flex-wrap: nowrap; }
.mail-more { color: var(--blue); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.mail-compact[open] .mail-more { opacity: .6; }
.mail-body { padding: 0 20px 16px; }
@media (max-width: 640px) { .mail-compact .mail-dns { display: none; } }

.mail-compact summary .t { white-space: nowrap; }

/* „Kommst du gar nicht weiter?“ – stärkere Hilfe gegen ein Herz */
.rescue { margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 2px dashed rgba(255,75,75,.45); background: rgba(255,75,75,.06); }
.rescue-head { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.rescue-head small { display: block; color: var(--muted); font-weight: 700; margin-top: 2px; }
.rescue .btn:disabled { opacity: .6; }
.rescue-out:empty { display: none; }
.rescue-out { margin-top: 12px; }
.rescue-out p { margin: 0 0 6px; font-weight: 700; }

/* Vorlesen-Knopf neben der Frage */
.speak-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: 10px; vertical-align: middle; border-radius: 12px; border: 2px solid var(--border); border-bottom-width: 4px; background: var(--bg); color: var(--blue); cursor: pointer; transition: background .15s; }
.speak-btn:hover { background: var(--bg-2); }
.speak-btn svg { width: 22px !important; height: 22px !important; flex: none; }
.speak-btn.on { background: var(--blue-bg); border-color: #3f85a7; }
.speak-btn.on .sw1 { animation: speakWave 1s ease-in-out infinite; }
.speak-btn.on .sw2 { animation: speakWave 1s ease-in-out .25s infinite; }
@keyframes speakWave { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .speak-btn.on .sw1, .speak-btn.on .sw2 { animation: none; } }
.voice-row { display: flex; gap: 8px; align-items: center; }
.voice-row .grow { flex: 1; min-width: 0; }

/* Admin: Account erstellen */
.adm-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.adm-toolbar .input { flex: 1; min-width: 0; margin: 0; }
.adm-toolbar .btn { flex: none; white-space: nowrap; }
@media (max-width: 560px) { .adm-toolbar { flex-direction: column; align-items: stretch; } }
.ac-pw { display: flex; gap: 8px; }
.ac-pw .input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; }
.ac-done { display: grid; gap: 8px; margin: 14px 0; text-align: left; }
.ac-done > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); border: 2px solid var(--border); }
.ac-done span { color: var(--muted); font-weight: 700; }
.ac-done b { font-family: ui-monospace, monospace; word-break: break-all; text-align: right; }


/* Zuschauen: Partien von Freunden */
.watch-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 12px; border-radius: 12px; background: rgba(28,176,246,.14); color: var(--blue); font-size: 13px; font-weight: 800; cursor: pointer; }
.watch-btn svg { width: 18px; height: 18px; }
.watch-btn:hover { background: rgba(28,176,246,.24); }
.watch-avas { display: inline-flex; flex: none; }
.watch-avas > * + * { margin-left: -12px; box-shadow: 0 0 0 3px var(--card, var(--bg)); border-radius: 50%; }
.cg-banner svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--blue); }

/* Partie-Analyse */
.cg-analysis { background: var(--card, #1a2b33); border: 2px solid var(--border, #37464f); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.an-title { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 16px; margin-bottom: 8px; }
.an-title svg { width: 20px; height: 20px; color: var(--yellow); }
.an-head { font-weight: 800; color: var(--green); margin-bottom: 10px; }
.an-prog { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin: 6px 0; }
.an-prog i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.an-wait { opacity: .7; }
.an-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 14px; align-items: center; font-size: 14px; }
.an-grid b { text-align: right; }
.an-grid .an-name { font-size: 12px; opacity: .8; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-grid .an-acc { font-size: 18px; }
.an-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.an-move { margin-top: 12px; padding-top: 10px; border-top: 2px solid var(--border, #37464f); font-size: 14px; line-height: 1.5; }
.an-hint { opacity: .7; font-size: 13px; }
.an-grid > span { white-space: nowrap; font-size: 13px; }
.chess-busy { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--orange, #ff9600); }

/* ───────── Werkstatt ───────── */
.ws-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.ws-hero > svg { width: 64px; height: 64px; flex: none; color: var(--blue); }
.ws-list { display: grid; gap: 14px; }
.ws-card { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; padding: 18px; border-radius: 18px; background: var(--card); border: 2px solid var(--border); border-bottom-width: 5px; color: inherit; cursor: pointer; transition: transform .15s, border-color .15s; }
.ws-card:hover { border-color: var(--pc); transform: translateY(-2px); }
.ws-ic { width: 58px; height: 58px; flex: none; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--pc) 18%, transparent); color: var(--pc); }
.ws-ic svg { width: 36px; height: 36px; }
.ws-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ws-body b { font-size: 17px; }
.ws-body small { color: var(--muted); font-weight: 700; line-height: 1.4; }
.ws-tag { font-size: 11px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: var(--pc); }
.ws-prog { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 6px; }
.ws-prog i { display: block; height: 100%; background: var(--pc); border-radius: 6px; }
.ws-meta { display: inline-flex; align-items: center; gap: 6px; }
.ws-meta svg { width: 16px; height: 16px; color: var(--green); }

.ws { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.ws-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.ws-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
.ws-title { font-size: 19px; margin: 0; line-height: 1.25; }
.ws-tree { display: flex; flex-direction: column; gap: 4px; }
.ws-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 2px solid transparent; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.ws-file:hover:not(:disabled) { background: rgba(255,255,255,.05); }
.ws-file.on { border-color: var(--border); background: var(--card); }
.ws-file:disabled { opacity: .45; cursor: default; }
.ws-fi { width: 20px; height: 20px; flex: none; }
.ws-fi svg { width: 20px; height: 20px; }
.ws-file.done .ws-fi { color: var(--green); }
.ws-file.active .ws-fi { color: var(--blue); }
.ws-file.readonly .ws-fi { color: var(--muted); }
.ws-fn { min-width: 0; display: flex; flex-direction: column; font-weight: 800; font-size: 14px; overflow-wrap: anywhere; }
.ws-fn small { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.ws-side-btns { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 4px; }

.ws-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ws-editor { border-radius: 16px; overflow: hidden; border: 2px solid var(--border); background: #0f1a1f; }
.ws-tab { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 10px 14px; background: var(--card); border-bottom: 2px solid var(--border); }
.ws-tab b { font-family: var(--mono, ui-monospace, monospace); font-size: 14px; }
.ws-tab small { color: var(--muted); font-weight: 700; font-size: 12.5px; flex: 1; min-width: 200px; }
.ws-ro { font-size: 11px; font-weight: 900; text-transform: uppercase; color: var(--muted); border: 1.5px solid var(--border); border-radius: 8px; padding: 1px 7px; }
.ws-code { position: relative; font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 13.5px; line-height: 1.65; padding: 10px 0; overflow-x: auto; max-height: 62vh; overflow-y: auto; }
.ws-line { display: flex; min-width: max-content; }
.ws-line .ln { width: 44px; flex: none; text-align: right; padding-right: 14px; color: #52656d; user-select: none; }
.ws-line .lc { white-space: pre; padding-right: 16px; }
.ws-line.mine { background: rgba(88, 204, 2, .07); }
.ws-line.more .lc { color: #52656d; }
.ws-line.typing { background: rgba(28, 176, 246, .08); }
.ws-line.typing .lc { padding-left: var(--ind); flex: 1; }
.ws-line.typing.shake { animation: shake .35s; }
#ws-input { width: 100%; min-width: 280px; font: inherit; color: #fff; background: rgba(0,0,0,.25); border: 2px solid var(--blue); border-radius: 8px; padding: 2px 8px; outline: none; }
#ws-input::placeholder { color: #5f7a86; }
.ws-empty { padding: 30px; text-align: center; color: var(--muted); font-weight: 700; }

.ws-task { background: var(--card); border: 2px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.ws-step { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.ws-free { display: inline-flex; align-items: center; gap: 5px; color: var(--yellow); }
.ws-free svg { width: 15px; height: 15px; }
.ws-explain p { margin: 6px 0; line-height: 1.55; }
.ws-hint { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 200, 0, .08); border: 2px solid rgba(255, 200, 0, .3); }
.ws-hint pre.code { margin: 8px 0 0; }
.ws-feedback { min-height: 22px; margin-top: 8px; font-weight: 800; }
.ws-feedback .bad { color: var(--red); }
.ws-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ws-done-head { display: flex; align-items: center; gap: 14px; }
.ws-done-head > svg { width: 54px; height: 54px; flex: none; }
.ws-done-head h3 { margin: 0; font-size: 20px; }
.ws-done-head p { margin: 4px 0 0; color: var(--muted); font-weight: 700; }
.ws-dl { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.ws-dl .btn svg { width: 20px; height: 20px; vertical-align: -4px; margin-right: 4px; }
.ws-howto h2 { font-size: 16px; margin: 14px 0 6px; }
.ws-howto ul { margin: 0; padding-left: 20px; line-height: 1.6; }

@media (max-width: 900px) {
  .ws { grid-template-columns: 1fr; }
  .ws-side { position: static; }
  .ws-tree { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .ws-file { flex: none; }
  .ws-fn small { display: none; }
  .ws-code { font-size: 12.5px; max-height: none; }
  #ws-input { min-width: 220px; }
}

/* Account-Wechsler */
.acc-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; text-align: left; }
.acc-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--border); background: var(--bg); color: var(--text); font: inherit; cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.acc-row:hover:not(.on) { border-color: var(--blue); background: var(--bg-2); }
.acc-row.on { border-color: var(--green); cursor: default; }
.acc-row .avatar { width: 42px; height: 42px; flex: none; }
.acc-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acc-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-name small { color: var(--muted); font-weight: 700; }
.acc-cur svg { width: 24px; height: 24px; color: var(--green); }
.acc-go { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; color: var(--blue); }
.acc-actions { display: flex; flex-direction: column; gap: 8px; }
.acc-actions .btn svg { vertical-align: -5px; margin-right: 4px; }
.acc-saved { text-align: left; }
.acc-saved > small { color: var(--muted); font-weight: 800; }
.acc-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 700; margin: 4px 0 8px; }
.acc-or::before, .acc-or::after { content: ''; flex: 1; height: 2px; background: var(--border); }
.hearts-reset { margin-top: -4px; color: var(--muted); }

/* Kategorien im Lernpfad */
.section-head { margin: 8px 0 22px; padding: 18px 20px; border-radius: 20px; border: 2px solid var(--border); background: linear-gradient(135deg, rgba(28,176,246,.14), rgba(206,130,255,.10)); }
.section-head + .unit { margin-top: 0; }
.section-kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: var(--blue); }
.section-kicker svg { width: 20px; height: 20px; }
.section-head h2 { margin: 6px 0 4px; font-size: 22px; }
.section-head p { margin: 0; color: var(--muted); font-weight: 700; }
.section-prog { height: 10px; margin-top: 12px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.section-prog i { display: block; height: 100%; background: var(--blue); border-radius: 6px; }
.node.project { width: 86px; height: 86px; border-radius: 24px; background: #1cb0f6; box-shadow: 0 8px 0 #1899d6; color: #fff; }
.node.project svg { width: 44px; height: 44px; color: #fff; }
.node.project.locked { background: #37464f; box-shadow: 0 8px 0 #2b373e; }
.node.project.locked svg { color: #52656d; }

/* ───────── Geburtstag ───────── */
.bday-card { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 28px; padding: 16px 18px; border-radius: 16px; border: 2px solid var(--border); background: var(--card); }
.bday-card.today { border-color: rgba(255,75,75,.45); background: linear-gradient(135deg, rgba(255,75,75,.1), rgba(206,130,255,.1)); }
.bday-ic { font-size: 34px; line-height: 1; flex: none; }
.bday-card .t { font-size: 18px; font-weight: 800; }
.bday-card .d { color: var(--muted); margin-top: 4px; }
.bday-card .d b { color: var(--text); }
.bday-card .link-btn { padding: 0; font-size: 13px; }
.bday-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.bday-form .btn { flex: none; }
.bday-hint { display: block; margin-top: 10px; color: var(--faint); font-size: 13px; line-height: 1.45; }
.bday-hero { font-size: 64px; text-align: center; line-height: 1.1; margin-bottom: 6px; animation: toastIn .6s var(--spring); }
.friend-row.bday { background: linear-gradient(90deg, rgba(255,75,75,.08), transparent 70%); }
.bday-tag { color: var(--red); font-size: 14px; font-weight: 800; margin: 2px 0; }
.congrats-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 12px; border-radius: 12px; background: rgba(255,75,75,.14); color: var(--red); font-size: 13px; font-weight: 800; cursor: pointer; }
.congrats-btn:hover { background: rgba(255,75,75,.24); }
.congrats-btn.done { background: rgba(88,204,2,.14); color: var(--green); cursor: default; }
#bday-pops { position: fixed; top: 16px; left: 16px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.bday-pop { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--card); border: 2px solid rgba(255,75,75,.5); box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 700; line-height: 1.35; cursor: pointer; pointer-events: auto; animation: bdayIn .5s var(--spring); }
.bday-pop .avatar { flex: none; }
.bday-pop.out { opacity: 0; transform: translateX(-24px); transition: opacity .3s, transform .3s; }
@keyframes bdayIn { from { opacity: 0; transform: translateX(-40px) scale(.9); } }
.discount-box { margin: 0 0 18px; padding: 14px 18px; border-radius: 16px; background: rgba(255,200,0,.1); border: 2px solid rgba(255,200,0,.35); }
.discount-total { color: var(--yellow); font-weight: 800; font-size: 17px; margin-bottom: 8px; }
.discount-part { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; font-weight: 700; }
.discount-part .role-badge { margin-left: 0; }
.discount-part b { color: var(--yellow); flex: none; }
.discount-box small { color: var(--faint); }
/* Geburtstags-Auswahl: Raster so breit wie die beiden Felder, damit es nie aus dem Bildschirm ragt */
.bday-pick { position: relative; display: flex; gap: 10px; flex: 1 1 240px; min-width: 0; }
.bday-pick > .csel { flex: 1 1 0; min-width: 0; }
.bday-pick .csel.grid { position: static; }
.bday-pick .csel.grid .csel-menu { left: 0; right: 0; width: auto; min-width: 0; max-width: none; }
.bday-pick .csel.grid .csel-opt { padding: 9px 2px; font-size: 14px; }
.csel.grid.auto .csel-menu { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.bday-card .grow { min-width: 0; }
.bday-pick .csel-btn { min-width: 0; width: 100%; }
.bday-pick .csel-label { width: 0; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bday-pick > .csel:first-of-type { flex: 0 0 88px; }
.bday-pick .csel-btn { padding: 12px 12px; gap: 6px; }
.bday-date { color: var(--muted); font-size: 13px; font-weight: 700; margin: 2px 0; }
.fm-bday { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; background: rgba(255,75,75,.08); border: 2px solid rgba(255,75,75,.3); font-size: 16px; font-weight: 700; }
.fm-bday b { color: var(--red); }
.adm-bday-form { margin-top: 0; }
.adm-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; }
.adm-check input { width: 18px; height: 18px; accent-color: var(--red); }
/* Werkstatt: gesperrtes Projekt (Lektionen der Kategorie noch nicht geschafft) */
.ws-card.locked { cursor: not-allowed; }
.ws-card.locked:hover { border-color: var(--border); transform: none; }
.ws-card.locked .ws-ic { filter: grayscale(1); opacity: .5; }
.ws-card.locked b, .ws-card.locked small:not(.ws-lock) { opacity: .6; }
.ws-card.locked .btn svg { width: 16px; height: 16px; margin-right: 4px; }
.ws-lock { display: flex; align-items: center; gap: 6px; color: var(--orange) !important; font-weight: 800; }
.ws-lock svg { width: 16px; height: 16px; flex: none; }
.ws-card.shake, .ws-lockrow.shake { animation: shake .35s; }
/* Werkstatt-Übersicht: Reiter und Abschnitte */
.ws-courses { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.ws-course { font: inherit; font-weight: 900; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; padding: 7px 14px; border-radius: 99px; border: 2px solid var(--border); background: none; color: var(--muted); cursor: pointer; }
.ws-course.on { color: var(--text); background: var(--card); border-color: var(--blue); }
.ws-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 16px; background: var(--bg-2); border: 2px solid var(--border); }
.ws-tab { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; font-weight: 900; font-size: 14px; letter-spacing: .6px; text-transform: uppercase; padding: 10px 12px; border-radius: 11px; border: 0; background: none; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.ws-tab:hover:not(.on) { color: var(--text); background: rgba(255,255,255,.04); }
.ws-tab.on { background: var(--card); color: var(--blue); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.ws-tab small { font-size: 12px; font-weight: 800; color: var(--faint); letter-spacing: 0; }
.ws-tab.on small { color: var(--muted); }
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); position: absolute; top: 8px; right: 10px; }
.ws-sum { display: flex; align-items: center; gap: 12px; margin: 14px 2px 4px; }
.ws-sum .ws-prog { flex: 1; margin: 0; height: 8px; --pc: var(--green); }
.ws-sum span { font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.ws-group { margin-top: 20px; }
.ws-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px 2px; font-size: 13px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.ws-group h3 small { font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--bg-2); color: var(--faint); }
.ws-lockrow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; border: 2px dashed var(--border); background: rgba(255,255,255,.015); cursor: default; }
.ws-lockrow .ws-ic { width: 42px; height: 42px; border-radius: 12px; filter: grayscale(1); opacity: .45; }
.ws-lockrow .ws-ic svg { width: 26px; height: 26px; }
.ws-lockrow b { font-size: 15px; opacity: .75; }
.ws-lockrow .btn { flex: none; }
@media (max-width: 560px) { .ws-lockrow { flex-wrap: wrap; } .ws-lockrow .btn { width: 100%; } .ws-tab { font-size: 13px; padding: 9px 8px; } .ws-dot { top: 6px; right: 6px; } }

/* Windows-App herunterladen */
.app-hero .mascot { width: 110px; height: auto; margin: 0 auto 6px; display: block; }
.modal a.btn#app-dl { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin: 6px 0 4px; }
.modal a.btn#app-dl svg { width: 22px; height: 22px; }
.app-meta { color: var(--muted); font-size: 14px; font-weight: 700; margin: 8px 0 14px; }
.app-note { text-align: left; font-size: 13px; line-height: 1.5; color: var(--muted); background: var(--bg-2); border-radius: 12px; padding: 10px 14px; }
.adm-desk-up { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.adm-desk-up input[type=file] { flex: 1 1 240px; min-width: 0; color: var(--muted); font-weight: 700; }
.adm-desk-prog { margin-top: 10px; }
#adm-desktop code { background: var(--bg-2); padding: 1px 5px; border-radius: 5px; }

/* Update-Pop-up oben */
#update-pop { position: fixed; top: 12px; left: 50%; z-index: 1000; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 24px); padding: 8px 8px 8px 12px; border-radius: 16px; background: var(--card); border: 1.5px solid rgba(28,176,246,.55); box-shadow: 0 10px 30px rgba(0,0,0,.4); overflow: hidden; transform: translate(-50%, -150%); opacity: 0; transition: transform .45s var(--spring), opacity .25s; }
#update-pop.show { transform: translate(-50%, 0); opacity: 1; }
#update-pop.auto { padding-right: 16px; }
#update-pop .up-ic { font-size: 20px; line-height: 1; flex: none; animation: upBob 1.6s ease-in-out infinite; }
@keyframes upBob { 50% { transform: translateY(-3px); } }
#update-pop .up-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#update-pop .up-text b { font-size: 14px; }
#update-pop .up-text span { color: var(--muted); font-weight: 700; font-size: 12.5px; line-height: 1.3; }
#update-pop .up-go { flex: none; font: inherit; font-weight: 800; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: #fff; background: var(--blue); border: 0; border-bottom: 3px solid #1899d6; border-radius: 10px; padding: 7px 11px; margin-left: 4px; cursor: pointer; }
#update-pop .up-go:active { transform: translateY(2px); border-bottom-width: 1px; }
#update-pop .up-later { flex: none; font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 6px 6px; border-radius: 8px; cursor: pointer; }
#update-pop .up-later:hover { background: rgba(255,255,255,.06); }
#update-pop .up-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--blue); transform-origin: left; animation: upBar 1.8s linear forwards; }
@keyframes upBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 520px) { #update-pop { width: calc(100% - 24px); } #update-pop .up-text { flex: 1; } }

/* Schach: Zuschauerzahl */
.cg-viewers { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding: 8px 12px; border-radius: 12px; background: rgba(28,176,246,.12); color: var(--blue); font-weight: 800; font-size: 14px; }
.cg-viewers svg { width: 20px; height: 20px; flex: none; }
.cg-viewers b { font-size: 16px; }
.cg-viewers span { color: var(--muted); font-weight: 700; }
.wl-viewers { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--muted); font-weight: 800; font-size: 13px; margin-right: 8px; }
.wl-viewers svg { width: 16px; height: 16px; }

/* Handy: „Mehr“-Menü von unten */
#more-sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0); transition: background .25s; }
#more-sheet.open { background: rgba(0,0,0,.55); }
.more-panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 2px solid var(--border); border-radius: 22px 22px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .28s var(--out); }
#more-sheet.open .more-panel { transform: none; }
.more-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 14px; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px 12px; border-radius: 16px; background: var(--card); border: 2px solid var(--border); border-bottom-width: 4px; color: var(--text); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.more-tile svg { width: 34px; height: 34px; }
.more-tile.on { border-color: var(--blue); background: var(--blue-bg); color: var(--blue); }
.more-tile:active { transform: translateY(2px); border-bottom-width: 2px; }
.more-list { display: flex; flex-direction: column; margin-top: 14px; border-top: 2px solid var(--border); padding-top: 8px; }
.more-list button { display: flex; align-items: center; gap: 14px; padding: 12px 8px; background: none; border: 0; color: var(--text); font: inherit; font-weight: 800; font-size: 15px; text-align: left; cursor: pointer; border-radius: 12px; }
.more-list button svg { width: 24px; height: 24px; color: var(--muted); }
.more-list button.muted { color: var(--muted); }

/* Passkeys */
.key-ic { width: 22px; height: 22px; flex: none; }
.pk-login { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.pk-ic { color: var(--yellow); }
.pk-ic .key-ic { width: 30px; height: 30px; }
.pk-add .btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.pk-add .btn .key-ic { width: 18px; height: 18px; }
.cg-leave { color: var(--muted); font-weight: 700; }

/* ───────── Geburtstags-Show ───────── */
#bday-show { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, rgba(206,130,255,.28), rgba(19,31,36,.96) 65%); backdrop-filter: blur(4px); opacity: 0; transition: opacity .35s; }
#bday-show.in { opacity: 1; }
#bday-show.out { opacity: 0; }
.bs-balloons { position: absolute; inset: 0; pointer-events: none; }
.bs-balloon { position: absolute; bottom: -120px; width: 46px; animation: bsFloat var(--dur) linear var(--del) infinite; }
.bs-balloon svg { width: 100%; display: block; animation: bsSway 2.6s ease-in-out infinite alternate; }
@keyframes bsFloat { to { transform: translateY(calc(-100vh - 180px)); } }
@keyframes bsSway { from { transform: translateX(calc(var(--sway) * -1)) rotate(-6deg); } to { transform: translateX(var(--sway)) rotate(6deg); } }
.bs-stage { position: relative; z-index: 1; width: min(460px, calc(100% - 32px)); max-height: 100%; overflow-y: auto; padding: 20px 0; text-align: center; }
.bs-cake { width: 150px; margin: 0 auto; animation: bsDrop .8s var(--spring) both; }
.bs-cake-svg { width: 100%; display: block; }
.bs-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: bsFlicker .5s ease-in-out infinite alternate; }
@keyframes bsFlicker { from { transform: scale(1, 1) rotate(-3deg); } to { transform: scale(.85, 1.12) rotate(3deg); } }
@keyframes bsDrop { from { transform: translateY(-120px) scale(.4); opacity: 0; } }
.bs-title { margin: 10px 0 4px; font-size: clamp(28px, 7vw, 40px); line-height: 1.15; color: var(--yellow); text-shadow: 0 4px 0 rgba(0,0,0,.3); }
.bs-title .bs-word { display: inline-block; white-space: nowrap; }
.bs-title .bs-word span { display: inline-block; animation: bsLetter .6s var(--spring) both, bsWave 2.4s ease-in-out infinite; animation-delay: calc(.35s + var(--i) * 45ms), calc(1.6s + var(--i) * 80ms); }
@keyframes bsLetter { from { transform: translateY(30px) scale(.2) rotate(-20deg); opacity: 0; } }
@keyframes bsWave { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-7px); } }
.bs-sub { margin: 0 0 18px; font-size: 18px; font-weight: 800; color: var(--text); animation: fadeIn .5s 1.2s both; }
.bs-sub b { color: #ff86b3; }
.bs-giftbox { position: relative; min-height: 190px; animation: bsDrop .7s 1.3s var(--spring) both; }
.bs-gift { position: relative; width: 140px; height: 140px; padding: 0; border: 0; background: none; cursor: pointer; animation: bsWiggle 1.6s 2s ease-in-out infinite; }
.bs-gift-svg { width: 100%; display: block; overflow: visible; }
.bs-gift:hover .bs-gift-svg { filter: brightness(1.08); }
@keyframes bsWiggle { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-8deg) scale(1.05); } 82% { transform: rotate(8deg) scale(1.05); } 89% { transform: rotate(-5deg); } 95% { transform: rotate(3deg); } }
.bs-lid { transform-box: fill-box; transform-origin: 50% 100%; }
.bs-gift.opening { animation: bsShake .5s ease-in-out; }
@keyframes bsShake { 20% { transform: rotate(-10deg) scale(1.08); } 40% { transform: rotate(10deg) scale(1.12); } 60% { transform: rotate(-8deg) scale(1.1); } 80% { transform: rotate(6deg) scale(1.05); } }
#bday-show.gifted .bs-lid { animation: bsLidOff .7s var(--out) forwards; }
@keyframes bsLidOff { to { transform: translate(40px, -90px) rotate(35deg); opacity: 0; } }
.bs-gem { position: absolute; left: 50%; top: 45%; width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: 0; pointer-events: none; }
.bs-gem svg { width: 100%; height: 100%; }
#bday-show.gifted:not(.no-gift) .bs-gem { animation: bsGemBurst 1.2s var(--d) var(--out) forwards; }
@keyframes bsGemBurst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(.3); } 70% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-150px) scale(1.2); } }
.bs-tap { margin: 6px 0 0; color: var(--muted); font-weight: 800; animation: bsPulse 1.4s ease-in-out infinite; }
@keyframes bsPulse { 50% { opacity: .45; } }
#bday-show.gifted .bs-tap { display: none; }
.bs-reward { display: none; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; font-size: 30px; font-weight: 900; color: var(--blue); }
.bs-gem-ic { width: 38px; height: 38px; animation: bsGemSpin 1.2s var(--spring) both; }
.bs-gem-ic svg { width: 100%; height: 100%; }
@keyframes bsGemSpin { from { transform: scale(0) rotate(-180deg); } }
#bday-show.gifted:not(.no-gift) .bs-reward { display: flex; animation: bsDrop .6s var(--spring) both; }
.bs-disc { margin: 14px 0 18px; color: var(--muted); font-weight: 700; line-height: 1.5; opacity: 0; transition: opacity .4s .6s; }
.bs-btns { display: flex; gap: 10px; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .4s .9s; }
.bs-btns .btn { flex: 0 1 180px; }
#bday-show.gifted .bs-disc, #bday-show.gifted .bs-btns { opacity: 1; pointer-events: auto; }
@media (max-height: 700px) { .bs-cake { width: 110px; } .bs-gift { width: 110px; height: 110px; } .bs-giftbox { min-height: 150px; } }

/* Maskottchen antippen: „Bonk“ */
.mascot .hit-eyes { display: none; }
.mascot-side.bonk .mascot .eyes { display: none; }
.mascot-side.bonk .mascot .hit-eyes { display: inline; }
.mascot-side.bonk .mascot { animation: bonk .6s cubic-bezier(.3, 1.6, .5, 1), dizzy .9s .6s ease-in-out; transform-origin: 50% 95%; }
@keyframes bonk { 0% { transform: none; } 18% { transform: scale(1.25, .62) rotate(-10deg); } 42% { transform: scale(.88, 1.14) translateY(-10px) rotate(8deg); } 65% { transform: scale(1.06, .95) rotate(-4deg); } 100% { transform: none; } }
@keyframes dizzy { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.bonk-hit { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; z-index: 2; animation: bonkHit .45s ease-out forwards; }
.bonk-hit svg { width: 100%; height: 100%; }
@keyframes bonkHit { 0% { transform: scale(.2) rotate(-30deg); opacity: 1; } 50% { transform: scale(1.15) rotate(10deg); opacity: 1; } 100% { transform: scale(1.3) rotate(20deg); opacity: 0; } }
.bonk-stars { position: absolute; left: 50%; top: 8%; width: 0; height: 0; pointer-events: none; }
.bonk-stars i { position: absolute; left: -9px; top: -9px; font-style: normal; font-size: 18px; color: #ffc800; text-shadow: 0 2px 0 rgba(0,0,0,.3); animation: bonkOrbit 1.1s linear infinite, fadeIn .2s both; animation-delay: calc(var(--i) * -0.37s), .2s; }
@keyframes bonkOrbit { from { transform: rotate(0deg) translateX(34px) rotate(0deg) scaleY(1); } to { transform: rotate(360deg) translateX(34px) rotate(-360deg); } }

/* ───────── Minispiele ───────── */
.mg-list { display: grid; gap: 14px; }
.mg-tile { display: flex; align-items: center; gap: 22px; width: 100%; text-align: left; padding: 18px 20px; border-radius: 20px; background: linear-gradient(135deg, rgba(255,75,75,.12), rgba(28,176,246,.1)); border: 2px solid var(--border); border-bottom-width: 5px; color: inherit; cursor: pointer; transition: transform .15s, border-color .15s; }
.mg-tile:hover { transform: translateY(-2px); border-color: var(--blue); }
.mg-tile:hover .mg-art .ez-card:nth-child(1) { transform: rotate(-22deg) translate(-8px, 2px); }
.mg-tile:hover .mg-art .ez-card:nth-child(3) { transform: rotate(22deg) translate(8px, 2px); }
.mg-art { position: relative; width: 120px; height: 100px; flex: none; }
.mg-art .ez-card { --w: 58px; position: absolute; left: 31px; top: 6px; transition: transform .25s var(--spring); }
.mg-art .ez-card:nth-child(1) { transform: rotate(-14deg) translateX(-4px); }
.mg-art .ez-card:nth-child(3) { transform: rotate(14deg) translateX(4px); }
.mg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mg-body b { font-size: 22px; }
.mg-body small { color: var(--muted); font-weight: 700; line-height: 1.45; }
.mg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mg-tags span { font-size: 11px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--bg-2); color: var(--muted); }
.mg-soon { padding: 18px; border-radius: 18px; border: 2px dashed var(--border); color: var(--faint); font-weight: 800; text-align: center; }
@media (max-width: 560px) { .mg-tile { flex-wrap: wrap; gap: 12px; } .mg-tile .btn { width: 100%; } }

/* Karten (eigenes Design: Farbfläche, weißer Rahmen, schräges Mittelfeld) */
.ez-card { --w: 88px; position: relative; width: var(--w); height: calc(var(--w) * 1.5); flex: none; border-radius: calc(var(--w) * .12); background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.25), 0 6px 14px rgba(0,0,0,.25); user-select: none; font-family: 'Nunito', system-ui, sans-serif; }
.ez-card::before { content: ''; position: absolute; inset: calc(var(--w) * .055); border-radius: calc(var(--w) * .08); background: var(--cc); }
.ez-r { --cc: #e8323c; --cd: #b81d26; } .ez-y { --cc: #f5c400; --cd: #c79c00; } .ez-g { --cc: #3aae3e; --cd: #26812a; } .ez-b { --cc: #1778d6; --cd: #0f58a3; } .ez-w { --cc: #1b2429; --cd: #000; }
.ez-mid { position: absolute; left: 14%; right: 14%; top: 20%; bottom: 20%; display: grid; place-items: center; border-radius: 46% 12%; background: #fff; transform: rotate(-16deg); box-shadow: inset 0 0 0 calc(var(--w) * .02) rgba(0,0,0,.08); }
.ez-mid b { transform: rotate(16deg); color: var(--cc); font-size: calc(var(--w) * .52); font-weight: 900; line-height: 1; text-shadow: calc(var(--w) * .02) calc(var(--w) * .025) 0 var(--cd); letter-spacing: -.02em; }
.ez-mid b.sym { font-size: calc(var(--w) * .4); }
.ez-mid b svg { width: calc(var(--w) * .42); height: calc(var(--w) * .42); display: block; filter: drop-shadow(calc(var(--w) * .015) calc(var(--w) * .02) 0 var(--cd)); }
.ez-wheel { background: conic-gradient(#e8323c 0 25%, #1778d6 0 50%, #3aae3e 0 75%, #f5c400 0); }
.ez-wheel b { color: #fff; text-shadow: 0 2px 0 #000, 0 0 6px rgba(0,0,0,.6); font-size: calc(var(--w) * .34); }
.ez-tl, .ez-br { position: absolute; z-index: 1; font-style: normal; font-weight: 900; color: #fff; font-size: calc(var(--w) * .17); line-height: 1; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.ez-tl { left: calc(var(--w) * .12); top: calc(var(--w) * .1); }
.ez-br { right: calc(var(--w) * .12); bottom: calc(var(--w) * .1); transform: rotate(180deg); }
.ez-tl svg, .ez-br svg { width: calc(var(--w) * .17); height: calc(var(--w) * .17); display: block; }
.ez-back::before { background: radial-gradient(circle at 50% 50%, #2b3d46 0 30%, #17232a 70%); }
.ez-back { background: #0e171b; }
.ez-logo { position: absolute; inset: 0; display: grid; place-items: center; transform: rotate(-24deg); z-index: 1; font-weight: 900; font-size: calc(var(--w) * .26); color: #ffc800; letter-spacing: -.02em; text-shadow: calc(var(--w) * .02) calc(var(--w) * .025) 0 #e8323c, calc(var(--w) * -.01) calc(var(--w) * -.01) 0 #1778d6; }
.ez-card.mini { --w: 30px; box-shadow: 0 2px 4px rgba(0,0,0,.35); }
.ez-card.mini .ez-logo { font-size: 0; }
.ez-card.mini .ez-logo::after { content: ''; width: 40%; height: 26%; border-radius: 50%; background: #ffc800; opacity: .9; }

/* Einz!-Übersicht */
.ez-hero { display: flex; align-items: center; gap: 22px; margin: 10px 0 20px; }
.ez-hero-cards { position: relative; width: 130px; height: 110px; flex: none; }
.ez-hero-cards .ez-card { --w: 64px; position: absolute; left: 33px; top: 4px; animation: ezHero 3s ease-in-out infinite; }
.ez-hero-cards .ez-card:nth-child(1) { --r: -16deg; --x: -12px; }
.ez-hero-cards .ez-card:nth-child(2) { --r: 0deg; --x: 0px; animation-delay: .15s; }
.ez-hero-cards .ez-card:nth-child(3) { --r: 16deg; --x: 12px; animation-delay: .3s; }
@keyframes ezHero { 0%, 100% { transform: translateX(var(--x)) rotate(var(--r)); } 50% { transform: translateX(calc(var(--x) * 1.5)) translateY(-6px) rotate(calc(var(--r) * 1.3)); } }
.ez-resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 16px; border-radius: 16px; background: var(--blue-bg); border: 2px solid rgba(28,176,246,.4); font-weight: 800; }
.ez-resume.invite { background: rgba(88,204,2,.1); border-color: rgba(88,204,2,.4); }
.ez-resume > span:first-child { display: flex; align-items: center; gap: 10px; }
.ez-resume .avatar { width: 34px; height: 34px; font-size: 14px; }

/* Lobby */
.ez-lobby .page-title { margin: 8px 0 4px; }
.ez-seats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 22px; }
.ez-seat-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: 18px; background: var(--card); border: 2px solid var(--border); text-align: center; min-width: 0; animation: bsDrop .4s var(--spring) both; }
.ez-seat-card .avatar { width: 58px; height: 58px; font-size: 22px; }
.ez-seat-card b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ez-seat-card small { color: var(--muted); font-weight: 800; font-size: 12px; }
.ez-seat-card.wait { opacity: .75; border-style: dashed; }
.ez-seat-card.empty { background: none; border-style: dashed; justify-content: center; min-height: 150px; }
.ez-empty-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 900; color: var(--faint); border: 2px dashed var(--border); }
.ez-dots::after { content: ''; animation: ezDots 1.4s steps(4) infinite; }
@keyframes ezDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.ez-sub { font-size: 13px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.ez-friends { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.ez-friend { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 2px solid var(--border); }
.ez-friend .avatar { width: 38px; height: 38px; font-size: 15px; }
.ez-friend .grow { display: flex; flex-direction: column; min-width: 0; }
.ez-friend small { color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 5px; }
.ez-on { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.ez-tag { font-size: 12px; font-weight: 900; color: var(--green); text-transform: uppercase; }
.ez-waiting { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px; color: var(--muted); font-weight: 800; }
.ez-card.spin { animation: ezSpin 1.6s ease-in-out infinite; }
@keyframes ezSpin { 50% { transform: rotateY(180deg); } }
.ez-bot-ava { display: grid; place-items: center; border-radius: 50%; color: #fff; }
@media (max-width: 640px) { .ez-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Spieltisch: ovaler Tisch, Spieler im Halbkreis, Stapel in der Mitte */
.ez-table { display: flex; flex-direction: column; gap: 6px; }
.ez-top { display: flex; align-items: center; justify-content: space-between; }
.ez-mode { font-size: 12px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); }
.ez-arena { --ring: #8a9ba3; position: relative; height: clamp(380px, 55vh, 500px); margin: 0 auto; width: 100%; max-width: 980px; }
.ez-arena.c-r { --ring: #e8323c; } .ez-arena.c-y { --ring: #f5c400; } .ez-arena.c-g { --ring: #3aae3e; } .ez-arena.c-b { --ring: #1778d6; }
.ez-felt { position: absolute; left: 12%; right: 12%; top: 30%; bottom: 3%; border-radius: 50%; background: var(--bg-2); border: 3px solid var(--border); box-shadow: inset 0 6px 0 rgba(255,255,255,.03), 0 10px 0 rgba(0,0,0,.25); }
.ez-flow { position: absolute; inset: 6%; width: 88%; height: 88%; overflow: visible; }
.ez-flow ellipse { fill: none; stroke: var(--ring); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 18 14; vector-effect: non-scaling-stroke; opacity: .75; transition: stroke .35s; animation: ezFlow 1.6s linear infinite; }
.ez-arena.ccw .ez-flow ellipse { animation-direction: reverse; }
@keyframes ezFlow { to { stroke-dashoffset: -64; } }
.ez-flow.flash ellipse { animation: ezFlow 1.6s linear infinite, ezFlash .6s ease-out; }
@keyframes ezFlash { 30% { stroke-width: 10; opacity: 1; } }
.ez-center { position: absolute; left: 50%; top: 62%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 44px; }
.ez-deck { position: relative; width: 92px; height: 138px; padding: 0; border: 0; background: none; cursor: default; }
.ez-deck .ez-card { --w: 92px; position: absolute; left: 0; top: 0; }
.ez-deck .d3 { transform: translate(-5px, 5px); } .ez-deck .d2 { transform: translate(-2.5px, 2.5px); }
.ez-deck.ok { cursor: pointer; }
.ez-deck.ok .d1 { animation: ezDeckHint 1.4s ease-in-out infinite; }
.ez-deck.ok:hover .d1 { transform: translateY(-8px); animation: none; }
@keyframes ezDeckHint { 50% { transform: translateY(-6px); } }
.ez-deck.shuffle .ez-card { animation: ezShuffle .6s ease-in-out; }
@keyframes ezShuffle { 30% { transform: translateX(-22px) rotate(-8deg); } 60% { transform: translateX(18px) rotate(6deg); } }
.ez-deck-n { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); padding: 1px 9px; border-radius: 99px; background: var(--bg); border: 2px solid var(--border); color: var(--muted); font-weight: 900; font-size: 12px; z-index: 2; }
.ez-pile { position: relative; width: 92px; height: 138px; }
.ez-pile .ez-card { --w: 92px; position: absolute; left: 0; top: 0; }
.ez-pile .ez-card.landed { animation: ezLand .35s ease-out; }
@keyframes ezLand { 0% { box-shadow: 0 0 0 6px rgba(255,255,255,.35), 0 12px 24px rgba(0,0,0,.4); } }
.ez-color { position: absolute; right: -42px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; background: var(--ring); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--ring), 0 0 16px var(--ring); }
.ez-color.pop { animation: ezPop .5s var(--spring); }
@keyframes ezPop { 0% { transform: scale(0); } 60% { transform: scale(1.5); } }
.ez-status { position: absolute; left: 50%; top: 92%; transform: translate(-50%, -50%); white-space: nowrap; padding: 6px 16px; border-radius: 99px; background: var(--bg); border: 2px solid var(--border); color: var(--muted); font-weight: 900; font-size: 14px; z-index: 3; }
.ez-status:empty { display: none; }
.ez-status .go { color: var(--yellow); }
.ez-incoming { visibility: hidden; }

.ez-opp { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; width: 120px; z-index: 2; }
.ez-opp-ava { position: relative; width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--border); transition: box-shadow .25s; }
.ez-opp-ava .avatar { width: 60px; height: 60px; font-size: 24px; }
.ez-opp.turn .ez-opp-ava { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--yellow), 0 0 22px rgba(255,200,0,.45); }
.ez-clock { position: absolute; inset: -7px; width: 74px; height: 74px; transform: rotate(-90deg); pointer-events: none; }
.ez-clock circle { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 126; stroke-dashoffset: 0; opacity: 0; transition: stroke-dashoffset .2s linear; }
.ez-opp.turn .ez-clock circle { opacity: .9; }
.ez-count { position: absolute; right: -8px; bottom: -4px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: #fff; color: #1b2429; font-weight: 900; font-size: 14px; box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.ez-opp-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 10px; border-radius: 99px; background: var(--card); border: 2px solid var(--border); font-weight: 800; font-size: 13px; }
.ez-opp.turn .ez-opp-name { border-color: var(--yellow); color: var(--yellow); }
.ez-fan { position: relative; height: 30px; width: calc(22px + (var(--n) - 1) * 8px); margin-top: 2px; }
.ez-fan .ez-card { --w: 22px; position: absolute; left: calc(var(--k) * 8px); top: 0; transform: rotate(calc((var(--k) - (var(--n) - 1) / 2) * -6deg)); transform-origin: 50% -40%; }
.ez-einz-badge { position: absolute; top: 22px; right: 8px; padding: 2px 8px; border-radius: 99px; background: #e8323c; color: #fff; font-weight: 900; font-size: 11px; box-shadow: 0 3px 0 #9c141c; animation: ezBadge 1s ease-in-out infinite alternate; }
@keyframes ezBadge { to { transform: scale(1.12) rotate(6deg); } }
.ez-opp.won .ez-opp-ava { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--green); }

.ez-me { position: relative; margin-top: 4px; }
.ez-mebar { display: flex; align-items: center; gap: 14px; max-width: 980px; margin: 0 auto; padding: 8px 12px; border-radius: 16px; background: var(--card); border: 2px solid var(--border); }
.ez-me.turn .ez-mebar { border-color: var(--yellow); }
.ez-me-who { display: flex; align-items: center; gap: 10px; }
.ez-me-who .avatar { width: 36px; height: 36px; font-size: 14px; }
.ez-me-who span { display: flex; flex-direction: column; line-height: 1.1; }
.ez-me-who small { color: var(--muted); font-weight: 800; font-size: 12px; }
.ez-timer { flex: 1; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; opacity: 0; transition: opacity .2s; }
.ez-timer.on { opacity: 1; }
.ez-timer i { display: block; height: 100%; background: var(--yellow); transition: width .2s linear; }
.ez-timer.low i { background: var(--red); }
.ez-me-btns { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ez-me-btns .btn[hidden] { display: none; }
.ez-einz { height: 42px; padding: 0 20px; border-radius: 99px; border: 0; background: #e8323c; color: #fff; font: inherit; font-weight: 900; font-size: 16px; letter-spacing: .5px; box-shadow: 0 4px 0 #9c141c; cursor: pointer; display: none; }
.ez-einz.show { display: block; animation: ezEinzPulse 1s ease-in-out infinite; }
.ez-einz.armed { background: var(--green); box-shadow: 0 4px 0 var(--green-d); animation: none; }
.ez-einz:active { transform: translateY(3px); box-shadow: 0 1px 0 #9c141c; }
@keyframes ezEinzPulse { 50% { transform: scale(1.08); } }
.ez-hand { position: relative; height: 172px; max-width: 1100px; margin: 0 auto; }
.ez-hand .ez-card { --w: 96px; position: absolute; top: 26px; transform: translateY(var(--lift, 0)) rotate(var(--rot, 0deg)); transform-origin: 50% 110%; transition: transform .22s var(--out), filter .2s, left .3s var(--out); cursor: default; }
.ez-hand .ez-card.ok { cursor: pointer; }
.ez-hand .ez-card.ok:hover { transform: translateY(-24px) rotate(0deg) scale(1.05); z-index: 50 !important; }
.ez-hand .ez-card.dim { filter: brightness(.5) saturate(.6); }
.ez-hand .ez-card.drawn { transform: translateY(-20px) rotate(0deg); }
.ez-hand .ez-card.nope { animation: shake .35s; }
.ez-shout { position: absolute; left: 50%; top: -10px; z-index: 70; padding: 5px 14px; border-radius: 12px; background: #fff; color: #1b2429; font-weight: 900; font-size: 17px; white-space: nowrap; pointer-events: none; animation: ezShout 1.4s var(--out) forwards; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.ez-shout.einz { background: #e8323c; color: #fff; font-size: 20px; }
.ez-shout.bad { background: var(--red); color: #fff; }
.ez-shout.skip { background: var(--bg); color: var(--red); font-size: 28px; padding: 0 10px; border: 2px solid var(--red); }
@keyframes ezShout { 0% { transform: translate(-50%, 10px) scale(.3); opacity: 0; } 18% { transform: translate(-50%, -8px) scale(1.15); opacity: 1; } 30% { transform: translate(-50%, -4px) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -30px); opacity: 0; } }
.ez-fly { position: fixed; left: 0; top: 0; z-index: 800; pointer-events: none; perspective: 800px; }
.ez-fly .ez-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.ez-fly .ez-side { position: absolute; inset: 0; backface-visibility: hidden; }
.ez-fly .ez-side.back { transform: rotateY(180deg); }
.ez-fly .ez-card { --w: var(--fw); box-shadow: 0 16px 30px rgba(0,0,0,.45); }

.ez-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 220px; margin: 10px auto 0; }
.ez-pick button { height: 90px; border: 0; border-radius: 18px; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.3); transition: transform .12s; }
.ez-pick button:hover { transform: scale(1.06); }
.ez-pick-r { background: #e8323c; } .ez-pick-y { background: #f5c400; } .ez-pick-g { background: #3aae3e; } .ez-pick-b { background: #1778d6; }
.ez-result { text-align: center; padding-top: 6px; }
.ez-result-ava { position: relative; width: 90px; margin: 0 auto 8px; }
.ez-result-ava .avatar { width: 90px; height: 90px; font-size: 34px; }
.ez-result-ava .ez-trophy { position: absolute; right: -14px; bottom: -6px; font-size: 34px; font-style: normal; }
.ez-standing { display: grid; gap: 6px; margin: 14px 0 18px; }
.ez-standing > div { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--bg-2); text-align: left; }
.ez-standing > div.me { outline: 2px solid var(--blue); }
.ez-standing .avatar { width: 30px; height: 30px; font-size: 12px; }
.ez-standing b { flex: 1; }
.ez-standing small { color: var(--muted); font-weight: 800; }
.ez-inv-ic { background: none !important; }

}

/* Einz!: Rückfrage, Hinweise, viele Mitspieler */
.ez-ask-cards { position: relative; height: 70px; width: 100px; margin: 0 auto 4px; }
.ez-ask-cards .ez-card { --w: 42px; position: absolute; left: 29px; top: 2px; }
.ez-ask-cards .ez-card:nth-child(1) { transform: rotate(-18deg) translateX(-10px); }
.ez-ask-cards .ez-card:nth-child(3) { transform: rotate(18deg) translateX(10px); }
.ez-ask .actions { display: flex; flex-direction: column; gap: 10px; }
.ez-note { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(255,200,0,.08); border: 2px solid rgba(255,200,0,.3); color: var(--yellow); font-weight: 700; font-size: 14px; }
.ez-tag.wait { color: var(--yellow); }
.ez-friend .link-btn { margin-left: 6px; font-size: 12px; }
@media (max-width: 720px) {
  .ez-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .ez-mode { display: none; }
  .ez-arena { height: clamp(280px, 42vh, 360px); }
  .ez-felt { left: 3%; right: 3%; top: 32%; bottom: 4%; }
  .ez-center { gap: 26px; top: 64%; }
  .ez-me-who .avatar { width: 28px; height: 28px; font-size: 12px; }
  .ez-me-who b { font-size: 14px; }
  .ez-deck, .ez-pile { width: 66px; height: 99px; }
  .ez-deck .ez-card, .ez-pile .ez-card { --w: 66px; }
  .ez-color { right: -30px; width: 20px; height: 20px; margin-top: -10px; }
  .ez-opp { width: 76px; }
  .ez-opp-ava, .ez-opp-ava .avatar { width: 44px; height: 44px; font-size: 17px; }
  .ez-clock { width: 58px; height: 58px; }
  .ez-count { min-width: 22px; height: 22px; font-size: 12px; }
  .ez-opp-name { font-size: 11px; max-width: 76px; padding: 1px 7px; }
  .ez-fan { height: 22px; width: calc(16px + (var(--n) - 1) * 5px); }
  .ez-fan .ez-card { --w: 16px; left: calc(var(--k) * 5px); }
  #ez-opps.many .ez-fan { display: none; }
  .ez-status { font-size: 12px; padding: 4px 12px; }
  .ez-mebar { gap: 8px; padding: 6px 10px; }
  .ez-einz { height: 36px; padding: 0 14px; font-size: 14px; }
  .ez-hand { height: 122px; }
  .ez-hand .ez-card { --w: 64px; top: 20px; }
}

.chess-hint { margin: 2px 0 0; padding: 8px 12px; border-radius: 12px; background: rgba(88,204,2,.1); border: 2px solid rgba(88,204,2,.3); color: var(--green); font-weight: 700; font-size: 13px; }
