/* English Quest – Design */
:root {
  --bg: #0e1633;
  --bg2: #131d42;
  --card: #1a2552;
  --card2: #222f63;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef2ff;
  --muted: #a7b2d9;
  --gold: #ffcf3f;
  --gold-d: #c99a10;
  --red: #ff5a6e;
  --red-d: #c43147;
  --green: #33d69f;
  --green-d: #1e9c72;
  --blue: #4aa8ff;
  --blue-d: #2a74c4;
  --purple: #a98bff;
  --orange: #ff9f43;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(3, 8, 30, 0.35);
  --font-h: "Fredoka", "Nunito", system-ui, sans-serif;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(74, 168, 255, 0.18), transparent 60%),
    radial-gradient(800px 500px at 110% 10%, rgba(255, 90, 110, 0.14), transparent 60%),
    radial-gradient(700px 600px at 50% 120%, rgba(169, 139, 255, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-h); font-weight: 600; letter-spacing: 0.2px; margin: 0 0 0.5em; line-height: 1.2; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; margin-top: 1em; }
p { margin: 0 0 0.8em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 18px; padding-bottom: 40px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.en { font-family: var(--font); }
.good-txt { color: var(--green); font-weight: 800; }
.bad-txt { color: var(--red); font-weight: 800; }
.gold-txt { color: var(--gold); }
.row-c { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 12px 0; }
.row-between { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; }
.warn { background: rgba(255, 159, 67, 0.15); border: 1px solid rgba(255, 159, 67, 0.4); border-radius: 12px; padding: 10px 14px; color: #ffd8b0; }
.foot { color: var(--muted); font-size: 0.8rem; text-align: center; padding-bottom: 30px; opacity: 0.8; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 22, 51, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tb-inner { max-width: 980px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--gold); color: var(--bg); font-family: var(--font-h); font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 3px 0 var(--gold-d);
}
.brand-txt { font-family: var(--font-h); font-weight: 600; font-size: 1.15rem; }
.rankchip {
  flex: 1; max-width: 380px; margin-left: auto; display: flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 6px;
}
.r-icon { font-size: 1.4rem; width: 34px; height: 34px; display: grid; place-items: center; background: var(--card2); border-radius: 50%; }
.r-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.r-name { font-family: var(--font-h); font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-num { font-weight: 800; color: var(--gold); font-size: 0.9rem; white-space: nowrap; }
.tb-right { display: flex; align-items: center; gap: 8px; }
.streak { font-weight: 800; padding: 6px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); opacity: 0.6; white-space: nowrap; }
.streak.on { opacity: 1; color: #ffb35c; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); font-size: 1.1rem;
}
.icon-btn:hover { background: var(--card2); }

/* ---------- Bausteine ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent), var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.two-col > .card { margin-bottom: 0; }
.two-col { margin-bottom: 16px; }
.section-title { margin: 26px 0 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 14px; border: 0; text-decoration: none; font-weight: 800;
  font-family: var(--font-h); font-size: 1rem; letter-spacing: 0.3px;
  background: var(--card2); color: var(--text); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.08s, filter 0.15s; user-select: none;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--gold); color: #1b1600; box-shadow: 0 4px 0 var(--gold-d); }
.btn.good { background: var(--green); color: #032b1e; box-shadow: 0 4px 0 var(--green-d); }
.btn.bad { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-d); }
.btn.ghost { background: transparent; border: 2px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.05); }
.btn.big { padding: 14px 26px; font-size: 1.1rem; }
.btn.small { padding: 7px 12px; font-size: 0.88rem; }
.btn.full { width: 100%; margin-top: 12px; }
.btn.warn-btn { background: var(--orange); color: #2b1400; box-shadow: 0 4px 0 #c4701e; }
.btn.file { cursor: pointer; }
.pill { background: rgba(0, 0, 0, 0.25); padding: 1px 9px; border-radius: 999px; font-size: 0.85rem; }

.bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #6ef0c2); transition: width 0.5s; }
.bar.xp { height: 7px; }
.bar.xp i { background: linear-gradient(90deg, var(--gold), #ffe58a); }
.bar.thin { height: 6px; grid-column: 1 / -1; }

.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.09); }
.ring-fg { fill: none; stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 0.8s; }
.ring-txt { fill: var(--text); font-family: var(--font-h); font-weight: 700; font-size: 26px; }
.ring-sub { fill: var(--muted); font-size: 12px; }
.daily .ring-txt { font-size: 20px; }

.tag {
  display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px;
  background: rgba(74, 168, 255, 0.15); color: #bfe0ff; font-size: 0.85rem; font-weight: 700;
}
.kw { display: inline-block; margin: 2px; padding: 2px 10px; border-radius: 8px; background: rgba(255, 207, 63, 0.15); color: #ffe7a0; font-weight: 700; }

/* ---------- Startseite ---------- */
.hero { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 26px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 207, 63, 0.18), transparent 70%); pointer-events: none;
}
.hero h1 { font-size: 2.1rem; }
.lead { font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.hero-side { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.tip { background: rgba(255, 255, 255, 0.05); border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 0 12px 12px 0; margin: 0; font-size: 0.95rem; }

.missions { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 12px; }
.missions li { display: grid; grid-template-columns: 24px 1fr auto; gap: 4px 10px; align-items: center; }
.m-check { font-weight: 800; color: var(--muted); }
.missions li.done .m-check { color: var(--green); }
.missions li.done .m-text { text-decoration: line-through; color: var(--muted); }
.m-prog { font-weight: 800; color: var(--gold); font-size: 0.9rem; }
.daily-row { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.streak-big { font-weight: 800; color: #ffb35c; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.mod {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; margin: 0; padding: 18px;
  position: relative; overflow: hidden; transition: transform 0.15s, border-color 0.15s;
}
.mod:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.25); }
.mod::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent, var(--blue)); }
.mod-icon { font-size: 2rem; line-height: 1; }
.mod-name { font-family: var(--font-h); font-weight: 600; font-size: 1.15rem; }
.mod-sub { color: var(--muted); font-size: 0.88rem; flex: 1; }
.mod-pct { font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.mod .bar { margin-top: 4px; }
.c-blue { --accent: var(--blue); }
.c-gold { --accent: var(--gold); }
.c-purple { --accent: var(--purple); }
.c-green { --accent: var(--green); }
.c-red { --accent: var(--red); }
.c-orange { --accent: var(--orange); }
.c-boss {
  --accent: linear-gradient(90deg, var(--gold), var(--red), var(--purple));
  background: linear-gradient(135deg, rgba(255, 207, 63, 0.16), rgba(255, 90, 110, 0.12)), var(--card);
  border-color: rgba(255, 207, 63, 0.35);
}
.c-boss::before { background: linear-gradient(90deg, var(--gold), var(--red), var(--purple)); }

/* ---------- Unterseiten ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.page-head h1 { margin: 0; font-size: 1.6rem; }
.back {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--line); text-decoration: none; font-size: 1.3rem; font-weight: 800;
}
.back:hover { background: var(--card2); }

.group-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-bottom: 10px; }
.group {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 14px;
  background: var(--bg2); border: 2px solid var(--line); transition: border-color 0.15s, background 0.15s;
}
.group.on { border-color: var(--blue); background: rgba(74, 168, 255, 0.1); }
.g-check { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--muted); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.group.on .g-check { background: var(--blue); border-color: var(--blue); color: #fff; }
.g-name { flex: 1; font-weight: 800; display: flex; flex-direction: column; line-height: 1.25; }
.g-name small { color: var(--muted); font-weight: 600; }
.g-pct { font-weight: 800; color: var(--green); }

.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.mode {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; text-decoration: none;
  padding: 14px; border-radius: 16px; background: var(--bg2); border: 2px solid var(--line);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); transition: transform 0.1s, border-color 0.15s;
}
.mode:hover { border-color: var(--gold); transform: translateY(-2px); }
.mode:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.mode span { font-size: 1.6rem; }
.mode b { font-family: var(--font-h); font-weight: 600; font-size: 1.05rem; }
.mode small { color: var(--muted); }
.mode.dim { opacity: 0.55; }

.topic-list, .story-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.topic, .story-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin: 0;
  padding: 14px 16px; border-radius: 16px; background: var(--bg2); border: 2px solid var(--line); box-shadow: none;
  transition: border-color 0.15s, transform 0.1s;
}
.topic:hover, .story-card:hover { border-color: var(--purple); transform: translateX(3px); }
.topic.mix { border-style: dashed; }
.t-icon, .story-icon { font-size: 1.7rem; width: 44px; text-align: center; flex-shrink: 0; }
.t-txt { flex: 1; display: flex; flex-direction: column; }
.t-txt b { font-family: var(--font-h); font-weight: 600; font-size: 1.05rem; }
.t-txt small { color: var(--muted); }
.t-pct, .best { font-weight: 800; color: var(--muted); white-space: nowrap; }
.best.good { color: var(--green); }
.rules-link { display: flex; align-items: center; gap: 14px; text-decoration: none; border-color: rgba(255, 207, 63, 0.35); }
.rules-link .arrow { margin-left: auto; font-size: 1.4rem; color: var(--gold); }

/* ---------- Übungen ---------- */
.session { max-width: 720px; margin: 0 auto; }
.s-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.progress { flex: 1; height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--green), #79f2c8); transition: width 0.4s; }
.progress.time i { background: linear-gradient(90deg, var(--red), var(--gold)); transition: width 0.25s linear; }
.s-count { font-weight: 800; color: var(--muted); min-width: 52px; text-align: right; }
.combo { font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); transition: transform 0.2s; }
.combo.hot { color: #ffb35c; border-color: rgba(255, 159, 67, 0.6); animation: pulse 1.2s infinite; }
.s-label { color: var(--muted); font-weight: 800; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.6px; margin: 0 4px 8px; }
.s-card { padding: 26px; text-align: center; }
.prompt { margin-bottom: 18px; }
.big { font-family: var(--font-h); font-size: 2rem; font-weight: 600; line-height: 1.25; word-break: break-word; }
.sentence { font-size: 1.25rem; font-weight: 700; line-height: 1.45; }
.blank { color: var(--gold); font-weight: 800; letter-spacing: 2px; }
.chips-prompt { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 12px; background: var(--bg2); border: 2px solid var(--line); font-weight: 800; font-size: 1.1rem; }
.sep { color: var(--muted); font-weight: 800; }
.sign { display: inline-block; padding: 4px 14px; border-radius: 999px; font-weight: 800; margin: 6px 4px 0; }
.sign.yes { background: rgba(51, 214, 159, 0.18); color: var(--green); }
.sign.no { background: rgba(255, 90, 110, 0.18); color: #ff8b99; }

.answer {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line); outline: none;
  background: var(--bg); color: var(--text); font-size: 1.2rem; font-weight: 700; text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.answer:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(74, 168, 255, 0.2); }
.answer.small { font-size: 1rem; padding: 10px 12px; text-align: left; }
.answer.area { text-align: left; font-size: 1rem; line-height: 1.6; resize: vertical; margin: 8px 0; }
.answer.code { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; word-break: break-all; }
.answer.ok, .gap.ok { border-color: var(--green); background: rgba(51, 214, 159, 0.12); }
.answer.near, .gap.near { border-color: var(--orange); background: rgba(255, 159, 67, 0.12); }
.answer.bad, .gap.bad { border-color: var(--red); background: rgba(255, 90, 110, 0.12); }
.shake { animation: shake 0.35s; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.opt {
  display: flex; align-items: center; gap: 10px; text-align: left; padding: 14px; border-radius: 14px;
  background: var(--bg2); border: 2px solid var(--line); font-weight: 700; font-size: 1.02rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); transition: border-color 0.15s, transform 0.08s;
}
.opt:hover:not(:disabled) { border-color: var(--blue); }
.opt:active:not(:disabled) { transform: translateY(2px); }
.opt:disabled { cursor: default; }
.opt .key { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); font-size: 0.8rem; color: var(--muted); }
.opt.ok { border-color: var(--green); background: rgba(51, 214, 159, 0.16); }
.opt.bad { border-color: var(--red); background: rgba(255, 90, 110, 0.16); }
.opt.picked { border-color: var(--blue); background: rgba(74, 168, 255, 0.16); }

.flash { perspective: 1000px; height: 220px; margin: 0 auto 10px; max-width: 460px; cursor: pointer; outline: none; }
.flash-inner { position: relative; width: 100%; height: 100%; transition: transform 0.5s; transform-style: preserve-3d; }
.flash.flipped .flash-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px;
  border-radius: 18px; border: 2px solid var(--line);
  background: linear-gradient(135deg, #263673, #1b2756);
}
.face.face-back { transform: rotateY(180deg); background: linear-gradient(135deg, #2b2a6e, #3a2563); }
.flash-rate { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

.order-line {
  min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
  padding: 12px; border-radius: 14px; border: 2px dashed var(--line); margin-bottom: 14px;
}
.order-line.ok { border-color: var(--green); border-style: solid; }
.order-line.bad { border-color: var(--red); border-style: solid; }
.order-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tok {
  padding: 9px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--card2);
  font-weight: 800; font-size: 1.05rem; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}
.tok:hover { border-color: var(--blue); }
.tok.used { visibility: hidden; }
.tok.in { background: rgba(74, 168, 255, 0.18); border-color: rgba(74, 168, 255, 0.5); }
.tok-end { font-weight: 800; font-size: 1.2rem; }

.s-card:has(.story) { text-align: left; }
.story-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; text-align: left; }
.story-title { font-family: var(--font-h); font-size: 1.3rem; font-weight: 600; }
.story { text-align: left; font-size: 1.08rem; line-height: 2.5; }
.who { color: var(--gold); }
.gap-wrap { white-space: nowrap; }
.gap {
  display: inline-block; max-width: 100%; padding: 2px 6px; margin: 0 2px; border: 0; border-bottom: 3px solid var(--blue);
  border-radius: 6px 6px 0 0; background: rgba(74, 168, 255, 0.1); color: var(--text); font-weight: 800; font-size: 1rem; outline: none; text-align: center;
}
.gap:focus { background: rgba(74, 168, 255, 0.22); }
.gap.ok, .gap.near, .gap.bad { border-width: 0 0 3px 0; }
.hint { color: var(--muted); font-size: 0.92rem; margin-left: 2px; }
.gap-fix { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 8px; background: rgba(51, 214, 159, 0.2); color: var(--green); font-weight: 800; font-size: 0.92rem; line-height: 1.6; }

.listen-head { text-align: left; }
.listen-head .row-c { justify-content: flex-start; }
.transcript { text-align: left; background: var(--bg); border-radius: 12px; padding: 14px; margin: 10px 0; font-size: 0.98rem; border: 1px solid var(--line); }
.transcript p { margin: 0 0 6px; }
.tf-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; text-align: left; }
.tf { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 2px solid transparent; }
.tf.ok { border-color: rgba(51, 214, 159, 0.6); }
.tf.bad { border-color: rgba(255, 90, 110, 0.6); }
.tf-num { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.08); font-weight: 800; font-size: 0.85rem; flex-shrink: 0; }
.tf-text { flex: 1; font-weight: 700; }
.tf-btns { display: flex; gap: 6px; flex-shrink: 0; }
.tfb { padding: 6px 12px; border-radius: 10px; border: 2px solid var(--line); background: var(--card2); font-weight: 800; }
.tfb.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.tfb.right { outline: 3px solid var(--green); outline-offset: 1px; }

.feedback { display: none; margin-top: 14px; padding: 16px 18px; border-radius: 16px; border: 2px solid; text-align: left; }
.feedback.show { display: block; animation: slideUp 0.25s; }
.feedback.ok { background: rgba(51, 214, 159, 0.12); border-color: rgba(51, 214, 159, 0.5); }
.feedback.near { background: rgba(255, 159, 67, 0.12); border-color: rgba(255, 159, 67, 0.5); }
.feedback.bad { background: rgba(255, 90, 110, 0.12); border-color: rgba(255, 90, 110, 0.5); }
.fb-line { margin-top: 6px; }
.fb-note { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 207, 63, 0.12); color: #ffe7a0; font-weight: 700; }
.fb-say { margin-top: 10px; }
.xp-pop { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: #1b1600; font-weight: 800; font-size: 0.9rem; animation: pop 0.4s; }
.combo-pop { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(255, 159, 67, 0.25); color: #ffc58a; font-weight: 800; font-size: 0.9rem; }
.s-actions { display: flex; justify-content: center; margin-top: 16px; }
.s-actions .btn { min-width: 220px; }

/* ---------- Ergebnisse ---------- */
.results { max-width: 720px; margin: 0 auto 16px; text-align: center; }
.stars { font-size: 3.2rem; letter-spacing: 6px; margin-bottom: 4px; }
.star { color: rgba(255, 255, 255, 0.15); display: inline-block; }
.star.on { color: var(--gold); animation: starIn 0.5s both; text-shadow: 0 0 20px rgba(255, 207, 63, 0.6); }
.stat-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 14px 0; }
.stat { min-width: 96px; padding: 10px 14px; border-radius: 14px; background: var(--bg2); display: flex; flex-direction: column; }
.stat b { font-family: var(--font-h); font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.stat.gold b { color: var(--gold); }
.stat.inline { display: inline-flex; }
.review { list-style: none; padding: 0; margin: 10px 0; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.review li { padding: 10px 14px; border-radius: 12px; background: var(--bg2); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.rq { font-weight: 700; }
.ra { color: var(--green); font-weight: 800; }
.rg { color: #ff9aa6; font-size: 0.85rem; width: 100%; }
.rs { width: 100%; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 800; }

.grade-badge {
  width: 130px; height: 130px; margin: 0 auto 14px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-h); border: 6px solid; animation: pop 0.6s;
}
.grade-badge span { font-size: 3.4rem; font-weight: 700; line-height: 1; }
.grade-badge small { font-size: 0.85rem; font-weight: 600; }
.g1, .g2 { border-color: var(--green); color: var(--green); background: rgba(51, 214, 159, 0.1); }
.g3, .g4 { border-color: var(--gold); color: var(--gold); background: rgba(255, 207, 63, 0.1); }
.g5, .g6 { border-color: var(--red); color: #ff8b99; background: rgba(255, 90, 110, 0.1); }
.big-num { font-family: var(--font-h); font-size: 1.4rem; font-weight: 600; }
.sect-table { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; text-align: left; }
.sect { display: grid; grid-template-columns: 1fr 120px 56px; gap: 10px; align-items: center; font-size: 0.92rem; }
.sect .bar { height: 10px; }
.sect b { text-align: right; }
.exam-parts { line-height: 1.9; }
.exam-hist { display: flex; flex-direction: column; gap: 8px; }
.eh { display: flex; align-items: center; gap: 14px; padding: 8px 12px; background: var(--bg2); border-radius: 12px; }
.grade-mini { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-h); font-weight: 700; border: 3px solid; }
.boss { border-color: rgba(255, 207, 63, 0.35); background: linear-gradient(135deg, rgba(255, 207, 63, 0.1), rgba(255, 90, 110, 0.08)), var(--card); }

/* ---------- Toasts & Overlays ---------- */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 700; animation: slideUp 0.3s; transition: opacity 0.4s, transform 0.4s; }
.toast.gold { border-color: rgba(255, 207, 63, 0.6); background: linear-gradient(135deg, #3a3418, #2a2a4a); }
.toast.bad { border-color: rgba(255, 90, 110, 0.6); }
.toast.out { opacity: 0; transform: translateY(10px); }
.t-big { font-size: 1.5rem; vertical-align: middle; margin-right: 6px; }
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(5, 9, 25, 0.75); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(4px); }
.modal { width: min(420px, 100%); background: var(--card); border: 2px solid rgba(255, 207, 63, 0.5); border-radius: 24px; padding: 28px; text-align: center; box-shadow: var(--shadow); }
.rank-big { font-size: 4.5rem; line-height: 1.1; margin-bottom: 6px; animation: bounce 1s; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.pop-in { animation: pop 0.45s; }

/* ---------- Listen ---------- */
.wtable, .vtable { display: flex; flex-direction: column; }
.wrow, .vrow { display: grid; grid-template-columns: 36px 1fr 1.2fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.vrow { grid-template-columns: 36px 1fr 1fr 1.4fr auto; }
.vrow.head { font-weight: 800; color: var(--muted); font-size: 0.82rem; text-transform: uppercase; }
.w-en { font-weight: 800; }
.w-en small { color: var(--muted); font-weight: 600; }
.w-de { color: var(--muted); }
.strong { font-weight: 800; color: var(--gold); }
.say { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--bg2); }
.say:hover { background: var(--card2); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.dots i.on { background: var(--blue); }
.dots i.on.m { background: var(--green); }
#wsearch, #vsearch { margin-bottom: 8px; }

/* ---------- Spickzettel ---------- */
.rule h2 { color: var(--gold); }
.ex { background: rgba(74, 168, 255, 0.1); border-left: 4px solid var(--blue); padding: 8px 12px; border-radius: 0 10px 10px 0; }
.rule .wrong { color: #ff8b99; font-weight: 700; margin-bottom: 2px; }
.rule .right { color: var(--green); font-weight: 700; }
.rtable { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.rtable td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rtable b { color: var(--gold); }

/* ---------- Blitz, Memory, Würfel ---------- */
.blitz-card { position: relative; }
.blitz-score { position: absolute; top: 14px; right: 18px; font-size: 1.3rem; color: var(--gold); }
.blitz-card .answer { margin-top: 18px; }
.blitz-fb { min-height: 28px; margin-top: 10px; }
.pair-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pair { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; background: var(--bg2); font-weight: 700; }
.memory { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.mcard { position: relative; height: 96px; border-radius: 14px; border: 2px solid var(--line); background: linear-gradient(135deg, #263673, #1b2756); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); padding: 6px; }
.mfront { font-family: var(--font-h); font-size: 2rem; color: var(--muted); }
.mback { display: none; flex-direction: column; align-items: center; gap: 2px; }
.mback b { font-size: 1rem; }
.mcard.open, .mcard.found { background: var(--card2); }
.mcard.open .mfront, .mcard.found .mfront { display: none; }
.mcard.open .mback, .mcard.found .mback { display: flex; }
.mcard.found { border-color: var(--green); background: rgba(51, 214, 159, 0.15); animation: pop 0.35s; }
.dice-table { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dice-table ol { margin: 0; padding-left: 22px; }
.dice-zone { display: flex; justify-content: center; gap: 24px; margin: 18px 0 6px; }
.die { width: 76px; height: 76px; border-radius: 16px; background: #fff; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 10px; box-shadow: 0 6px 0 #c9cfe6, 0 10px 20px rgba(0, 0, 0, 0.3); }
.die i { width: 12px; height: 12px; border-radius: 50%; place-self: center; }
.die i.on { background: var(--bg); }
.dice-q { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.dice-q label { font-weight: 700; margin-top: 6px; }
.wcheck { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wcheck li { padding: 10px 14px; border-radius: 12px; background: var(--bg2); border-left: 5px solid; display: flex; flex-direction: column; }
.wcheck li.ok { border-color: var(--green); }
.wcheck li.bad { border-color: var(--red); }
.wcheck small { color: var(--muted); font-weight: 700; }

/* ---------- Profil ---------- */
.ranks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rank { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border-radius: 14px; background: var(--bg2); border: 2px solid transparent; opacity: 0.5; text-align: center; }
.rank.past { opacity: 0.85; }
.rank.now { opacity: 1; border-color: var(--gold); background: rgba(255, 207, 63, 0.1); }
.ri { font-size: 1.8rem; }
.rn { font-weight: 800; font-size: 0.9rem; }
.rx { color: var(--muted); font-size: 0.78rem; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 8px; border-radius: 14px; background: var(--bg2); filter: grayscale(1); opacity: 0.4; }
.badge.have { filter: none; opacity: 1; border: 2px solid rgba(255, 207, 63, 0.4); }
.bi { font-size: 2rem; }
.badge b { font-size: 0.9rem; }
.badge small { color: var(--muted); font-size: 0.75rem; }
.prog-row { display: grid; grid-template-columns: 130px 1fr 48px; gap: 10px; align-items: center; margin: 10px 0; }
.prog-row b { text-align: right; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.settings label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.settings label.check { flex-direction: row; align-items: center; gap: 10px; }
.settings input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--gold); }
input[type="range"] { accent-color: var(--gold); }
select.answer { text-align: left; }
.danger { border-color: rgba(255, 90, 110, 0.3); }

/* ---------- Animationen ---------- */
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes pop { 0% { transform: scale(0.85); opacity: 0; } 60% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); } }
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } to { transform: scale(1) rotate(0); } }
@keyframes bounce { 0% { transform: scale(0.3); } 50% { transform: scale(1.15); } 70% { transform: scale(0.95); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: stretch; text-align: left; padding: 20px; }
  .hero-side { flex-direction: row; justify-content: flex-start; gap: 12px; }
  .hero-side .ring { width: 92px; height: 92px; }
  .hero h1 { font-size: 1.7rem; }
  .brand-txt { display: none; }
  .tb-inner { gap: 8px; padding: 8px 12px; }
  .rankchip { padding-right: 10px; }
  .options { grid-template-columns: 1fr; }
  .s-card { padding: 20px 16px; }
  .big { font-size: 1.65rem; }
  .sentence { font-size: 1.1rem; }
  .settings { grid-template-columns: 1fr; }
  .dice-table { grid-template-columns: 1fr; }
  .wrow { grid-template-columns: 32px 1fr auto; }
  .wrow .w-de { grid-column: 2 / 3; grid-row: 2; }
  .vrow { grid-template-columns: 32px 1fr 1fr auto; }
  .vrow > span:nth-child(4) { grid-column: 2 / 4; grid-row: 2; color: var(--muted); font-size: 0.88rem; }
  .vrow.head > span:nth-child(4) { display: none; }
  .sect { grid-template-columns: 1fr 70px 48px; }
  .prog-row { grid-template-columns: 110px 1fr 44px; }
  .tf { flex-wrap: wrap; }
  .tf-btns { margin-left: 36px; }
  .s-actions .btn { width: 100%; }
}
@media (max-width: 420px) {
  .xp-num { display: none; }
  .streak { padding: 6px 8px; }
  .stat { min-width: 80px; }
}

/* Fortschritt im Ergebnis */
.prog-gain { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; text-align: left; margin: 14px auto; max-width: 520px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); font-weight: 700; }
.prog-gain .bar { min-width: 60px; }
@media (max-width: 760px) { .prog-gain { grid-template-columns: 1fr auto; } .prog-gain .bar { grid-column: 1 / -1; grid-row: 2; } }
