/* ==========================================================================
   LearnCraft – Design System
   Weißer Hintergrund, grau-blaue Verläufe, RGB-Gamer-Akzente.
   Schrift: Lexend (entwickelt für bessere Lesbarkeit).
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e3e8f2;
  --card: rgba(255, 255, 255, 0.82);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(30, 58, 138, 0.06);
  --shadow: 0 2px 6px rgba(15, 23, 42, 0.05), 0 12px 32px rgba(30, 58, 138, 0.1);
  --shadow-lg: 0 20px 60px rgba(49, 46, 129, 0.18);
  --radius: 22px;
  --radius-sm: 14px;

  --blue: #3b82f6;
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --purple: #a855f7;
  --magenta: #d946ef;
  --cyan: #06b6d4;
  --rgb: linear-gradient(90deg, #3b82f6, #8b5cf6, #d946ef, #06b6d4, #3b82f6);
  --brand: linear-gradient(135deg, #3b82f6 0%, #6366f1 45%, #a855f7 100%);
  --steel: linear-gradient(135deg, #eef2f9 0%, #e1e8f4 50%, #ece8fa 100%);

  --ok: #16a34a;
  --ok-bg: #ecfdf3;
  --warn: #d97706;
  --warn-bg: #fff8eb;
  --bad: #e11d48;
  --bad-bg: #fff1f3;

  /* Fächerfarben */
  --c-englisch: #16a34a;
  --c-englisch-2: #4ade80;
  --c-deutsch: #eab308;
  --c-deutsch-2: #fde047;
  --c-mathe: #2563eb;
  --c-mathe-2: #60a5fa;
  --c-geo: #ea580c;
  --c-geo-2: #fdba74;
  --c-nt: #0d9488;
  --c-nt-2: #5eead4;
  --c-musik: #e11d48;
  --c-musik-2: #fb7185;

  --subject: var(--violet);
  --subject-2: var(--purple);

  --font: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Chakra Petch", "Lexend", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Grau-blauer Verlauf im Hintergrund */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 600px at 100% -10%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 10%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(100, 116, 139, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 0.8em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1; }

.ic { width: 1.25em; height: 1.25em; flex-shrink: 0; vertical-align: -0.22em; }

.rgb-text {
  background: var(--rgb);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rgbshift 8s linear infinite;
}
@keyframes rgbshift { to { background-position: 300% 0; } }

/* ---------- Layout ---------- */
.container { width: min(1120px, 100% - 32px); margin: 0 auto; }
main.container { padding: 28px 0 120px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--rgb);
  background-size: 300% 100%;
  animation: rgbshift 10s linear infinite;
  opacity: 0.7;
}
.topbar .container { display: flex; align-items: center; gap: 14px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.02em; }
.logo-mark { width: 36px; height: 36px; }
.logo b { font-weight: 700; }
.topbar .spacer { flex: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.chip.gem { color: #4338ca; }
.chip.gem .gem-ic { width: 20px; height: 20px; }
.chip.flame { color: #ea580c; }
.chip.level { background: var(--brand); color: #fff; border: none; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  color: var(--ink-2);
  transition: transform 0.15s, box-shadow 0.15s;
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(6px);
}
.card.steel { background: var(--steel); }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

/* RGB-Rahmen beim Hover (wie eine Gaming-Tastatur) */
.rgb-hover { isolation: isolate; }
.rgb-hover::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  padding: 2px;
  background: var(--rgb);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s;
  animation: rgbshift 4s linear infinite;
  pointer-events: none;
}
.rgb-hover:hover::before, .rgb-hover:focus-visible::before { opacity: 1; }

.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 32px;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(168, 85, 247, 0.28), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(59, 130, 246, 0.25), transparent 60%),
    linear-gradient(135deg, #1e293b 0%, #312e81 55%, #4c1d95 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, transparent, black 60%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero .muted { color: #c7d2fe; }
.hero .stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.hero .stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 10px 16px;
  min-width: 110px;
}
.hero .stat b { display: block; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.hero .stat span { font-size: 0.8rem; color: #c7d2fe; }
.levelbar { height: 10px; border-radius: 99px; background: rgba(255,255,255,0.15); overflow: hidden; margin-top: 8px; max-width: 420px; }
.levelbar i { display: block; height: 100%; background: var(--rgb); background-size: 300% 100%; animation: rgbshift 6s linear infinite; border-radius: 99px; }

.ring { --p: 0; --size: 150px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(from 0deg, #60a5fa, #a78bfa, #f0abfc, #22d3ee calc(var(--p) * 1%), rgba(255,255,255,0.12) 0);
  position: relative; }
.ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #1e1b4b; }
.ring > div { position: relative; text-align: center; }
.ring b { font-family: var(--font-display); font-size: 2rem; display: block; line-height: 1; }
.ring span { font-size: 0.78rem; color: #c7d2fe; }

/* ---------- Subjects ---------- */
.subject-card {
  --c1: var(--subject);
  --c2: var(--subject-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.2,.8,.2,1), box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  min-height: 190px;
}
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.subject-card .band {
  position: absolute; inset: 0 0 auto 0; height: 92px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  opacity: 0.12;
}
.subject-card .tile {
  position: relative;
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--c1) 40%, transparent);
}
.subject-card .tile .ic { width: 28px; height: 28px; }
.subject-card h3 { position: relative; font-size: 1.3rem; margin: 6px 0 0; }
.subject-card p { position: relative; margin: 0; color: var(--muted); font-size: 0.92rem; }
.subject-card .tag {
  position: absolute; top: 16px; right: 16px;
  font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: 99px;
  background: #fff; border: 1px solid var(--line); color: var(--muted);
}
.subject-card .tag.live { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); border: none; }

[data-subject="englisch"] { --subject: var(--c-englisch); --subject-2: var(--c-englisch-2); }
[data-subject="deutsch"] { --subject: var(--c-deutsch); --subject-2: var(--c-deutsch-2); }
[data-subject="mathe"] { --subject: var(--c-mathe); --subject-2: var(--c-mathe-2); }
[data-subject="geo"] { --subject: var(--c-geo); --subject-2: var(--c-geo-2); }
[data-subject="nt"] { --subject: var(--c-nt); --subject-2: var(--c-nt-2); }
[data-subject="musik"] { --subject: var(--c-musik); --subject-2: var(--c-musik-2); }

.subject-hero {
  border-radius: 28px;
  padding: 28px 32px;
  color: #fff;
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(255,255,255,0.25), transparent 60%),
    linear-gradient(135deg, var(--subject), color-mix(in srgb, var(--subject) 55%, #1e1b4b));
  box-shadow: 0 18px 50px color-mix(in srgb, var(--subject) 35%, transparent);
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 24px;
}
[data-subject="deutsch"] .subject-hero { color: #1f1300; background: radial-gradient(500px 240px at 100% 0%, rgba(255,255,255,0.45), transparent 60%), linear-gradient(135deg, #facc15, #f59e0b); }
.subject-hero .tile { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.35); }
.subject-hero .tile .ic { width: 34px; height: 34px; }
.subject-hero h1 { margin: 0; color: inherit; }
.subject-hero p { margin: 0; opacity: 0.88; }

.mode-card {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; position: relative;
}
.mode-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.mode-card .tile {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--subject), var(--subject-2)); color: #fff;
}
.mode-card h3 { margin: 2px 0 4px; }
.mode-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; margin-bottom: 16px; cursor: pointer; }
.back:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; font-weight: 600; cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--brand); color: #fff; border: none; box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35); }
.btn.subject { background: linear-gradient(135deg, var(--subject), color-mix(in srgb, var(--subject) 70%, #312e81)); color: #fff; border: none; }
[data-subject="deutsch"] .btn.subject { background: linear-gradient(135deg, #facc15, #f59e0b); color: #1f1300; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { color: var(--bad); }
.btn.big { padding: 16px 26px; font-size: 1.08rem; border-radius: 16px; }
.btn.sm { padding: 7px 12px; font-size: 0.88rem; border-radius: 10px; }

.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); gap: 4px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ---------- Practice ---------- */
.practice { max-width: 820px; margin: 0 auto; }
.task-card { text-align: center; padding: 34px 28px; }
.task-label { display: inline-flex; gap: 8px; align-items: center; font-size: 0.85rem; font-weight: 600; color: var(--subject); background: color-mix(in srgb, var(--subject) 10%, #fff); padding: 6px 12px; border-radius: 99px; }
[data-subject="deutsch"] .task-label { color: #92400e; }
.task-text { font-size: clamp(1.45rem, 3.6vw, 2.1rem); font-weight: 600; line-height: 1.35; margin: 18px auto 10px; max-width: 680px; }
.task-text.long { font-size: clamp(1.2rem, 2.6vw, 1.5rem); font-weight: 500; text-align: left; }
.targets { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 6px 0 4px; }
.targets span { font-size: 0.82rem; padding: 4px 10px; border-radius: 99px; background: var(--bg-soft); border: 1px dashed #cbd5e1; color: var(--ink-2); }

.mic-zone { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 26px 0 6px; }
.mic {
  --lvl: 0;
  position: relative;
  width: 112px; height: 112px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 36px rgba(99, 102, 241, 0.45);
  transition: transform 0.15s;
}
.mic .ic { width: 44px; height: 44px; }
.mic:hover { transform: scale(1.04); }
.mic::before {
  content: "";
  position: absolute; inset: -8px; border-radius: 50%;
  background: conic-gradient(#3b82f6, #8b5cf6, #d946ef, #06b6d4, #3b82f6);
  z-index: -1; opacity: 0.35; filter: blur(6px);
  animation: spin 6s linear infinite;
}
.mic.rec { background: linear-gradient(135deg, #e11d48, #a855f7); transform: scale(calc(1 + var(--lvl) * 0.18)); }
.mic.rec::before { opacity: 0.9; inset: calc(-10px - var(--lvl) * 22px); animation-duration: 1.6s; }
.mic.busy { background: linear-gradient(135deg, #64748b, #6366f1); cursor: wait; }
.mic.busy .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mic-hint { color: var(--muted); font-size: 0.95rem; min-height: 1.5em; }
.mic-sm { width: 64px; height: 64px; }
.mic-sm .ic { width: 26px; height: 26px; }

.transcript {
  margin: 10px auto 0; max-width: 640px; padding: 14px 18px;
  border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 1.15rem; font-style: italic; color: var(--ink-2);
}

.feedback { margin-top: 20px; border-radius: 20px; padding: 20px 22px; text-align: left; border: 1px solid; animation: pop 0.35s cubic-bezier(.2,1.4,.4,1); }
.feedback.richtig { background: var(--ok-bg); border-color: #bbf7d0; }
.feedback.fast { background: var(--warn-bg); border-color: #fde68a; }
.feedback.falsch { background: var(--bad-bg); border-color: #fecdd3; }
.feedback .verdict { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; margin-bottom: 6px; }
.feedback.richtig .verdict { color: var(--ok); }
.feedback.fast .verdict { color: var(--warn); }
.feedback.falsch .verdict { color: var(--bad); }
.feedback .solution { margin-top: 10px; padding: 12px 14px; background: rgba(255,255,255,0.75); border-radius: 12px; font-weight: 600; font-size: 1.1rem; }
.word-results { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.word-results span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; font-size: 0.85rem; font-weight: 500; background: #fff; border: 1px solid var(--line); }
.word-results span.ok { color: var(--ok); border-color: #bbf7d0; }
.word-results span.no { color: var(--bad); border-color: #fecdd3; }
.mistakes { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mistakes li { background: rgba(255,255,255,0.75); padding: 10px 12px; border-radius: 12px; font-size: 0.95rem; }
.mistakes s { color: var(--bad); }
.mistakes b { color: var(--ok); }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.session-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.progress { flex: 1; min-width: 140px; height: 12px; border-radius: 99px; background: #e8edf6; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--subject), var(--subject-2)); transition: width 0.4s; }
.combo { font-family: var(--font-display); font-weight: 700; color: #7c3aed; }

.gem-burst { position: fixed; z-index: 200; pointer-events: none; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #4f46e5; display: flex; align-items: center; gap: 6px; animation: burst 1.3s ease-out forwards; }
.gem-burst svg { width: 34px; height: 34px; }
@keyframes burst { 0% { transform: translate(-50%, 0) scale(0.6); opacity: 0; } 20% { transform: translate(-50%, -20px) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -110px) scale(1); opacity: 0; } }

/* Abschreibtext */
.copy-text { font-size: var(--copy-size, clamp(1.25rem, 2.6vw, 1.55rem)); line-height: 2; letter-spacing: 0.02em; word-spacing: 0.12em; text-align: left; white-space: pre-wrap; padding: 26px 28px; background: #fffef6; border: 1px solid #f5e7a6; border-radius: 18px; background-image: repeating-linear-gradient(transparent, transparent calc(2em - 1px), #f3e9b8 calc(2em - 1px), #f3e9b8 2em); background-position: 0 26px; }
.copy-text mark { background: linear-gradient(transparent 55%, #fde68a 55%); padding: 0 2px; border-radius: 3px; }
.focus-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.focus-list div { padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.focus-list b { display: block; font-size: 1.1rem; }

/* Aufsatz */
.essay-parts { display: grid; gap: 10px; text-align: left; }
.essay-part { padding: 12px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; font-size: 1.02rem; }
.stars { display: inline-flex; gap: 4px; color: #f59e0b; }
.stars .ic { width: 28px; height: 28px; }
.stars .off { color: #e2e8f0; }
.topic-btn { text-align: left; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: #fff; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.15s; }
.topic-btn:hover { transform: translateY(-2px); }
.topic-btn.on { border-color: #f59e0b; box-shadow: 0 0 0 3px #fde68a; }
.topic-btn b { display: block; }

/* ---------- Rewards ---------- */
.gem-big { display: flex; align-items: center; gap: 14px; }
.gem-big svg { width: 64px; height: 64px; filter: drop-shadow(0 8px 16px rgba(99,102,241,0.4)); animation: float 3s ease-in-out infinite; }
.gem-big b { font-family: var(--font-display); font-size: 3rem; line-height: 1; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-4deg); } }
.redeem-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.redeem-opt { padding: 18px 12px; border-radius: 18px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: center; box-shadow: var(--shadow-sm); transition: transform 0.15s; position: relative; }
.redeem-opt:hover:not(:disabled) { transform: translateY(-3px); }
.redeem-opt:disabled { opacity: 0.45; cursor: not-allowed; }
.redeem-opt b { font-family: var(--font-display); font-size: 1.8rem; display: block; }
.park { background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #d946ef 100%); color: #fff; border: none; overflow: hidden; }
.park .muted { color: #e0e7ff; }

.list { display: grid; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 0.78rem; font-weight: 600; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.new { background: #eef2ff; color: #4f46e5; }
.badge.gray { background: var(--bg-soft); color: var(--muted); }

/* ---------- Login ---------- */
.login-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; }
.login-card { width: min(420px, 100%); text-align: center; padding: 34px 28px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0 22px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; background: #e2e8f0; transition: background 0.15s, transform 0.15s; }
.pin-dots i.on { background: var(--brand); transform: scale(1.15); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-pad button { height: 64px; border-radius: 18px; border: 1px solid var(--line); background: #fff; font-size: 1.5rem; font-family: var(--font-display); font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.1s; }
.pin-pad button:active { transform: scale(0.95); }
.shake { animation: shake 0.4s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }

input, textarea, select {
  font: inherit; color: inherit;
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(99,102,241,0.15); }
textarea { min-height: 140px; resize: vertical; }
label.field { display: grid; gap: 6px; font-weight: 500; font-size: 0.93rem; }

/* ---------- Tutor (Pixel) ---------- */
.tutor-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 10px; border-radius: 99px; border: none; cursor: pointer;
  background: #0f172a; color: #fff; font-weight: 600;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.35);
}
.tutor-fab .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); }
.tutor-fab::before { content: ""; position: absolute; inset: -2px; border-radius: 99px; background: var(--rgb); background-size: 300% 100%; animation: rgbshift 4s linear infinite; z-index: -1; filter: blur(8px); opacity: 0.6; }
.tutor-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: min(420px, calc(100vw - 32px)); height: min(620px, calc(100vh - 110px));
  display: flex; flex-direction: column;
  background: #fff; border-radius: 26px; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop 0.25s ease-out;
}
.tutor-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, #1e293b, #4c1d95); color: #fff; }
.tutor-head .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); }
.tutor-head .icon-btn { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); color: #fff; width: 36px; height: 36px; }
.tutor-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 0.97rem; line-height: 1.5; white-space: pre-wrap; }
.bubble.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; align-self: flex-start; }
.bubble.me { background: var(--brand); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.bubble .speak { margin-top: 6px; }
.tutor-foot { padding: 14px; display: flex; align-items: center; justify-content: center; gap: 14px; border-top: 1px solid var(--line); }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; top: 80px; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; }
.toast { padding: 12px 18px; border-radius: 14px; background: #0f172a; color: #fff; box-shadow: var(--shadow-lg); font-weight: 500; animation: pop 0.25s; max-width: 90vw; }
.toast.err { background: var(--bad); }

.loader { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.loader .ic { animation: spin 1s linear infinite; }
.skeleton { height: 1.2em; border-radius: 8px; background: linear-gradient(90deg, #eef2f8, #f8fafc, #eef2f8); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.demo-banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; background: #eef2ff; color: #3730a3; font-size: 0.9rem; margin-bottom: 18px; border: 1px solid #c7d2fe; }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 22px; }
.tabs button { border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 12px; cursor: pointer; font-weight: 500; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.tabs button.on { background: #0f172a; color: #fff; border-color: #0f172a; }
.kpi { padding: 18px 20px; }
.kpi b { font-family: var(--font-display); font-size: 2rem; display: block; line-height: 1.1; }
.kpi span { color: var(--muted); font-size: 0.88rem; }
.chart-box { position: relative; height: 260px; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; }
.table-wrap { overflow-x: auto; }
.meter { width: 90px; height: 8px; background: #eef2f7; border-radius: 99px; overflow: hidden; display: inline-block; vertical-align: middle; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #f43f5e, #f59e0b, #22c55e); background-size: 90px 100%; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .hero .ring { --size: 120px; justify-self: center; }
  .topbar .container { height: 60px; gap: 8px; }
  .logo span.word { display: none; }
  .chip.level { display: none; }
  .subject-hero { padding: 22px; }
  .card { padding: 18px; }
  .tutor-fab .lbl { display: none; }
  .tutor-fab { padding: 8px; }
  .hero .stats { display: grid; grid-template-columns: 1fr 1fr; }
  .hero .stat { min-width: 0; }
  #subjects { grid-template-columns: 1fr 1fr; gap: 12px; }
  .subject-card { min-height: 0; padding: 16px; }
  .subject-card .tag { display: none; }
  .subject-card h3 { font-size: 1.05rem; }
  .subject-card p { font-size: 0.82rem; }
  .task-card { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Erzählung: Merkmale, Abschreiben, geführtes Schreiben ---------- */
.practice.wide { max-width: 1000px; }
.mode-card.featured { border: 2px solid #fde68a; background: linear-gradient(135deg, #fffbeb, #ffffff 60%); }
.mode-card.featured h3 { margin-top: 6px; }

.kurve { width: 100%; height: auto; margin: 6px 0; }
.kurve .kv-t { font: 500 13px var(--font); fill: var(--muted); }
.kurve .kv-hi { font: 700 13px var(--font); fill: #ea580c; }

.merkmal-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.merkmal-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.merkmal-nr { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: #1f1300; background: linear-gradient(135deg, #facc15, #f59e0b); }
.merkmal-example { font-style: italic; color: var(--ink-2); background: #fffbeb; border-left: 4px solid #facc15; padding: 10px 14px; border-radius: 10px; }
.merkmal-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.merkmal-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 0.84rem; font-weight: 500; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2); }
.merkmal-chip.ok { background: var(--ok-bg); border-color: #bbf7d0; color: var(--ok); }
.merkmal-chip.no { background: var(--warn-bg); border-color: #fde68a; color: var(--warn); }
details.example summary { cursor: pointer; color: var(--muted); font-weight: 500; }
details.example .merkmal-example { margin-top: 8px; }

/* Mustererzählung zum Abschreiben */
.story { display: grid; gap: 14px; }
.story-row { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.story.annotated .story-row { grid-template-columns: 1fr 200px; }
.story-title { font-weight: 700; padding-top: 14px; padding-bottom: 14px; }
.story-note { font-size: 0.88rem; color: var(--ink-2); padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px dashed #f59e0b; }
.story-note b { display: block; color: #92400e; }
.mk { border-radius: 4px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.mk sup { font-size: 0.55em; font-weight: 700; margin-left: 2px; font-family: var(--font-display); }
.mk-spannung { background: #fee2e2; box-shadow: inset 0 -3px 0 #ef4444; }
.mk-rede { background: #dbeafe; box-shadow: inset 0 -3px 0 #3b82f6; }
.mk-verben { background: #ede9fe; box-shadow: inset 0 -3px 0 #8b5cf6; }
.mk-satzanfaenge { background: #dcfce7; box-shadow: inset 0 -3px 0 #22c55e; }
.mk-sinne { background: #ffedd5; box-shadow: inset 0 -3px 0 #f97316; }
.mk-praeteritum { background: #ccfbf1; box-shadow: inset 0 -3px 0 #14b8a6; }
.mk-ueberschrift, .mk-einleitung, .mk-schluss { background: #fef9c3; box-shadow: inset 0 -3px 0 #eab308; }
.feature-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.feature-list .mk { font-weight: 600; font-size: 0.85rem; padding: 2px 8px; margin-right: 4px; }

/* Schritt-für-Schritt */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--muted); font-weight: 500; }
.step-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-soft); font-family: var(--font-display); font-weight: 700; }
.step.done .step-dot { background: var(--ok-bg); color: var(--ok); }
.step.on { border-color: #f59e0b; color: var(--ink); box-shadow: 0 0 0 3px #fde68a; }
.step.on .step-dot { background: linear-gradient(135deg, #facc15, #f59e0b); color: #1f1300; }
.criteria { display: grid; gap: 10px; }
.criterion { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.criterion.ok { border-color: #bbf7d0; }
.criterion.warn { border-color: #fde68a; }
.criterion.bad { border-color: #fecdd3; }
.criterion-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }

@media (max-width: 760px) {
  .story.annotated .story-row { grid-template-columns: 1fr; }
  .step-name { font-size: 0.75rem; }
}

/* ---------- Vorlesen & Stimmen-Menü ---------- */
.btn.speaking { background: #0f172a; color: #fff; border-color: #0f172a; }
.modal-backdrop { position: fixed; inset: 0; z-index: 400; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: pop 0.2s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 24px; padding: 22px; box-shadow: var(--shadow-lg); }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 16px 0; }
.voice-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; background: #fff; }
.voice-opt.on { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); background: #f5f3ff; }
.voice-opt .icon-btn { width: 36px; height: 36px; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--bg-soft); cursor: pointer; }
.switch-row input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; accent-color: var(--indigo); }

/* Automatisch weiter: Countdown im Weiter-Knopf */
.btn.autonext { position: relative; overflow: hidden; }
.btn.autonext > span { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.btn.autonext .countdown { position: absolute; inset: 0; width: 0; background: rgba(255, 255, 255, 0.28); }
.btn.autonext.running .countdown { animation: countdown var(--auto-ms, 3000ms) linear forwards; }
@keyframes countdown { from { width: 0; } to { width: 100%; } }

/* ---------- Geographie: Sonnensystem & Quiz ---------- */
.solar-wrap { overflow-x: auto; margin: 10px -6px 4px; -webkit-overflow-scrolling: touch; }
.solar { width: 100%; min-width: 720px; height: auto; display: block; background: radial-gradient(ellipse at 0% 50%, #fff7ed 0%, #f8fafc 45%, #f1f5f9 100%); border-radius: 18px; }
.solar .orbit { fill: none; stroke: #cbd5e1; stroke-width: 1.5; stroke-dasharray: 4 6; }
.solar .body { cursor: pointer; outline: none; }
.solar .body .hit { fill: transparent; stroke: transparent; stroke-width: 3; transition: stroke 0.2s; }
.solar .body:hover .hit, .solar .body:focus-visible .hit, .solar .body.on .hit { stroke: #8b5cf6; stroke-dasharray: 5 4; }
.solar .body.on .planet-label { fill: #6d28d9; }
.solar .planet-label { font: 700 17px var(--font); fill: #1e293b; }
.solar .sun-label { font: 700 24px var(--font); fill: #92400e; }
.solar .small-label { font: 500 13px var(--font); fill: #57534e; }
.solar .group { font: 700 16px var(--font); }
.solar .group.rock, .group-card.rock h2 { fill: #dc2626; color: #dc2626; }
.solar .group.gas, .group-card.gas h2 { fill: #2563eb; color: #2563eb; }
.solar .bracket { fill: none; stroke-width: 2.5; }
.solar .bracket.rock { stroke: #dc2626; }
.solar .bracket.gas { stroke: #2563eb; }
.planet-info { margin-top: 16px; padding: 16px 18px; border-radius: 18px; background: var(--bg-soft); border: 1px solid var(--line); }
.planet-dot { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; box-shadow: inset -6px -6px 0 rgba(0,0,0,0.08); }
.group-card.rock { border: 2px solid #f87171; }
.group-card.gas { border: 2px solid #60a5fa; }
.group-card h2 { margin: 4px 0 6px; }
.merksatz { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.merk-word { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: #fff; border: 1px solid var(--line); cursor: pointer; transition: transform 0.15s; }
.merk-word:hover { transform: translateY(-2px); }
.merk-word .mw { font-size: 1.15rem; font-weight: 500; }
.merk-word .mw b { color: #ea580c; font-size: 1.35rem; }
.merk-word .mp { font-size: 0.8rem; color: var(--muted); }
.funfact { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #eef2ff; color: #3730a3; }
.lesson-card + .lesson-card { margin-top: 16px; }
.pw-field { position: relative; }
.pw-field input { padding-right: 56px; font-size: 1.1rem; }
.pw-field .icon-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; }
.mic-hint:empty { display: none; }

/* ---------- Natur und Technik: Biologie ---------- */
.step-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #3f7d58; color: #fff; font-size: 0.95rem; margin-right: 6px; vertical-align: 3px; font-family: var(--font-display); }
.step-num.blue { background: #2f5fb3; }
.step-num.red { background: #d0574f; }
.kz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; margin-top: 14px; }
.kz { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 2px solid #86b597; background: #f3faf5; }
.kz-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #3f7d58; color: #fff; flex-shrink: 0; }
.note-box { margin-top: 14px; padding: 12px 16px; border-radius: 14px; border: 2px solid #f5b860; background: #fff8ec; display: grid; gap: 6px; }
.note-box .ic { color: #d97706; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.check-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 16px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; box-shadow: var(--shadow-sm); transition: transform 0.15s; }
.check-card .ic { width: 30px; height: 30px; color: var(--subject); }
.check-card:hover { transform: translateY(-2px); }
.check-card.on { border-color: var(--subject); box-shadow: 0 0 0 3px color-mix(in srgb, var(--subject) 25%, transparent); }
.check-card.right { background: var(--ok-bg); }
.check-card.wrong { background: var(--bad-bg); }
.check-q { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--bg-soft); }
.um-box { margin: 12px 0; padding: 12px 16px; border-radius: 14px; border: 2px solid #5b8bd6; background: #f4f8ff; font-size: 1.1rem; }
.um-box b { color: #2f5fb3; margin-right: 8px; }
.cell-wrap { margin-top: 10px; overflow-x: auto; }
.cell { width: 100%; min-width: 560px; height: auto; display: block; background: #f8fafc; border-radius: 18px; }
.cell .part { cursor: pointer; transition: filter 0.15s, opacity 0.15s; }
.cell .part:hover { filter: brightness(0.95); }
.cell .part.on:not(.lbl) { filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.8)); }
.cell .lbl text { font: 700 20px var(--font); }
.cell .lbl.on text { text-decoration: underline; }
.compare td, .compare th { vertical-align: middle; }

/* ---------- Englisch: to be ---------- */
.tobe-table { margin-top: 10px; }
.tobe-table td, .tobe-table th { padding: 10px 12px; }
.tobe-table tbody tr { cursor: pointer; transition: background 0.15s; }
.tobe-table tbody tr:hover, .tobe-table tbody tr.on { background: #f0fdf4; }
.tobe-table tr.plural td { border-top: 2px solid #94a3b8; }
.tobe-table .pron { color: #1d4ed8; font-size: 1.1rem; }
.tobe-table .short { color: #15803d; font-size: 1.1rem; }
b.v, .v { color: #dc2626; }
.apo { color: #dc2626; font-weight: 800; }
.rule-card { border-width: 2px; }
.rule-card.orange { border: 2px dashed #f59e0b; background: #fffbeb; }
.rule-card.orange h3, .rule-card.orange > b:first-child { color: #c2410c; }
.rule-card.green { border: 2px solid #22c55e; background: #f0fdf4; }
.rule-card.green h3, .rule-card.green > b:first-child { color: #15803d; }
.rule-card.blue { border: 2px solid #3b82f6; background: #eff6ff; }
.eselsbruecke { margin-top: 10px; font-style: italic; color: var(--ink-2); }
.apo-list { display: grid; gap: 4px; margin-top: 10px; font-size: 1.1rem; }
.apo-list s { color: #dc2626; }
.examples { display: grid; gap: 8px; }
.example { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; text-align: left; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.05rem; }
.example .ic { color: var(--subject); }
.story-en { font-size: 1.25rem; line-height: 1.8; margin: 10px 0 0; }
.drill { display: grid; gap: 8px; }
.drill-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); }
.drill-row.solved { background: var(--ok-bg); border-color: #bbf7d0; }
.drill-s { font-size: 1.1rem; }
.drill-s .gap { display: inline-block; min-width: 44px; text-align: center; }
.drill-btns { display: flex; gap: 6px; }
.drill-btns .btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.drill-btns .btn.no { background: var(--bad-bg); color: var(--bad); border-color: #fecdd3; }
.family-tree { display: grid; gap: 6px; justify-items: center; padding: 14px; border-radius: 16px; background: var(--bg-soft); overflow-x: auto; }
.ft-row { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: nowrap; }
.ft-row.labels { gap: 60px; }
.ft { display: flex; flex-direction: column; align-items: center; padding: 6px 12px; border-radius: 12px; border: 2px solid; background: #fff; font-weight: 700; font-size: 0.95rem; min-width: 96px; }
.ft small { font-weight: 400; font-size: 0.72rem; color: var(--muted); }
.ft.p { border-color: #a855f7; color: #7e22ce; }
.ft.b { border-color: #3b82f6; color: #1d4ed8; }
.ft.o { border-color: #f97316; color: #c2410c; }
.ft.g { border-color: #22c55e; color: #15803d; }
.ft.r { border-color: #dc2626; color: #b91c1c; }
.ft.me { border-style: dashed; border-color: #1e293b; color: #1e293b; min-width: 64px; }
.ft-gap { width: 24px; }
.ft-label { font-weight: 700; font-size: 0.85rem; }
.ft-label.p { color: #7e22ce; } .ft-label.b { color: #1d4ed8; } .ft-label.o { color: #c2410c; font-weight: 400; } .ft-label.g { color: #15803d; }
.vocab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; margin-top: 14px; }
.vocab-item { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; }
.vocab-item b { color: #1d4ed8; }
.vocab-item span { color: var(--muted); font-size: 0.9rem; }
