:root {
  --black: #000000;
  --red: #DD0000;
  --gold: #FFCC00;
  --gold-2: #e6b800;
  --bg: #070707;
  --bg-2: #111111;
  --panel: rgba(18, 18, 18, 0.92);
  --line: rgba(255, 204, 0, 0.14);
  --text: #f6f6f6;
  --muted: #b8b0a4;
  --green: #FFCC00;
  --green-2: #e6b800;
  --orange: #FFCC00;
  --blue: #DD0000;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
.de-flag {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 6px;
}
.de-flag i:nth-child(1) { background: #000; }
.de-flag i:nth-child(2) { background: #DD0000; }
.de-flag i:nth-child(3) { background: #FFCC00; }
body {
  font-family: "Cairo", "Outfit", sans-serif;
  background: #050505;
  color: var(--text);
}

/* App shell: blurred photo or gradient per section */
.app-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background: transparent;
}
.de-flag { position: relative; z-index: 2; }
.app-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.app-bg-photo {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  /* Lighter blur: full-viewport blur(16px) was a major paint cost on mobile. */
  filter: blur(8px) saturate(1.25) brightness(0.94) contrast(1.04);
  transform: translateZ(0) scale(1.04);
  transform-origin: center center;
  will-change: auto;
  contain: paint;
}
.app-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.68) 100%),
    radial-gradient(900px 420px at 85% -5%, rgba(221, 0, 0, 0.18), transparent 55%),
    radial-gradient(760px 380px at 5% 15%, rgba(255, 204, 0, 0.14), transparent 50%);
}
.app-shell-inner {
  position: relative;
  z-index: 1;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-shell {
  --muted-on-bg: #ece8e0;
  --muted-in-panel: #b8b0a4;
}

/* Per-page background: always blurred photo + tint */
.app-bg-dashboard .app-bg-photo { object-position: center 40%; }
.app-bg-dashboard .app-bg-overlay {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.66) 100%),
    radial-gradient(1000px 500px at 50% 8%, rgba(255, 204, 0, 0.18), transparent 62%);
}
.app-bg-lesen .app-bg-photo { object-position: 22% 45%; filter: blur(8px) saturate(1.2) brightness(0.92) hue-rotate(-6deg); }
.app-bg-lesen .app-bg-overlay {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.68) 100%),
    radial-gradient(800px 400px at 15% 28%, rgba(221, 0, 0, 0.2), transparent 62%);
}
.app-bg-hoeren .app-bg-photo { object-position: 55% 38%; filter: blur(8px) saturate(1.25) brightness(0.9) hue-rotate(10deg); }
.app-bg-hoeren .app-bg-overlay {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.68) 100%),
    radial-gradient(900px 460px at 72% 18%, rgba(255, 204, 0, 0.2), transparent 58%);
}
.app-bg-schreiben .app-bg-photo { object-position: 78% 52%; filter: blur(8px) saturate(1.15) brightness(0.9) hue-rotate(14deg); }
.app-bg-schreiben .app-bg-overlay {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.68) 100%),
    radial-gradient(820px 420px at 85% 35%, rgba(255, 204, 0, 0.18), transparent 58%);
}
.app-bg-mundlich .app-bg-photo { object-position: 35% 30%; filter: blur(8px) saturate(1.1) brightness(0.88) hue-rotate(-12deg); }
.app-bg-mundlich .app-bg-overlay {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.7) 100%),
    radial-gradient(860px 440px at 28% 22%, rgba(221, 0, 0, 0.18), transparent 60%);
}
.app-bg-notebook .app-bg-photo { object-position: center 45%; filter: blur(8px) saturate(1.2) brightness(0.88); }
.app-bg-notebook .app-bg-overlay,
.app-bg-notifications .app-bg-overlay {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.68) 100%),
    radial-gradient(760px 380px at 50% 25%, rgba(255, 204, 0, 0.16), transparent 62%);
}
.app-bg-notifications .app-bg-photo { object-position: 62% 40%; }
.app-bg-default .app-bg-photo { object-position: center 50%; }
.app-bg-default .app-bg-overlay {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.68) 100%),
    radial-gradient(800px 400px at 50% 20%, rgba(255, 204, 0, 0.14), transparent 60%);
}
a { color: var(--green); text-decoration: none; }
h1, h2, h3 { font-family: "Outfit", "Cairo", sans-serif; margin: 0 0 0.4em; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.92);
  direction: ltr;
  overflow: visible;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "toggle logo actions";
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 48px);
  direction: ltr;
  overflow: visible;
}

@media (min-width: 901px) {
  .app-shell .app-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo nav actions";
    align-items: center;
    column-gap: 16px;
    padding: 14px clamp(16px, 3vw, 48px);
    position: sticky;
    top: 0;
    z-index: 120;
    overflow: visible;
  }
  .app-shell .topbar {
    display: contents;
    padding: 0;
  }
  .app-shell .topbar .logo {
    grid-area: logo;
    justify-self: start;
  }
  .app-shell .nav-end {
    grid-area: actions;
    justify-self: end;
  }
  .app-shell .main-nav {
    grid-area: nav;
    position: static;
    left: auto;
    transform: none;
    z-index: 1;
    pointer-events: auto;
    justify-self: start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-width: 0;
    max-width: 100%;
  }
}

/* Mid desktop: keep progress ring only so it never collides with Notebook */
@media (min-width: 901px) and (max-width: 1180px) {
  .nav-progress-copy { display: none; }
  .nav-progress {
    padding: 3px;
    border-radius: 999px;
  }
  .nav-site-link { display: none; }
}
.logo {
  justify-self: start;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  font-size: 22px;
}
.logo-b2 { color: var(--green); }
.logo-b1 {
  color: var(--red);
  margin-inline-start: 0.02em;
}
.nav-actions, .hero-actions { display: flex; gap: 10px; justify-content: center; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  font: inherit;
  cursor: pointer;
  color: #fff;
}
.btn.primary { background: linear-gradient(180deg, #ffe14d, var(--gold)); color: #111; font-weight: 800; }
.btn.ghost { background: rgba(255,255,255,0.06); border: 1px solid var(--line); }
.btn.wide { width: 100%; }
.landing-top .nav-actions { margin-inline-start: auto; }
.main-nav { direction: ltr; justify-self: center; }
.main-nav-head,
.nav-drawer-link {
  direction: rtl;
  text-align: start;
  unicode-bidi: plaintext;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  justify-self: start;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 99px;
  background: #fff;
  transition: transform 0.2s, opacity 0.2s;
}
body.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}
.main-nav-head,
.nav-drawer-link { display: none; }
.nav-end { direction: ltr; justify-self: end; margin-left: 0; margin-inline-start: 0; }

.hero {
  text-align: center;
  padding: 72px 20px 48px;
  max-width: 820px;
  margin: 0 auto;
}
.pills, .meta-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pill, .offer, .chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}
.offer { display: inline-block; margin: 16px 0; color: #d7ffe8; }
.hero h1 { font-size: clamp(48px, 8vw, 84px); font-weight: 800; }
.hero h1 em { color: var(--green); font-style: normal; }
.lead { color: var(--muted); line-height: 1.9; font-size: 18px; }
.stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
  direction: ltr;
}
.stats strong { display: block; font-size: 32px; }
.stats span { color: var(--muted); font-size: 13px; }

.skills-preview, .how, .pricing, .faq { max-width: 1040px; margin: 0 auto; padding: 24px 20px 56px; }
.sub { color: var(--muted); }
.skill-grid, .plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.skill-grid article, .plan-grid article, .skill-card, .auth-card, .player, .mundlich-card {
  background: rgba(18, 18, 18, 0.88);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
}
.plan-grid .featured { outline: 1px solid var(--green); }
.price { font-size: 32px; color: var(--green); font-weight: 800; }
.how ol { line-height: 2; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 8px 0; }
.site-foot { text-align: center; color: var(--muted); padding: 40px 0 60px; }

.site-footer {
  padding: 28px 20px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.site-footer-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.site-footer-brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}

.site-footer-links a {
  color: #d7e2f2;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.site-footer-links a:hover { color: var(--gold); }

.site-footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  unicode-bidi: isolate;
}

@media (min-width: 720px) {
  .site-footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: start;
  }

  .site-footer-brand,
  .site-footer-copy { flex: 1; }

  .site-footer-links {
    flex: 1;
    justify-content: center;
  }

  .site-footer-copy { text-align: end; }
}

.auth-page .auth-card { max-width: 440px; margin: 80px auto; }
.auth-card form, .write-form, .quiz, .note-form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}
.hint { color: var(--muted); font-size: 13px; }
.alert, .error { color: #ff8d8d; }

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.main-nav a.is-active { background: rgba(221, 0, 0, 0.92); color: #fff; }
.main-nav .notebook { color: var(--gold); }
.nav-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(255, 204, 0, 0.08);
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.nav-progress:hover {
  color: #fff;
  background: rgba(255, 204, 0, 0.16);
  border-color: rgba(255, 204, 0, 0.55);
}
.nav-progress.is-active {
  background: rgba(221, 0, 0, 0.92);
  border-color: rgba(255, 204, 0, 0.45);
  color: #fff;
}
.nav-progress-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(farthest-side, rgba(18, 18, 18, 0.96) 64%, transparent 66%),
    conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, 0.12) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 204, 0, 0.2);
}
.nav-progress-ring strong {
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.nav-progress-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
  min-width: 0;
}
.nav-progress-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
}
.nav-progress.is-active .nav-progress-title { color: #fff; }
.nav-progress-meta {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.55);
}
.nav-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  direction: ltr;
  overflow: visible;
  flex-shrink: 0;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.nav-site-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: start;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav-site-link:hover {
  color: var(--gold);
  border-color: rgba(255, 204, 0, 0.35);
  background: rgba(255, 204, 0, 0.06);
}
.icon-btn { position: relative; font-size: 20px; line-height: 1; padding: 6px; }
.bell-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}
.bell-access-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 92px;
  text-align: center;
}
.bell-access-date {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 204, 0, 0.9);
  line-height: 1.15;
  white-space: nowrap;
}
.bell-access-countdown {
  font-size: 9px;
  font-weight: 800;
  color: #ffdf70;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}
.bell-btn { filter: saturate(1.2); }
.bell-btn.bell-landed {
  animation: bell-land-pulse 0.9s ease-out;
}
@keyframes bell-land-pulse {
  0% { transform: scale(1); filter: saturate(1.2); }
  35% { transform: scale(1.22); filter: saturate(1.6) drop-shadow(0 0 8px rgba(255, 204, 0, 0.55)); }
  100% { transform: scale(1); filter: saturate(1.2); }
}
.bell-btn.is-active {
  background: rgba(221, 0, 0, 0.18);
  border-radius: 999px;
  outline: 1px solid rgba(221, 0, 0, 0.45);
}
.icon-btn i {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  background: #e24b4b;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  line-height: 1.3;
  border: 2px solid rgba(8, 8, 8, 0.85);
}
.bell-btn.has-unread i {
  animation: bell-dot-pulse 1.4s ease-in-out infinite;
}
@keyframes bell-dot-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(226, 75, 75, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(226, 75, 75, 0.15); }
}
.access-grant-toast {
  position: fixed;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(12, 12, 12, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  max-width: min(92vw, 420px);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    top 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.55s ease,
    width 0.7s ease;
  will-change: top, left, transform, opacity;
}
.access-grant-toast[hidden] {
  display: none !important;
}
.access-grant-toast.is-flying {
  pointer-events: none;
}
.access-grant-toast-bell {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.access-grant-toast-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}
.access-grant-toast-body strong {
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
}
.access-grant-toast-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}
.access-grant-toast-countdown {
  font-size: 13px;
  font-weight: 800;
  color: #ffdf70;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  white-space: nowrap;
}
.notifications-panel {
  cursor: pointer;
}
.notifications-panel:focus-visible {
  outline: 2px solid rgba(255, 204, 0, 0.45);
  outline-offset: 4px;
  border-radius: 18px;
}
@media (max-width: 720px) {
  .bell-access-countdown {
    display: none;
  }
  .bell-access-date {
    font-size: 8px;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .access-grant-toast {
    top: 64px;
    padding: 8px 12px;
  }
}
.notification-list .notification-card {
  display: grid;
  gap: 8px;
}
.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.notification-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 204, 0, 0.14);
  border: 1px solid rgba(255, 204, 0, 0.28);
  color: #ffdf70;
  font-size: 11px;
  font-weight: 800;
}
.notification-body {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}
.notification-expiry {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}
.notification-countdown {
  margin: 0;
  font-size: 22px;
}
.notification-item.is-expired .notification-countdown {
  color: #ff8a8a;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); color: #111;
  display: inline-grid; place-items: center; font-weight: 800;
  font-size: 15px; flex-shrink: 0;
}
.user-menu {
  position: relative;
  direction: rtl;
}
.user-menu-trigger {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: 2px solid rgba(255, 204, 0, 0.28);
  border-radius: 50%;
  padding: 2px;
  color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.user-menu-trigger:hover,
.user-menu[open] .user-menu-trigger {
  border-color: rgba(255, 204, 0, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.1);
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  width: min(272px, calc(100vw - 32px));
  background: rgba(22, 22, 22, 0.95);
  border: 1px solid rgba(255, 204, 0, 0.18);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  z-index: 30;
  direction: rtl;
  text-align: right;
}
.user-menu-panel p { margin: 0 0 10px; line-height: 1.5; }
.user-menu-display {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.user-menu-email {
  color: #888;
  font-size: 12px;
  direction: ltr;
  text-align: right;
  word-break: break-all;
}
.user-menu-plan {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}
.user-menu-expiry {
  color: #c8c0b4;
  font-size: 13px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px !important;
}
.user-menu-expiry.is-expired { color: #ff8d8d; }
.user-menu-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 0;
  margin-bottom: 4px;
}
.user-menu-progress-val {
  font-size: 12px;
  opacity: 0.85;
  font-weight: 600;
}
.user-menu-logout { margin: 0; padding-top: 4px; }
.user-menu-logout button {
  background: none;
  border: 0;
  color: #e88;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0 0;
  width: 100%;
  text-align: right;
}
.user-menu-logout button:hover { color: #ffb4b4; }
.plan-chip { color: var(--gold); font-size: 12px; }

.workspace {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 32px clamp(16px, 3vw, 48px) 80px;
  flex: 1;
}
.app-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}
.app-panel,
.dash-panel {
  background: rgba(16, 16, 16, 0.72);
  border: 1px solid rgba(255, 204, 0, 0.14);
  border-radius: 22px;
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.dash-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.dash-hero {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: center;
  padding: 28px 32px;
  text-align: right;
}
.dash-hero-copy { flex: 1; min-width: 0; }
.dash-lead {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  max-width: 36em;
}
.meta-row { margin: 0; }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
@media (min-width: 1100px) {
  .dash-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
}
.recent {
  padding: 24px 28px;
}
.recent h2 { margin-bottom: 12px; }
.overall-ring {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(farthest-side, rgba(18, 18, 18, 0.94) 66%, transparent 68%),
    conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, 0.1) 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
  padding: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 204, 0, 0.15);
}
.overall-ring strong {
  font-size: 26px;
  line-height: 1;
}
.overall-ring span {
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
  max-width: 92%;
  margin-top: 1px;
}

/* Dashboard path (A) + readiness radar (B) — page only, not navbar */
.dash-path-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.dash-continue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  color: inherit;
  text-decoration: none;
  border-color: rgba(255, 204, 0, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 204, 0, 0.1), transparent 55%),
    rgba(16, 16, 16, 0.72);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.dash-continue:hover {
  border-color: rgba(255, 204, 0, 0.48);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}
.dash-continue-eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
}
.dash-continue h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}
.dash-continue-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
.dash-continue-icon { font-size: 1.1rem; }
.dash-continue-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe14d, var(--gold));
  color: #111;
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
}
.dash-streak {
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-streak-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.dash-streak-head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.dash-streak-head span {
  color: var(--muted);
  font-size: 0.82rem;
}
.dash-streak-days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.dash-streak-days li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  border-radius: 12px;
}
.dash-streak-days li.is-today {
  background: rgba(255, 204, 0, 0.08);
}
.dash-streak-label {
  font-size: 0.68rem;
  color: var(--muted);
}
.dash-streak-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.dash-streak-days li.is-active .dash-streak-dot {
  background: var(--gold);
  border-color: rgba(255, 204, 0, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.16);
}
.dash-streak-num {
  font-size: 0.72rem;
  color: #ccc;
}
.dash-readiness {
  padding: 20px 22px 22px;
}
.dash-readiness-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.dash-readiness-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--gold);
  font-weight: 700;
}
.dash-readiness-icon {
  display: inline-flex;
  color: var(--gold);
}
.dash-readiness-score {
  margin-inline-start: auto;
  font-size: 1.15rem;
  color: var(--gold);
}
.dash-readiness-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr);
  gap: 18px;
  align-items: center;
}
.dash-radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.dash-radar-frame {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  direction: ltr;
}
.dash-radar {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.dash-radar-lab {
  position: absolute;
  left: calc(var(--lx) * 0.5%);
  top: calc(var(--ly) * 0.5%);
  transform: translate(-50%, -50%);
  z-index: 1;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f2f2f2;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.01em;
}
.dash-radar-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
}
.dash-radar-target {
  fill: rgba(160, 160, 160, 0.12);
  stroke: rgba(170, 170, 170, 0.72);
  stroke-width: 1.75;
  stroke-dasharray: 5 4;
  stroke-linejoin: round;
}
.dash-radar-fill {
  fill: rgba(255, 204, 0, 0.28);
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linejoin: round;
}
.dash-radar-dot {
  fill: var(--gold);
  stroke: #121212;
  stroke-width: 1.5;
}
.dash-radar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.dash-radar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dash-radar-legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
}
.dash-radar-legend-target i {
  background: rgba(160, 160, 160, 0.25);
  border: 1.5px dashed rgba(170, 170, 170, 0.85);
}
.dash-radar-legend-you i {
  background: rgba(255, 204, 0, 0.35);
  border: 1.5px solid var(--gold);
}
.dash-weak-tip {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 204, 0, 0.18);
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-weak-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 700;
}
.dash-weak-skill {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.dash-weak-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.dash-weak-btn {
  margin-top: 6px;
  align-self: flex-start;
  text-decoration: none;
}

.skill-card {
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  min-height: 196px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  content-visibility: auto;
  contain-intrinsic-size: 196px;
}
.skill-card:hover {
  border-color: rgba(255, 204, 0, 0.32);
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32);
}
.skill-card header { display: flex; gap: 10px; align-items: center; }
.skill-card-icon { font-size: 1.35rem; line-height: 1; }
.skill-card h2 { margin: 0; font-size: 1.25rem; }
.skill-card-blurb {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.skill-card footer {
  margin-top: auto;
  font-size: 0.88rem;
  color: #ccc;
}
.bar { height: 8px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; margin: 4px 0 0; }
.bar i { display: block; height: 100%; background: var(--accent, var(--green)); }
.recent ul, .notes, .exam-list, .review, .bands { list-style: none; padding: 0; }
.recent li, .notes li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}

.skill-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  direction: ltr;
  margin-bottom: 14px;
  text-align: center;
  background: rgba(10, 10, 10, 0.78);
  border: 1px solid rgba(255, 204, 0, 0.16);
  border-radius: 22px;
  padding: 10px 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.app-shell .skill-head.center p {
  color: var(--muted-on-bg);
  margin: 0;
  line-height: 1.6;
}
.exam-collapse {
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 16px;
  animation: examCollapseIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.exam-collapse:nth-child(1) { animation-delay: 0.04s; }
.exam-collapse:nth-child(2) { animation-delay: 0.08s; }
.exam-collapse:nth-child(3) { animation-delay: 0.12s; }
.exam-collapse:nth-child(4) { animation-delay: 0.16s; }
.exam-collapse:nth-child(5) { animation-delay: 0.2s; }
.exam-collapse:nth-child(n+6) { animation-delay: 0.24s; }
@keyframes examCollapseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.exam-collapse summary.exam-row {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.exam-collapse summary.exam-row::-webkit-details-marker { display: none; }
.exam-collapse[open] summary.exam-row {
  border-color: rgba(255, 204, 0, 0.35);
  background: rgba(28, 28, 28, 0.94);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.exam-collapse-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  background: rgba(14, 14, 14, 0.92);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  margin-top: -1px;
  backdrop-filter: blur(8px);
}
.exam-collapse[open] .exam-collapse-panel {
  grid-template-rows: 1fr;
}
.exam-collapse-inner {
  overflow: hidden;
  padding: 0 18px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.28s ease, transform 0.28s ease, padding 0.34s ease;
  direction: rtl;
  text-align: start;
}
.exam-collapse[open] .exam-collapse-inner {
  padding: 14px 18px 16px;
  opacity: 1;
  transform: translateY(0);
}
.exam-collapse-meta {
  margin: 0 0 10px;
  color: #ddd6cb;
  font-size: 13px;
}
.exam-start-btn {
  display: inline-flex;
  width: auto;
}
.exam-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 18, 18, 0.82);
  color: inherit;
  direction: rtl;
  text-align: start;
  backdrop-filter: blur(8px);
  box-shadow: none;
  outline: none;
  transition: border-color 0.22s ease, background 0.22s ease;
}
.exam-row:hover {
  border-color: rgba(255, 204, 0, 0.28);
  background: rgba(24, 24, 24, 0.9);
}
.exam-collapse--catalog .exam-row {
  background: rgba(36, 30, 12, 0.9);
  border-color: rgba(255, 204, 0, 0.2);
}
.exam-collapse--catalog .exam-row:hover {
  background: rgba(46, 38, 14, 0.96);
  border-color: rgba(255, 204, 0, 0.36);
}
.exam-collapse--catalog[open] summary.exam-row {
  background: rgba(50, 40, 14, 0.98);
  border-color: rgba(255, 204, 0, 0.4);
}
.exam-collapse--catalog .exam-collapse-panel {
  background: rgba(28, 22, 8, 0.94);
}
.exam-row .num {
  flex: 0 0 auto;
  order: 1;
}
.exam-row .titles {
  flex: 1 1 0;
  order: 2;
  display: grid;
  min-width: 0;
  overflow: hidden;
  text-align: start;
}
.exam-row .titles-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.exam-row .titles-line b {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exam-row .titles-line .ver {
  flex: 0 0 auto;
  order: unset;
  margin: 0;
}
.exam-row .titles small {
  color: #ddd6cb;
  font-size: 12px;
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: start;
}
.exam-row .titles b,
.exam-row .titles small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.exam-row .ver,
.exam-row .score {
  flex: 0 0 auto;
  order: 3;
}
.exam-row .chevron {
  order: 4;
  flex: 0 0 auto;
  margin-inline-start: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-inline-end: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), margin 0.28s ease;
  opacity: 0.85;
}
.exam-collapse[open] .chevron {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}
.skill-head.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  direction: rtl;
  padding: 20px 24px;
}
.count-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffe566, var(--gold));
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 800;
  line-height: 1;
  color: #111;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.count-badge small {
  display: block;
  font-size: 11px;
  color: #1a1a1a;
  font-weight: 700;
  line-height: 1;
  opacity: 0.82;
}
.lvl {
  background: var(--gold); color: #111;
  border-radius: 8px; padding: 2px 8px; font-size: 14px; margin-inline-end: 6px;
}
.lvl-b1 {
  background: var(--red);
  color: #fff;
}
.lvl-b2 {
  background: var(--gold);
  color: #111;
}
.level-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  margin-top: 12px;
}
.level-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 8px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.level-toggle-btn:hover {
  color: #fff;
}
.level-toggle-btn.is-active {
  color: #111;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.35);
}
.level-toggle-btn.is-active[href*="level=b1"],
.level-toggle:has(.level-toggle-btn.is-active[href*="level=b1"]) .level-toggle-btn.is-active {
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(221, 0, 0, 0.45);
}
.skill-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}
.skill-head .level-toggle,
.skill-head-top .level-toggle {
  margin-top: 0;
}
.lvl-chip {
  font-weight: 800;
  letter-spacing: 0.04em;
}
.lvl-chip-b1 {
  border-color: rgba(221, 0, 0, 0.45);
  color: #ff8080;
}
.lvl-chip-b2 {
  border-color: rgba(255, 204, 0, 0.35);
  color: #ffdf70;
}
.dash-hero-copy .level-toggle {
  margin-top: 14px;
}
.skill-head.center .level-toggle {
  margin-bottom: 10px;
}
.skill-card header h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: clamp(22px, 3vw, 28px);
}
.skill-card header h2 .lvl {
  font-size: 12px;
}
.skill-head h1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 10px;
  width: auto;
  max-width: 100%;
  margin: 0;
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.15;
  direction: ltr;
}
.skill-head-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  direction: ltr;
}
.skill-head h1 > .lvl,
.skill-head-title .lvl {
  margin-inline-end: 0;
  flex: 0 0 auto;
}
.skill-head-name {
  min-width: 0;
}
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  background: rgba(18, 18, 18, 0.82);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px;
  gap: 4px;
  overflow: auto;
  backdrop-filter: blur(10px);
  margin-bottom: 4px;
  width: 100%;
  scrollbar-width: thin;
  scroll-padding-inline: 4px;
}
.tabs::before,
.tabs::after {
  content: "";
  flex: 1 1 0;
  min-width: 0;
}
.tabs a {
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
  color: #e8e4dc;
  padding: 8px 10px;
  border-radius: 10px;
  white-space: nowrap;
  font-size: 14px;
}
.tabs a.is-active { background: linear-gradient(180deg, #ff4d4d, var(--red)); color: #fff; font-weight: 800; }
.search { margin: 16px 0; max-width: 100%; }
.search input {
  width: 100%;
  background: rgba(18, 18, 18, 0.88);
  backdrop-filter: blur(8px);
  direction: rtl;
  text-align: right;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: #f0ece4;
  font-family: inherit;
  font-size: 15px;
}
.search input:focus {
  outline: none;
  border-color: rgba(255, 204, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.1);
}
.exam-collapse[hidden] {
  display: none !important;
}
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 8px;
}
.list-label {
  text-align: center;
  direction: rtl;
  unicode-bidi: plaintext;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex: 1 1 auto;
  min-width: 0;
}
.exam-list-separator {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin: 18px 0 10px;
  padding: 4px 0;
  grid-column: 1 / -1;
  width: 100%;
}
.exam-list-separator-line {
  flex: 1 1 40px;
  min-width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}
.exam-list-separator-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}
.exam-list-separator-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}
.layout-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.78);
  flex: 0 0 auto;
}
.layout-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.layout-switch-btn:hover {
  color: #fff;
}
.layout-switch-btn.is-active {
  color: #111;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.35);
}
.layout-icon {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background: currentColor;
}
.layout-icon-list {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='2' width='14' height='2' rx='1'/%3E%3Crect x='1' y='7' width='14' height='2' rx='1'/%3E%3Crect x='1' y='12' width='14' height='2' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='2' width='14' height='2' rx='1'/%3E%3Crect x='1' y='7' width='14' height='2' rx='1'/%3E%3Crect x='1' y='12' width='14' height='2' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.layout-icon-grid {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='1' width='6' height='6' rx='1.2'/%3E%3Crect x='9' y='1' width='6' height='6' rx='1.2'/%3E%3Crect x='1' y='9' width='6' height='6' rx='1.2'/%3E%3Crect x='9' y='9' width='6' height='6' rx='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='1' width='6' height='6' rx='1.2'/%3E%3Crect x='9' y='1' width='6' height='6' rx='1.2'/%3E%3Crect x='1' y='9' width='6' height='6' rx='1.2'/%3E%3Crect x='9' y='9' width='6' height='6' rx='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.exam-list {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px; /* same vertical rhythm as Prüfungen */
}
.exam-list > .exam-collapse,
.exam-list > button.exam-collapse--picker,
.exam-list > a.exam-collapse--picker,
.exam-list > [data-exam-item] {
  margin: 0;
}
/* Early grid before exam-layout.js (avoids FOUC + wrong list margins).
   Match Prüfungen `.exam-list--parts` spacing for all section grids. */
html.exam-layout-grid-pending #exam-list,
.exam-list.is-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  row-gap: 10px;
  column-gap: 10px;
  align-items: stretch;
  justify-items: stretch;
}
html.exam-layout-grid-pending #exam-list > script,
html.exam-layout-grid-pending #exam-list > [hidden],
.exam-list.is-grid > script,
.exam-list.is-grid > [hidden] {
  display: none !important;
}
html.exam-layout-grid-pending #exam-list > .exam-collapse,
html.exam-layout-grid-pending #exam-list > button.exam-collapse--picker,
html.exam-layout-grid-pending #exam-list > a.exam-collapse--picker,
html.exam-layout-grid-pending #exam-list > [data-exam-item],
.exam-list.is-grid > .exam-collapse,
.exam-list.is-grid > button.exam-collapse--picker,
.exam-list.is-grid > a.exam-collapse--picker,
.exam-list.is-grid > [data-exam-item] {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100%;
  justify-self: stretch;
  align-self: stretch;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 14px;
}
html.exam-layout-grid-pending #exam-list .exam-row,
.exam-list.is-grid .exam-row,
.exam-list.is-grid a.exam-collapse--picker .exam-row,
.exam-list.is-grid button.exam-collapse--picker .exam-row {
  display: grid !important;
  /* One line: num | title(+تعديلات) | score | chevron */
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-rows: auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 0;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 72px;
  height: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  box-sizing: border-box;
  flex-wrap: nowrap !important;
  overflow: hidden;
}
html.exam-layout-grid-pending #exam-list .exam-row .num,
html.exam-layout-grid-pending #exam-list .exam-row .titles,
html.exam-layout-grid-pending #exam-list .exam-row .score,
html.exam-layout-grid-pending #exam-list .exam-row .chevron,
.exam-list.is-grid .exam-row .num,
.exam-list.is-grid .exam-row .titles,
.exam-list.is-grid .exam-row .score,
.exam-list.is-grid .exam-row .chevron {
  order: unset;
  flex: unset;
  flex-basis: auto !important;
  margin-top: 0 !important;
  padding-inline-start: 0 !important;
  min-width: 0;
}
html.exam-layout-grid-pending #exam-list .exam-row .num,
.exam-list.is-grid .exam-row .num {
  grid-column: 1;
  grid-row: 1;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: inherit;
}
html.exam-layout-grid-pending #exam-list .exam-row .titles,
.exam-list.is-grid .exam-row .titles {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  min-width: 0;
  overflow: hidden;
}
html.exam-layout-grid-pending #exam-list .exam-row .score,
.exam-list.is-grid .exam-row .score {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  max-width: 100%;
  flex-shrink: 0;
  flex-basis: auto !important;
  padding-inline-start: 0 !important;
  margin-top: 0 !important;
}
html.exam-layout-grid-pending #exam-list .exam-row .chevron,
.exam-list.is-grid .exam-row .chevron {
  display: block;
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
  margin-inline-start: 0;
  flex: 0 0 auto;
}
html.exam-layout-grid-pending #exam-list .exam-row .titles-line,
.exam-list.is-grid .exam-row .titles-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
html.exam-layout-grid-pending #exam-list .exam-row .titles b,
html.exam-layout-grid-pending #exam-list .exam-row .titles small,
.exam-list.is-grid .exam-row .titles b,
.exam-list.is-grid .exam-row .titles small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.exam-layout-grid-pending #exam-list .exam-row .titles-line b,
.exam-list.is-grid .exam-row .titles-line b {
  display: block;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
html.exam-layout-grid-pending #exam-list > .empty,
.exam-list.is-grid > .empty {
  grid-column: 1 / -1;
}
@media (min-width: 720px) {
  html.exam-layout-grid-pending #exam-list:not(.exam-list--hoeren-topics):not(.exam-list--parts),
  .exam-list.is-grid:not(.exam-list--hoeren-topics):not(.exam-list--parts) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  html.exam-layout-grid-pending #exam-list:not(.exam-list--hoeren-topics):not(.exam-list--parts),
  .exam-list.is-grid:not(.exam-list--hoeren-topics):not(.exam-list--parts) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.exam-row .num {
  width: 32px; height: 32px; border-radius: 10px;
  background: rgba(221, 0, 0, 0.18); color: var(--gold);
  display: grid; place-items: center; font-weight: 800;
}
.ver {
  background: rgba(72, 52, 18, 0.72);
  color: #e8a317;
  border: 1px solid rgba(232, 163, 23, 0.28);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.score { color: var(--green); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .exam-collapse,
  .exam-collapse-panel,
  .exam-collapse-inner,
  .exam-row .chevron {
    animation: none !important;
    transition: none !important;
  }
}

.mundlich-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  width: 100%;
}
.app-shell .notes {
  background: rgba(16, 16, 16, 0.72);
  border: 1px solid rgba(255, 204, 0, 0.14);
  border-radius: 22px;
  padding: 8px 20px;
  backdrop-filter: blur(14px);
}
.app-shell .notes li span,
.app-shell .notes li small {
  color: #d8d2c8;
}
.app-shell .notes .empty {
  color: #ece8e0;
}
.app-shell .note-form {
  background: rgba(16, 16, 16, 0.72);
  border: 1px solid rgba(255, 204, 0, 0.14);
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(12px);
}
.app-shell .skill-head.center {
  padding: 24px;
}
.mundlich-card { text-align: center; color: inherit; position: relative; }
.mundlich-card p:not(.teil) {
  color: #ddd6cb;
  margin: 0;
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: center;
}
.mundlich-card .go {
  position: absolute; inset-inline-start: 16px; bottom: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-items: center;
}
.teil { color: #ddd6cb; font-size: 13px; }
.m-icon { font-size: 28px; }

.player { margin-top: 12px; display: grid; gap: 20px; }
.player-head {
  display: grid;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.player-head h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.player-sub { margin: 0; color: var(--muted); }
.player-body { display: grid; gap: 16px; }
/* Prüfungen hub — open page sections (no mega-card) */
.exam-hub-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin-top: 8px;
}
.exam-hub-chrome {
  display: grid;
  gap: 6px;
  padding: 4px 2px 12px;
  border-bottom: 1px solid rgba(255, 204, 0, 0.14);
}
.exam-hub-chrome .eyebrow {
  margin: 0;
  color: #ddd6cb;
  font-size: 13px;
  font-weight: 700;
}
.exam-hub-chrome h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 800;
}
.exam-hub-sub {
  margin: 0;
  color: #d8d2c8;
  font-size: 14px;
  font-weight: 600;
}
.exam-hub-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(28, 22, 12, 0.92), rgba(12, 12, 12, 0.88));
  border: 1px solid rgba(255, 204, 0, 0.28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.exam-hub-cta--empty {
  justify-content: flex-start;
}
.exam-hub-cta-copy {
  flex: 1 1 220px;
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: right;
}
.exam-hub-cta-copy h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}
.exam-hub-cta-copy p {
  margin: 0;
  color: #d8d2c8;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.exam-hub-cta-action {
  flex: 0 1 auto;
  display: grid;
  gap: 8px;
  justify-items: stretch;
  min-width: min(100%, 260px);
}
.exam-hub-parts {
  display: grid;
  gap: 10px;
}
.exam-hub-toolbar {
  margin: 0;
}
.exam-hub-toolbar .list-label {
  flex: 0 1 auto;
  text-align: center;
  white-space: nowrap;
}
/* Legacy nested hub (modal / older markup) */
.exam-hub {
  display: grid;
  gap: 16px;
}
.exam-hub-head h2 { margin: 0 0 6px; font-size: 20px; }
.exam-hub-head p { margin: 0; color: var(--muted); font-size: 14px; }
.exam-list--parts {
  display: grid;
  gap: 10px;
  row-gap: 10px;
  column-gap: 10px;
  width: 100%;
}
.exam-list--parts.is-grid {
  /* Hub parts page: original Prüfungen columns (not the 5-col skill list) */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
@media (min-width: 720px) {
  .exam-list--parts.is-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .exam-list--parts.is-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}
/* Exam start modal: keep the original stacked parts list */
.exam-start-parts.exam-list.is-grid,
.exam-start-modal .exam-list--parts.is-grid {
  grid-template-columns: 1fr !important;
  gap: 10px;
}
.exam-list--schreiben.is-grid {
  /* Same Prüfungen grid rhythm as Lesen parts */
  gap: 10px;
  row-gap: 10px;
  column-gap: 10px;
}
.exam-part-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  background: rgba(12, 12, 12, 0.94);
  border: 1px solid rgba(255, 204, 0, 0.22);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  content-visibility: auto;
  contain-intrinsic-size: 72px;
}
.exam-part-card:hover {
  border-color: rgba(255, 204, 0, 0.45);
  background: rgba(22, 16, 10, 0.98);
  transform: translateY(-1px);
}
.exam-part-card .num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(221, 0, 0, 0.18);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: 0 0 auto;
}
.exam-part-card .titles {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.exam-part-card .titles b {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.exam-part-card .titles small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.exam-part-card .chevron {
  flex: 0 0 auto;
  margin-inline-start: auto;
  width: 0.55rem;
  height: 0.55rem;
  border-inline-end: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  opacity: 0.85;
}
.exam-part-card.is-pending {
  opacity: 0.72;
  cursor: default;
  transform: none;
}
.exam-part-card.is-pending:hover {
  border-color: rgba(255, 204, 0, 0.22);
  background: rgba(12, 12, 12, 0.94);
  transform: none;
}
.exam-part-card .pending-badge {
  order: initial;
  margin-inline-start: 0;
}
.exam-empty {
  text-align: center;
  padding: 28px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 204, 0, 0.18);
}
.exam-empty p { margin: 0 0 8px; }
.exam-empty .muted { color: #ddd6cb; font-size: 14px; margin: 0; }
.exam-row.is-pending {
  opacity: 0.72;
  cursor: default;
  margin: 10px 0;
}
.exam-row.is-pending .chevron { display: none; }
.pending-badge {
  flex: 0 0 auto;
  order: 4;
  margin-inline-start: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255, 204, 0, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}
.exam-part-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 3px;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  overflow-x: auto;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, 0.42);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
/* Legacy / non-shell toolbars that still place the switch as a grid child */
.zet-lesen-toolbar--exam > .exam-part-switch {
  grid-column: 1 / -1;
}
.exam-part-switch-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #e8dfd0;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}
.exam-part-switch-btn:hover {
  color: #fff;
  border-color: rgba(255, 204, 0, 0.55);
  background: rgba(255, 204, 0, 0.14);
}
.exam-part-switch-btn:focus-visible {
  outline: 2px solid rgba(255, 204, 0, 0.85);
  outline-offset: 2px;
}
.exam-part-switch-btn.is-active {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  background: var(--gold, #ffcc00);
  border-color: #ffcc00;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: default;
}
.zet-lesen-toolbar--exam {
  row-gap: 8px;
}
.zet-lesen-toolbar-center {
  min-width: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 12px 14px;
}
.exam-run-shell .exam-run-toolbar .zet-lesen-toolbar-center {
  grid-column: 2;
}
.exam-run-shell .exam-run-toolbar .exam-part-switch {
  grid-column: auto;
  margin-inline: 0;
  flex: 0 1 auto;
  min-width: 0;
}
.exam-run-shell .exam-run-toolbar .zet-lesen-toolbar-copy {
  flex: 0 1 auto;
  min-width: 0;
}
.exam-run-shell .exam-run-toolbar .zet-lesen-toolbar-copy h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(28vw, 220px);
}
.exam-run-shell .exam-run-toolbar .exam-part-switch-btn {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 11px;
}
@media (max-width: 1100px) {
  .exam-run-shell .exam-run-toolbar .zet-lesen-toolbar-center {
    flex-wrap: wrap;
  }
  .exam-run-shell .exam-run-toolbar .zet-lesen-toolbar-copy h1 {
    max-width: min(40vw, 180px);
  }
}
.exam-run-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  background: #050505;
  color: #fff;
  overflow: hidden;
  border-radius: 0 !important;
}
/* Match native B2 Lesen Teil 1 warm gold chrome across the full exam shell. */
.exam-run-shell.exam-run-shell--b2 {
  --lesen-gold: #ffb300;
  --lesen-gold-soft: rgba(255, 179, 0, 0.46);
  background: #0b0904;
}
.exam-run-shell.exam-run-shell--b2 .exam-run-toolbar {
  background: rgba(16, 12, 4, 0.96);
  border-bottom-color: rgba(255, 179, 0, 0.42);
}
.exam-run-shell.exam-run-shell--b2 .zet-lesen-module {
  color: #ffb300;
}
.exam-run-shell.exam-run-shell--b2 .exam-part-switch {
  border-color: rgba(255, 179, 0, 0.42);
}
.exam-run-shell.exam-run-shell--b2 .exam-part-switch-btn.is-active {
  background: #ffb300;
  border-color: #ffb300;
  color: #0b0904 !important;
  -webkit-text-fill-color: #0b0904 !important;
}
.exam-run-shell.exam-run-shell--b2 .exam-run-frame {
  background: #0b0904 !important;
}
.exam-run-shell .exam-run-toolbar {
  /* Keep chrome in the flex flow — never sticky/fixed over the panels. */
  position: relative !important;
  top: auto !important;
  flex: 0 0 auto;
  z-index: 5;
  /* One row for B1/B2: gear | title + parts | timer — same physical LTR as Teil 2/3 */
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  row-gap: 0;
  border-radius: 0 !important;
  direction: ltr;
}
.exam-run-shell .exam-part-switch-btn {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.exam-run-panels {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  z-index: 1;
}
.exam-run-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  content-visibility: hidden;
  contain: layout style paint;
}
.exam-run-panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
  content-visibility: visible;
}
.exam-run-panel .player.player--zet-lesen.zet-lesen-fs,
.exam-run-panel .player--zet-lesen,
.exam-run-panel .zet-lesen-fs {
  /* Fill the panel below the exam toolbar — do not use viewport-fixed
     fullscreen (that clips Teil 1 text under the shell chrome). */
  position: absolute;
  inset: 0;
  z-index: auto;
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  overflow: hidden;
}
.exam-run-panel .zet-lesen-form {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.exam-run-panel .zet-lesen-scroll {
  scroll-padding-top: 0.25rem;
  padding-top: 4px;
}
.exam-run-frame,
.exam-run-shell .live-frame--fullscreen,
.zetb2-exam-shell .exam-run-frame.live-frame--fullscreen {
  /* Override .app-live-fullscreen .live-frame--fullscreen { position:fixed; inset:0 }
     so Teil 2/3 + Sprach iframes fill the panel under the toolbar, not the viewport. */
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: #050505 !important;
  z-index: 0 !important;
}
.zetb2-exam-shell .live-back-fab {
  display: none !important;
}

/* Route busy: light enter/exit feedback (no blur — blur lags mobile GPUs) */
html.zet-route-busy-pending,
html.zet-route-busy-on,
html.zet-route-leaving {
  cursor: progress;
}
html.zet-route-busy-pending::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10049;
  background: rgba(5, 5, 5, 0.35);
  pointer-events: all;
}
.zet-route-busy {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 5, 5, 0.4);
}
.zet-route-busy[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  content-visibility: hidden;
}
.zet-route-busy-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: min(200px, 84vw);
  padding: 18px 22px;
  border-radius: 14px;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f5f5;
  text-align: center;
}
.zet-route-busy-spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.22);
  border-top-color: #ff4d4d;
  animation: zet-route-busy-spin 0.7s linear infinite;
}
.zet-route-busy-msg {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}
@keyframes zet-route-busy-spin {
  to {
    transform: rotate(360deg);
  }
}
html[data-color-scheme="light"].zet-route-busy-pending::before {
  background: rgba(248, 246, 242, 0.45);
}
html[data-color-scheme="light"] .zet-route-busy {
  background: rgba(248, 246, 242, 0.45);
}
html[data-color-scheme="light"] .zet-route-busy-card {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
}
html[data-color-scheme="light"] .zet-route-busy-spinner {
  border-color: rgba(0, 0, 0, 0.12);
  border-top-color: var(--red, #dd0000);
}

.live-frame {
  width: 100%;
  min-height: 82vh;
  border: 0;
  border-radius: 16px;
  background: #fff;
}
/* Fullscreen embedded exercise (iframe) */
.app-live-fullscreen {
  overflow: hidden;
  background: #050505;
}
html[data-color-scheme="light"].app-live-fullscreen,
html[data-color-scheme="light"] body.app-live-fullscreen {
  background: #f4efe4;
}
.app-live-fullscreen .de-flag,
.app-live-fullscreen .app-header,
.app-live-fullscreen .app-bg {
  display: none !important;
}
.app-live-fullscreen .app-shell-inner {
  min-height: 100dvh;
}
.app-live-fullscreen .workspace--fullscreen {
  padding: 0;
  margin: 0;
  min-height: 100dvh;
  position: relative;
}
.app-live-fullscreen .live-back-fab {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  left: auto;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: rtl;
  unicode-bidi: isolate;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.88);
  border: 1.5px solid rgba(255, 204, 0, 0.45);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.app-live-fullscreen .live-back-fab:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.92);
  transform: translateY(-1px);
}
/* Hidden when Schreiben / Lesen shell embeds رجوع inside the iframe top bar */
.app-live-fullscreen .live-back-fab.is-embedded-in-frame,
.app-live-fullscreen .live-back-fab[hidden] {
  display: none !important;
}
.app-live-fullscreen .live-frame--fullscreen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  border: 0;
  margin: 0;
  padding: 0;
  /* Beat .live-frame { border-radius: 16px } — fullscreen chrome must be square. */
  border-radius: 0 !important;
  background: transparent;
  z-index: 1;
}
.passage, .model, .audio-box, .task {
  background: rgba(0,0,0,0.2); border-radius: 14px; padding: 16px; margin: 14px 0;
}
.passage, .model, .prompts { line-height: 1.8; }
.passage p, .task p {
  white-space: pre-wrap;
}
.quiz fieldset { border: 1px solid var(--line); border-radius: 14px; margin: 12px 0; padding: 12px; }
.quiz label { display: flex; align-items: flex-start; gap: 8px; list-style: none; }
.question-passage {
  margin: 0 0 12px;
  color: #ddd6cb;
  line-height: 1.7;
  white-space: pre-wrap;
}
.number-answer {
  width: 100%;
  max-width: 240px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  font: inherit;
}
.result { margin-top: 18px; padding: 16px; border-radius: 16px; background: rgba(255,255,255,0.04); }
.result.ok { outline: 1px solid var(--green); }
.review .good { color: var(--green); }
.review .bad { color: #ff9b9b; }
.app-shell .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.app-shell .back:hover {
  color: var(--gold);
  border-color: rgba(255, 204, 0, 0.42);
  background: rgba(0, 0, 0, 0.72);
}
.note-form { grid-template-columns: 1fr 1fr 1fr auto; }
.ghost-mini { background: none; border: 0; color: #ff9b9b; font: inherit; cursor: pointer; }
.app-shell .workspace > .empty,
.app-shell .exam-list > .empty {
  color: #f2eee8;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  margin: 8px 0;
}
.app-shell .player .empty,
.app-shell .dash-panel .empty,
.app-shell .exam-hub .empty {
  color: var(--muted-in-panel);
  background: transparent;
  border: 0;
  padding: 0;
}
.eyebrow { color: var(--muted-in-panel); margin: 0; }
.app-shell .workspace > h1 {
  text-align: center;
  margin-bottom: 16px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(10, 10, 10, 0.78);
  border: 1px solid rgba(255, 204, 0, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.app-shell .player .eyebrow,
.app-shell .dash-panel .eyebrow,
.app-shell .dash-panel .dash-lead,
.app-shell .skill-card-blurb,
.app-shell .skill-card footer,
.app-shell .exam-hub-head p,
.app-shell .exam-hub-cta-copy p,
.app-shell .exam-hub-sub,
.app-shell .player-sub,
.app-shell .overall-ring span,
.app-shell .hint {
  color: var(--muted-in-panel);
}
.app-shell .tabs a:not(.is-active) {
  color: #ddd6cb;
}
.app-shell .search input::placeholder {
  color: #aaa59c;
  opacity: 1;
}

.welcome-modal {
  /* Prefer explicit visual-viewport height over inset:0 alone — on mobile
     browsers inset:0 often tracks the layout viewport (taller than visible),
     so flex-centering looks top-heavy once browser chrome is on screen. */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  width: 100dvw;
  height: 100%;
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  margin: 0;
  padding: calc(16px + env(safe-area-inset-top, 0px))
    calc(16px + env(safe-area-inset-right, 0px))
    calc(16px + env(safe-area-inset-bottom, 0px))
    calc(16px + env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  /* JS may pin top/height/width to visualViewport on real phones. */
  --vv-top: 0px;
  --vv-left: 0px;
  --vv-width: 100%;
  --vv-height: 100svh;
}
.welcome-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}
.welcome-modal-card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  margin: 0;
  padding: 32px 28px;
  text-align: right;
  animation: welcomeIn 0.35s ease;
}
.welcome-modal.is-closing .welcome-modal-card {
  animation: welcomeOut 0.25s ease forwards;
}
.welcome-modal-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
}
.welcome-modal-lead {
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 1rem;
}
.welcome-modal-list {
  margin: 0 0 1.25rem;
  padding: 0 1.1rem 0 0;
  color: #ddd;
  line-height: 1.8;
  font-size: 0.92rem;
}
.welcome-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}
.hoeren-resume-modal {
  z-index: 2600;
}
.hoeren-resume-card {
  text-align: right;
}
.hoeren-resume-card h2,
.exercise-exit-modal .welcome-modal-card h2,
.ai-budget-modal-card h2,
.session-kicked-modal .welcome-modal-card h2,
.site-exit-modal .welcome-modal-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.35;
  color: #fff;
}
.welcome-modal .welcome-modal-actions .btn.primary,
.hoeren-codes-modal-primary,
.color-scheme-modal .btn.primary {
  color: #111;
  -webkit-text-fill-color: #111;
}

/*
 * Shared light/dark surfaces for exercise dialogs
 * (exit / resume / AI budget / session / codes / theme picker).
 */
html[data-color-scheme="light"] .welcome-modal .welcome-modal-backdrop,
html[data-color-scheme="light"] .hoeren-codes-modal,
html[data-color-scheme="light"] .color-scheme-modal-backdrop,
html[data-color-scheme="light"] .schreiben-ai-modal-backdrop {
  background: rgba(40, 28, 12, 0.42);
}
html[data-color-scheme="light"] .welcome-modal .welcome-modal-card.app-panel,
html[data-color-scheme="light"] .hoeren-resume-card,
html[data-color-scheme="light"] .hoeren-codes-modal-card,
html[data-color-scheme="light"] .color-scheme-modal-card,
html[data-color-scheme="light"] .schreiben-ai-modal-card.app-panel {
  background: #fffaf0 !important;
  border: 1px solid rgba(154, 107, 0, 0.35) !important;
  color: #1a140c !important;
  box-shadow: 0 24px 60px rgba(80, 50, 0, 0.18);
}
html[data-color-scheme="light"] .welcome-modal .welcome-modal-eyebrow,
html[data-color-scheme="light"] .color-scheme-modal-eyebrow,
html[data-color-scheme="light"] .hoeren-resume-card .welcome-modal-eyebrow {
  color: #9a6b00 !important;
}
html[data-color-scheme="light"] .welcome-modal .welcome-modal-card h2,
html[data-color-scheme="light"] .hoeren-resume-card h2,
html[data-color-scheme="light"] .ai-budget-modal-card h2,
html[data-color-scheme="light"] .hoeren-codes-modal-card h2,
html[data-color-scheme="light"] .color-scheme-modal-card h2,
html[data-color-scheme="light"] .schreiben-ai-modal-card h2 {
  color: #1a140c !important;
}
html[data-color-scheme="light"] .welcome-modal .welcome-modal-lead,
html[data-color-scheme="light"] .hoeren-codes-modal-card p,
html[data-color-scheme="light"] .color-scheme-modal-sub {
  color: #5a4a38 !important;
}
html[data-color-scheme="light"] .welcome-modal .btn.ghost,
html[data-color-scheme="light"] .hoeren-codes-modal-enter,
html[data-color-scheme="light"] .color-scheme-modal .btn.ghost,
html[data-color-scheme="light"] .schreiben-ai-modal-card .btn.ghost {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.4) !important;
  color: #7a5500 !important;
  -webkit-text-fill-color: #7a5500 !important;
}
html[data-color-scheme="light"] .welcome-modal .btn.primary,
html[data-color-scheme="light"] .hoeren-codes-modal-primary,
html[data-color-scheme="light"] .color-scheme-modal .btn.primary,
html[data-color-scheme="light"] .schreiben-ai-modal-card .btn.primary {
  background: var(--gold, #ffcc00) !important;
  border-color: var(--gold, #ffcc00) !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}
html[data-color-scheme="light"] .hoeren-codes-modal-close {
  color: #7a5500 !important;
}
html[data-color-scheme="light"] .hoeren-codes-modal-icon {
  background: rgba(255, 179, 0, 0.16);
  border-color: rgba(154, 107, 0, 0.35);
}
html[data-color-scheme="light"] .color-scheme-dont-show {
  color: #5a3d00 !important;
  border-color: rgba(180, 130, 20, 0.35) !important;
  background: rgba(255, 204, 0, 0.14) !important;
}

.activation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 204, 0, 0.25);
  background: rgba(255, 204, 0, 0.08);
}

.activation-banner.is-locked {
  border-color: rgba(255, 123, 123, 0.35);
  background: rgba(255, 123, 123, 0.08);
}

.activation-banner-copy {
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
  color: #d7e2f2;
}

.activation-banner-copy strong {
  color: #fff;
  font-size: 0.98rem;
}

.btn.whatsapp {
  background: #25d366;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn.whatsapp:hover {
  background: #1fb855;
  color: #fff;
}

.btn.whatsapp.compact {
  padding: 8px 14px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.locked-card .btn.wide {
  width: 100%;
  margin-top: 8px;
}

body.welcome-modal-open { overflow: hidden; }
body.ai-budget-modal-open { overflow: hidden; }
.ai-budget-modal { z-index: 120; }
.ai-budget-modal-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  line-height: 1.4;
}
body.exercise-exit-open { overflow: hidden; }
.exercise-exit-modal {
  z-index: 1100;
}
body.session-modal-open { overflow: hidden; }

.session-kicked-modal .welcome-modal-card {
  border: 1px solid rgba(255, 204, 0, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
@keyframes welcomeIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes welcomeOut {
  to { opacity: 0; transform: scale(0.98) translateY(8px); }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "toggle logo actions";
    gap: 10px;
    padding: 10px 14px;
  }
  .nav-toggle {
    display: inline-flex;
    grid-area: toggle;
  }
  .logo {
    grid-area: logo;
    justify-self: center;
    font-size: 20px;
  }
  .nav-end {
    grid-area: actions;
    gap: 6px;
    justify-self: end;
  }
  .nav-site-link { display: none; }
  .nav-progress-copy { display: none; }
  .nav-progress {
    padding: 3px;
    border-radius: 999px;
  }
  .main-nav {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: auto;
    bottom: 0;
    z-index: 200;
    width: min(300px, 88vw);
    margin: 0;
    padding: 18px 16px 24px;
    padding-top: max(18px, env(safe-area-inset-top));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    background: rgba(14, 14, 14, 0.97);
    border-inline-end: 1px solid var(--line);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    direction: rtl;
    visibility: hidden;
    pointer-events: none;
  }
  body.nav-open .main-nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .app-header {
    z-index: 201;
  }
  .main-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    color: #fff;
    font-size: 15px;
  }
  .nav-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font: inherit;
    cursor: pointer;
  }
  .main-nav a {
    display: block;
    width: 100%;
    text-align: right;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
  }
  .nav-progress {
    padding: 4px 10px 4px 5px;
    gap: 6px;
  }
  .nav-progress-ring {
    width: 30px;
    height: 30px;
  }
  .nav-progress-title { font-size: 0.72rem; }
  .nav-progress-meta { font-size: 0.62rem; }
  .nav-drawer-link {
    display: block;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 14px;
  }
  .nav-drawer-link.is-active {
    background: rgba(221, 0, 0, 0.92);
    color: #fff;
    border-radius: 12px;
  }
  .nav-drawer-site { color: var(--gold); }
  .workspace {
    padding: 20px 14px 64px;
  }
  .dash-hero {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
  .dash-hero-copy { text-align: center; }
  .dash-path-row,
  .dash-readiness-body {
    grid-template-columns: 1fr;
  }
  .dash-continue {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .dash-continue-meta { justify-content: center; }
  .dash-continue-cta { width: 100%; }
  .dash-weak-btn { align-self: stretch; text-align: center; }
  .dash-grid { grid-template-columns: 1fr; gap: 16px; }
  .dash-page { gap: 24px; }
  .skill-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
    text-align: center;
    gap: 8px 10px;
    margin-bottom: 12px;
    padding: 8px 10px;
  }
  .skill-head.center {
    flex-direction: column;
    padding: 20px 16px;
  }
  .skill-head h1 { font-size: clamp(20px, 6vw, 28px); }
  .list-toolbar {
    gap: 8px;
    margin: 10px 0 6px;
  }
  .list-label {
    padding: 8px 12px;
    font-size: 13px;
  }
  .layout-switch-btn {
    min-height: 32px;
    padding: 6px 10px;
  }
  .layout-switch-label { display: none; }
  .count-badge {
    width: 56px;
    height: 56px;
    font-size: 15px;
  }
  .count-badge small { font-size: 10px; }
  .overall-ring {
    width: 108px;
    height: 108px;
  }
  .overall-ring strong { font-size: 24px; }
  .overall-ring span { font-size: 10px; }
  .tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    gap: 3px;
    scroll-padding-inline: 6px;
  }
  .tabs::before,
  .tabs::after {
    display: none;
  }
  .tabs a {
    flex: 0 0 auto;
    min-width: auto;
    padding: 7px 9px;
    font-size: 13px;
    border-radius: 9px;
  }
  .mundlich-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .note-form {
    display: grid;
    grid-template-columns: 1fr;
  }
  .stats { gap: 20px; }
  .player {
    padding: 16px;
    border-radius: 16px;
  }
  .exam-hub-page {
    gap: 16px;
  }
  .exam-hub-cta {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .exam-hub-cta-copy {
    text-align: center;
  }
  .exam-hub-cta-action {
    min-width: 0;
    width: 100%;
  }
  .exam-hub-chrome h1 {
    font-size: clamp(24px, 7vw, 34px);
  }
  .exam-row {
    padding: 14px;
    gap: 10px;
  }
  .welcome-modal-card { padding: 24px 20px; }
  .welcome-modal-actions { flex-direction: column; }
  .welcome-modal-actions .btn { width: 100%; }
}

@media (max-width: 480px) {
  .topbar { padding: 8px 12px; }
  .logo { font-size: 18px; }
  .avatar { width: 30px; height: 30px; font-size: 13px; }
  .icon-btn { font-size: 18px; padding: 4px; }
  .meta-row { gap: 6px; }
  .chip { font-size: 12px; padding: 5px 10px; }
  .player-head h1 { font-size: clamp(22px, 7vw, 32px); }
  .exam-hub-chrome h1 { font-size: clamp(22px, 7vw, 30px); }
  .exam-list.is-grid:not(.exam-list--hoeren-topics):not(.exam-list--parts),
  .exam-list--parts.is-grid:not(.exam-start-parts) {
    grid-template-columns: 1fr;
  }
}

.schreiben-ai-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}
.schreiben-ai-modal[hidden] { display: none; }
.schreiben-ai-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 28, 0.62);
  backdrop-filter: blur(4px);
}
.schreiben-ai-modal-card {
  position: relative;
  width: min(640px, 100%);
  max-height: min(80vh, 760px);
  overflow: auto;
  padding: 24px;
}
.schreiben-ai-close {
  position: absolute;
  top: 12px;
  left: 12px;
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}
.schreiben-ai-body { margin: 12px 0 18px; }
.schreiben-ai-score { font-size: 1.05rem; margin-bottom: 10px; }
.schreiben-ai-feedback,
.schreiben-ai-corrections { margin-top: 12px; }
.schreiben-ai-loading { opacity: 0.85; }
.schreiben-ai-history {
  margin: 8px 0 4px;
}
.schreiben-ai-history-label {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold, #ffcc00);
}
.schreiben-ai-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.schreiben-ai-history-btn {
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(255, 204, 0, 0.08);
  color: inherit;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  cursor: pointer;
}
.schreiben-ai-history-btn.is-active {
  background: linear-gradient(180deg, #ffe14d, #ffcc00);
  color: #1a1400;
  border-color: rgba(154, 107, 0, 0.55);
  font-weight: 700;
}
.schreiben-ai-section {
  margin-top: 14px;
}
.schreiben-ai-section h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--gold, #ffcc00);
}
.schreiben-ai-section ul {
  margin: 0;
  padding-inline-start: 1.1rem;
}
.schreiben-ai-corrections {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
.schreiben-ai-fix-item {
  border: 1px solid rgba(255, 204, 0, 0.22);
  background: rgba(255, 204, 0, 0.05);
  padding: 10px 12px;
  border-radius: 0;
}
.schreiben-ai-fix-issue,
.schreiben-ai-fix-suggestion,
.schreiben-ai-fix-issue-ar,
.schreiben-ai-fix-ar {
  margin: 0 0 6px;
  line-height: 1.45;
}
.schreiben-ai-fix-suggestion {
  color: var(--gold, #ffcc00);
  font-weight: 600;
}
.schreiben-ai-fix-ar,
.schreiben-ai-fix-issue-ar {
  opacity: 0.92;
  font-size: 0.92rem;
}
.schreiben-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.schreiben-ai-actions .btn[disabled] {
  opacity: 0.55;
  cursor: wait;
}
body.schreiben-ai-open { overflow: hidden; }

html[data-color-scheme="light"] .schreiben-ai-history-btn {
  background: rgba(255, 204, 0, 0.12);
  border-color: rgba(154, 107, 0, 0.3);
  color: #1a140c;
}
html[data-color-scheme="light"] .schreiben-ai-fix-item {
  background: rgba(255, 204, 0, 0.08);
  border-color: rgba(154, 107, 0, 0.22);
}
html[data-color-scheme="light"] .schreiben-ai-fix-suggestion,
html[data-color-scheme="light"] .schreiben-ai-section h3,
html[data-color-scheme="light"] .schreiben-ai-history-label {
  color: #9a6b00;
}

.schreiben-ai-choice,
.schreiben-ai-pause {
  display: grid;
  gap: 10px;
  text-align: right;
}
.schreiben-ai-choice-lead,
.schreiben-ai-pause-msg {
  margin: 0 0 4px;
  line-height: 1.55;
  font-size: 0.98rem;
}
.schreiben-ai-pause-timer {
  margin: 4px 0 8px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--gold, #ffcc00);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: center;
}
.schreiben-ai-choice-btn {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(255, 204, 0, 0.08);
  color: inherit;
  border-radius: 0;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.schreiben-ai-choice-btn--primary {
  background: linear-gradient(180deg, rgba(255, 204, 0, 0.28), rgba(120, 80, 0, 0.35));
  border-color: rgba(255, 204, 0, 0.55);
  color: #ffe566;
}
html[data-color-scheme="light"] .schreiben-ai-pause-timer {
  color: #9a6b00;
}
html[data-color-scheme="light"] .schreiben-ai-choice-btn {
  background: rgba(255, 204, 0, 0.12);
  border-color: rgba(154, 107, 0, 0.3);
  color: #1a140c;
}
html[data-color-scheme="light"] .schreiben-ai-choice-btn--primary {
  background: linear-gradient(180deg, #ffe14d, #ffcc00);
  border-color: rgba(154, 107, 0, 0.55);
  color: #1a1400;
}

/* Native Lesen Teil 1 player */
.player.player--zet-lesen {
  max-width: 1180px;
  margin: 12px auto 0;
  padding: 28px 24px 24px;
  background: rgba(8, 8, 8, 0.9);
  border: 1px solid rgba(255, 204, 0, 0.28);
}
.player.player--zet-lesen.zet-lesen-fs {
  position: fixed;
  inset: 0;
  z-index: 1;
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #050505;
  border: 0;
  /* Beat .player { border-radius: 20px } — fullscreen chrome must be square. */
  border-radius: 0 !important;
  overflow: hidden;
}
.player.player--zet-lesen.zet-lesen-level-b2 {
  --lesen-gold: #ffb300;
  --lesen-gold-soft: rgba(255, 179, 0, 0.46);
}
.zet-lesen-level-b2.zet-lesen-fs {
  background: #0b0904;
}
.zet-lesen-level-b2 .zet-lesen-toolbar,
.zet-lesen-level-b2 .zet-lesen-bar {
  background: rgba(16, 12, 4, 0.96);
  border-color: rgba(255, 179, 0, 0.42);
}
.zet-lesen-level-b2 .zet-lesen-module,
.zet-lesen-level-b2 .zet-lesen-text-label,
.zet-lesen-level-b2 .zet-lesen-side-title,
.zet-lesen-level-b2 .zet-lesen-head-tr {
  color: #ffb300;
}
.zet-lesen-level-b2 .zet-lesen-text,
.zet-lesen-level-b2 .zet-lesen-side,
.zet-lesen-level-b2 .zet-lesen-head {
  background: rgba(255, 179, 0, 0.10);
  border-color: rgba(255, 179, 0, 0.38);
}
.zet-lesen-level-b2 .zet-lesen-slot {
  background: rgba(255, 179, 0, 0.12);
  border-color: rgba(255, 179, 0, 0.48);
}
.zet-lesen-level-b2 .zet-lesen-badge {
  border-color: #ffb300;
  color: #ffb300;
}
.zet-lesen-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, auto) minmax(140px, 1fr);
  align-items: center;
  gap: 10px 16px;
  padding: 10px 16px;
  background: rgba(8, 8, 8, 0.94);
  border-bottom: 1px solid rgba(255, 204, 0, 0.28);
  border-radius: 0 !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* Match Teil 2/3 iframe topbar: physical LTR chrome (page is html[dir=rtl]). */
  direction: ltr;
}
.zet-lesen-toolbar-start {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}
.zet-lesen-toolbar-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  flex-wrap: nowrap;
  direction: ltr;
}
.zet-lesen-toolbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  direction: ltr;
}
.zet-lesen-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold, #ffcc00);
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  direction: rtl;
}
.zet-lesen-back:hover {
  background: rgba(255, 204, 0, 0.12);
  border-color: var(--gold, #ffcc00);
  color: #fff;
}
.zet-lesen-changes-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 9.5rem;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, 0.7);
  background: linear-gradient(180deg, rgba(255, 204, 0, 0.28), rgba(120, 80, 0, 0.45));
  color: #ffe566;
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    0 0 0 1px rgba(255, 204, 0, 0.18),
    0 0 18px rgba(255, 204, 0, 0.45),
    0 0 36px rgba(255, 204, 0, 0.18);
  animation: zet-changes-shine 2.4s ease-in-out infinite;
}
.zet-lesen-changes-btn:hover,
.zet-lesen-changes-btn:focus-visible {
  background: linear-gradient(180deg, rgba(255, 204, 0, 0.42), rgba(150, 100, 0, 0.55));
  color: #fff8d6;
  outline: none;
  box-shadow:
    0 0 0 1px rgba(255, 204, 0, 0.35),
    0 0 22px rgba(255, 204, 0, 0.55),
    0 0 42px rgba(255, 204, 0, 0.25);
}
.zet-lesen-changes-btn[hidden] {
  display: none !important;
}
@keyframes zet-changes-shine {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 204, 0, 0.18),
      0 0 14px rgba(255, 204, 0, 0.35),
      0 0 28px rgba(255, 204, 0, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 204, 0, 0.35),
      0 0 22px rgba(255, 204, 0, 0.6),
      0 0 44px rgba(255, 204, 0, 0.28);
  }
}
.variant-changes-fab {
  /* Deprecated: live iframe parts mount «ما تغيّر» in the topbar. Keep rule to hide stale markup. */
  display: none !important;
}
.variant-changes-fab[hidden] {
  display: none !important;
}
.variant-changes-fab:hover {
  color: #fff8d6;
  border-color: var(--gold);
}
body.variant-changes-open {
  overflow: hidden;
}
.variant-changes-modal {
  z-index: 1200;
  /* Flex (not grid): tall cards were packing to the top under place-items-only grid. */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  top: var(--vv-top, 0px);
  left: var(--vv-left, 0px);
  right: auto;
  width: var(--vv-width, 100%);
  height: var(--vv-height, 100svh);
  max-height: var(--vv-height, 100dvh);
  /* Keep equal inset so the flex mid-point matches the visible safe area. */
  padding: max(12px, env(safe-area-inset-top, 0px))
    max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-left, 0px));
}
.variant-changes-modal .variant-changes-card {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  width: min(560px, calc(100% - 8px), 94vw);
  max-width: min(560px, calc(100% - 8px), 94vw);
  /* Prefer small/dynamic viewport units so max-height matches what is visible. */
  max-height: min(84svh, 84dvh, calc(var(--vv-height, 100dvh) - 24px), 720px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  text-align: right;
  direction: rtl;
  color: #f2eee8;
  background: linear-gradient(180deg, #17140f 0%, #100e0a 100%);
  border: 1px solid rgba(255, 204, 0, 0.32);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 204, 0, 0.08);
}
.variant-changes-head {
  flex: 0 0 auto;
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid rgba(255, 204, 0, 0.18);
  background: rgba(255, 204, 0, 0.05);
}
.variant-changes-modal .welcome-modal-eyebrow {
  margin: 0 0 0.35rem;
  color: #ffcc00;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.variant-changes-modal #variant-changes-title,
.variant-changes-modal .variant-changes-card h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.35;
  font-weight: 900;
  color: #fff8e8 !important;
  -webkit-text-fill-color: #fff8e8 !important;
  text-align: right;
}
.variant-changes-topic {
  margin: 0.55rem 0 0;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, 0.4);
  background: rgba(255, 204, 0, 0.12);
  color: #ffe566 !important;
  -webkit-text-fill-color: #ffe566 !important;
  font-weight: 800;
  font-size: 0.92rem;
  text-align: right;
  direction: ltr;
  unicode-bidi: isolate;
}
.variant-changes-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1.35rem 0.35rem;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 204, 0, 0.55) rgba(255, 255, 255, 0.06);
}
.variant-changes-scroll::-webkit-scrollbar {
  width: 8px;
}
.variant-changes-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
}
.variant-changes-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 204, 0, 0.5);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.variant-changes-modal .welcome-modal-lead {
  margin: 0 0 0.65rem;
  color: #c9bfae;
  font-size: 0.9rem;
  line-height: 1.65;
  text-align: right;
}
.variant-changes-notice {
  margin: 0 0 0.95rem;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 204, 0, 0.4);
  border-inline-start: 3px solid #ffcc00;
  background: rgba(255, 204, 0, 0.1);
  color: #ffe9a8;
  font-size: 0.92rem;
  line-height: 1.6;
  font-weight: 700;
  text-align: right;
}
.variant-changes-cross {
  margin: 0.35rem 0 1rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 204, 0, 0.18);
  background: rgba(255, 255, 255, 0.03);
}
.variant-changes-cross + .variant-changes-cross {
  margin-top: 0.75rem;
}
.variant-changes-cross-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.variant-changes-cross-label {
  margin: 0;
  color: #ffcc00;
  font-weight: 900;
  font-size: 0.95rem;
  text-align: right;
  width: 100%;
}
.variant-changes-cross-title {
  margin: 0;
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.28);
  color: #f0e8da;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
  direction: ltr;
  unicode-bidi: isolate;
}
.variant-changes-list {
  margin: 0 0 0.35rem;
  padding: 0 1.15rem 0 0;
  color: #ece6da;
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: right;
  list-style: disc;
}
.variant-changes-list li + li {
  margin-top: 0.4rem;
}
.variant-changes-list li::marker {
  color: #ffcc00;
}
.variant-changes-foot {
  flex: 0 0 auto;
  padding: 0.85rem 1.35rem 1.2rem;
  border-top: 1px solid rgba(255, 204, 0, 0.18);
  background: rgba(0, 0, 0, 0.28);
}
.variant-changes-modal .welcome-modal-actions {
  display: flex;
  justify-content: stretch;
}
.variant-changes-modal label.variant-changes-dont-show {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(255, 204, 0, 0.08);
  color: #ffe9a8;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
  text-align: right;
}
.variant-changes-modal label.variant-changes-dont-show span {
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
}
.variant-changes-modal label.variant-changes-dont-show input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #ffcc00;
  cursor: pointer;
}
.variant-changes-modal .btn.primary,
.variant-changes-modal .variant-changes-highlight {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, 0.75);
  background: linear-gradient(180deg, #ffe14d, #ffcc00);
  color: #1a1400 !important;
  -webkit-text-fill-color: #1a1400 !important;
  font-weight: 900;
  box-shadow:
    0 0 0 1px rgba(255, 204, 0, 0.25),
    0 8px 22px rgba(255, 204, 0, 0.28);
}
.variant-changes-modal .variant-changes-jump {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: right;
  cursor: pointer;
  line-height: inherit;
}
.variant-changes-modal .variant-changes-jump:hover,
.variant-changes-modal .variant-changes-jump:focus-visible {
  color: #ffe08a;
  text-decoration: underline;
  outline: none;
}

/* In-page variant change marks (Teil 1 native) */
.zet-lesen-head.is-variant-changed,
.zet-lesen-text.is-variant-changed {
  position: relative;
  box-shadow: inset 0 0 0 2px rgba(255, 204, 0, 0.72);
  background: rgba(255, 204, 0, 0.1);
}
.zet-lesen-head.is-variant-changed::after {
  content: "تغيّر";
  display: inline-flex;
  align-items: center;
  margin-inline-start: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 204, 0, 0.92);
  color: #1a1400;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.zet-lesen-text.is-variant-changed > .zet-lesen-text-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.zet-lesen-text.is-variant-changed > .zet-lesen-text-top::after {
  content: "تغيّر";
  display: inline-flex;
  align-items: center;
  margin-inline-start: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 204, 0, 0.92);
  color: #1a1400;
  font-size: 0.68rem;
  font-weight: 800;
}
.zet-lesen-head.is-variant-pulse,
.zet-lesen-text.is-variant-pulse {
  animation: zetb2-variant-pulse 1.15s ease;
}
@keyframes zetb2-variant-pulse {
  0% { box-shadow: inset 0 0 0 2px rgba(255, 204, 0, 0.95), 0 0 0 0 rgba(255, 204, 0, 0.45); }
  55% { box-shadow: inset 0 0 0 2px rgba(255, 204, 0, 0.95), 0 0 0 10px rgba(255, 204, 0, 0); }
  100% { box-shadow: inset 0 0 0 2px rgba(255, 204, 0, 0.72), 0 0 0 0 rgba(255, 204, 0, 0); }
}
html[data-color-scheme="light"] .zet-lesen-head.is-variant-changed,
html[data-color-scheme="light"] .zet-lesen-text.is-variant-changed {
  background: rgba(255, 196, 0, 0.16);
  box-shadow: inset 0 0 0 2px rgba(196, 140, 0, 0.75);
}

html[data-color-scheme="light"] .variant-changes-modal .variant-changes-card {
  color: #1a140c;
  background: linear-gradient(180deg, #fffdf8 0%, #fff6e8 100%);
  border-color: rgba(154, 107, 0, 0.35);
  box-shadow:
    0 24px 56px rgba(60, 45, 10, 0.18),
    0 0 0 1px rgba(154, 107, 0, 0.08);
}
html[data-color-scheme="light"] .variant-changes-head {
  background: rgba(255, 204, 0, 0.12);
  border-bottom-color: rgba(154, 107, 0, 0.22);
}
html[data-color-scheme="light"] .variant-changes-modal .welcome-modal-eyebrow {
  color: #8a6100;
}
html[data-color-scheme="light"] .variant-changes-modal #variant-changes-title,
html[data-color-scheme="light"] .variant-changes-modal .variant-changes-card h2 {
  color: #1a140c !important;
  -webkit-text-fill-color: #1a140c !important;
}
html[data-color-scheme="light"] .variant-changes-topic {
  background: #fff;
  border-color: rgba(154, 107, 0, 0.4);
  color: #5c4200 !important;
  -webkit-text-fill-color: #5c4200 !important;
}
html[data-color-scheme="light"] .variant-changes-scroll {
  scrollbar-color: rgba(154, 107, 0, 0.45) rgba(154, 107, 0, 0.08);
}
html[data-color-scheme="light"] .variant-changes-scroll::-webkit-scrollbar-track {
  background: rgba(154, 107, 0, 0.08);
}
html[data-color-scheme="light"] .variant-changes-scroll::-webkit-scrollbar-thumb {
  background: rgba(154, 107, 0, 0.45);
}
html[data-color-scheme="light"] .variant-changes-modal .welcome-modal-lead {
  color: #5a4a38;
}
html[data-color-scheme="light"] .variant-changes-notice {
  background: #fff8e0;
  border-color: rgba(154, 107, 0, 0.35);
  color: #3a2f22;
}
html[data-color-scheme="light"] .variant-changes-cross {
  background: #fffdf8;
  border-color: rgba(154, 107, 0, 0.22);
}
html[data-color-scheme="light"] .variant-changes-cross-label {
  color: #8a6100;
}
html[data-color-scheme="light"] .variant-changes-cross-title {
  background: #fff;
  border-color: rgba(154, 107, 0, 0.3);
  color: #3a2f22;
}
html[data-color-scheme="light"] .variant-changes-list {
  color: #2a2118;
}
html[data-color-scheme="light"] .variant-changes-modal .variant-changes-jump:hover,
html[data-color-scheme="light"] .variant-changes-modal .variant-changes-jump:focus-visible {
  color: #8a6100;
}
html[data-color-scheme="light"] .variant-changes-list li::marker {
  color: #8a6100;
}
html[data-color-scheme="light"] .variant-changes-foot {
  background: rgba(255, 246, 232, 0.95);
  border-top-color: rgba(154, 107, 0, 0.22);
}
html[data-color-scheme="light"] .variant-changes-modal label.variant-changes-dont-show {
  background: #fff;
  border-color: rgba(154, 107, 0, 0.35);
  color: #3a2f22;
}
.zet-lesen-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  direction: rtl;
}
.zet-lesen-duration select {
  min-width: 64px;
  height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: #111;
  color: var(--gold);
  font-weight: 800;
}
.zet-lesen-fs .font-scale-control {
  z-index: 50;
}
.zet-lesen-fs .font-scale-panel {
  /* Same as live Lesen: open to the physical right of the gear. */
  inset-inline-start: auto;
  inset-inline-end: auto;
  left: 0;
  right: auto;
}
.zet-hoeren-fs .font-scale-control {
  z-index: 50;
}
.zet-hoeren-fs .font-scale-panel,
.zet-hoeren-toolbar-start .font-scale-panel {
  inset-inline-start: auto;
  inset-inline-end: auto;
  left: 0;
  right: auto;
}
/* Full Prüfung: gear is on the physical right — open leftward into the toolbar. */
.exam-run-shell .font-scale-panel,
.exam-run-shell .zet-lesen-toolbar-start .font-scale-panel {
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  left: auto !important;
  right: 0 !important;
}
.zet-lesen-module {
  margin: 0;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.zet-lesen-kicker {
  margin: 0;
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.zet-lesen-sep {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 800;
}
.zet-lesen-toolbar h1 {
  margin: 0;
  font-size: clamp(16px, 2.2vw, 22px);
  line-height: 1.15;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.zet-lesen-timer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  direction: ltr;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.zet-lesen-timer-copy {
  display: grid;
  gap: 1px;
  text-align: end;
  direction: rtl;
}
.zet-lesen-timer-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.zet-lesen-timer-display {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--gold);
  line-height: 1;
}
.zet-lesen-timer.is-low .zet-lesen-timer-display,
.zet-lesen-timer.is-up .zet-lesen-timer-display {
  color: var(--red);
}
.zet-lesen-timer.is-up .zet-lesen-timer-display {
  animation: zet-timer-pulse 1s ease-in-out infinite;
}
@keyframes zet-timer-pulse {
  50% { opacity: 0.45; }
}
.zet-lesen-timer-controls {
  display: flex;
  gap: 6px;
}
.zet-lesen-timer-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 204, 0, 0.28);
  background: #111;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.zet-lesen-timer-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.zet-lesen-note {
  margin: 0 auto 8px;
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}
.zet-lesen-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.zet-lesen-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 10px 8px;
}
.zet-lesen-bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  /* Match .zet-lesen-toolbar chrome */
  background: rgba(8, 8, 8, 0.94);
  border-top: 1px solid rgba(255, 204, 0, 0.28);
  border-radius: 0 !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.zet-lesen-bar-score {
  margin: 0;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
}
.zet-lesen-bar-score.is-ok { color: var(--gold); }
.zet-lesen-bar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
}
.zet-lesen-bar-label-short {
  display: none;
}
.zet-lesen-board {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 10px;
  align-items: start;
  max-width: none;
}
.zet-lesen-texts {
  display: grid;
  gap: 10px;
}
.zet-lesen-text {
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 204, 0, 0.22);
  border-radius: 16px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.zet-lesen-text.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.45);
}
.zet-lesen-text.is-correct { border-color: #22c55e; box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35); }
.zet-lesen-text.is-wrong { border-color: var(--red); box-shadow: 0 0 0 1px rgba(221, 0, 0, 0.3); }
.zet-lesen-text-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.zet-lesen-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  flex: 0 0 auto;
}
.zet-lesen-text-label {
  font-weight: 800;
  color: var(--gold);
}
.zet-lesen-story-tag {
  margin-inline-start: auto;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #141414;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.zet-lesen-story-tag:hover,
.zet-lesen-story-tag.is-on {
  background: var(--gold);
  color: #111;
  border-color: #111;
}
.zet-lesen-story-box {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff6c2;
  color: #111;
  border: 1px solid #111;
}
.zet-lesen-story-box-title {
  margin: 0 0 6px;
  font-weight: 900;
  color: #111;
}
.zet-lesen-story-box-text {
  margin: 0;
  line-height: 1.85;
  direction: rtl;
  text-align: right;
}
.zet-lesen-story-box-text b {
  background: #ffcc00;
  border-radius: 4px;
  padding: 0 4px;
}
.zet-lesen-passage {
  margin: 0;
  color: #f2eee8;
  line-height: 1.75;
  white-space: pre-wrap;
}
.zet-lesen-slot {
  position: relative;
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 204, 0, 0.38);
  background: rgba(255, 204, 0, 0.06);
  color: #fff;
  font: inherit;
  text-align: start;
  padding: 10px 36px 10px 12px;
  cursor: pointer;
}
.zet-lesen-slot.is-filled {
  border-style: solid;
  border-color: var(--gold);
  background: rgba(255, 204, 0, 0.14);
}
.zet-lesen-slot.is-correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.16);
}
.zet-lesen-slot.is-wrong {
  border-color: var(--red);
  background: rgba(221, 0, 0, 0.16);
}
.zet-lesen-slot-empty { color: var(--muted); }
.zet-lesen-slot-value {
  display: none;
  align-items: center;
  gap: 10px;
}
.zet-lesen-slot.is-filled .zet-lesen-slot-empty { display: none; }
.zet-lesen-slot.is-filled .zet-lesen-slot-value { display: flex; }
.zet-lesen-slot-clear {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(221, 0, 0, 0.85);
  font-size: 14px;
  line-height: 1;
}
.zet-lesen-slot-clear[hidden] {
  display: none !important;
}
.zet-lesen-fazit {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 204, 0, 0.08);
  color: #ddd6cb;
  line-height: 1.6;
}
.zet-lesen-correction {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}
.zet-lesen-corr-ok,
.zet-lesen-corr-wrong {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.zet-lesen-corr-ok {
  border: 2px dashed rgba(34, 197, 94, 0.55);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.22), rgba(34, 197, 94, 0.14));
  color: #bbf7d0;
}
.zet-lesen-corr-ok-text {
  flex: 1;
  min-width: 0;
  color: inherit;
}
.zet-lesen-corr-check {
  color: #4ade80;
  font-size: 1.1rem;
  font-weight: 800;
}
.zet-lesen-corr-wrong {
  color: #fecaca;
  text-decoration: line-through;
  opacity: 0.95;
}
.zet-lesen-corr-x {
  color: #f87171;
  font-weight: 800;
}
.zet-lesen-side {
  position: sticky;
  top: 4px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 204, 0, 0.22);
  border-radius: 16px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100dvh - 7.25rem);
  overflow: hidden;
}
.zet-lesen-side-title {
  margin: 0 0 8px;
  color: var(--gold);
  font-weight: 800;
  flex-shrink: 0;
}
.zet-lesen-heads {
  list-style: none;
  margin: 0;
  padding: 0 2px 0 0;
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--gold, #ffcc00) 55%, transparent)
    color-mix(in srgb, #fff 8%, transparent);
}
.zet-lesen-heads::-webkit-scrollbar {
  width: 8px;
}
.zet-lesen-heads::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--gold, #ffcc00) 55%, transparent);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.zet-lesen-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 204, 0, 0.18);
  background: rgba(18, 18, 18, 0.88);
  color: #fff;
  font: inherit;
  text-align: start;
  padding: 8px 10px;
  cursor: pointer;
}
.zet-lesen-head:hover {
  border-color: var(--gold);
}
.zet-lesen-head.is-selected {
  border-color: var(--gold);
  background: rgba(255, 204, 0, 0.16);
  box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.35);
}
.zet-lesen-head.is-used,
.zet-lesen-head.is-used:hover,
.zet-lesen-head:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.35);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}
.zet-lesen-head.is-correct {
  border-color: var(--gold);
  background: rgba(255, 204, 0, 0.2);
  opacity: 1;
}
.zet-lesen-head.is-wrong {
  border-color: var(--red);
  background: rgba(221, 0, 0, 0.16);
  opacity: 1;
}
.zet-lesen-badge {
  flex: 0 0 auto;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #000;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
}
.zet-lesen-head-text {
  line-height: 1.35;
  color: #fff;
  font-weight: 700;
}
.zet-lesen-head-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: start;
}
.zet-lesen-head-tr {
  color: #ffd24d;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}
.zet-lesen-heads--mobile { display: none; }
.zet-lesen-ai-bar {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}
.zet-lesen-ai-bar--mobile { display: none; }
.zet-lesen-ai-btn {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  min-width: 0;
  min-height: 58px;
  padding: 6px 4px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255, 204, 0, 0.22);
  background: rgba(18, 18, 18, 0.88);
  color: #fff;
  cursor: pointer;
  font: inherit;
}
.zet-lesen-ai-btn:hover,
.zet-lesen-ai-btn.is-on {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 204, 0, 0.12);
}
.zet-lesen-ai-btn b {
  font-size: 11px;
  font-weight: 800;
}
.zet-lesen-ai-orb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff8dc 0%, #ffcc00 22%, #5a4a18 55%, #1a1400 100%);
  box-shadow: 0 0 0 1.5px rgba(26, 20, 0, 0.55), 0 0 8px rgba(255, 204, 0, 0.4);
}
.zet-lesen-text-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.zet-lesen-tr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.zet-lesen-tr-btn.is-solid {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}
.zet-lesen-tr-btn.is-hover {
  border: 1.5px solid var(--gold);
  background: #111;
  color: var(--gold);
}
.zet-lesen-tr-btn.is-hover.is-on {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.zet-lesen-text-tr {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 204, 0, 0.28);
  background: rgba(255, 204, 0, 0.08);
  color: #f2eee8;
  line-height: 1.7;
  direction: rtl;
  text-align: right;
}
.zet-word {
  cursor: text;
}
.zet-word.is-hi,
.zet-hi {
  background: linear-gradient(135deg, #fff176, #ffee58);
  color: #111;
  border-radius: 3px;
  padding: 0 2px;
}
.zet-kw-popup {
  position: fixed;
  z-index: 1200;
  display: none;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--gold);
  border: 1px solid #111;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}
.zet-kw-popup.is-on { display: flex; }
.zet-kw-popup button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #111;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.zet-kw-popup button:hover { background: rgba(0, 0, 0, 0.1); }
.zet-kw-popup svg { width: 18px; height: 18px; overflow: visible; }
.zet-word-tip {
  position: fixed;
  z-index: 1210;
  display: none;
  max-width: min(320px, calc(100vw - 24px));
  padding: 8px 14px;
  border-radius: 12px;
  background: #ffcc00;
  color: #111;
  border: 1px solid #111;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  direction: rtl;
}
.zet-word-tip.is-on { display: block; }
.zet-lesen-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 1300;
  display: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid rgba(255, 204, 0, 0.35);
  color: #fff;
  font-weight: 700;
}
.zet-lesen-toast.is-on { display: block; }
.zet-lesen-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.zet-lesen-modal.is-on { display: flex; }
.zet-lesen-modal-card {
  width: min(560px, 94vw);
  max-height: min(84vh, 720px);
  overflow: auto;
  padding: 1.25rem 1.35rem 1.2rem;
  border-radius: 20px;
  direction: rtl;
  text-align: right;
  color: #f2eee8;
  background: linear-gradient(180deg, #17140f 0%, #100e0a 100%);
  border: 1px solid rgba(255, 204, 0, 0.32);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 204, 0, 0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 204, 0, 0.55) rgba(255, 255, 255, 0.06);
}
.zet-lesen-modal-card::-webkit-scrollbar {
  width: 8px;
}
.zet-lesen-modal-card::-webkit-scrollbar-thumb {
  background: rgba(255, 204, 0, 0.5);
  border-radius: 99px;
}
.zet-lesen-modal-card > h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff8e8 !important;
  -webkit-text-fill-color: #fff8e8 !important;
  text-align: right;
}
.zet-lesen-modal-eyebrow {
  margin: 0 0 0.3rem;
  color: #ffcc00;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: right;
}
.zet-lesen-modal-card > p {
  margin: 0 0 0.85rem;
  color: #c9bfae;
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: right;
}
.zet-lesen-modal-card select,
.zet-lesen-chat-row input {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 204, 0, 0.28);
  background: rgba(0, 0, 0, 0.35);
  color: #f2eee8;
  font: inherit;
  font-weight: 700;
}
.zet-lesen-modal-card select {
  margin-bottom: 0.75rem;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #ffcc00 50%),
    linear-gradient(135deg, #ffcc00 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-inline-end: 2rem;
}
.zet-lesen-modal-card select:focus,
.zet-lesen-chat-row input:focus {
  outline: none;
  border-color: rgba(255, 204, 0, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.18);
}
.zet-lesen-modal-card select option {
  background: #14110c;
  color: #f2eee8;
}
.zet-lesen-modal-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.zet-lesen-modal-actions .btn.ghost,
.zet-lesen-modal-card .btn.ghost {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #f2eee8 !important;
  -webkit-text-fill-color: #f2eee8 !important;
  font-weight: 800;
}
.zet-lesen-modal-card .btn.primary {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, 0.75);
  background: linear-gradient(180deg, #ffe14d, #ffcc00);
  color: #1a1400 !important;
  -webkit-text-fill-color: #1a1400 !important;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(255, 204, 0, 0.25);
}
.zet-lesen-chat-log {
  display: grid;
  gap: 8px;
  min-height: 160px;
  max-height: min(36vh, 280px);
  overflow: auto;
  margin: 0 0 12px;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 204, 0, 0.18);
  background: rgba(255, 255, 255, 0.03);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 204, 0, 0.5) transparent;
}
.zet-lesen-chat-log p {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #ece6da;
  line-height: 1.6;
  text-align: right;
}
.zet-lesen-chat-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.zet-lesen-chat-row input {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.zet-lesen-chat-row .btn.primary {
  flex: 0 0 auto;
  padding-inline: 1.15rem;
}

html[data-color-scheme="light"] .zet-lesen-modal {
  background: rgba(40, 30, 12, 0.38);
}
html[data-color-scheme="light"] .zet-lesen-modal-card {
  color: #1a140c;
  background: linear-gradient(180deg, #fffdf8 0%, #fff6e8 100%);
  border-color: rgba(154, 107, 0, 0.35);
  box-shadow:
    0 24px 56px rgba(60, 45, 10, 0.18),
    0 0 0 1px rgba(154, 107, 0, 0.08);
  scrollbar-color: rgba(154, 107, 0, 0.45) rgba(154, 107, 0, 0.08);
}
html[data-color-scheme="light"] .zet-lesen-modal-card::-webkit-scrollbar-thumb {
  background: rgba(154, 107, 0, 0.45);
}
html[data-color-scheme="light"] .zet-lesen-modal-card > h2 {
  color: #1a140c !important;
  -webkit-text-fill-color: #1a140c !important;
}
html[data-color-scheme="light"] .zet-lesen-modal-eyebrow {
  color: #8a6100;
}
html[data-color-scheme="light"] .zet-lesen-modal-card > p {
  color: #5a4a38;
}
html[data-color-scheme="light"] .zet-lesen-modal-card select,
html[data-color-scheme="light"] .zet-lesen-chat-row input {
  background: #fff;
  border-color: rgba(154, 107, 0, 0.35);
  color: #1a140c;
}
html[data-color-scheme="light"] .zet-lesen-modal-card select {
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #8a6100 50%),
    linear-gradient(135deg, #8a6100 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
html[data-color-scheme="light"] .zet-lesen-modal-card select option {
  background: #fff;
  color: #1a140c;
}
html[data-color-scheme="light"] .zet-lesen-modal-card select:focus,
html[data-color-scheme="light"] .zet-lesen-chat-row input:focus {
  border-color: #8a6100;
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.28);
}
html[data-color-scheme="light"] .zet-lesen-chat-log {
  background: #fffdf8;
  border-color: rgba(154, 107, 0, 0.22);
  scrollbar-color: rgba(154, 107, 0, 0.45) transparent;
}
html[data-color-scheme="light"] .zet-lesen-chat-log p {
  background: #fff;
  border: 1px solid rgba(154, 107, 0, 0.16);
  color: #2a2118;
}
html[data-color-scheme="light"] .zet-lesen-modal-actions .btn.ghost,
html[data-color-scheme="light"] .zet-lesen-modal-card .btn.ghost {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.4) !important;
  color: #241b10 !important;
  -webkit-text-fill-color: #241b10 !important;
}
html[data-color-scheme="light"] .zet-lesen-modal-card .btn.primary {
  background: linear-gradient(180deg, #ffe14d, #ffcc00);
  border-color: rgba(154, 107, 0, 0.55);
  color: #1a1400 !important;
  -webkit-text-fill-color: #1a1400 !important;
}
.zet-lesen-story-lead,
.zet-lesen-story-hint,
.zet-lesen-story-empty {
  margin: 0 0 12px;
  color: #d7cfc3;
  line-height: 1.75;
  direction: rtl;
  text-align: right;
}
.zet-lesen-story-para {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-right: 3px solid var(--gold);
}
.zet-lesen-story-title,
.zet-lesen-story-para .zet-lesen-story-box-title {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 204, 0, 0.28);
  color: #ffcc00;
  font-weight: 800;
}
.zet-lesen-story-text,
.zet-lesen-story-para .zet-lesen-story-box-text {
  line-height: 1.9;
  direction: rtl;
  text-align: right;
  color: #f6f1e8;
}
.zet-lesen-story-text b {
  background: rgba(255, 204, 0, 0.28);
  color: #fff;
  border-radius: 4px;
  padding: 0 4px;
}
.zet-lesen-actions {
  display: flex;
  justify-content: center;
}
.zetb2-lesen-t1 .result {
  max-width: 1180px;
  margin: 16px auto 0;
}
@media (max-width: 860px) {
  .zet-lesen-board {
    grid-template-columns: 1fr;
  }
  .zet-lesen-side { display: none; }
  .zet-lesen-heads--mobile { display: grid; }
  .zet-lesen-ai-bar--mobile {
    display: flex;
    margin-bottom: 14px;
  }
  .player.player--zet-lesen { padding: 18px 14px; }
  .player.player--zet-lesen.zet-lesen-fs { padding: 0; }
  /*
   * Mobile toolbar: title centered on its own row, then controls centered
   * as a group. Do not use space-between — that scatters gear / timer / back.
   * Full-exam shell keeps the same rhythm + part switch on a third row.
   */
  .zet-lesen-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
    padding: 10px 12px;
  }
  .zet-lesen-toolbar-copy {
    flex: 1 1 100%;
    order: -1;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .zet-lesen-module,
  .zet-lesen-kicker { font-size: 0.62rem; }
  .zet-lesen-toolbar h1 { font-size: 15px; }
  .zet-lesen-scroll { padding: 4px 8px 8px; }
  .zet-lesen-toolbar-start {
    order: 1;
    flex: 1 1 100%;
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: none;
  }
  .zet-lesen-toolbar-tools {
    order: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  .zet-lesen-toolbar--exam .exam-part-switch,
  .exam-run-toolbar .exam-part-switch {
    flex: 0 1 auto;
    order: 0;
    justify-content: center;
    width: auto;
    max-width: 100%;
    margin-inline: 0;
  }
  .exam-run-toolbar.zet-lesen-toolbar {
    position: relative !important;
    top: auto !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 10px;
  }
  .exam-run-toolbar .zet-lesen-toolbar-center {
    flex: 1 1 100%;
    order: -1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
  }
  .exam-run-toolbar .zet-lesen-toolbar-copy {
    flex: 0 1 auto;
    order: 0;
    width: auto;
  }
  .exam-run-toolbar .exam-part-switch {
    flex: 0 1 auto;
  }
  /* Light/dark + settings sit on their own row — center the pair. */
  .exam-run-toolbar .zet-lesen-toolbar-start {
    flex: 1 1 100%;
    width: 100%;
    order: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }
  .exam-run-toolbar .zet-lesen-toolbar-tools {
    flex: 1 1 100%;
    width: 100%;
    order: 2;
    justify-content: center;
  }
  /* Full exam: keep chrome stable — no sticky jump, centered stack only */
  .exam-run-toolbar.zet-lesen-toolbar {
    position: relative !important;
    top: auto !important;
  }
  .zet-lesen-changes-btn {
    min-width: 0;
    padding: 0.42rem 0.85rem;
    font-size: 0.74rem;
    box-shadow:
      0 0 0 1px rgba(255, 204, 0, 0.2),
      0 0 12px rgba(255, 204, 0, 0.35);
  }
  .zet-lesen-duration {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    font-size: 11px;
  }
  .zet-lesen-duration select {
    min-width: 48px;
    height: 28px;
    padding: 0 4px;
  }
  .zet-lesen-timer {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
  }
  .zet-lesen-timer-controls { gap: 4px; flex: 0 0 auto; }
  .zet-lesen-timer-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .zet-lesen-timer-label { font-size: 9px; }
  .zet-lesen-timer-display { font-size: 0.95rem; }
  /* المدة sits next to the gear in RTL and gets covered — keep دقيقة + select only */
  .zet-lesen-duration-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .zet-lesen-fs .font-scale-panel {
    inset-inline-start: auto;
    inset-inline-end: auto;
    left: 0;
    right: auto;
  }
  /* Keep exam-shell zoom menu opening left even on narrow screens */
  .exam-run-shell .font-scale-panel,
  .exam-run-shell .zet-lesen-toolbar-start .font-scale-panel {
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
    left: auto !important;
    right: 0 !important;
  }
  .zet-lesen-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .zet-lesen-bar-score,
  .zet-lesen-bar-actions { width: 100%; }
  .zet-lesen-bar-actions {
    justify-content: center;
    gap: 8px;
  }
  .zet-lesen-bar-actions .btn {
    justify-content: center;
    padding: 9px 14px;
    font-size: 0.92rem;
    white-space: nowrap;
    line-height: 1.2;
  }
  .zet-lesen-bar-label-full {
    display: none;
  }
  .zet-lesen-bar-label-short {
    display: inline;
  }
}

@media (max-width: 520px) {
  /* Narrow phones: one centered control row each */
  .zet-lesen-toolbar-start,
  .zet-lesen-toolbar-tools {
    flex: 1 1 100%;
    justify-content: center;
  }
  .zet-lesen-toolbar-tools .zet-lesen-back {
    order: -1;
  }
}

/* Native Hören player — same shell as Lesen, redder opacity */
.player.player--zet-hoeren.zet-hoeren-fs {
  position: fixed;
  inset: 0;
  z-index: 1;
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #080505;
  border: 0;
  /* Beat .player { border-radius: 20px } — fullscreen chrome must be square. */
  border-radius: 0;
  overflow: hidden;
}
.zet-hoeren-level-b1.zet-hoeren-fs { background: #080505; }
.zet-hoeren-level-b2.zet-hoeren-fs { background: #0c0606; }
.zet-hoeren-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, auto) minmax(140px, 1fr);
  align-items: center;
  gap: 10px 16px;
  padding: 10px 16px;
  background: rgba(18, 8, 8, 0.96);
  border-bottom: 1px solid rgba(221, 0, 0, 0.35);
  border-radius: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* Match Lesen / Teil 2–3 chrome: physical LTR (page is html[dir=rtl]). */
  direction: ltr;
}
.zet-hoeren-toolbar-start {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}
.zet-hoeren-toolbar-center {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.zet-hoeren-toolbar-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  flex-wrap: nowrap;
  direction: ltr;
}
.zet-hoeren-part-switch {
  flex: 0 0 auto;
  max-width: 100%;
}
.zet-hoeren-part-switch .exam-part-switch-btn {
  text-decoration: none;
}
.zet-hoeren-toolbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  direction: ltr;
}
.zet-hoeren-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold, #ffcc00);
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  direction: rtl;
}
.zet-hoeren-back:hover {
  background: rgba(255, 204, 0, 0.12);
  border-color: var(--gold, #ffcc00);
  color: #fff;
}
.zet-hoeren-module {
  margin: 0;
  color: #ff6b6b;
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.zet-hoeren-kicker {
  margin: 0;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.zet-hoeren-sep { color: rgba(255, 255, 255, 0.35); font-weight: 800; }
.zet-hoeren-toolbar h1 {
  margin: 0;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.15;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.zet-hoeren-clip-count {
  color: #ffb4b4;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.zet-hoeren-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  direction: rtl;
}
.zet-hoeren-duration select {
  min-width: 56px;
  height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid rgba(221, 0, 0, 0.4);
  background: #111;
  color: #ff8a8a;
  font-weight: 800;
}
.zet-hoeren-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid rgba(221, 0, 0, 0.3);
  background: rgba(221, 0, 0, 0.08);
  direction: ltr;
}
.zet-hoeren-timer-copy {
  display: grid;
  gap: 1px;
  text-align: end;
  direction: rtl;
}
.zet-hoeren-timer-label { display: block; color: #c9b8b8; font-size: 10px; font-weight: 700; }
.zet-hoeren-timer-display { color: #fff; font-weight: 900; font-size: 16px; font-variant-numeric: tabular-nums; }
.zet-hoeren-timer-controls { display: flex; gap: 4px; }
.zet-hoeren-timer-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}
.zet-hoeren-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.zet-hoeren-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 18px;
}
.zet-hoeren-note {
  margin: 0 auto 14px;
  max-width: 980px;
  color: #e8d8d8;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}
.zet-hoeren-pack-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 14px;
  width: 100%;
}
.zet-hoeren-pack-toolbar .zet-hoeren-clip-count {
  display: inline-flex;
  margin: 0;
}
.zet-hoeren-pack-layout {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  margin: 0;
}
.zet-hoeren-pack-layout .layout-switch-btn {
  flex-direction: row;
  gap: 8px;
}
.zet-hoeren-clips {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}
.zet-hoeren-clips.is-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
  gap: 14px;
}
.zet-hoeren-clip {
  border-radius: 16px;
  border: 1px solid rgba(221, 0, 0, 0.28);
  background: rgba(221, 0, 0, 0.08);
  overflow: hidden;
}
.zet-hoeren-clip-head {
  padding: 14px 16px 12px;
  background: linear-gradient(135deg, rgba(120, 16, 16, 0.95), rgba(40, 10, 10, 0.95));
  display: grid;
  gap: 12px;
}
.zet-hoeren-clip-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.zet-hoeren-clip-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #111;
  font-weight: 900;
  flex: 0 0 auto;
}
.zet-hoeren-clip-title {
  margin: 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}
.zet-hoeren-player {
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 12px 14px;
  direction: ltr;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}
.zet-hoeren-clip > .zet-hoeren-no-audio {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.zet-hoeren-player audio { display: none; }
.zet-hoeren-play {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: #111;
  font-weight: 900;
  cursor: pointer;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  line-height: 1;
}
.zet-hoeren-track {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}
.zet-hoeren-progress {
  position: relative;
  width: 100%;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
  cursor: pointer;
}
.zet-hoeren-progress:hover {
  background: rgba(255, 255, 255, 0.22);
}
.zet-hoeren-progress:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.zet-hoeren-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ffcc00, #ff6b6b);
  pointer-events: none;
}
.zet-hoeren-time {
  color: #ffe0e0;
  font-size: 12px;
  font-weight: 700;
  min-width: 36px;
  font-variant-numeric: tabular-nums;
}
.zet-hoeren-time--end {
  text-align: end;
  opacity: 0.85;
}
.zet-hoeren-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
}
.zet-hoeren-mute {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  flex: 0 0 auto;
}
.zet-hoeren-mute:hover {
  background: rgba(255, 204, 0, 0.22);
}
.zet-hoeren-volume-range {
  width: 84px;
  height: 6px;
  accent-color: var(--gold);
  cursor: pointer;
}
@media (max-width: 640px) {
  .zet-hoeren-volume-range { width: 64px; }
  .zet-hoeren-player { gap: 8px; }
}
.zet-hoeren-no-audio,
.zet-hoeren-clip-note {
  margin: 0;
  color: #ffd0a8;
  font-size: 0.86rem;
  font-weight: 700;
}
.zet-hoeren-table-wrap { overflow-x: auto; }
.zet-hoeren-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.zet-hoeren-table th {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9b0b0;
  text-align: center;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.zet-hoeren-table th.is-text { text-align: start; }
.zet-hoeren-table td {
  padding: 10px;
  vertical-align: middle;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.zet-hoeren-table td.is-text { text-align: start; }
.zet-hoeren-table th:nth-child(2),
.zet-hoeren-table td:nth-child(2) { width: 48px; }
.zet-hoeren-table th:nth-child(3),
.zet-hoeren-table td:nth-child(3),
.zet-hoeren-table th:nth-child(4),
.zet-hoeren-table td:nth-child(4) { width: 72px; }
.zet-hoeren-sentence {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}
.zet-hoeren-tr {
  margin: 8px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 204, 0, 0.12);
  color: #fff6c2;
  font-size: 0.86rem;
  line-height: 1.55;
  direction: rtl;
  text-align: right;
}
.zet-hoeren-badge {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}
.zet-hoeren-row.is-correct { background: rgba(255, 204, 0, 0.08); }
.zet-hoeren-row.is-wrong { background: rgba(221, 0, 0, 0.14); }
.zet-hoeren-row.is-correct .zet-hoeren-badge { background: var(--gold); color: #111; }
.zet-hoeren-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.zet-hoeren-circle:hover { border-color: var(--gold); transform: scale(1.08); }
.zet-hoeren-circle.is-on {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.25);
}
.zet-hoeren-row.is-correct .zet-hoeren-circle.is-on {
  background: #1aab5e;
  border-color: #1aab5e;
}
.zet-hoeren-row.is-wrong .zet-hoeren-circle.is-on {
  background: var(--red);
  border-color: var(--red);
}
.zet-hoeren-circle.is-answer {
  border-color: #22c55e;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}
.zet-hoeren-circle.is-miss {
  border-color: var(--red);
  background: var(--red);
}
.zet-hoeren-circle.is-disabled {
  opacity: 0.35;
  cursor: default;
}
.zet-hoeren-clip-msg {
  margin: 0 12px 10px;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  direction: rtl;
  background: rgba(14, 156, 107, 0.12);
  border: 1.5px solid rgba(14, 156, 107, 0.35);
  color: #b7f7d8;
}
.zet-hoeren-clip-msg.is-bad {
  background: rgba(221, 0, 0, 0.12);
  border-color: rgba(221, 0, 0, 0.4);
  color: #ffc9c9;
}
.zet-hoeren-clip-score {
  display: inline-block;
  margin-inline-start: 0.65rem;
  color: var(--gold);
  font-weight: 900;
}
.zet-hoeren-tool--check {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.16);
  color: #b7f7d8;
}
.zet-hoeren-tool--check:hover {
  border-color: #22c55e;
  color: #fff;
  background: rgba(34, 197, 94, 0.28);
}
.zet-hoeren-clip-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.zet-hoeren-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, 0.28);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.zet-hoeren-tool.is-on,
.zet-hoeren-tool:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 204, 0, 0.12);
}
.zet-hoeren-story {
  margin: 0 12px 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff6c2;
  color: #111;
  border: 1px solid #111;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
}
.zet-hoeren-bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(14, 6, 6, 0.96);
  border-top: 1px solid rgba(221, 0, 0, 0.32);
  border-radius: 0;
}
.zet-hoeren-bar-score {
  margin: 0;
  font-weight: 800;
  color: #ffb4b4;
  text-align: center;
}
.zet-hoeren-bar-score.is-ok { color: var(--gold); }
.zet-hoeren-bar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.zet-hoeren-bar-label-short {
  display: none;
}
@media (max-width: 860px) {
  /*
   * Same rhythm as Lesen Teil 1: title row, then controls as one centered group.
   */
  .zet-hoeren-toolbar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    padding: 8px 10px;
  }
  .zet-hoeren-toolbar-copy {
    flex: 1 1 100%;
    order: -1;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .zet-hoeren-module,
  .zet-hoeren-kicker { font-size: 0.62rem; }
  .zet-hoeren-toolbar h1 { font-size: 14px; }
  .zet-hoeren-scroll { padding: 10px 12px 14px; }
  .zet-hoeren-toolbar-start {
    order: 1;
    flex: 1 1 100%;
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    max-width: none;
  }
  .zet-hoeren-toolbar-tools {
    order: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  .zet-hoeren-toolbar-tools .zet-hoeren-back {
    order: -1;
  }
  .zet-hoeren-back {
    padding: 0.32rem 0.65rem;
    font-size: 0.74rem;
  }
  .zet-hoeren-duration {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    font-size: 11px;
  }
  .zet-hoeren-duration select {
    min-width: 44px;
    height: 28px;
    padding: 0 4px;
  }
  .zet-hoeren-duration > span:last-child {
    display: none;
  }
  .zet-hoeren-timer {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    flex: 0 1 auto;
    min-width: 0;
  }
  .zet-hoeren-timer-btn {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .zet-hoeren-timer-label { font-size: 9px; }
  .zet-hoeren-timer-display { font-size: 14px; }
  .zet-hoeren-duration-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .zet-hoeren-bar {
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .zet-hoeren-bar-actions {
    width: 100%;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .zet-hoeren-bar-actions .btn {
    justify-content: center;
    padding: 9px 14px;
    font-size: 0.92rem;
    white-space: nowrap;
    line-height: 1.2;
  }
  .zet-hoeren-bar-label-full {
    display: none;
  }
  .zet-hoeren-bar-label-short {
    display: inline;
  }
  .zet-hoeren-table th:nth-child(3),
  .zet-hoeren-table td:nth-child(3),
  .zet-hoeren-table th:nth-child(4),
  .zet-hoeren-table td:nth-child(4) { width: 56px; }
  .zet-hoeren-sentence { font-size: 14px; }
  .zet-hoeren-clips.is-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .zet-hoeren-toolbar-start,
  .zet-hoeren-toolbar-tools {
    flex: 0 1 auto;
    justify-content: center;
  }
}

/* Hören skill hub — B1 Teile + B2 packs */
.tabs.tabs--hoeren-mode {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  margin-bottom: 12px;
  background: rgba(14, 10, 10, 0.92);
  border: 1px solid rgba(255, 204, 0, 0.16);
  border-radius: 18px;
}
.tabs.tabs--hoeren-mode::before,
.tabs.tabs--hoeren-mode::after {
  content: none;
  flex: 0;
}
.hoeren-mode-tab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 12px;
  color: rgba(245, 240, 232, 0.72);
  font-weight: 800;
  background: transparent;
  border: 1px solid transparent;
}
.hoeren-mode-tab:hover {
  color: #fff;
  border-color: rgba(255, 204, 0, 0.22);
  background: rgba(255, 204, 0, 0.06);
}
.hoeren-mode-tab.is-active {
  color: #fff;
  background: linear-gradient(180deg, #3a7bd5, #1f5fad);
  border-color: rgba(255, 204, 0, 0.28);
  box-shadow: 0 8px 18px rgba(31, 95, 173, 0.28);
}
.tabs--hoeren-mode[data-level="b1"] .hoeren-mode-tab.is-active {
  background: linear-gradient(180deg, #ff4d4d, var(--red));
  box-shadow: 0 8px 18px rgba(221, 0, 0, 0.25);
}
.hoeren-mode-tab.is-active .hoeren-mode-icon {
  filter: drop-shadow(0 0 4px rgba(255, 204, 0, 0.35));
}
.hoeren-hub {
  margin: 0 0 18px;
  width: 100%;
}
.hoeren-hub-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(28, 28, 28, 0.95);
  border: 1px solid rgba(255, 204, 0, 0.16);
  width: 100%;
  box-sizing: border-box;
}
.hoeren-hub-banner h2 {
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}
.hoeren-hub-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}
.hoeren-hub-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 204, 0, 0.22);
  background: rgba(12, 12, 12, 0.94);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.hoeren-hub-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 204, 0, 0.42);
}
.hoeren-hub-card.is-current {
  border-color: rgba(255, 204, 0, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.18);
}
/* Hub tiles — same large layout for الجمل (audio) + الأكواد (codes) */
.hoeren-hub-card--tile,
.hoeren-hub-card--audio,
.hoeren-hub-card--codes {
  min-height: 210px;
  gap: 12px;
  padding: 16px;
}
.hoeren-hub-card--tile .hoeren-hub-card-top,
.hoeren-hub-card--audio .hoeren-hub-card-top,
.hoeren-hub-card--codes .hoeren-hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hoeren-hub-card--tile .hoeren-hub-badge,
.hoeren-hub-card--audio .hoeren-hub-badge,
.hoeren-hub-card--codes .hoeren-hub-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c9b8b8;
  font-size: 11px;
  font-weight: 800;
}
.hoeren-hub-card--tile .hoeren-hub-card-copy,
.hoeren-hub-card--audio .hoeren-hub-card-copy,
.hoeren-hub-card--codes .hoeren-hub-card-copy {
  display: grid;
  gap: 8px;
  text-align: center;
  justify-items: center;
  flex: 1 1 auto;
}
.hoeren-hub-card--tile .hoeren-hub-label,
.hoeren-hub-card--audio .hoeren-hub-label,
.hoeren-hub-card--codes .hoeren-hub-label {
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.hoeren-hub-card--tile .hoeren-hub-count,
.hoeren-hub-card--audio .hoeren-hub-count,
.hoeren-hub-card--codes .hoeren-hub-count {
  display: inline;
  color: rgba(255, 204, 0, 0.85);
  font-size: 14px;
  font-weight: 700;
}
.hoeren-hub-card--tile .hoeren-hub-cta,
.hoeren-hub-card--audio .hoeren-hub-cta,
.hoeren-hub-card--codes .hoeren-hub-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 204, 0, 0.14);
  border: 1px solid rgba(255, 204, 0, 0.45);
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
  box-sizing: border-box;
}

/* Compact strip — topic-list mini nav only */
.hoeren-hub-card--pack {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  min-height: 0;
}
.hoeren-hub-card--pack .hoeren-hub-card-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}
.hoeren-hub-card--pack .hoeren-hub-badge,
.hoeren-hub-card--pack .hoeren-hub-sub,
.hoeren-hub-card--pack .hoeren-hub-count,
.hoeren-hub-card--pack .hoeren-hub-cta {
  display: none;
}
.hoeren-hub-card--pack .hoeren-hub-label {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.hoeren-hub-card--pack .hoeren-hub-label::before {
  content: "< ";
  color: var(--gold);
}
.hoeren-hub-card--pack .hoeren-hub-num {
  order: 2;
  margin-inline-start: auto;
}
.hoeren-hub-card--b1 {
  background: rgba(36, 30, 12, 0.92);
  border-color: rgba(255, 204, 0, 0.24);
}
.hoeren-hub-card--b1:hover,
.hoeren-hub-card--b1.is-current {
  background: rgba(46, 38, 14, 0.98);
  border-color: rgba(255, 204, 0, 0.42);
}
.hoeren-hub-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(80, 16, 16, 0.95);
  color: var(--gold);
  font-weight: 900;
  flex: 0 0 auto;
}
.hoeren-hub-card--b1 .hoeren-hub-num {
  background: rgba(255, 204, 0, 0.16);
  color: var(--gold);
}
.hoeren-hub-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.hoeren-hub-badge {
  justify-self: end;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ddd6cb;
  font-size: 11px;
  font-weight: 800;
}
.hoeren-hub-label {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}
.hoeren-hub-sub {
  color: #cfc6b8;
  font-size: 13px;
  font-weight: 700;
}
.hoeren-hub-count {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}
.hoeren-hub-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 204, 0, 0.14);
  color: var(--gold);
  font-weight: 800;
  font-size: 14px;
}
.hoeren-hub-card--b1 .hoeren-hub-cta {
  background: rgba(255, 204, 0, 0.18);
}
.hoeren-hub-play {
  font-size: 11px;
}
.exam-list--hoeren-b1 .exam-collapse--catalog .exam-row {
  background: rgba(36, 30, 12, 0.9);
  border-color: rgba(255, 204, 0, 0.2);
}
.zet-hoeren-teils {
  display: flex;
  justify-content: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  padding: 8px 16px 10px;
  background: rgba(14, 6, 6, 0.96);
  border-bottom: 1px solid rgba(221, 0, 0, 0.28);
}
.zet-hoeren-teil {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  color: rgba(245, 240, 232, 0.78);
  font-weight: 700;
  text-decoration: none;
}
.zet-hoeren-teil.is-active {
  color: #fff;
  font-weight: 800;
  background: linear-gradient(180deg, #ff4d4d, var(--red));
  border: 1px solid rgba(255, 204, 0, 0.35);
  box-shadow: 0 8px 18px rgba(221, 0, 0, 0.25);
}
@media (max-width: 820px) {
  .hoeren-hub-cards {
    grid-template-columns: 1fr;
  }
  .hoeren-hub-card--pack {
    min-height: 56px;
  }
}

.hoeren-hub-cards--mini {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}
.hoeren-hub-cards--mini .hoeren-hub-card {
  padding: 12px 14px;
}
.hoeren-hub-card--pack .hoeren-hub-count {
  display: inline;
  color: rgba(255, 204, 0, 0.75);
  font-size: 12px;
}

/* B1 الأكواد — warning variants on top of shared tile layout */
.hoeren-hub-warn-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(221, 0, 0, 0.16);
  border: 1px solid rgba(221, 0, 0, 0.35);
  color: #ff6b6b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.hoeren-hub-card--codes.is-warn {
  border-color: rgba(221, 0, 0, 0.45);
  background: linear-gradient(160deg, rgba(80, 12, 12, 0.95), rgba(18, 8, 8, 0.96));
}
.hoeren-hub-card--codes.is-warn .hoeren-hub-num {
  background: var(--red);
  color: #fff;
}
.hoeren-hub-card--codes.is-warn .hoeren-hub-label {
  color: #ff6b6b;
}
.hoeren-hub-warn-text {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(221, 0, 0, 0.14);
  border: 1px solid rgba(221, 0, 0, 0.28);
  color: #ffc9c9;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}
.hoeren-hub-card--codes .hoeren-hub-cta.is-warn {
  background: rgba(221, 0, 0, 0.16);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff8f8f;
}

.hoeren-codes-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}
.hoeren-codes-modal[hidden] {
  display: none !important;
}
body.hoeren-codes-modal-open {
  overflow: hidden;
}
.hoeren-codes-modal-card {
  width: min(440px, 100%);
  padding: 28px 22px 18px;
  border-radius: 22px;
  background: #151010;
  border: 1px solid rgba(255, 204, 0, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
  direction: rtl;
}
.hoeren-codes-modal-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 204, 0, 0.14);
  border: 1px solid rgba(255, 204, 0, 0.35);
  font-size: 26px;
}
.hoeren-codes-modal-card h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
}
.hoeren-codes-modal-card p {
  margin: 0 0 18px;
  color: #e8d8d8;
  font-size: 0.95rem;
  line-height: 1.75;
  font-weight: 600;
}
.hoeren-codes-modal-primary,
.hoeren-codes-modal-enter {
  width: 100%;
  justify-content: center;
  margin: 0 0 10px;
  border-radius: 999px !important;
}
.hoeren-codes-modal-close {
  display: inline-block;
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: #9a8a8a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.hoeren-codes-modal-close:hover {
  color: #ffcc00;
}

/* B1 topic grid inside h tN — same pack-card language as B2 */
.exam-list--hoeren-topics {
  display: grid;
  gap: 10px;
}
.exam-list--hoeren-topics.is-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 900px) {
  .exam-list--hoeren-topics.is-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.hoeren-topic-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  background: rgba(12, 12, 12, 0.94);
  border: 1px solid rgba(255, 204, 0, 0.22);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.hoeren-topic-card:hover {
  border-color: rgba(255, 204, 0, 0.45);
  background: rgba(22, 16, 10, 0.98);
  transform: translateY(-1px);
}
.hoeren-topic-title {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 800;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hoeren-topic-title-wrap {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  order: 1;
}
.hoeren-topic-title-wrap .hoeren-topic-title {
  flex: 0 1 auto;
}
.hoeren-topic-title-wrap .ver,
.hoeren-topic-card .ver {
  order: unset;
  flex: 0 0 auto;
}
.hoeren-topic-title::before {
  content: "< ";
  color: var(--gold);
}
.hoeren-topic-num {
  order: 3;
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgba(80, 16, 16, 0.95);
  color: var(--gold);
  font-weight: 900;
  font-size: 13px;
}
.hoeren-topic-score {
  order: 4;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}
.exam-list--hoeren-topics:not(.is-grid) .hoeren-topic-card {
  width: 100%;
}

/* Variant picker: one card per title, modal chooses الأصل / تعديلات N */
button.exam-collapse--picker,
a.exam-collapse--picker {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  outline: none;
}
button.exam-collapse--picker .exam-row,
a.exam-collapse--picker .exam-row {
  width: 100%;
  box-sizing: border-box;
}
button.hoeren-topic-card--picker {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
body.variant-picker-open {
  overflow: hidden;
}
.variant-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
}
.variant-picker-modal[hidden] {
  display: none;
}
.variant-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}
.variant-picker-card {
  position: relative;
  width: min(420px, 100%);
  padding: 28px 24px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 204, 0, 0.28);
  background: rgba(18, 16, 12, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  text-align: right;
}
.variant-picker-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
}
.variant-picker-card h2 {
  margin: 0 0 0.55rem;
  color: #f5f0e6;
  font-size: 1.2rem;
  font-weight: 800;
  text-align: left;
}
.variant-picker-intro {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 204, 0, 0.28);
  background: rgba(255, 204, 0, 0.08);
  color: #f0e6c8;
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: right;
  font-weight: 600;
}
.variant-picker-options {
  display: grid;
  gap: 10px;
  margin: 0 0 1rem;
}
.variant-picker-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 204, 0, 0.22);
  background: rgba(28, 24, 16, 0.95);
  color: #f5f0e6;
  text-decoration: none;
  font-weight: 700;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.variant-picker-option:hover,
.variant-picker-option:focus-visible {
  border-color: rgba(255, 204, 0, 0.55);
  background: rgba(40, 32, 14, 0.98);
  transform: translateY(-1px);
  outline: none;
}
.variant-picker-option.is-original {
  border-color: rgba(255, 204, 0, 0.4);
  background: rgba(46, 36, 12, 0.98);
}
.variant-picker-option.is-modified {
  border-color: rgba(232, 163, 23, 0.35);
}
.variant-picker-option-main {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
}
.variant-picker-option-label {
  font-size: 0.98rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.variant-picker-option-label .ver {
  pointer-events: none;
}
.variant-picker-option-blurb {
  color: rgba(240, 230, 200, 0.82);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
}
.variant-picker-option-score {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 800;
}
.variant-picker-close {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px;
  border: 0;
  background: transparent;
  color: #bbb4a8;
  font: inherit;
  cursor: pointer;
}
.variant-picker-close:hover {
  color: var(--gold);
}

/* Prüfung theme start modal */
body.exam-start-open {
  overflow: hidden;
}
.exam-start-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
}
.exam-start-modal[hidden] {
  display: none;
}
.exam-start-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}
.exam-start-card {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: rgba(12, 12, 12, 0.96);
  border: 1px solid rgba(255, 204, 0, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  display: grid;
  gap: 12px;
  text-align: start;
}
.exam-start-eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.exam-start-card h2 {
  margin: 0;
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.2;
  text-align: start;
  justify-self: stretch;
  width: 100%;
}
.exam-start-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.exam-start-full {
  justify-self: stretch;
  text-align: center;
  min-height: 46px;
}
.exam-start-or {
  margin: 4px 0 0;
  text-align: center;
  color: #d8d2c8;
  font-size: 13px;
  font-weight: 700;
}
.exam-start-parts {
  margin-top: 2px;
}
.exam-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.exam-start-close {
  border: 0;
  background: transparent;
  color: #9a8a8a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 4px;
}
.exam-start-close:hover {
  color: #ffcc00;
}
.exam-hub-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  white-space: nowrap;
}
.exam-hub-or {
  margin: 0;
  color: #d8d2c8;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
button.exam-collapse--picker,
a.exam-collapse--picker {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: inherit;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
button.exam-collapse--picker .exam-row,
a.exam-collapse--picker .exam-row {
  width: 100%;
}

/* B1 number-code fullscreen player */
.zet-hoeren-code-form .zet-hoeren-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
}
.zet-hoeren-code-card {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 28px 24px;
  border-radius: 20px;
  background: rgba(18, 10, 10, 0.96);
  border: 1px solid rgba(255, 204, 0, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.zet-hoeren-code-hint {
  margin: 0 0 14px;
  color: #cfc6b8;
  font-size: 14px;
  text-align: center;
}
.zet-hoeren-code-topic {
  margin: 0 0 22px;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}
.zet-hoeren-code-label {
  display: block;
  margin: 0 0 8px;
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
}
.zet-hoeren-code-input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  letter-spacing: 0.06em;
}
.zet-hoeren-code-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.18);
}
.zet-hoeren-code-result {
  margin: 16px 0 0;
  text-align: center;
  font-weight: 900;
  font-size: 16px;
}
.zet-hoeren-code-result.is-ok { color: var(--gold); }
.zet-hoeren-code-result.is-bad { color: #ff6b6b; }
.zet-hoeren-code-explain {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 204, 0, 0.08);
  border: 1px solid rgba(255, 204, 0, 0.18);
  color: #f0e6d2;
  font-size: 14px;
  line-height: 1.55;
  direction: rtl;
  text-align: start;
}

/* ===== Appearance: color-scheme toggle + modal + light surfaces ===== */
.zet-lesen-toolbar-start,
.zet-hoeren-toolbar-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}
.color-scheme-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 18px;
}
.color-scheme-modal[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.color-scheme-modal .btn.primary {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}
.exam-start-full.btn.primary,
.exam-start-modal .btn.primary {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}
.color-scheme-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}
.color-scheme-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: #12100c;
  border: 1px solid rgba(255, 204, 0, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  color: #f6f6f6;
  text-align: start;
}
.color-scheme-modal-eyebrow {
  margin: 0 0 6px;
  color: #ffcc00;
  font-size: 13px;
  font-weight: 700;
}
.color-scheme-modal-card h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  line-height: 1.35;
}
.color-scheme-modal-sub {
  margin: 0 0 14px;
  color: #cfc4b4;
  font-size: 0.95rem;
  line-height: 1.55;
}
.color-scheme-dont-show {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 16px;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(255, 204, 0, 0.08);
  color: #ffe9a8;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
  text-align: right;
}
.color-scheme-dont-show span {
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
}
.color-scheme-dont-show input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #ffcc00;
  cursor: pointer;
}
.color-scheme-modal-actions {
  display: grid;
  gap: 10px;
}
body.color-scheme-modal-open {
  overflow: hidden;
}

/* Light chrome only on live play surfaces — never dashboard / lists / Prüfung hubs. */
html[data-color-scheme="light"] body:is(
  .app-live-fullscreen,
  .zetb2-exam-shell,
  .zetb2-schreiben,
  .zetb2-lesen,
  .zetb2-lesen-t1,
  .zetb2-hoeren
),
html[data-color-scheme="light"] body:is(
  .app-live-fullscreen,
  .zetb2-exam-shell,
  .zetb2-schreiben,
  .zetb2-lesen,
  .zetb2-lesen-t1,
  .zetb2-hoeren
) .app-shell {
  color: #1a140c;
}
html[data-color-scheme="light"] body:is(
  .app-live-fullscreen,
  .zetb2-exam-shell,
  .zetb2-schreiben,
  .zetb2-lesen,
  .zetb2-lesen-t1,
  .zetb2-hoeren
) .app-bg-overlay {
  background:
    linear-gradient(180deg, rgba(244, 239, 228, 0.72) 0%, rgba(244, 239, 228, 0.88) 100%),
    radial-gradient(900px 420px at 85% -5%, rgba(221, 0, 0, 0.1), transparent 55%),
    radial-gradient(760px 380px at 5% 15%, rgba(255, 179, 0, 0.12), transparent 50%);
}
html[data-color-scheme="light"] body:is(
  .app-live-fullscreen,
  .zetb2-exam-shell,
  .zetb2-schreiben,
  .zetb2-lesen,
  .zetb2-lesen-t1,
  .zetb2-hoeren
) .topbar,
html[data-color-scheme="light"] body:is(
  .app-live-fullscreen,
  .zetb2-exam-shell,
  .zetb2-schreiben,
  .zetb2-lesen,
  .zetb2-lesen-t1,
  .zetb2-hoeren
) .app-header .topbar {
  background: rgba(255, 250, 240, 0.92);
  border-bottom-color: rgba(180, 130, 20, 0.25);
}
html[data-color-scheme="light"] .exam-run-shell {
  background: #f4efe4;
  color: #1a140c;
}
html[data-color-scheme="light"] .exam-run-shell.exam-run-shell--b2 {
  background: #f7f1e4;
}
/* Beat B2 dark-chrome rules (.exam-run-shell--b2 / .zet-lesen-level-b2). */
html[data-color-scheme="light"] .exam-run-shell,
html[data-color-scheme="light"] .exam-run-shell.exam-run-shell--b2,
html[data-color-scheme="light"] .exam-run-shell.exam-run-shell--b1 {
  background: #f4efe4 !important;
  color: #1a140c !important;
}
html[data-color-scheme="light"] .exam-run-shell.exam-run-shell--b2 {
  background: #f7f1e4 !important;
}
html[data-color-scheme="light"] .exam-run-shell .exam-run-toolbar,
html[data-color-scheme="light"] .exam-run-shell.exam-run-shell--b2 .exam-run-toolbar,
html[data-color-scheme="light"] .zet-lesen-toolbar,
html[data-color-scheme="light"] .zet-lesen-level-b2 .zet-lesen-toolbar,
html[data-color-scheme="light"] .zet-lesen-bar,
html[data-color-scheme="light"] .zet-lesen-level-b2 .zet-lesen-bar {
  background: rgba(255, 250, 240, 0.98) !important;
  border-color: rgba(154, 107, 0, 0.32) !important;
  border-bottom-color: rgba(154, 107, 0, 0.32) !important;
  border-top-color: rgba(154, 107, 0, 0.32) !important;
  color: #1a140c !important;
  border-radius: 0 !important;
}
html[data-color-scheme="light"] .zet-lesen-module,
html[data-color-scheme="light"] .exam-run-shell .zet-lesen-module,
html[data-color-scheme="light"] .exam-run-shell.exam-run-shell--b2 .zet-lesen-module,
html[data-color-scheme="light"] .zet-lesen-level-b2 .zet-lesen-module {
  color: #8a6100 !important;
}
html[data-color-scheme="light"] .player.player--zet-lesen.zet-lesen-fs,
html[data-color-scheme="light"] .zet-lesen-fs,
html[data-color-scheme="light"] .zet-lesen-level-b2.zet-lesen-fs {
  background: #f4efe4 !important;
}
html[data-color-scheme="light"] .zet-lesen-level-b2.zet-lesen-fs {
  background: #f7f1e4 !important;
}
html[data-color-scheme="light"] .zet-lesen-text,
html[data-color-scheme="light"] .zet-lesen-side,
html[data-color-scheme="light"] .zet-lesen-head,
html[data-color-scheme="light"] .zet-lesen-level-b2 .zet-lesen-text,
html[data-color-scheme="light"] .zet-lesen-level-b2 .zet-lesen-side,
html[data-color-scheme="light"] .zet-lesen-level-b2 .zet-lesen-head {
  background: #fffdf8 !important;
  border-color: rgba(154, 107, 0, 0.32) !important;
  color: #1a140c !important;
}
html[data-color-scheme="light"] .exam-part-switch,
html[data-color-scheme="light"] .exam-run-shell.exam-run-shell--b2 .exam-part-switch {
  border-color: rgba(154, 107, 0, 0.35) !important;
  background: rgba(255, 255, 255, 0.55) !important;
}
html[data-color-scheme="light"] .exam-part-switch-btn {
  color: #3a2f22 !important;
  background: transparent !important;
  border-color: transparent !important;
}
html[data-color-scheme="light"] .exam-part-switch-btn.is-active,
html[data-color-scheme="light"] .exam-run-shell.exam-run-shell--b2 .exam-part-switch-btn.is-active {
  background: #ffb300 !important;
  border-color: #ffb300 !important;
  color: #1a140c !important;
  -webkit-text-fill-color: #1a140c !important;
}
html[data-color-scheme="light"] .exam-run-frame,
html[data-color-scheme="light"] .exam-run-shell.exam-run-shell--b2 .exam-run-frame {
  background: #f4efe4 !important;
}
html[data-color-scheme="light"] .zet-lesen-changes-btn,
html[data-color-scheme="light"] .variant-changes-fab {
  background: linear-gradient(180deg, #fffdf5, #ffe8a3) !important;
  border-color: rgba(154, 107, 0, 0.55) !important;
  color: #5c4200 !important;
  -webkit-text-fill-color: #5c4200 !important;
  box-shadow:
    0 0 0 1px rgba(154, 107, 0, 0.18),
    0 4px 14px rgba(120, 80, 0, 0.16) !important;
  animation: none;
}
html[data-color-scheme="light"] .zet-lesen-changes-btn:hover,
html[data-color-scheme="light"] .zet-lesen-changes-btn:focus-visible,
html[data-color-scheme="light"] .variant-changes-fab:hover {
  background: linear-gradient(180deg, #fff6d6, #ffd666) !important;
  border-color: #8a6100 !important;
  color: #3a2a00 !important;
  -webkit-text-fill-color: #3a2a00 !important;
  box-shadow:
    0 0 0 1px rgba(154, 107, 0, 0.28),
    0 6px 18px rgba(120, 80, 0, 0.2) !important;
}
html[data-color-scheme="light"] .color-scheme-modal-eyebrow {
  color: #9a6b00;
}
html[data-color-scheme="light"] .color-scheme-modal-sub {
  color: #5a4a38;
}
html[data-color-scheme="light"] .color-scheme-dont-show {
  color: #5a3d00;
  border-color: rgba(180, 130, 20, 0.35);
  background: rgba(255, 204, 0, 0.14);
}
/* Lesen light-mode contrast: native Teil 1 uses explicit dark-theme text colors. */
html[data-color-scheme="light"] .zet-lesen-toolbar h1,
html[data-color-scheme="light"] .zet-lesen-kicker,
html[data-color-scheme="light"] .zet-lesen-timer-label,
html[data-color-scheme="light"] .zet-lesen-duration,
html[data-color-scheme="light"] .zet-lesen-passage,
html[data-color-scheme="light"] .zet-lesen-fazit,
html[data-color-scheme="light"] .zet-lesen-text-tr,
html[data-color-scheme="light"] .zet-lesen-slot,
html[data-color-scheme="light"] .zet-lesen-slot-empty,
html[data-color-scheme="light"] .zet-lesen-slot-value,
html[data-color-scheme="light"] .zet-lesen-head,
html[data-color-scheme="light"] .zet-lesen-head-text,
html[data-color-scheme="light"] .zet-lesen-head-tr,
html[data-color-scheme="light"] .zet-lesen-side-title,
html[data-color-scheme="light"] .zet-lesen-text-label,
html[data-color-scheme="light"] .zet-lesen-note,
html[data-color-scheme="light"] .zet-lesen-bar-score {
  color: #241b10 !important;
  -webkit-text-fill-color: #241b10 !important;
}
html[data-color-scheme="light"] .zet-lesen-text-tr {
  background: #fff6e8 !important;
  border-color: rgba(154, 107, 0, 0.28) !important;
  color: #1a140c !important;
  -webkit-text-fill-color: #1a140c !important;
}
html[data-color-scheme="light"] .zet-lesen-fazit {
  background: #fff8e8 !important;
  border: 1px solid rgba(154, 107, 0, 0.22);
  color: #3a2f22 !important;
  -webkit-text-fill-color: #3a2f22 !important;
}
html[data-color-scheme="light"] .zet-lesen-corr-ok {
  background: linear-gradient(135deg, #eafaf1, #d9f5e6) !important;
  border-color: #7bc99a !important;
  color: #14532d !important;
  -webkit-text-fill-color: #14532d !important;
}
html[data-color-scheme="light"] .zet-lesen-corr-check {
  color: #16a34a !important;
}
html[data-color-scheme="light"] .zet-lesen-corr-wrong {
  color: #b23b2e !important;
  -webkit-text-fill-color: #b23b2e !important;
}
html[data-color-scheme="light"] .zet-lesen-corr-x {
  color: #dc2626 !important;
}
html[data-color-scheme="light"] .zet-lesen-text.is-correct {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.35);
}
html[data-color-scheme="light"] .zet-lesen-text.is-wrong {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.28);
}
html[data-color-scheme="light"] .zet-lesen-slot.is-correct {
  border-color: #16a34a !important;
  background: rgba(22, 163, 74, 0.1) !important;
}
html[data-color-scheme="light"] .zet-lesen-slot.is-wrong {
  border-color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.08) !important;
}
html[data-color-scheme="light"] .zet-lesen-module,
html[data-color-scheme="light"] .zet-lesen-side-title,
html[data-color-scheme="light"] .zet-lesen-text-label,
html[data-color-scheme="light"] .zet-lesen-head-tr,
html[data-color-scheme="light"] .zet-lesen-bar-score,
html[data-color-scheme="light"] .zet-lesen-timer-display {
  color: #8a6100 !important;
  -webkit-text-fill-color: #8a6100 !important;
}
html[data-color-scheme="light"] .zet-lesen-kicker {
  color: #b00000 !important;
  -webkit-text-fill-color: #b00000 !important;
}
html[data-color-scheme="light"] .zet-lesen-sep {
  color: rgba(36, 27, 16, 0.42) !important;
}
html[data-color-scheme="light"] .zet-lesen-slot {
  background: #fffdf7 !important;
  border-color: rgba(154, 107, 0, 0.42) !important;
}
html[data-color-scheme="light"] .zet-lesen-head {
  background: #fffdf7 !important;
}
html[data-color-scheme="light"] .zet-lesen-story-tag {
  background: #292929 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html[data-color-scheme="light"] .zet-lesen-timer-btn {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.4) !important;
  color: #241b10 !important;
  -webkit-text-fill-color: #241b10 !important;
}
html[data-color-scheme="light"] .zet-lesen-timer-btn:hover {
  border-color: #8a6100 !important;
  color: #8a6100 !important;
}
html[data-color-scheme="light"] .zet-lesen-back {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.55) !important;
  color: #5c4000 !important;
  -webkit-text-fill-color: #5c4000 !important;
  box-shadow: 0 1px 0 rgba(92, 64, 0, 0.08);
}
html[data-color-scheme="light"] .zet-lesen-back:hover {
  background: rgba(255, 179, 0, 0.18) !important;
  border-color: #8a6100 !important;
  color: #241b10 !important;
  -webkit-text-fill-color: #241b10 !important;
}
html[data-color-scheme="light"] .zet-lesen-duration select {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.4) !important;
  color: #8a6100 !important;
}
html[data-color-scheme="light"] .zet-lesen-bar .btn.primary {
  color: #1a1400 !important;
  -webkit-text-fill-color: #1a1400 !important;
}
html[data-color-scheme="light"] .zet-lesen-bar .btn.ghost,
html[data-color-scheme="light"] .zet-lesen-bar a.btn.ghost {
  background: #fff !important;
  border: 1px solid rgba(154, 107, 0, 0.45) !important;
  color: #241b10 !important;
  -webkit-text-fill-color: #241b10 !important;
}
html[data-color-scheme="light"] .zet-lesen-bar .btn.ghost:hover,
html[data-color-scheme="light"] .zet-lesen-bar a.btn.ghost:hover {
  background: rgba(255, 179, 0, 0.14) !important;
  border-color: #8a6100 !important;
}
html[data-color-scheme="light"] .zet-lesen-ai-btn {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.35) !important;
  color: #241b10 !important;
}
html[data-color-scheme="light"] .zet-lesen-ai-btn:hover,
html[data-color-scheme="light"] .zet-lesen-ai-btn.is-on {
  background: rgba(255, 179, 0, 0.14) !important;
  border-color: #8a6100 !important;
  color: #8a6100 !important;
}
html[data-color-scheme="light"] .zet-lesen-ai-btn b {
  color: inherit !important;
}
html[data-color-scheme="light"] .zet-lesen-badge {
  background: #fff !important;
  border-color: #8a6100 !important;
  color: #8a6100 !important;
}

/* ===== Native Hören light mode (match Lesen cream shell) ===== */
html[data-color-scheme="light"] .player.player--zet-hoeren.zet-hoeren-fs,
html[data-color-scheme="light"] .zet-hoeren-fs,
html[data-color-scheme="light"] .zet-hoeren-level-b1.zet-hoeren-fs,
html[data-color-scheme="light"] .zet-hoeren-level-b2.zet-hoeren-fs {
  background: #f4efe4 !important;
  color: #1a140c !important;
}
html[data-color-scheme="light"] .zet-hoeren-level-b2.zet-hoeren-fs {
  background: #f7f1e4 !important;
}
html[data-color-scheme="light"] .zet-hoeren-toolbar,
html[data-color-scheme="light"] .zet-hoeren-bar {
  background: rgba(255, 250, 240, 0.98) !important;
  border-color: rgba(154, 107, 0, 0.32) !important;
  border-bottom-color: rgba(154, 107, 0, 0.32) !important;
  border-top-color: rgba(154, 107, 0, 0.32) !important;
  color: #1a140c !important;
  border-radius: 0 !important;
}
html[data-color-scheme="light"] .zet-hoeren-module {
  color: #b42318 !important;
}
html[data-color-scheme="light"] .zet-hoeren-kicker,
html[data-color-scheme="light"] .zet-hoeren-timer-display,
html[data-color-scheme="light"] .zet-hoeren-bar-score,
html[data-color-scheme="light"] .zet-hoeren-bar-score.is-ok {
  color: #8a6100 !important;
}
html[data-color-scheme="light"] .zet-hoeren-toolbar h1,
html[data-color-scheme="light"] .zet-hoeren-sentence,
html[data-color-scheme="light"] .zet-hoeren-code-topic,
html[data-color-scheme="light"] .zet-hoeren-note,
html[data-color-scheme="light"] .zet-hoeren-duration,
html[data-color-scheme="light"] .zet-hoeren-timer-label,
html[data-color-scheme="light"] .zet-hoeren-clip-count,
html[data-color-scheme="light"] .zet-hoeren-code-hint,
html[data-color-scheme="light"] .zet-hoeren-code-label {
  color: #1a140c !important;
}
html[data-color-scheme="light"] .zet-hoeren-sep {
  color: rgba(90, 70, 40, 0.35) !important;
}
html[data-color-scheme="light"] .zet-hoeren-clip,
html[data-color-scheme="light"] .zet-hoeren-code-card {
  background: #fffdf8 !important;
  border-color: rgba(154, 107, 0, 0.32) !important;
  color: #1a140c !important;
}
html[data-color-scheme="light"] .zet-hoeren-clip-head {
  background: linear-gradient(180deg, #fff8e8 0%, #ffe9b0 100%) !important;
  border-bottom: 1px solid rgba(154, 107, 0, 0.28);
}
html[data-color-scheme="light"] .zet-hoeren-clip-title {
  color: #1a140c !important;
}
html[data-color-scheme="light"] .zet-hoeren-clip-num {
  background: #ffb300 !important;
  color: #1a1400 !important;
}
html[data-color-scheme="light"] .zet-hoeren-player {
  background: rgba(255, 179, 0, 0.08) !important;
  border-color: rgba(154, 107, 0, 0.18) !important;
}
html[data-color-scheme="light"] .zet-hoeren-pack-layout {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(154, 107, 0, 0.35) !important;
}
html[data-color-scheme="light"] .zet-hoeren-table th {
  background: rgba(255, 179, 0, 0.12) !important;
  border-color: rgba(154, 107, 0, 0.28) !important;
  color: #5a4a38 !important;
}
html[data-color-scheme="light"] .zet-hoeren-table td {
  border-bottom-color: rgba(154, 107, 0, 0.14) !important;
}
html[data-color-scheme="light"] .zet-hoeren-play,
html[data-color-scheme="light"] .zet-hoeren-mute,
html[data-color-scheme="light"] .zet-hoeren-timer-btn {
  background: #fff !important;
  border: 1px solid rgba(154, 107, 0, 0.4) !important;
  color: #8a6100 !important;
}
html[data-color-scheme="light"] .zet-hoeren-play:hover,
html[data-color-scheme="light"] .zet-hoeren-mute:hover,
html[data-color-scheme="light"] .zet-hoeren-timer-btn:hover {
  background: rgba(255, 179, 0, 0.16) !important;
  border-color: #8a6100 !important;
  color: #241b10 !important;
}
html[data-color-scheme="light"] .zet-hoeren-progress {
  background: rgba(154, 107, 0, 0.18) !important;
}
html[data-color-scheme="light"] .zet-hoeren-progress i {
  background: #ffb300 !important;
}
html[data-color-scheme="light"] .zet-hoeren-time {
  color: #5a4a38 !important;
}
html[data-color-scheme="light"] .zet-hoeren-volume-range {
  accent-color: #ffb300;
}
html[data-color-scheme="light"] .zet-hoeren-tr {
  background: rgba(255, 179, 0, 0.14) !important;
  color: #5c4200 !important;
}
html[data-color-scheme="light"] .zet-hoeren-circle {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.45) !important;
}
html[data-color-scheme="light"] .zet-hoeren-circle.is-on {
  background: #ffb300 !important;
  border-color: #ffb300 !important;
  box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.28) !important;
}
html[data-color-scheme="light"] .zet-hoeren-circle.is-answer,
html[data-color-scheme="light"] .zet-hoeren-row.is-correct .zet-hoeren-circle.is-on {
  background: #16a34a !important;
  border-color: #15803d !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.35) !important;
  opacity: 1 !important;
}
html[data-color-scheme="light"] .zet-hoeren-circle.is-miss,
html[data-color-scheme="light"] .zet-hoeren-row.is-wrong .zet-hoeren-circle.is-on {
  background: #dc2626 !important;
  border-color: #b91c1c !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.28) !important;
  opacity: 1 !important;
}
html[data-color-scheme="light"] .zet-hoeren-circle.is-disabled {
  opacity: 0.28 !important;
  border-color: rgba(120, 100, 80, 0.35) !important;
  background: rgba(255, 255, 255, 0.7) !important;
  box-shadow: none !important;
}
html[data-color-scheme="light"] .zet-hoeren-row.is-correct {
  background: rgba(34, 197, 94, 0.12) !important;
}
html[data-color-scheme="light"] .zet-hoeren-row.is-wrong {
  background: rgba(221, 0, 0, 0.1) !important;
}
html[data-color-scheme="light"] .zet-hoeren-clip-msg {
  background: rgba(14, 156, 107, 0.12) !important;
  border-color: rgba(14, 156, 107, 0.35) !important;
  color: #065f46 !important;
}
html[data-color-scheme="light"] .zet-hoeren-clip-msg.is-bad {
  background: rgba(221, 0, 0, 0.1) !important;
  border-color: rgba(221, 0, 0, 0.35) !important;
  color: #9b1c1c !important;
}
html[data-color-scheme="light"] .zet-hoeren-clip-score {
  color: #8a6100 !important;
}
html[data-color-scheme="light"] .zet-hoeren-tool--check {
  border-color: rgba(14, 156, 107, 0.45) !important;
  background: rgba(14, 156, 107, 0.12) !important;
  color: #065f46 !important;
}
html[data-color-scheme="light"] .zet-hoeren-back {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.45) !important;
  color: #7a5500 !important;
}
html[data-color-scheme="light"] .zet-hoeren-back:hover {
  background: rgba(255, 179, 0, 0.16) !important;
  color: #241b10 !important;
}
html[data-color-scheme="light"] .zet-hoeren-duration select,
html[data-color-scheme="light"] .zet-hoeren-code-input {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.4) !important;
  color: #1a140c !important;
}
html[data-color-scheme="light"] .zet-hoeren-teils {
  background: rgba(255, 250, 240, 0.9) !important;
  border-color: rgba(154, 107, 0, 0.28) !important;
}
html[data-color-scheme="light"] .zet-hoeren-teil {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.35) !important;
  color: #241b10 !important;
}
html[data-color-scheme="light"] .zet-hoeren-teil.is-active {
  background: #ffb300 !important;
  border-color: #ffb300 !important;
  color: #1a140c !important;
}
html[data-color-scheme="light"] .zet-hoeren-bar .btn.primary {
  color: #1a1400 !important;
  -webkit-text-fill-color: #1a1400 !important;
}
html[data-color-scheme="light"] .zet-hoeren-bar .btn.ghost,
html[data-color-scheme="light"] .zet-hoeren-bar a.btn.ghost {
  background: #fff !important;
  border: 1px solid rgba(154, 107, 0, 0.45) !important;
  color: #241b10 !important;
  -webkit-text-fill-color: #241b10 !important;
}
html[data-color-scheme="light"] .zet-hoeren-bar .btn.ghost:hover,
html[data-color-scheme="light"] .zet-hoeren-bar a.btn.ghost:hover {
  background: rgba(255, 179, 0, 0.14) !important;
  border-color: #8a6100 !important;
}
html[data-color-scheme="light"] .zet-hoeren-clip-tools .btn,
html[data-color-scheme="light"] .zet-hoeren-clip-tools button {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.4) !important;
  color: #241b10 !important;
}

html[data-color-scheme="light"] .color-scheme-toggle,
html[data-color-scheme="light"] .font-scale-trigger {
  background: #fff !important;
  border-color: rgba(154, 107, 0, 0.4) !important;
  color: #5a4a38 !important;
}
html[data-color-scheme="light"] .color-scheme-toggle:hover,
html[data-color-scheme="light"] .font-scale-trigger:hover {
  color: #8a6100 !important;
  border-color: rgba(154, 107, 0, 0.6) !important;
}

/* Square shell chrome — Lesen B1/B2 + Schreiben (match Hören). */
.player.player--zet-lesen.zet-lesen-fs,
.player.player--zet-lesen.zet-lesen-level-b1.zet-lesen-fs,
.player.player--zet-lesen.zet-lesen-level-b2.zet-lesen-fs,
.exam-run-shell,
.exam-run-shell .exam-run-toolbar,
.zet-lesen-toolbar,
.zet-lesen-toolbar--exam,
.zet-lesen-bar,
.app-live-fullscreen .live-frame--fullscreen,
.exam-run-shell .live-frame--fullscreen,
.zetb2-exam-shell .exam-run-frame.live-frame--fullscreen {
  border-radius: 0 !important;
}

@media (max-width: 720px) {
  .player.player--zet-lesen.zet-lesen-fs,
  .player.player--zet-hoeren.zet-hoeren-fs {
    border-radius: 0 !important;
  }
}
