/* ==================================================================== LernHub v2 · neue Bereiche (Liga, Erfolge, Pass, Statistik, Tutor, Kisten, Schulen)
   Standard ist der cleane Stil; der Glas-Stil (glass.css) überschreibt nur diese Variablen und Flächen. */
/* Neue v2-Bausteine im cleanen Stil: feste Flächen, weiche Schatten, kein Glas */
:root { --glass: var(--surface); --glass-2: var(--surface-2); --glass-brd: var(--line); --glass-in: transparent; --glass-sh: var(--soft); --blur: none;
  --duo-green: #58cc02; --duo-green-dk: #3f9a00; --duo-blue: #1cb0f6; --duo-yellow: #ffc800; --duo-red: #ff4b4b; --duo-purple: #ce82ff; --r-card: 18px; }
.glass { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--soft); position: relative; }
.card.flat { background: var(--surface-2); }

/* ---------- Online-Punkt ---------- */
.av-wrap, .lav { position: relative; display: inline-flex; }
.on-dot { position: absolute; right: 0; top: 0; bottom: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--duo-green); box-shadow: 0 0 0 3px var(--surface); animation: onPulse 2.4s ease-in-out infinite; z-index: 4; }
@keyframes onPulse { 50% { box-shadow: 0 0 0 3px var(--surface), 0 0 0 7px color-mix(in srgb, var(--duo-green) 25%, transparent); } }
.online-txt { color: var(--duo-green-dk); font-weight: 800; }
.online-pill { font: 800 12px var(--f-body); vertical-align: middle; color: #fff; background: var(--duo-green); padding: 3px 9px; border-radius: 99px; }

/* ==================================================================== Neue Seiten */
.v2 { gap: 18px; }
.v2-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.v2-head h1 { margin: 0; }
.center { text-align: center; }

/* Liga */
.league-hero { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 22px 16px 20px; overflow: hidden; }
.league-hero::before { content: ""; position: absolute; inset: -40% -20% auto; height: 220px; background: radial-gradient(closest-side, color-mix(in srgb, var(--lc) 45%, transparent), transparent); pointer-events: none; }
.league-hero h1 { margin: 2px 0 0; font-size: clamp(28px, 6vw, 40px); }
.lh-strip { display: flex; align-items: center; gap: 8px; overflow-x: auto; max-width: 100%; padding: 6px 4px; scrollbar-width: none; }
.lh-strip span { flex: none; display: grid; transition: transform .3s; }
.lh-strip .past { opacity: .55; } .lh-strip .cur { animation: gemIn .7s cubic-bezier(.2, 1.5, .4, 1) both; filter: drop-shadow(0 8px 16px color-mix(in srgb, var(--lc) 60%, transparent)); }
@keyframes gemIn { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
.lgem { display: inline-grid; width: var(--ls); height: var(--ls); }
.lgem svg { width: 100%; height: 100%; }
.lgem.locked { filter: grayscale(1) opacity(.35); }
.lb-list { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.lrow { display: grid; grid-template-columns: 44px auto 1fr auto; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 16px; text-decoration: none; color: var(--ink); animation: rise .35s var(--d) both; transition: background .15s; }
.lrow:hover { background: var(--surface-2); }
.lrow.me { background: color-mix(in srgb, var(--pen) 12%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pen) 35%, transparent); }
.lrow.z-up .lxp { color: var(--duo-green-dk); } .lrow.z-down .lxp { color: var(--duo-red); }
.lrank { display: grid; place-items: center; position: relative; font: 800 17px var(--f-display); color: var(--muted); }
.lrank .i { position: absolute; width: 34px; height: 34px; opacity: .9; } .lrank b { position: relative; }
.lrank.r1 .i { color: #f5b301; fill: #ffd84a; } .lrank.r2 .i { color: #9aa6b2; fill: #dfe5ea; } .lrank.r3 .i { color: #c47a3a; fill: #f0b47a; }
.lrank.r1 b, .lrank.r2 b, .lrank.r3 b { font-size: 12px; color: var(--ink); transform: translateY(-3px); }
.lname { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lxp { font: 800 15px var(--f-display); font-variant-numeric: tabular-nums; }
.zone-line { display: flex; align-items: center; gap: 8px; font: 800 12px var(--f-body); text-transform: uppercase; letter-spacing: .06em; padding: 8px 12px 4px; }
.zone-line::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: currentColor; opacity: .3; }
.zone-line.up { color: var(--duo-green-dk); } .zone-line.down { color: var(--duo-red); }
.zone-line .i { width: 14px; height: 14px; }

/* Ergebnis-Popups */
.glass-modal .modal-card { padding: 28px 22px; }
.v2-pop { display: grid; justify-items: center; gap: 10px; text-align: center; }
.v2-pop h2 { margin: 0; }
.vp-gem { animation: gemIn .8s cubic-bezier(.2, 1.5, .4, 1) both; filter: drop-shadow(0 12px 24px #0003); }
.v2-pop.down .vp-gem { animation-name: gemDown; }
@keyframes gemDown { from { transform: translateY(-30px); opacity: 0; } }
.vp-rew { display: flex; align-items: center; gap: 10px; font-weight: 800; padding: 8px 14px; border-radius: 16px; background: color-mix(in srgb, var(--duo-yellow) 18%, transparent); }

/* Abzeichen */
.bdg { position: relative; display: inline-grid; place-items: center; width: var(--bs); height: var(--bs); flex: none; filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--bc) 45%, transparent)); }
.bdg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bdg-i { position: relative; display: grid; place-items: center; color: #fff; margin-top: -6%; }
.bdg-i .i { width: calc(var(--bs) * .38); height: calc(var(--bs) * .38); stroke-width: 2.4; filter: drop-shadow(0 1px 1px #0003); }
.bdg.locked { filter: grayscale(1); opacity: .35; }
.ach-count { display: grid; justify-items: center; padding: 10px 18px; }
.ach-count b { font: 800 30px/1 var(--f-display); color: var(--pen); } .ach-count span { font-size: 12px; color: var(--muted); font-weight: 700; }
.showcase { padding: 16px; display: grid; gap: 12px; }
.sc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; } .sc-h h3 { display: flex; gap: 6px; align-items: center; margin: 0; }
.sc-row { display: flex; justify-content: center; gap: 22px; }
.sc-slot { display: grid; justify-items: center; gap: 6px; width: 96px; text-align: center; font-weight: 700; font-size: 12px; }
.sc-slot.empty span { width: 76px; height: 76px; border-radius: 22px; border: 2px dashed var(--line); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.ach { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px; cursor: pointer; font: inherit; color: inherit; animation: rise .35s var(--d) both; transition: transform .15s; }
.ach:hover { transform: translateY(-2px); }
.ach-t { display: grid; gap: 3px; min-width: 0; flex: 1; } .ach-t b { font-size: 15px; } .ach-t small { color: var(--muted); }
.ach-steps { display: flex; gap: 3px; } .ach-steps i { width: 14px; height: 5px; border-radius: 3px; background: var(--line); } .ach-steps i.on { background: var(--duo-yellow); }
.ach-bar { height: 8px; border-radius: 8px; background: rgb(20 40 80 / .08); overflow: hidden; } .ach-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--duo-yellow), #ff9600); }
.ach-done { color: var(--duo-green-dk) !important; font-weight: 800; display: inline-flex; gap: 4px; align-items: center; } .ach-done .i { width: 14px; height: 14px; }
.ach.secret { opacity: .75; }
.ach-toast { position: fixed; z-index: 130; left: 50%; top: calc(var(--top-h) + 14px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: flex; gap: 12px; align-items: center; padding: 12px 18px 12px 12px; width: min(420px, calc(100vw - 24px)); cursor: pointer; animation: achIn .5s cubic-bezier(.2, 1.4, .4, 1) both; transition: opacity .3s, transform .3s; }
.ach-toast.out { opacity: 0; transform: translate(-50%, -16px); }
.ach-toast small { display: block; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; color: #d98a00; }
.ach-toast b { display: block; font: 800 17px var(--f-display); } .ach-toast span { font-size: 13px; color: var(--muted); }
@keyframes achIn { from { opacity: 0; transform: translate(-50%, -24px) scale(.9); } }

/* Saison-Pass */
.pass-hero { display: flex; gap: 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 22px; overflow: hidden; }
.pass-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, color-mix(in srgb, var(--duo-purple) 22%, transparent), transparent 50%, color-mix(in srgb, var(--duo-blue) 18%, transparent)); pointer-events: none; }
.pass-hero h1 { margin: 2px 0; } .ph-l, .ph-r { position: relative; }
.ph-r { display: grid; gap: 8px; min-width: min(320px, 100%); flex: 1; max-width: 420px; }
.ph-tier { display: flex; align-items: baseline; gap: 6px; } .ph-tier b { font: 800 44px/1 var(--f-display); color: var(--pen); }
.ph-bar { height: 16px; border-radius: 99px; background: rgb(20 40 80 / .08); overflow: hidden; } .ph-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--duo-purple), var(--duo-blue)); }
.pass-track { display: flex; gap: 12px; overflow-x: auto; padding: 18px 6px 22px; scroll-snap-type: x proximity; position: relative; }
.pass-track::before { content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 4px; background: var(--line); border-radius: 4px; min-width: 100%; }
.pt { flex: none; width: 128px; display: grid; justify-items: center; gap: 10px; scroll-snap-align: center; position: relative; }
.pt-n { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font: 800 14px var(--f-display); background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); z-index: 1; }
.pt.reached .pt-n { background: linear-gradient(180deg, #b58cff, var(--duo-purple)); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--duo-purple) 25%, transparent); }
.pt.nextup .pt-n { box-shadow: inset 0 0 0 2px var(--duo-purple); color: var(--duo-purple); animation: pulse 1.8s infinite; }
.pt-card { width: 100%; min-height: 150px; display: grid; justify-items: center; align-content: center; gap: 6px; padding: 12px 8px; text-align: center; }
.pt-card small { font-weight: 800; font-size: 12px; line-height: 1.2; }
.pt.big { width: 150px; } .pt.big .pt-card { box-shadow: inset 0 0 0 2px #ffcf3f, inset 0 1px 0 var(--glass-in), 0 10px 30px -10px #f5b30199 !important; }
.pt.claimed .pt-card { opacity: .55; }
.pt:not(.reached) .pt-card .pr-ic { filter: saturate(.3); opacity: .7; }
.pr-ic { position: relative; display: grid; place-items: center; min-height: 64px; } .pr-ic b { position: absolute; bottom: -4px; right: -10px; font: 800 13px var(--f-display); background: var(--surface); padding: 1px 6px; border-radius: 8px; box-shadow: 0 2px 6px #0002; }
.pt-ok { color: var(--duo-green-dk); } .pt-lock { color: var(--muted); opacity: .6; } .pt-ok .i, .pt-lock .i { width: 20px; height: 20px; }
.pt .btn.sm { padding: 5px 10px; font-size: 12.5px; }

/* Statistiken */
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.st-tile { padding: 14px; display: grid; gap: 2px; }
.st-tile b { font: 800 26px/1.1 var(--f-display); } .st-tile small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.st-ic { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--pen) 12%, transparent); color: var(--pen); margin-bottom: 4px; }
.st-tile.ok .st-ic { background: color-mix(in srgb, var(--duo-green) 16%, transparent); color: var(--duo-green-dk); }
.st-tile.hot .st-ic { background: color-mix(in srgb, #ff9600 16%, transparent); color: #ff9600; }
.st-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.st-card { padding: 16px; display: grid; gap: 12px; align-content: start; } .st-card h3 { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 17px; } .st-card h3 .i { color: var(--pen); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.bar-c { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar-c i { width: 100%; min-height: 3px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #7be02a, var(--duo-green)); animation: growUp .6s var(--d) cubic-bezier(.2, .8, .3, 1) both; transform-origin: bottom; }
.bar-c small { font-size: 11px; color: var(--muted); font-weight: 700; }
@keyframes growUp { from { transform: scaleY(0); } }
.hours { display: flex; align-items: flex-end; gap: 2px; height: 110px; } .hours i { flex: 1; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--duo-blue) 70%, transparent); }
.hours-l { display: flex; justify-content: space-between; } .hours-l small { font-size: 11px; color: var(--muted); }
.heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 3px; overflow-x: auto; }
.heat i, .heat-l i { width: 14px; height: 14px; border-radius: 4px; background: rgb(20 40 80 / .07); display: block; }
.heat .h1, .heat-l .h1 { background: #c6efa1; } .heat .h2, .heat-l .h2 { background: #93db57; } .heat .h3, .heat-l .h3 { background: #58cc02; } .heat .h4, .heat-l .h4 { background: #3a8f00; } .heat .hf { opacity: .25; }
.heat-l { display: flex; align-items: center; gap: 4px; justify-content: flex-end; } .heat-l small { font-size: 11px; color: var(--muted); margin: 0 4px; }
.weak, .sets-st { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.weak li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--surface-2); }
.wk-r { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 800 13px var(--f-display); background: conic-gradient(var(--duo-red) calc(var(--r) * 1%), rgb(20 40 80 / .08) 0); position: relative; }
.wk-r::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); } .wk-r { isolation: isolate; } .wk-r::before { z-index: -1; }
.wk-t { flex: 1; min-width: 0; display: grid; } .wk-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wk-t small { color: var(--muted); }
.sets-st a { display: grid; grid-template-columns: auto 1fr 90px 42px; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 6px; border-radius: 12px; }
.sets-st a:hover { background: var(--surface-2); }
.sets-st .dot { width: 10px; height: 10px; border-radius: 50%; } .ss-t { display: grid; min-width: 0; } .ss-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ss-t small { color: var(--muted); }
.ss-p { height: 8px; border-radius: 8px; background: rgb(20 40 80 / .08); overflow: hidden; } .ss-p i { display: block; height: 100%; border-radius: inherit; } .ss-n { font: 800 13px var(--f-display); text-align: right; }

/* Profil */
.pc-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pc-badges a { text-decoration: none; display: inline-grid; justify-items: center; }
.pc-league small { font-size: 11px; font-weight: 800; color: var(--muted); }
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.ql { display: grid; gap: 2px; padding: 14px 16px; text-decoration: none; color: var(--ink); transition: transform .15s; }
.ql:hover { transform: translateY(-2px); } .ql .i { width: 26px; height: 26px; color: var(--pen); margin-bottom: 4px; } .ql small { color: var(--muted); }

/* Startseite: Liga & Pass */
.dw { display: grid; gap: 10px; }
.dw a { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px; padding: 12px 14px !important; text-decoration: none; color: var(--ink); }
.dw a > span:nth-child(2) { flex: 1; display: grid; } .dw small { color: var(--muted); font-weight: 700; font-size: 12px; } .dw b { font: 800 16px var(--f-display); }
.dw a > .i { transform: rotate(180deg); color: var(--muted); }
.dw-pi { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--duo-purple), var(--duo-blue)); color: #fff; }
.dw-pi .i { width: 24px; height: 24px; }
.dw .badge { position: static; }

/* ==================================================================== KI-Tutor */
.tutor-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--glass-brd); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 99px; padding: 3px 12px 3px 4px; font: 800 13.5px var(--f-body); color: var(--ink); cursor: pointer; box-shadow: inset 0 1px 0 var(--glass-in), 0 4px 12px -6px #0003; white-space: nowrap; }
.tutor-btn:hover { transform: translateY(-1px); }
@media (max-width: 899px) { .tutor-btn > span:not(.mascot) { display: none; } }
.tutor { position: fixed; inset: 0; z-index: 115; background: rgb(10 20 40 / .35); display: flex; justify-content: flex-end; align-items: flex-end; padding: 16px; animation: fadeIn .2s; }
.tutor.out { animation: fadeOut .25s forwards; }
.tu-panel { width: min(440px, 100%); height: min(640px, calc(100dvh - 32px)); display: flex; flex-direction: column; overflow: hidden; padding: 0 !important; animation: tuIn .35s cubic-bezier(.2, 1.2, .4, 1); background: var(--surface) !important; }
@keyframes tuIn { from { transform: translateY(30px) scale(.97); opacity: 0; } }
.tu-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tu-head > div:nth-child(2) { display: grid; flex: 1; min-width: 100px; } .tu-head small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tu-mode button { padding: 6px 10px; font-size: 12.5px; }
.tu-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.tu-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; animation: rise .25s both; }
.tu-msg p { margin: 0; padding: 10px 14px; border-radius: 18px; line-height: 1.45; font-size: 15px; }
.tu-msg.bot p { background: var(--glass); border: 1px solid var(--glass-brd); border-bottom-left-radius: 6px; }
.tu-msg.me { align-self: flex-end; } .tu-msg.me p { background: var(--pen); color: #fff; border-bottom-right-radius: 6px; }
.tu-msg.typing p { display: flex; gap: 4px; } .tu-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.1s infinite; } .tu-msg.typing i:nth-child(2) { animation-delay: .15s; } .tu-msg.typing i:nth-child(3) { animation-delay: .3s; }
.tu-sugg { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px; } .tu-sugg:empty { display: none; } .tu-sugg .chip { cursor: pointer; font-size: 13px; }
.tu-in { display: flex; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); } .tu-in .input { flex: 1; } .tu-in .btn { padding-inline: 14px; }
@media (max-width: 600px) { .tutor { padding: 0; } .tu-panel { width: 100%; height: 88dvh; border-radius: 26px 26px 0 0 !important; } }

/* ==================================================================== Kiste öffnen (Duolingo-Stil) */
.chest-ov { position: fixed; inset: 0; z-index: 140; display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px)); overflow: hidden; animation: fadeIn .25s; --tc: #4fa3ff; }
.chest-ov.t2 { --tc: #b46bff; } .chest-ov.t3 { --tc: #ffb800; } .chest-ov.t4 { --tc: #ff4f8b; }
.chest-ov.out { animation: fadeOut .3s forwards; }
.ch-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--tc) 30%, var(--bg)), var(--bg) 70%); transition: background .4s; }
.ch-rays { position: absolute; left: 50%; top: 44%; width: 200vmax; height: 200vmax; margin: -100vmax 0 0 -100vmax; background: repeating-conic-gradient(color-mix(in srgb, var(--tc) 30%, transparent) 0 8deg, transparent 8deg 20deg); -webkit-mask: radial-gradient(circle, #000 8%, transparent 45%); mask: radial-gradient(circle, #000 8%, transparent 45%); opacity: 0; transform: scale(.6); transition: opacity .5s, transform .8s cubic-bezier(.2, .8, .3, 1); animation: spin 20s linear infinite; }
.chest-ov.opened .ch-rays { opacity: 1; transform: scale(1); }
.ch-top { position: relative; z-index: 2; }
.ch-pill { display: inline-block; padding: 8px 18px; border-radius: 99px; font: 800 16px var(--f-display); color: #fff; background: var(--tc); box-shadow: inset 0 1px 0 #fff6, 0 6px 18px -6px var(--tc); }
.ch-pill.up { animation: pillUp .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pillUp { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } }
.ch-stage { position: relative; z-index: 2; display: grid; place-items: center; align-self: center; width: 100%; min-height: 320px; }
.ch-glow { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tc) 55%, transparent), transparent); filter: blur(10px); animation: glowP 2s ease-in-out infinite; }
@keyframes glowP { 50% { transform: scale(1.12); opacity: .8; } }
.ch-box { position: relative; border: 0; background: none; padding: 0; cursor: pointer; animation: chDrop .7s cubic-bezier(.2, 1.4, .4, 1) both, chIdle 2.2s 1s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgb(0 0 0 / .22)); }
.ch-box:focus-visible { outline: none; }
@keyframes chDrop { 0% { transform: translateY(-60vh) rotate(-8deg); } 70% { transform: translateY(10px) scaleY(.92); } 100% { transform: none; } }
@keyframes chIdle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-4deg); } 90% { transform: rotate(4deg); } 95% { transform: rotate(-2deg); } }
.ch-box.charge { animation: chCharge .12s linear infinite; }
@keyframes chCharge { 0% { transform: translate(-2px, 0) rotate(-2deg) scale(1.03); } 50% { transform: translate(2px, -1px) rotate(2deg) scale(1.05); } 100% { transform: translate(-2px, 0) rotate(-2deg) scale(1.03); } }
.ch-box.flash { animation: chFlash .7s cubic-bezier(.2, 1.4, .4, 1); }
.ch-box.flash::after { content: ""; position: absolute; inset: -40%; border-radius: 50%; background: radial-gradient(closest-side, #fff, transparent); animation: flashOut .6s forwards; }
@keyframes chFlash { 0% { transform: scale(.7); } 50% { transform: scale(1.18); } 100% { transform: none; } }
@keyframes flashOut { from { opacity: 1; } to { opacity: 0; transform: scale(1.6); } }
.ch-box.burst { animation: chBurst .9s cubic-bezier(.2, .8, .3, 1) forwards; pointer-events: none; }
.ch-box.burst .lid { animation: lidOff .6s cubic-bezier(.3, .6, .4, 1) forwards; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes lidOff { to { transform: translate(40px, -150px) rotate(40deg); opacity: 0; } }
@keyframes chBurst { 0% { transform: scale(1); } 20% { transform: scale(1.15, .85); } 45% { transform: scale(.95, 1.08) translateY(-8px); } 100% { transform: translateY(90px) scale(.7); opacity: .25; } }
.ch-rewards { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; pointer-events: none; }
.ch-card { pointer-events: auto; display: grid; justify-items: center; gap: 4px; min-width: 130px; padding: 16px 16px 14px; border-radius: 24px; text-align: center;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-in), 0 18px 40px -14px rgb(0 0 0 / .35);
  animation: cardRise .6s calc(var(--i) * .16s) cubic-bezier(.2, 1.4, .4, 1) both; }
.ch-card b { font: 800 26px/1.1 var(--f-display); } .ch-card small { font-weight: 800; color: var(--muted); }
.ch-card.item b { font-size: 18px; } .ch-card.item.r-legendary { box-shadow: inset 0 0 0 2px #ffcf3f, 0 0 40px -6px #ffcf3f !important; } .ch-card.item.r-epic { box-shadow: inset 0 0 0 2px #b46bff, 0 0 34px -8px #b46bff !important; }
@keyframes cardRise { from { opacity: 0; transform: translateY(70px) scale(.6); } }
.ch-hint { position: relative; z-index: 2; font: 800 18px var(--f-display); color: var(--ink); min-height: 28px; animation: hintB 1.6s ease-in-out infinite; }
@keyframes hintB { 50% { opacity: .5; } }
.ch-act { position: relative; z-index: 2; width: min(380px, 100%); min-height: 54px; }
.ch-act .btn { animation: rise .4s both; }
body.chest-open { overflow: hidden; }

/* ==================================================================== Shop (aufgeräumt) */
.shop-head { align-items: center; }
.balance { border-radius: 20px !important; padding: 10px 18px !important; }
.shop-top { gap: 14px; }
.freeze-card, .crate-card { padding: 18px !important; overflow: hidden; }
.freeze-card::before, .crate-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6; }
.freeze-card::before { background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--duo-blue) 22%, transparent), transparent 60%); }
.crate-card::before { background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--duo-purple) 24%, transparent), transparent 60%); }
.freeze-card > *, .crate-card > * { position: relative; }
.filter-chips { position: sticky; top: calc(var(--top-h) + 8px); z-index: 5; padding: 6px; border-radius: 18px; width: fit-content; max-width: 100%; overflow-x: auto; flex-wrap: nowrap;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-in), var(--glass-sh); }
.filter-chips .chip { white-space: nowrap; background: transparent !important; border-color: transparent !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.filter-chips .chip.on { background: var(--surface) !important; box-shadow: 0 2px 8px -2px #0002 !important; color: var(--pen); }
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shop-item { padding: 12px 10px 14px !important; gap: 6px; transition: transform .18s, box-shadow .18s; }
.si-prev { width: 100%; height: 108px; border-radius: 18px; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--rc, #8fb3ff) 26%, transparent), transparent 70%); }
.shop-item.r-rare { --rc: #4fa3ff; } .shop-item.r-epic { --rc: #b46bff; } .shop-item.r-legendary { --rc: #ffb800; } .shop-item.r-basis { --rc: #9aa6b2; }
.shop-item .rar { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--rc); }
.shop-item.owned { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--duo-green) 50%, transparent), var(--glass-sh) !important; }
.shop-item.r-legendary { box-shadow: inset 0 0 0 1.5px #ffcf3f99, inset 0 1px 0 var(--glass-in), 0 10px 30px -14px #f5b301aa !important; }

/* ==================================================================== Admin: Schulen */
.school-tree { display: grid; gap: 12px; }
.school { padding: 0 !important; overflow: hidden; }
.school-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.school-h .s-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--duo-blue), var(--pen)); color: #fff; flex: none; }
.school-h .s-ic .i { width: 24px; height: 24px; }
.school-h h3 { margin: 0; } .school-h small { color: var(--muted); }
.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; padding: 0 14px 14px; }
.class-c { padding: 10px 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 4px; }
.class-c b { font: 800 16px var(--f-display); } .class-c small { color: var(--muted); }
.kind-pill { font: 800 11px var(--f-body); text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--pen) 14%, transparent); color: var(--pen); }

@media (prefers-reduced-motion: reduce) { body::before, .ch-rays, .ch-glow, .on-dot { animation: none !important; } }
@media (max-width: 899px) {
  .tutor-btn { position: fixed; right: 14px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 25; padding: 5px !important; border-radius: 50%; box-shadow: inset 0 1px 0 var(--glass-in), 0 10px 26px -8px rgb(10 30 70 / .45); animation: fabIn .5s cubic-bezier(.2, 1.4, .4, 1) both; display: inline-flex !important; }
  .tutor-btn .mascot { --ms: 44px !important; }
  body:has(#panel .q-top) .tutor-btn, body.tutor-open .tutor-btn { display: none !important; }
  .tu-head { display: grid; grid-template-columns: auto 1fr auto; }
  .tu-head .tu-mode { grid-column: 1 / -1; order: 3; display: flex; } .tu-head .tu-mode button { flex: 1; }
}
@keyframes fabIn { from { transform: scale(0) rotate(-30deg); } }

/* Saison-Items */
.av.fr-pass::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; z-index: -1; background: conic-gradient(#ce82ff, #1cb0f6, #58cc02, #ffc800, #ff4b4b, #ce82ff); animation: spin 4s linear infinite; }
.av.fr-pass { box-shadow: 0 0 0 3px #fff, 0 0 18px #ce82ff88; }
.bg-pass { background: radial-gradient(60% 60% at 20% 15%, #ffffffcc, transparent 60%), radial-gradient(50% 60% at 85% 20%, #ce82ff88, transparent 70%), radial-gradient(70% 70% at 70% 100%, #1cb0f699, transparent 70%), linear-gradient(135deg, #e9e4ff, #d9f3ff) !important; }
.av.bg-pass { background: radial-gradient(circle at 30% 25%, #fff, #d7c8ff 55%, #9fd8ff) !important; }
.sc-row { align-items: flex-start; } .sc-slot { align-content: start; } .sc-slot .bdg { margin: 0 auto; }
.ch-card.item { display: grid; grid-template-columns: none; justify-items: center; width: auto; max-width: 220px; padding: 16px 16px 14px; border-bottom: 1px solid var(--glass-brd); }

/* Lesetexte (Reading) */
.read-box{background:var(--surface-2,#f4f6f8);border:1px solid var(--line,#e5e5e5);border-radius:14px;padding:10px 14px;margin:0 0 12px}
.read-box summary{cursor:pointer;font-weight:700;display:flex;gap:8px;align-items:center;list-style:none}
.read-box summary::-webkit-details-marker{display:none}
.read-text{max-height:38vh;overflow:auto;line-height:1.65;font-size:1rem;margin-top:8px;white-space:normal}
