/* Erste Schritte (A0/A1 picture cards) and level pages (#niveau/..) – erste-schritte.js */
.es-der {
  --es-a: #2463c7;
}
.es-die {
  --es-a: #c2362b;
}
.es-das {
  --es-a: #1d7a45;
}
.es-legend {
  font-size: 0.95rem;
  color: var(--dm-muted);
}
.es-legend span {
  display: inline-block;
  padding: 0 0.5em;
  border-radius: 6px;
  color: #fff;
  background: var(--es-a);
  font-weight: 700;
}

.es-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0.5rem 0 1rem;
}
.es-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}
.es-lang select {
  min-height: 44px;
  padding: 0 0.6rem;
  border: 2px solid var(--dm-line);
  border-radius: 10px;
  font: inherit;
  background: var(--dm-surface);
  max-width: 100%;
}

/* cards */
.es-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.es-grid-tile {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}
.es-grid-phrase {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.es-card-btn {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.5rem 0.8rem;
  border: 2px solid var(--dm-line);
  border-top: 6px solid var(--es-a, var(--dm-line));
  border-radius: var(--dm-r);
  background: var(--dm-surface);
  font: inherit;
  color: var(--dm-ink);
  cursor: pointer;
  text-align: center;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.es-card-btn:hover,
.es-card-btn:focus-visible {
  border-color: var(--dm-tinte);
  transform: translateY(-2px);
}
.es-card-btn.is-playing {
  border-color: var(--dm-tinte);
  box-shadow: 0 0 0 4px var(--dm-tinte-soft);
}
.es-vis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
}
.es-img {
  width: 100%;
  max-width: 160px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
}
.es-emoji {
  font-size: 3rem;
  line-height: 1;
}
.es-swatch {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12);
}
.es-white {
  box-shadow: inset 0 0 0 2px var(--dm-line);
}
.es-tile {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--dm-tinte);
  line-height: 1.1;
}
.es-tile-long {
  font-size: 1.25rem;
}
.es-clock {
  color: var(--dm-ink);
}
.es-word {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.es-word em {
  font-style: normal;
  color: var(--es-a, var(--dm-muted));
}
.es-grid-phrase .es-word {
  font-size: 1.05rem;
}
.es-sub {
  font-size: 0.9rem;
  color: var(--dm-muted);
}
.es-tr {
  font-size: 0.95rem;
  color: var(--dm-tinte-dark);
  background: var(--dm-tinte-soft);
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
}
.es-play {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  font-size: 0.95rem;
  opacity: 0.7;
}

/* sentences */
.es-sent ol {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.5rem;
}
.es-sbtn {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0.5rem 0.8rem;
  border: 2px solid var(--dm-line);
  border-radius: 12px;
  background: var(--dm-surface);
  font: inherit;
  font-size: 1.05rem;
  text-align: left;
  color: var(--dm-ink);
  cursor: pointer;
}
.es-sbtn:hover,
.es-sbtn.is-playing {
  border-color: var(--dm-tinte);
  background: var(--dm-tinte-soft);
}

/* quiz */
.es-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.es-modes button {
  min-height: 44px;
  padding: 0 1rem;
  border: 2px solid var(--dm-line);
  border-radius: 999px;
  background: var(--dm-surface);
  font: inherit;
  cursor: pointer;
  color: var(--dm-ink);
}
.es-modes button[aria-pressed="true"] {
  background: var(--dm-tinte);
  border-color: var(--dm-tinte);
  color: #fff;
}
.es-q {
  font-weight: 700;
}
.es-qword-big {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0.25rem 0 0.75rem;
}
.es-qvis {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}
.es-qvis .es-img {
  max-width: 180px;
}
.es-qword {
  font-size: 1.5rem;
}
.es-opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  max-width: 520px;
}
.es-opts-art {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 420px;
  margin: 0 auto;
}
.es-opt {
  min-height: 56px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border: 3px solid var(--dm-line);
  border-radius: 14px;
  background: var(--dm-surface);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dm-ink);
  cursor: pointer;
}
.es-opts-art .es-opt {
  color: #fff;
  background: var(--es-a);
  border-color: var(--es-a);
  font-size: 1.3rem;
}
.es-opt .es-img {
  max-width: 130px;
}
.es-opt .es-swatch {
  width: 64px;
  height: 64px;
}
.es-opt-w {
  font-size: 1.4rem;
  overflow-wrap: anywhere;
}
.es-opts-text .es-opt-w {
  font-size: 1.1rem;
}
.es-opt:hover:not(:disabled) {
  border-color: var(--dm-tinte);
}
.es-opt.is-right {
  border-color: var(--dm-gruen);
  box-shadow: 0 0 0 4px rgba(29, 122, 69, 0.25);
}
.es-opt.is-wrong {
  border-color: var(--dm-rot);
  opacity: 0.7;
}
.es-opt:disabled {
  cursor: default;
}
.es-fb {
  min-height: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.es-result {
  text-align: center;
  padding: 1rem;
  border: 2px dashed var(--dm-line);
  border-radius: var(--dm-r);
}
.es-score {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--dm-tinte);
  margin: 0;
}
.es-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.es-pn {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 2rem 0 1rem;
}

/* topic cards (hub + level page) */
.es-tgrid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.es-tcard {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 2px solid var(--dm-line);
  border-radius: var(--dm-r);
  background: var(--dm-surface);
  text-decoration: none;
  color: var(--dm-ink);
  overflow: hidden;
}
.es-tcard:hover {
  border-color: var(--dm-tinte);
}
.es-tcard img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.es-tcard-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/3;
  font-size: 3rem;
  background: var(--dm-tinte-soft);
}
.es-tcard-t {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.7rem 0.7rem;
}
.es-tcard-t small {
  color: var(--dm-muted);
}
.es-tcard.is-done {
  border-color: var(--dm-gruen);
}
.es-tcard.is-done small {
  color: var(--dm-gruen);
  font-weight: 700;
}

/* level page */
.es-lvtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.es-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.es-link {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-height: 56px;
  height: 100%;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--dm-line);
  border-radius: 12px;
  background: var(--dm-surface);
  color: var(--dm-ink);
  text-decoration: none;
}
.es-link:hover {
  border-color: var(--dm-tinte);
  background: var(--dm-tinte-soft);
}
.es-link-ic {
  font-size: 1.6rem;
  flex: none;
}
.es-link b {
  display: block;
  overflow-wrap: anywhere;
}
.es-link small {
  color: var(--dm-muted);
}

@media (max-width: 400px) {
  .es-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .es-grid-tile {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .es-grid-phrase {
    grid-template-columns: 1fr;
  }
  .es-tgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .es-links {
    grid-template-columns: 1fr;
  }
  .es-word {
    font-size: 1rem;
  }
  .es-tile {
    font-size: 2rem;
  }
  .es-vis {
    min-height: 72px;
  }
  .es-swatch {
    width: 64px;
    height: 64px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .es-card-btn {
    transition: none;
  }
  .es-card-btn:hover {
    transform: none;
  }
}
.es-tcard-t b, .es-word, .es-link b { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }

/* level page: exam preparation groups (one per exam) */
.es-lv-exam .es-lv-h3{font-size:1.05rem;line-height:1.3;margin:22px 0 10px;color:var(--dm-tinte,#2341B5)}
.es-lv-exam .es-lv-h3:first-of-type{margin-top:6px}

/* B2 exam format switch (telc / DTB / both) */
.es-fmt{margin:8px 0 18px;padding:14px;border:1px solid var(--dm-line,#dadfea);border-radius:16px;background:var(--dm-surface,#fff)}
.es-fmt-h{font-size:1.05rem;margin:0 0 10px}
.es-fmt-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.es-fmt-b{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:56px;padding:10px 12px;border:2px solid var(--dm-line,#dadfea);border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.es-fmt-b small{font-size:.8rem;opacity:.75}
.es-fmt-b[aria-pressed=true]{border-color:var(--dm-tinte,#2341B5);background:var(--dm-tinte-soft,#E8ECFA)}
.es-fmt-b:focus-visible{outline:3px solid var(--dm-marker,#FFE45C);outline-offset:2px}
.es-fmt-note{margin:8px 0 0;font-size:.9rem}
.es-fmtwrap[data-show=telc] [data-fmt=dtb],.es-fmtwrap[data-show=telc] [data-fmt=dtz],.es-fmtwrap[data-show=dtb] [data-fmt=telc],.es-fmtwrap[data-show=dtb] [data-fmt=dtz],.es-fmtwrap[data-show=dtz] [data-fmt=telc],.es-fmtwrap[data-show=dtz] [data-fmt=dtb]{display:none}
.es-fmt-row-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:760px){.es-fmt-row-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:520px){.es-fmt-row{grid-template-columns:1fr}.es-fmt-b{min-height:48px}}

/* level page: progress line + "already opened" tick on tiles (erste-schritte.js lvProgress) */
.es-prog{margin:12px 0 0;max-width:520px}
.es-prog:empty{display:none}
.es-prog-t{margin:0 0 6px;font-size:1rem}
.es-prog-bar{height:10px;border-radius:99px;background:var(--dm-line,#dadfea);overflow:hidden}
.es-prog-bar span{display:block;height:100%;min-width:0;background:var(--dm-gruen,#1D7A45);border-radius:99px;transition:width .3s}
.es-prog-note{margin:6px 0 0;font-size:.85rem;color:var(--dm-muted,#5b6475)}
.es-link{position:relative}
.es-link.is-seen{border-color:#CBE3D3;background:#F3F8F4}
.es-seen{margin-left:auto;flex:none;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--dm-gruen,#1D7A45);color:#fff;font-weight:700;font-size:.95rem}
@media (prefers-reduced-motion: reduce){.es-prog-bar span{transition:none}}

/* B2 flashcards (#b2-woerter, b2-woerter.js) */
.b2w-h{font-size:1.1rem;margin:0 0 10px}
.b2w-themes{margin:8px 0 18px}
.b2w-tgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px}
.b2w-tb{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-height:56px;padding:9px 11px;border:2px solid var(--dm-line,#dadfea);border-radius:12px;background:var(--dm-surface,#fff);color:inherit;font:inherit;text-align:left;cursor:pointer}
.b2w-tb b{overflow-wrap:anywhere;line-height:1.25}
.b2w-tb small{font-size:.8rem;color:var(--dm-muted,#5b6475)}
.b2w-tb[aria-pressed=true]{border-color:var(--dm-tinte,#2341B5);background:var(--dm-tinte-soft,#E8ECFA)}
.b2w-mini{display:block;width:100%;height:5px;border-radius:9px;background:var(--dm-line,#dadfea);overflow:hidden}
.b2w-mini span{display:block;height:100%;width:0;background:var(--dm-gruen,#1D7A45)}
.b2w-stage{max-width:620px}
.b2w-top{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;justify-content:space-between}
.b2w-top .b2w-h{margin:0}
.b2w-filter{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer}
.b2w-filter input{width:22px;height:22px;flex:none;accent-color:var(--dm-tinte,#2341B5)}
.b2w-filter small{color:var(--dm-muted,#5b6475)}
.b2w-count{margin:4px 0 10px;color:var(--dm-muted,#5b6475);font-size:.95rem}
.b2w-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;min-height:230px;padding:22px 16px 30px;border:2px solid var(--dm-line,#dadfea);border-radius:18px;background:var(--dm-surface,#fff);color:inherit;font:inherit;text-align:center;cursor:pointer;box-shadow:0 2px 0 rgba(0,0,0,.04)}
.b2w-card.is-back{background:#FBFCFF;border-color:var(--dm-tinte,#2341B5)}
.b2w-card:focus-visible,.b2w-btn:focus-visible,.b2w-tb:focus-visible,.b2w-filter input:focus-visible{outline:3px solid var(--dm-marker,#FFE45C);outline-offset:2px}
.b2w-kind{font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--dm-muted,#5b6475)}
.b2w-word{font-size:1.6rem;font-weight:700;line-height:1.25;overflow-wrap:anywhere;hyphens:auto;-webkit-hyphens:auto}
.b2w-word-b{font-size:1.35rem}
.b2w-ask{font-size:.95rem;color:var(--dm-muted,#5b6475)}
.b2w-tap{position:absolute;bottom:8px;font-size:.78rem;color:var(--dm-muted,#5b6475)}
.b2w-forms{font-size:1.05rem}
.b2w-ex{font-style:italic;max-width:46ch;line-height:1.4}
.b2w-der,.b2w-n{color:#2341B5}.b2w-die,.b2w-v{color:#C2362B}.b2w-das{color:#1D7A45}
.b2w-gap{display:inline-block;min-width:2.5em;border-bottom:3px solid #C2362B}
.b2w-badge{position:absolute;top:8px;right:10px;font-size:.78rem;font-weight:700;color:var(--dm-gruen,#1D7A45)}
.b2w-badge-u{color:#9A5B00}
.b2w-hint{margin:6px 0 10px;font-size:.82rem;color:var(--dm-muted,#5b6475);text-align:center}
.b2w-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
.b2w-row>*{flex:1 1 140px}
.b2w-btn{min-height:48px;padding:10px 14px;border:2px solid var(--dm-line,#dadfea);border-radius:12px;background:var(--dm-surface,#fff);color:inherit;font:inherit;font-weight:600;cursor:pointer}
.b2w-btn:disabled{opacity:.45;cursor:default}
.b2w-btn.is-playing{border-color:var(--dm-tinte,#2341B5)}
.b2w-k{border-color:var(--dm-gruen,#1D7A45);background:#F3F8F4}
.b2w-u{border-color:#E0B25A;background:#FFF8E8}
.b2w-k[aria-pressed=true]{background:var(--dm-gruen,#1D7A45);color:#fff}
.b2w-u[aria-pressed=true]{background:#9A5B00;border-color:#9A5B00;color:#fff}
.b2w-q{font-weight:500}
.b2w-end{padding:18px;border:2px solid var(--dm-line,#dadfea);border-radius:18px;background:var(--dm-surface,#fff)}
.b2w-end-t{margin:0 0 12px;font-size:1.05rem}
.b2w-pdf{margin-top:22px;font-size:.95rem}
@media (max-width:400px){.b2w-tgrid{grid-template-columns:1fr 1fr}.b2w-tb{padding:8px 9px}.b2w-word{font-size:1.4rem}}
.es-fmt-status{margin:10px 0 0;font-weight:700;color:var(--dm-gruen,#1D7A45)}
.es-fmt-status:empty{display:none}
#lv-exam{scroll-margin-top:90px}
/* b2-training.js: Sprachbausteine + telc B2 Sprechen */
.b2t-filter,.b2t-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.b2t-chip,.b2t-tabs a{display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;border:2px solid var(--dm-line,#dadfea);border-radius:999px;text-decoration:none;color:inherit;font-weight:600;background:var(--dm-surface,#fff)}
.b2t-chip[aria-current],.b2t-tabs a[aria-current]{border-color:var(--dm-tinte,#1f3a8a);background:var(--dm-tinte-soft,#e8edfb)}
.b2t-group h2{margin:20px 0 8px}
.b2t-sets{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.b2t-set{display:flex;flex-direction:column;gap:4px;padding:14px;border:2px solid var(--dm-line,#dadfea);border-radius:14px;text-decoration:none;color:inherit;background:var(--dm-surface,#fff)}
.b2t-set:hover{border-color:var(--dm-tinte,#1f3a8a)}
.b2t-set small,.b2t-res{font-size:.9rem;opacity:.8}
.b2t-time{font-size:.95rem;margin:4px 0 10px}
.b2t-bank{display:flex;flex-wrap:wrap;gap:6px;padding:10px;border-radius:12px;background:var(--dm-tinte-soft,#eef2fb);margin-bottom:12px}
.b2t-bank span{padding:4px 8px;border-radius:8px;background:var(--dm-surface,#fff);font-size:.95rem}
.b2t-text{padding:16px;border:1px solid var(--dm-line,#dadfea);border-radius:14px;background:var(--dm-surface,#fff);line-height:1.9;overflow-wrap:anywhere}
.b2t-text h2,.b2t-text h3{margin-top:0;font-size:1.1rem}
.b2t-slot{display:inline-block;max-width:100%}
.b2t-gap{max-width:100%;min-height:40px;padding:4px 6px;border:2px solid var(--dm-tinte,#1f3a8a);border-radius:8px;background:var(--dm-surface,#fff);color:inherit;font:inherit;font-size:.95rem}
.b2t-slot.is-ok .b2t-gap{border-color:#1f8a4c;background:#e7f6ec}
.b2t-slot.is-bad .b2t-gap{border-color:#c0392b;background:#fdecea}
.b2t-actions{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}
.b2t-res-box{padding:16px;border-radius:14px;border:2px solid var(--dm-line,#dadfea);background:var(--dm-surface,#fff)}
.b2t-sol{padding-left:1.2em}.b2t-sol li{margin:8px 0}.b2t-sol li.is-ok b{color:#1f8a4c}.b2t-sol li.is-bad b{color:#c0392b}
.b2t-more{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:16px 0}
.b2t-panel{padding:16px;border:1px solid var(--dm-line,#dadfea);border-radius:14px;background:var(--dm-surface,#fff);margin-bottom:14px}
.b2t-choice{border:0;padding:0;margin:0 0 10px}
.b2t-opt{display:flex;gap:10px;align-items:flex-start;min-height:44px;padding:10px;border:2px solid var(--dm-line,#dadfea);border-radius:12px;margin:6px 0;cursor:pointer}
.b2t-opt input{margin-top:4px;width:20px;height:20px}
.b2t-points li{margin:4px 0}
.b2t-timer{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:12px 0}
.b2t-clock{font:700 1.4rem/1 ui-monospace,monospace}
.b2t-q,.b2t-red{margin:10px 0;padding:10px 12px;border-radius:12px;background:var(--dm-tinte-soft,#eef2fb)}
.b2t-q summary,.b2t-red summary{min-height:32px;cursor:pointer;font-weight:700}
.b2t-red h3{font-size:1rem;margin:10px 0 4px}
.b2t-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:560px){.b2t-two{grid-template-columns:1fr}}
.b2t-partner{display:flex;flex-direction:column;gap:8px}
.b2t-line{font-style:italic;min-height:1.5em}
.b2t-notes{display:flex;flex-direction:column;gap:6px;font-weight:600;margin:14px 0}
.b2t-notes textarea{width:100%;box-sizing:border-box;padding:10px;border:2px solid var(--dm-line,#dadfea);border-radius:12px;font:inherit}
.b2t-check{margin:14px 0}.b2t-check .check{display:flex;gap:8px;align-items:flex-start;min-height:44px}
.sp-next-step{margin:12px 0 4px;line-height:2}.sp-next-step a{display:inline-block;min-height:44px;line-height:44px;font-weight:700}
