/* ═══════════════════════════════════════════════════
   DeutschMeister – style.css  v3
   Calm German Forest · Warm Ivory + Forest Green + Gold
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── Variables ── */
:root {
  /* Backgrounds — warm ivory / parchment */
  --bg:        #f5f0e8;
  --bg2:       #ede8dd;
  --bg3:       #e4ddd0;
  --card:      #faf7f2;
  --card2:     #f0ebe0;

  /* Borders */
  --border:    rgba(120,100,70,0.12);
  --border2:   rgba(120,100,70,0.22);

  /* German flag + brand palette */
  --de-black:  #1c1c1e;
  --de-red:    #c0392b;
  --de-gold:   #d4a017;

  /* Accent: forest green (calm, academic) */
  --green-forest: #2d6a4f;
  --green-light:  #52b788;
  --green-dim:    rgba(45,106,79,0.10);
  --green-glow:   rgba(45,106,79,0.22);

  /* Gold accent */
  --gold:      #c9920a;
  --gold2:     #e8b84b;
  --gold-dim:  rgba(201,146,10,0.10);
  --gold-glow: rgba(201,146,10,0.25);

  /* Status */
  --correct:   #2d6a4f;
  --wrong:     #c0392b;
  --blue:      #2f5fa0;

  /* Text */
  --text:       #1c1a16;
  --text-muted: #6b6049;
  --text-dim:   #a89880;

  /* Layout */
  --panel-w:   296px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow:    0 8px 40px rgba(80,60,30,0.13);
  --shadow-sm: 0 3px 14px rgba(80,60,30,0.10);
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', sans-serif;
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ══════════════════ GERMAN FLAG COMPONENT ══════════════════ */
.de-flag {
  display: flex;
  flex-direction: column;
  width: 24px; height: 17px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 5px rgba(0,0,0,0.2);
}
.de-flag span:nth-child(1) { background: var(--de-black); flex: 1; }
.de-flag span:nth-child(2) { background: var(--de-red);   flex: 1; }
.de-flag span:nth-child(3) { background: var(--de-gold);  flex: 1; }

.flag-mini {
  display: flex;
  flex-direction: column;
  width: 18px; height: 13px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.flag-mini span:nth-child(1) { background: var(--de-black); flex: 1; }
.flag-mini span:nth-child(2) { background: var(--de-red);   flex: 1; }
.flag-mini span:nth-child(3) { background: var(--de-gold);  flex: 1; }

/* ══════════════════ PANEL ══════════════════ */
.panel {
  width: var(--panel-w);
  min-height: 100vh;
  background: var(--card);
  border-right: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.3rem 1rem;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  box-shadow: 2px 0 20px rgba(80,60,30,0.07);
}

/* Brand */
.panel-logo-wrap {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.panel-logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--de-gold), var(--gold2));
  color: #1c1c1e;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px var(--gold-glow);
  flex-shrink: 0;
  letter-spacing: -.5px;
}
.panel-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 2rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--border);
}
.panel-brand-text { display: flex; flex-direction: column; }
.panel-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -.3px;
  line-height: 1.2;
}
.panel-subtitle {
  font-size: .66rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}
.panel-nav { flex: 1; }
.panel-section-label {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: .63rem;
  color: var(--text-dim);
  margin-bottom: .6rem;
  font-weight: 600;
}

/* Level slider */
.level-slider-wrap { margin-bottom: .5rem; }
.level-track {
  position: relative;
  height: 5px;
  background: var(--bg3);
  border-radius: 99px;
  margin-bottom: .8rem;
}
.level-fill {
  position: absolute;
  left: 0; top: 0; height: 100%;
  background: linear-gradient(90deg, var(--green-forest), var(--green-light));
  border-radius: 99px;
  width: 0%;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.level-thumb {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  background: var(--green-forest);
  border-radius: 50%;
  left: 0%;
  transition: left .4s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 0 3px var(--green-glow), 0 2px 6px rgba(45,106,79,.3);
  border: 2px solid #fff;
}
.level-labels { display: flex; justify-content: space-between; }
.lv-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .68rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: .18rem .32rem;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.lv-label.active { color: var(--green-forest); background: var(--green-dim); }

/* Quiz type chips */
.quiz-type-wrap { animation: fadeDown .25s ease; }
.quiz-type-chips { display: flex; flex-direction: column; gap: .3rem; }

/* Mode buttons – modern redesign */
.mode-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .87rem;
  font-weight: 500;
  padding: .58rem .75rem;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: .18rem;
  transition: all .18s cubic-bezier(.4,0,.2,1);
  text-align: left;
  position: relative;
}
.mode-btn:hover { 
  color: var(--text); 
  background: var(--bg2);
}
.mode-btn.active {
  background: linear-gradient(135deg, rgba(45,106,79,.13), rgba(82,183,136,.08));
  color: var(--green-forest);
  font-weight: 600;
}
.mode-btn.active .mode-icon-wrap {
  background: var(--green-forest);
  color: #fff;
}
.mode-icon-wrap {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .18s;
  color: inherit;
}
.mode-btn:hover .mode-icon-wrap {
  background: var(--bg3);
}
.mode-label { flex: 1; }
.mode-svg { width: 14px; height: 14px; flex-shrink: 0; }
.mode-chevron {
  flex-shrink: 0;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  opacity: .45;
}
.mode-chevron.open { transform: rotate(180deg); }

/* Parent mode button */
.mode-parent {}
.mode-parent.group-active {
  color: var(--text);
  font-weight: 600;
}
.mode-parent.group-active .mode-icon-wrap {
  background: var(--bg3);
}

/* Submenu */
.mode-group { position: relative; }
.mode-submenu {
  display: none;
  flex-direction: column;
  gap: .08rem;
  margin: .1rem 0 .3rem 1.2rem;
  padding-left: .75rem;
  border-left: 2px solid var(--border2);
  overflow: hidden;
  animation: slideDown .2s ease;
}
.mode-submenu.open { display: flex; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mode-sub-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .83rem;
  font-weight: 500;
  padding: .45rem .65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
}
.mode-sub-btn:hover {
  background: var(--bg2);
  color: var(--text);
}
.mode-sub-btn.active {
  background: rgba(45,106,79,.12);
  color: var(--green-forest);
  font-weight: 600;
}

/* Exam chips */
.exam-type-wrap { animation: fadeDown .25s ease; }
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.exam-chips { display: flex; flex-direction: column; gap: .3rem; }
.exam-chip {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 500;
  padding: .5rem .85rem;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}
.exam-chip:hover { color: var(--text); border-color: var(--border2); background: var(--bg3); }
.exam-chip.active {
  background: rgba(47,95,160,.08);
  border-color: rgba(47,95,160,.32);
  color: var(--blue);
}

/* Quantity */
.qty-row { display: flex; align-items: center; gap: .8rem; margin-bottom: .3rem; }
.qty-btn {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--green-forest);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.qty-btn:hover { background: var(--green-dim); }
.qty-val {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  min-width: 2.2rem;
  text-align: center;
}
.qty-hint { font-size: .7rem; color: var(--text-dim); margin-bottom: 1.1rem; }

/* Generate button */
.generate-btn {
  width: 100%;
  padding: .85rem;
  background: linear-gradient(135deg, var(--green-forest), var(--green-light));
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  cursor: pointer;
  letter-spacing: .2px;
  transition: opacity var(--transition), transform .15s, box-shadow var(--transition);
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px var(--green-glow);
}
.generate-btn:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 6px 28px var(--green-glow); }
.generate-btn:active { transform: translateY(0); }

/* Stats */
.panel-stats { display: flex; gap: .5rem; margin: 0 0 1rem 0; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.stat-box {
  flex: 1;
  background: var(--bg2);
  border-radius: 10px;
  padding: .55rem .3rem;
  text-align: center;
  border: 1px solid var(--border);
}
.stat-box span { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--green-forest); display:block; }
.stat-box small { font-size: .63rem; color: var(--text-muted); }

/* Panel footer */
.panel-footer {
  border-top: 1px solid var(--border);
  padding-top: .9rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .5rem;
}
.footer-info-row {
  display: flex;
  gap: 1rem;
  font-size: .73rem;
  color: var(--text-muted);
}
.footer-info-row b { color: var(--green-forest); }
.change-key-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: .72rem;
  cursor: pointer;
  padding: .35rem .6rem;
  border-radius: 6px;
  transition: all var(--transition);
  text-align: left;
  width: fit-content;
  margin-top: .2rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.change-key-btn:hover { color: var(--green-forest); border-color: rgba(45,106,79,.3); }

/* ══════════════════ HAMBURGER ══════════════════ */
.hamburger {
  display: none;
  position: fixed;
  top: 1rem; left: 1rem;
  z-index: 200;
  width: 42px; height: 42px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 11px;
  color: var(--green-forest);
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* ══════════════════ MAIN ══════════════════ */
.main {
  margin-left: var(--panel-w);
  flex: 1;
  min-height: 100vh;
  padding: 2.5rem 3rem 4rem;
  position: relative;
  background: var(--bg);
}

/* ══════════════════ API KEY ══════════════════ */
.apikey-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.apikey-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .18;
  pointer-events: none;
}
.apikey-blob.b1 { width: 500px; height: 500px; background: var(--de-gold); top: -100px; right: -100px; }
.apikey-blob.b2 { width: 320px; height: 320px; background: var(--green-forest); bottom: -50px; left: 0; }

.apikey-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 2.8rem 2.5rem;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow);
  animation: fadeUp .4s ease;
  text-align: center;
  position: relative;
  z-index: 1;
}
.apikey-flag {
  display: flex;
  flex-direction: row;
  width: 54px; height: 36px;
  border-radius: 5px;
  overflow: hidden;
  margin: 0 auto 1.2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.apikey-flag span:nth-child(1) { background: var(--de-black); flex: 1; }
.apikey-flag span:nth-child(2) { background: var(--de-red);   flex: 1; }
.apikey-flag span:nth-child(3) { background: var(--de-gold);  flex: 1; }

.apikey-icon { font-size: 2.2rem; margin-bottom: .8rem; }
.apikey-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.65rem;
  color: var(--text);
  margin-bottom: .6rem;
}
.apikey-sub {
  font-size: .87rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.apikey-sub strong { color: var(--green-forest); }
.apikey-input-wrap { position: relative; margin-bottom: .5rem; }
.apikey-input {
  width: 100%;
  background: var(--bg2);
  border: 1.5px solid var(--border2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: .85rem 3rem .85rem 1rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.apikey-input:focus { border-color: var(--green-forest); box-shadow: 0 0 0 3px var(--green-glow); }
.apikey-input::placeholder { color: var(--text-dim); }
.apikey-toggle {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; opacity: .45;
  transition: opacity var(--transition); color: var(--text-muted);
}
.apikey-toggle:hover { opacity: 1; }
.apikey-hint { font-size: .8rem; min-height: 1.1rem; margin-bottom: .4rem; color: var(--wrong); }
.apikey-hint.ok { color: var(--correct); }
.apikey-info { margin-top: 1rem; font-size: .78rem; color: var(--text-muted); }
.apikey-info a { color: var(--green-forest); text-decoration: none; }
.apikey-info a:hover { text-decoration: underline; }

/* ══════════════════ HERO ══════════════════ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-deco { position: absolute; inset: 0; pointer-events: none; }
.deco-circle { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .15; }
.c1 { width: 580px; height: 580px; background: var(--de-gold); top: -150px; right: -100px; }
.c2 { width: 340px; height: 340px; background: var(--green-forest); bottom: 30px; left: 30%; }
.c3 { width: 240px; height: 240px; background: var(--de-red); top: 40%; left: -80px; }

.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-flag-badge {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 500;
  padding: .38rem .95rem;
  border-radius: 99px;
  letter-spacing: .3px;
  margin-bottom: 1.8rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(80,60,30,0.07);
}
.hero-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 1.0;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 1.3rem;
}
.hero-title em { font-style: italic; color: var(--green-forest); }
.hero-sub { font-size: 1rem; color: var(--text-muted); margin-bottom: 2.5rem; line-height: 1.8; }
.hero-sub strong { color: var(--green-forest); font-weight: 600; }

.hero-features { display: flex; gap: 1rem; flex-wrap: wrap; }
.feat {
  background: rgba(255,255,255,.75);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
  backdrop-filter: blur(6px);
  user-select: none;
}
.feat:hover { border-color: rgba(45,106,79,.5); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(45,106,79,.13); background: rgba(255,255,255,.95); }
.feat:active { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(45,106,79,.18); }
.feat-icon { font-size: 1.5rem; }
.feat p { font-size: .85rem; color: var(--text); font-weight: 600; line-height: 1.2; }
.feat small { color: var(--text-muted); font-size: .74rem; }

/* ══════════════════ LOADING ══════════════════ */
.loading-section {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}
.loader-ring {
  width: 60px; height: 60px;
  border: 3px solid var(--border2);
  border-top-color: var(--green-forest);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-family: var(--font-head); font-size: 1.1rem; color: var(--text); }
.loader-sub { color: var(--text-muted); font-size: .85rem; }

/* ══════════════════ SESSION ══════════════════ */
.session-section { max-width: 680px; margin: 0 auto; padding-top: 2rem; }
.session-header { margin-bottom: 2rem; }
.session-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.session-badge {
  background: var(--green-dim);
  border: 1px solid rgba(45,106,79,.28);
  color: var(--green-forest);
  font-size: .73rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 99px;
  font-family: var(--font-head);
  letter-spacing: .5px;
}
.exam-badge {
  background: rgba(47,95,160,.08);
  border: 1px solid rgba(47,95,160,.25);
  color: var(--blue);
  font-size: .7rem;
  font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 99px;
  font-family: var(--font-head);
  letter-spacing: .4px;
}
.progress-text { font-size: .78rem; color: var(--text-muted); }
.progress-bar-wrap {
  height: 5px;
  background: var(--bg3);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-forest), var(--green-light));
  border-radius: 99px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  width: 0%;
}

/* Question card */
.question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow);
  animation: fadeUp .35s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.q-number {
  font-family: var(--font-head);
  font-size: .78rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: .8rem;
}
.q-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.42rem;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 1.8rem;
  letter-spacing: -.3px;
}
.q-text em { font-style: italic; color: var(--green-forest); }

.answers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.answer-btn {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 500;
  padding: .95rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition), background var(--transition), transform .12s;
  line-height: 1.4;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.answer-btn::before {
  content: attr(data-letter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border2);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .72rem;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.answer-btn:hover:not(:disabled) {
  border-color: rgba(45,106,79,.4);
  background: rgba(45,106,79,.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(45,106,79,.07);
}
.answer-btn.correct {
  border-color: var(--correct);
  background: rgba(45,106,79,.08);
  color: var(--correct);
}
.answer-btn.correct::before { background: var(--correct); color: #fff; border-color: var(--correct); }
.answer-btn.wrong {
  border-color: var(--wrong);
  background: rgba(192,57,43,.07);
  color: var(--wrong);
}
.answer-btn.wrong::before { background: var(--wrong); color: #fff; border-color: var(--wrong); }
.answer-btn:disabled { cursor: default; }

/* Explanation */
.explanation-box {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  animation: fadeUp .3s ease;
}
.explanation-inner {
  background: var(--bg2);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.2rem;
  font-size: .87rem;
  color: var(--text);
  margin-bottom: 1.1rem;
  line-height: 1.7;
}
.explanation-inner .expl-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .77rem;
  color: var(--gold);
  letter-spacing: .5px;
  display: block;
  margin-bottom: .4rem;
}
.explanation-inner.correct-expl { border-left-color: var(--correct); }
.explanation-inner.correct-expl .expl-label { color: var(--correct); }

.next-btn {
  background: linear-gradient(135deg, var(--green-forest), var(--green-light));
  color: #fff;
  border: none;
  padding: .72rem 1.9rem;
  border-radius: 99px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: opacity var(--transition), transform .15s, box-shadow var(--transition);
  box-shadow: 0 4px 14px var(--green-glow);
}
.next-btn:hover { opacity: .9; transform: translateY(-1px); }

.session-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}
.skip-btn {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text-muted);
  padding: .5rem 1.2rem;
  border-radius: 99px;
  font-size: .78rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.skip-btn:hover { color: var(--text); border-color: var(--border2); }
.live-score {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .88rem;
  color: var(--text-muted);
}

/* ══════════════════ PRÜFUNG (shared) ══════════════════ */
.pruefung-section { max-width: 980px; margin: 0 auto; padding-top: 2rem; }
.pruefung-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.pruefung-header-right { display: flex; align-items: center; gap: .7rem; }
.pruefung-progress { font-size: .78rem; color: var(--text-muted); }

.pruefung-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  animation: fadeUp .35s ease;
}
.text-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.9rem;
  box-shadow: var(--shadow);
}
.text-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-forest);
  margin-bottom: 1rem;
  letter-spacing: -.1px;
}
.story-body {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.9;
  max-height: 70vh;
  overflow-y: auto;
}
.story-body p { margin-bottom: .9rem; }
.story-body p:last-child { margin-bottom: 0; }
.story-body::-webkit-scrollbar { width: 4px; }
.story-body::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.questions-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.9rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 80vh;
}
.questions-panel::-webkit-scrollbar { width: 4px; }
.questions-panel::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.qp-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.pruef-q-item { margin-bottom: 1.2rem; }
.pruef-q-text { font-size: .87rem; font-weight: 500; color: var(--text); margin-bottom: .55rem; line-height: 1.5; }
.pruef-answers { display: flex; flex-direction: column; gap: .35rem; }
.pruef-ans-btn {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 500;
  padding: .52rem .9rem;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}
.pruef-ans-btn:hover:not(:disabled) { border-color: rgba(45,106,79,.35); color: var(--text); background: rgba(45,106,79,.05); }
.pruef-ans-btn.correct { border-color: var(--correct); background: rgba(45,106,79,.08); color: var(--correct); }
.pruef-ans-btn.wrong   { border-color: var(--wrong);   background: rgba(192,57,43,.07); color: var(--wrong); }
.pruef-ans-btn:disabled { cursor: default; }
.pruef-q-divider { border: none; border-top: 1px solid var(--border); margin: .9rem 0; }

/* ══════════════════ HÖREN ══════════════════ */
.hoeren-panel { display: flex; flex-direction: column; gap: 1rem; }

.situation-box {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  background: rgba(47,95,160,.06);
  border: 1px solid rgba(47,95,160,.2);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.situation-box svg { flex-shrink: 0; margin-top: 2px; stroke: var(--blue); }

.audio-player-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
}

/* Wave bars */
.audio-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 38px;
}
.audio-wave span {
  display: block;
  width: 4px;
  background: var(--green-forest);
  border-radius: 2px;
  opacity: .25;
  transform: scaleY(.3);
  transition: transform .3s, opacity .3s;
}
.audio-wave.playing span {
  opacity: 1;
  animation: waveAnim 1.1s ease-in-out infinite;
}
.audio-wave.playing span:nth-child(1)  { animation-delay:  0s;   height: 12px; }
.audio-wave.playing span:nth-child(2)  { animation-delay: .1s;   height: 26px; }
.audio-wave.playing span:nth-child(3)  { animation-delay: .2s;   height: 18px; }
.audio-wave.playing span:nth-child(4)  { animation-delay: .15s;  height: 34px; }
.audio-wave.playing span:nth-child(5)  { animation-delay: .3s;   height: 14px; }
.audio-wave.playing span:nth-child(6)  { animation-delay: .08s;  height: 30px; }
.audio-wave.playing span:nth-child(7)  { animation-delay: .22s;  height: 22px; }
.audio-wave.playing span:nth-child(8)  { animation-delay: .05s;  height: 38px; }
.audio-wave.playing span:nth-child(9)  { animation-delay: .18s;  height: 16px; }
.audio-wave.playing span:nth-child(10) { animation-delay: .35s;  height: 10px; }
@keyframes waveAnim {
  0%, 100% { transform: scaleY(1);   opacity: .7; }
  50%       { transform: scaleY(.35); opacity: 1;  }
}

/* Action buttons */
.hoeren-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  padding: .75rem 1.2rem;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.hoeren-action-btn.primary {
  background: linear-gradient(135deg, var(--green-forest), var(--green-light));
  color: #fff;
  box-shadow: 0 4px 18px var(--green-glow);
}
.hoeren-action-btn.primary:hover { opacity: .9; transform: translateY(-1px); }
.hoeren-action-btn.primary.playing {
  background: linear-gradient(135deg, var(--de-red), #e06a5a);
  box-shadow: 0 4px 18px rgba(192,57,43,.25);
}
.hoeren-action-btn.secondary {
  background: var(--card);
  border: 1.5px solid var(--border2);
  color: var(--text-muted);
}
.hoeren-action-btn.secondary:hover { color: var(--text); border-color: rgba(45,106,79,.4); }
.hoeren-action-btn.secondary.active {
  background: var(--green-dim);
  border-color: rgba(45,106,79,.35);
  color: var(--green-forest);
}

/* Transcript */
.transcript-box {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.1rem;
  animation: fadeUp .3s ease;
  max-height: 38vh;
  overflow-y: auto;
}
.transcript-box::-webkit-scrollbar { width: 4px; }
.transcript-box::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.transcript-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .73rem;
  color: var(--blue);
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: .85rem;
}
.transcript-body { font-size: .87rem; color: var(--text); line-height: 1.85; }
.transcript-line { margin-bottom: .6rem; display: flex; gap: .5rem; border-radius: 6px; padding: .15rem .4rem; transition: background .2s; }
.transcript-line.speaking { background: rgba(45,106,79,0.12); }
.speaker-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .8rem;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 70px;
}

/* Locked state */
.hoeren-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  border: 1.5px dashed var(--border2);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: var(--bg2);
}
.hoeren-locked svg { opacity: .35; stroke: var(--text-muted); }
.hoeren-locked p { font-size: .85rem; line-height: 1.6; }

/* ══════════════════ RESULTS ══════════════════ */
.results-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.results-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow);
  animation: fadeUp .4s ease;
}
.results-flag {
  display: flex;
  flex-direction: row;
  width: 62px; height: 40px;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto 1.2rem;
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}
.results-flag span:nth-child(1) { background: var(--de-black); flex: 1; }
.results-flag span:nth-child(2) { background: var(--de-red);   flex: 1; }
.results-flag span:nth-child(3) { background: var(--de-gold);  flex: 1; }
.results-emoji { font-size: 3.5rem; margin-bottom: .8rem; }
.results-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 2rem;
}
.results-stats { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.8rem; }
.r-stat { text-align: center; }
.r-stat span { font-family: var(--font-head); font-weight: 800; font-size: 2.2rem; color: var(--green-forest); display: block; }
.r-stat small { font-size: .73rem; color: var(--text-muted); }
.results-bar-wrap { height: 7px; background: var(--bg3); border-radius: 99px; overflow: hidden; margin-bottom: 1.5rem; }
.results-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-forest), var(--green-light));
  border-radius: 99px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
}
.results-msg { font-size: .93rem; color: var(--text-muted); margin-bottom: 2rem; line-height: 1.65; }
.results-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.results-actions .generate-btn { width: auto; padding: .8rem 1.8rem; }
.back-btn {
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  padding: .8rem 1.8rem;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  cursor: pointer;
  font-size: .88rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.back-btn:hover { color: var(--text); border-color: var(--border2); background: var(--bg3); }

/* ══════════════════ RESPONSIVE ══════════════════ */
@media (max-width: 960px) {
  .pruefung-card { grid-template-columns: 1fr; }
  .story-body { max-height: 260px; }
  .questions-panel { max-height: none; }
}
@media (max-width: 768px) {
  .panel { transform: translateX(-100%); }
  .panel.open { transform: translateX(0); box-shadow: 6px 0 40px rgba(80,60,30,.15); }
  .hamburger { display: flex; }
  .main { margin-left: 0; padding: 1.2rem 1rem 3rem; }
  .answers-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.8rem; letter-spacing: -1.5px; }
  .hero-features { flex-direction: column; }
}

/* ══════════════════ SCROLLBAR ══════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120,100,70,.35); }

/* ══════════════════ SELECTION & FOCUS ══════════════════ */
::selection { background: rgba(45,106,79,.25); color: var(--text); }
button:focus-visible { outline: 2px solid var(--green-forest); outline-offset: 2px; }

/* ══════════════════ NEW v5 ADDITIONS ══════════════════ */

/* Quiz type chips — scrollable when many */
.quiz-type-chips {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}
.quiz-type-chips::-webkit-scrollbar { width: 3px; }
.quiz-type-chips::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* Exam structure info box */
.exam-structure-info {
  margin-top: .7rem;
  font-size: .78rem;
  color: var(--green-forest);
  background: var(--green-dim);
  border: 1px solid var(--green-glow);
  border-radius: 8px;
  padding: .5rem .8rem;
  line-height: 1.5;
  font-weight: 500;
}

/* Mode buttons — 4 now */
.mode-btn {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .62rem .9rem;
  border-radius: 10px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .83rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  margin-bottom: .4rem;
}
.mode-btn:hover { border-color: rgba(45,106,79,.3); color: var(--text); background: rgba(45,106,79,.04); }
.mode-btn.active { background: var(--green-dim); border-color: rgba(45,106,79,.5); color: var(--green-forest); }
.mode-svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Schreiben / Sprechen section layout */
#schreibenSection,
#sprechenSection {
  max-width: 860px;
  margin: 0 auto;
  padding-top: 2rem;
}

/* Textarea focus ring */
textarea:focus {
  outline: none;
  border-color: var(--green-forest) !important;
  box-shadow: 0 0 0 3px var(--green-glow);
}

/* Sprechen feedback model answer styling */
.model-answer-box {
  background: var(--bg2);
  border-radius: 10px;
  padding: .9rem 1.1rem;
  font-size: .87rem;
  line-height: 1.75;
  color: var(--text);
  font-style: italic;
}

/* Schreiben error cards */
.error-card {
  background: rgba(192,57,43,.05);
  border: 1px solid rgba(192,57,43,.15);
  border-radius: 9px;
  padding: .7rem 1rem;
  margin-bottom: .5rem;
  font-size: .84rem;
}

/* rf-expl inline explanation */
.rf-expl {
  font-size:.81rem;
  color:var(--text-muted);
  margin-top:.5rem;
  padding:.5rem .8rem;
  background:var(--bg2);
  border-radius:8px;
  animation: fadeUp .25s ease;
}

/* ══════════════════ LANGUAGE SWITCHER ══════════════════ */
.lang-switcher {
  display: flex;
  gap: .3rem;
  margin-bottom: .5rem;
}
.lang-btn {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  padding: .35rem .2rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.lang-btn:hover { color: var(--text); border-color: var(--border2); }
.lang-btn.active {
  background: var(--green-dim);
  border-color: rgba(45,106,79,.4);
  color: var(--green-forest);
}

/* Arabic RTL support */
body.lang-ar { direction: ltr; }
body.lang-ar .gram-detail-card { direction: rtl; text-align: right; }
body.lang-ar .gram-card-topic { direction: rtl; text-align: right; }
body.lang-ar .gram-card-expl { direction: rtl; text-align: right; }
body.lang-ar .explanation-inner { direction: rtl; text-align: right; }
body.lang-ar .gram-rule-row { flex-direction: row-reverse; }

/* ══════════════════ GRAMMATIK-REFERENZ ══════════════════ */
.grammatik-section {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 1rem;
  animation: fadeUp .35s ease;
}
.gram-header { margin-bottom: 1.8rem; }
.gram-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.gram-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.9rem;
  color: var(--text);
  letter-spacing: -.5px;
  margin-bottom: .3rem;
}
.gram-sub { font-size: .87rem; color: var(--text-muted); }
.gram-level-tabs {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.gram-lvl-tab {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .8rem;
  padding: .42rem .9rem;
  border-radius: 9px;
  cursor: pointer;
  transition: all var(--transition);
}
.gram-lvl-tab:hover { color: var(--text); border-color: var(--border2); }
.gram-lvl-tab.active {
  background: var(--green-forest);
  border-color: var(--green-forest);
  color: #fff;
}

/* Grammar card grid */
.gram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.gram-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.gram-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--green-forest);
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity var(--transition);
}
.gram-card:hover { border-color: rgba(45,106,79,.35); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.gram-card:hover::before { opacity: 1; }
.gram-card-icon { font-size: 1.6rem; margin-bottom: .6rem; }
.gram-card-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: .35rem;
}
.gram-card-topic {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gram-card-badge {
  display: inline-block;
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border-radius: 99px;
  margin-bottom: .5rem;
  background: var(--green-dim);
  color: var(--green-forest);
  border: 1px solid rgba(45,106,79,.2);
}

/* Grammar detail overlay */
.gram-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,24,16,0.55);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.gram-detail-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2.4rem;
  max-width: 660px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  position: relative;
  animation: fadeUp .3s ease;
}
.gram-close-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--bg2);
  border: 1px solid var(--border2);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text-muted);
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.gram-close-btn:hover { color: var(--text); border-color: var(--border2); }

.gram-detail-level-badge {
  display: inline-block;
  background: var(--green-forest);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .8px;
  padding: .22rem .8rem;
  border-radius: 99px;
  margin-bottom: .8rem;
}
.gram-detail-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: .4rem;
}
.gram-detail-icon { font-size: 2rem; margin-bottom: .6rem; }
.gram-detail-desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

/* Translation label */
.gram-translation-box {
  background: rgba(47,95,160,.07);
  border: 1px solid rgba(47,95,160,.18);
  border-radius: 10px;
  padding: .7rem 1rem;
  margin-bottom: 1.2rem;
  font-size: .84rem;
  color: var(--blue);
  line-height: 1.65;
}
.gram-translation-label {
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: .35rem;
  opacity: .7;
}

/* Rule rows */
.gram-rules-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .85rem;
  color: var(--text);
  letter-spacing: .4px;
  margin-bottom: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: .72rem;
  color: var(--text-dim);
}
.gram-rule-row {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-bottom: .6rem;
  font-size: .85rem;
  line-height: 1.6;
}
.gram-rule-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-forest);
  flex-shrink: 0;
  margin-top: .45rem;
}
.gram-rule-text { color: var(--text); }
.gram-rule-text strong { color: var(--green-forest); }

/* Example block */
.gram-example-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--de-gold);
  border-radius: 9px;
  padding: .85rem 1.1rem;
  margin-top: 1.1rem;
  font-size: .86rem;
}
.gram-example-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}
.gram-example-de {
  font-family: var(--font-head);
  font-style: italic;
  color: var(--text);
  margin-bottom: .18rem;
}
.gram-example-tr { color: var(--text-muted); font-size: .82rem; }

/* Practice button */
.gram-practice-btn {
  width: 100%;
  margin-top: 1.5rem;
  padding: .8rem;
  background: linear-gradient(135deg, var(--green-forest), var(--green-light));
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--green-glow);
  transition: all var(--transition);
}
.gram-practice-btn:hover { opacity: .92; transform: translateY(-1px); }

@media (max-width: 768px) {
  .gram-grid { grid-template-columns: 1fr 1fr; }
  .gram-header-top { flex-direction: column; }
  .gram-level-tabs { justify-content: flex-start; }
  .gram-detail-card { padding: 1.5rem 1.2rem; }
}
@media (max-width: 480px) {
  .gram-grid { grid-template-columns: 1fr; }
}

/* ══════════════════ FLOATING LANG SWITCHER ══════════════════ */
.lang-float-wrap {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 300;
}
.lang-float-toggle {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--border2);
  cursor: pointer;
  font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.lang-float-toggle:hover { transform: scale(1.07); box-shadow: 0 6px 20px rgba(80,60,30,0.18); }
.lang-float-menu {
  display: none;
  flex-direction: column;
  gap: .3rem;
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: .5rem;
  box-shadow: var(--shadow);
  min-width: 140px;
  animation: fadeDown .18s ease;
}
.lang-float-menu.open { display: flex; }
.lang-float-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 500;
  padding: .55rem .8rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  white-space: nowrap;
}
.lang-float-btn:hover { background: var(--bg2); color: var(--text); }
.lang-float-btn.active { background: var(--green-dim); color: var(--green-forest); font-weight: 700; }

/* ══════════════════ BACKGROUND DECORATION ══════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 700px 500px at 80% 10%, rgba(201,146,10,0.055) 0%, transparent 70%),
    radial-gradient(ellipse 600px 500px at 10% 85%, rgba(45,106,79,0.055) 0%, transparent 70%),
    radial-gradient(ellipse 400px 350px at 60% 70%, rgba(192,57,43,0.03) 0%, transparent 60%);
}

/* Subtle grid pattern overlay */
.main::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.018;
  background-image:
    linear-gradient(rgba(28,28,30,.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,28,30,.8) 1px, transparent 1px);
  background-size: 60px 60px;
}

.main > * { position: relative; z-index: 1; }

/* ══════════════════ GRAMMAR TTS BUTTON ══════════════════ */
.gram-tts-btn {
  position: absolute;
  top: .9rem; right: .9rem;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--green-forest);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: all var(--transition);
  opacity: .7;
}
.gram-tts-btn:hover { opacity: 1; background: var(--green-dim); border-color: rgba(45,106,79,.4); transform: scale(1.1); }
.gram-tts-btn.speaking { background: var(--green-dim); opacity: 1; animation: pulse-tts 1s ease-in-out infinite; }
@keyframes pulse-tts { 0%,100% { box-shadow: 0 0 0 0 var(--green-glow); } 50% { box-shadow: 0 0 0 5px transparent; } }

.gram-detail-tts-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--green-dim);
  border: 1px solid var(--green-glow);
  color: var(--green-forest);
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  padding: .38rem .8rem;
  border-radius: 20px;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: all var(--transition);
}
.gram-detail-tts-btn:hover { background: var(--green-forest); color: #fff; }
.gram-detail-tts-btn.speaking { background: var(--green-forest); color: #fff; }

/* ══════════════════ IMPROVED MOBILE ══════════════════ */
@media (max-width: 768px) {
  .main { padding: 1.2rem 1rem 3rem; }
  .hero-title { font-size: clamp(2.4rem, 9vw, 3.5rem); }
  .hero-features { gap: .7rem; }
  .feat { padding: .75rem 1rem; }
  .session-section { padding-top: 4.5rem; }
  .lang-float-wrap { top: .75rem; right: .75rem; }
  .lang-float-toggle { width: 40px; height: 40px; font-size: 1.2rem; }
  .results-card { padding: 2rem 1.2rem; }
}

@media (max-width: 480px) {
  .main { padding: 1rem .75rem 3rem; }
  .hero-content { padding-top: 4rem; }
  .hero-sub { font-size: .9rem; }
  .question-card { padding: 1.4rem 1.1rem; }
  .gram-detail-card { padding: 1.2rem 1rem; }
  .pruefung-section,
  #schreibenSection,
  #sprechenSection { padding: 3.5rem .5rem 2rem; }
  .lang-float-wrap { top: .5rem; right: .5rem; }
}

/* ── Quiz Type Dropdown ─────────────────────────────── */
.quiz-type-dropdown-wrap {
  position: relative;
  width: 100%;
  margin-top: .3rem;
}

.quiz-type-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .9rem;
  background: var(--card);
  border: 1.5px solid var(--border2);
  border-radius: 10px;
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  font-family: inherit;
}

.quiz-type-dropdown-btn:hover,
.quiz-type-dropdown-btn.open {
  border-color: var(--green-forest);
  background: var(--bg2);
}

.quiz-type-dropdown-btn svg {
  flex-shrink: 0;
  transition: transform .2s;
}

.quiz-type-dropdown-btn.open svg {
  transform: rotate(180deg);
}

.quiz-type-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1.5px solid var(--border2);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 999;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.quiz-type-dropdown-menu.open {
  display: block;
}

.qtd-item {
  display: block;
  width: 100%;
  padding: .6rem 1rem;
  background: none;
  border: none;
  text-align: left;
  color: var(--text);
  font-size: .84rem;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}

.qtd-item:hover {
  background: var(--bg2);
}

.qtd-item.active {
  background: rgba(74,124,89,.15);
  color: var(--green-forest);
  font-weight: 700;
}

/* ── AI Provider & Model Selector ────────────────────── */
.apikey-card-wide {
  max-width: 560px;
  width: 100%;
}

.provider-tabs-label,
.model-grid-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.1rem 0 .5rem;
  text-align: left;
  width: 100%;
}

.provider-tabs {
  display: flex;
  gap: .5rem;
  width: 100%;
  margin-bottom: .2rem;
}

.provider-tab {
  flex: 1;
  padding: .55rem .4rem;
  border: 1.5px solid var(--border2);
  border-radius: 10px;
  background: var(--bg2);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s;
  text-align: center;
}

.provider-tab:hover {
  border-color: var(--green-forest);
  color: var(--text);
}

.provider-tab.active {
  background: rgba(74,124,89,.15);
  border-color: var(--green-forest);
  color: var(--green-forest);
}

.model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  width: 100%;
}

.model-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  padding: .65rem .8rem;
  border: 1.5px solid var(--border2);
  border-radius: 10px;
  background: var(--bg2);
  cursor: pointer;
  transition: all .18s;
  text-align: left;
  font-family: inherit;
}

.model-card:hover {
  border-color: var(--green-forest);
  background: rgba(74,124,89,.08);
}

.model-card.active {
  border-color: var(--green-forest);
  background: rgba(74,124,89,.16);
}

.model-tier-badge {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 5px;
}

.model-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.model-desc {
  font-size: .73rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.apikey-links-row {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: .9rem;
  font-size: .75rem;
}

.apikey-links-row a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}

.apikey-links-row a:hover {
  color: var(--green-forest);
}

/* Model badge in panel footer */
.footer-model-row {
  display: flex;
  justify-content: center;
  margin: .3rem 0;
}

.model-active-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: .22rem .7rem;
  border-radius: 20px;
  background: rgba(74,124,89,.15);
  color: var(--green-forest);
  border: 1px solid rgba(74,124,89,.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

/* ── Dual API Key Blocks ─────────────────────────────── */
.dual-key-block {
  width: 100%;
  margin-top: 1rem;
  border: 1.5px solid var(--border2);
  border-radius: 12px;
  padding: .8rem 1rem;
  background: var(--bg2);
}

.dual-key-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .6rem;
  flex-wrap: wrap;
}

.dual-key-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.dual-key-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.dual-key-label small {
  font-weight: 400;
  color: var(--text-muted);
}

.dual-key-link {
  font-size: .72rem;
  font-weight: 600;
  color: var(--green-forest);
  text-decoration: none;
  padding: .2rem .55rem;
  border: 1px solid var(--green-forest);
  border-radius: 6px;
  transition: all .15s;
  white-space: nowrap;
}

.dual-key-link:hover {
  background: var(--green-forest);
  color: #fff;
}

.dual-key-block .apikey-input-wrap {
  margin-top: 0;
}

/* Gemini badge in footer */
.gemini-badge {
  background: rgba(59,130,246,.12) !important;
  color: #3b82f6 !important;
  border-color: rgba(59,130,246,.25) !important;
}

.footer-model-row {
  display: flex;
  justify-content: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin: .3rem 0;
}

/* ── Grammar Section Wrapper ───────────────────────── */
.gram-referenz-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
.gram-detail-panel {
  background: var(--card);
  border-radius: 18px;
  padding: 1.8rem 1.5rem;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.gram-detail-close {
  position: sticky;
  top: 0;
  left: 100%;
  float: right;
  margin-bottom: -2.5rem;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.gram-detail-close:hover { background: var(--wrong); color: #fff; }

/* ══════════════════ WÖRTERBUCH ══════════════════ */
.wb-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  width: 100%;
}
.wb-header {
  margin-bottom: 1.5rem;
}
.wb-title {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .3rem;
}
.wb-sub {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}
/* Tabs */
.wb-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.wb-tab {
  padding: .48rem 1.1rem;
  border-radius: 20px;
  border: 1.5px solid var(--border2);
  background: var(--bg2);
  color: var(--text-muted);
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
}
.wb-tab:hover { border-color: var(--green-forest); color: var(--text); background: var(--bg3); }
.wb-tab.active {
  background: var(--green-dim);
  border-color: var(--green-forest);
  color: var(--green-forest);
}
/* Search */
.wb-search-wrap {
  display: flex;
  gap: .5rem;
  margin-bottom: .8rem;
}
.wb-search {
  flex: 1;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border2);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.wb-search:focus { border-color: var(--green-forest); }
.wb-search-btn {
  padding: .65rem 1rem;
  background: linear-gradient(135deg, var(--green-forest), var(--green-light));
  border: none;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center;
  transition: opacity .2s;
}
.wb-search-btn:hover { opacity: .88; }

/* Quick pills */
.wb-quick-pills {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.wb-pill {
  padding: .3rem .75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .78rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.wb-pill:hover { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }

/* Result area */
.wb-result-area { min-height: 300px; }
.wb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: .9rem;
}
.wb-placeholder-icon { font-size: 3rem; }

/* Loading */
.wb-loading {
  display: flex; align-items: center; justify-content: center; gap: .8rem;
  padding: 3rem;
  color: var(--text-muted);
  font-size: .9rem;
}
.wb-spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--border2);
  border-top-color: var(--green-forest);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Result card */
.wb-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: fadeDown .25s ease;
}

/* Card hero */
.wb-card-hero {
  padding: 1.4rem 1.6rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.wb-word-main { flex: 1; }
.wb-word-de {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -.5px;
}
.wb-word-type-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .65rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-left: .6rem;
  vertical-align: middle;
}
.wb-badge-verb { background: rgba(47,95,160,.12); color: var(--blue); border: 1px solid rgba(47,95,160,.25); }
.wb-badge-nomen { background: var(--green-dim); color: var(--green-forest); border: 1px solid var(--green-glow); }
.wb-badge-adj { background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold-glow); }

.wb-word-ar {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: .3rem;
  font-weight: 500;
}
.wb-word-en {
  font-size: .87rem;
  color: var(--text-dim);
  margin-top: .15rem;
}
.wb-speak-btn {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: .5rem .75rem;
  cursor: pointer;
  color: var(--green-forest);
  font-size: 1.1rem;
  transition: background .15s;
  flex-shrink: 0;
}
.wb-speak-btn:hover { background: var(--green-dim); }

/* Artikel badge (for Nomen) */
.wb-artikel-row {
  display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap;
}
.wb-artikel-badge {
  padding: .3rem .9rem;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: .95rem;
}
.wb-artikel-der { background: rgba(47,95,160,.12); color: var(--blue); border: 1px solid rgba(47,95,160,.28); }
.wb-artikel-die { background: rgba(192,57,43,.1); color: var(--de-red); border: 1px solid rgba(192,57,43,.28); }
.wb-artikel-das { background: var(--green-dim); color: var(--green-forest); border: 1px solid var(--green-glow); }
.wb-plural-tag {
  padding: .3rem .9rem;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Card sections */
.wb-sections { display: flex; flex-direction: column; }

.wb-section {
  padding: 1rem 1.6rem;
  border-bottom: 1px solid var(--border);
}
.wb-section:last-child { border-bottom: none; }
.wb-section-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .8rem;
}

/* Konjugation table */
.wb-konj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .87rem;
}
.wb-konj-table th {
  background: var(--bg2);
  padding: .45rem .7rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 2px solid var(--border2);
}
.wb-konj-table td {
  padding: .42rem .7rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.wb-konj-table tr:last-child td { border-bottom: none; }
.wb-konj-table td:first-child { color: var(--text-muted); font-weight: 500; width: 30%; }
.wb-konj-table td.wb-form { font-weight: 700; color: var(--green-forest); }
.wb-konj-table td.wb-form2 { font-weight: 700; color: var(--blue); }
.wb-konj-table td.wb-form3 { font-weight: 700; color: var(--gold); }

/* Tenses row tabs */
.wb-tense-tabs {
  display: flex; gap: .35rem; margin-bottom: .85rem; flex-wrap: wrap;
}
.wb-tense-tab {
  padding: .28rem .75rem;
  border-radius: 20px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-muted);
  transition: all .15s;
}
.wb-tense-tab:hover { border-color: var(--green-forest); color: var(--green-forest); }
.wb-tense-tab.active { background: var(--green-dim); border-color: var(--green-forest); color: var(--green-forest); }

/* Kasus table */
.wb-kasus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .6rem;
}
.wb-kasus-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem .85rem;
}
.wb-kasus-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .3rem;
}
.wb-kasus-val {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.wb-kasus-hint {
  font-size: .73rem;
  color: var(--text-muted);
  margin-top: .1rem;
}
.wb-kasus-card.wb-kasus-nom { border-left: 3px solid var(--green-forest); }
.wb-kasus-card.wb-kasus-akk { border-left: 3px solid var(--blue); }
.wb-kasus-card.wb-kasus-dat { border-left: 3px solid var(--gold); }
.wb-kasus-card.wb-kasus-gen { border-left: 3px solid var(--de-red); }

/* Examples */
.wb-examples { display: flex; flex-direction: column; gap: .55rem; }
.wb-example-item {
  background: var(--bg2);
  border-left: 3px solid var(--green-forest);
  border-radius: 0 8px 8px 0;
  padding: .55rem .9rem;
}
.wb-example-de { font-weight: 600; color: var(--text); font-size: .88rem; }
.wb-example-ar { font-size: .82rem; color: var(--text-muted); margin-top: .15rem; }

/* Adj dekl table */
.wb-adj-section { margin-top: .5rem; }

/* Error card */
.wb-error {
  background: rgba(192,57,43,.08);
  border: 1px solid rgba(192,57,43,.25);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  color: var(--de-red);
  font-size: .9rem;
  text-align: center;
}

@media (max-width: 600px) {
  .wb-word-de { font-size: 1.5rem; }
  .wb-section { padding: .9rem 1rem; }
  .wb-card-hero { padding: 1rem; }
  .wb-kasus-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Wrong Type / Not Found Cards ── */
.wb-wrongtype-card,
.wb-error-card {
  background: var(--card);
  border: 1.5px solid var(--border2);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  animation: fadeDown .25s ease;
}
.wb-wrongtype-card {
  border-color: rgba(201,146,10,.35);
  background: rgba(201,146,10,.04);
}
.wb-wt-icon,
.wb-error-icon {
  font-size: 2.8rem;
  line-height: 1;
}
.wb-wt-title,
.wb-error-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.wb-wt-trans {
  font-size: .92rem;
  color: var(--text-muted);
  direction: ltr;
}
.wb-wt-hint,
.wb-error-msg {
  font-size: .88rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.6;
}
.wb-wt-switch-btn {
  margin-top: .5rem;
  padding: .65rem 1.6rem;
  background: linear-gradient(135deg, var(--green-forest), var(--green-light));
  border: none;
  border-radius: 20px;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 16px var(--green-glow);
}
.wb-wt-switch-btn:hover { opacity: .88; transform: translateY(-1px); }
