/* ===== banoo.boo Lernbereich =================================================
   Lives inside .article — inherits all banoo.boo design tokens:
   --brand (#fc8550), --text (#1d4052), --muted (#5e7682),
   --ring (#e6edf2), --radius (16px), --radius-inner (10px),
   --shadow, --panel, --panel-2, --bg
   ========================================================================= */

/* ---- Override .article img { width:100% } for all lernbereich images ---- */
/* .article img has specificity (0,1,1); these have (0,2,1) and win */
.article img.mode-header__char    { width: 110px; height: 110px; border-radius: 0; flex-shrink: 0; }
.article img.explain-card__char   { width: 68px;  height: 68px;  border-radius: 0; flex-shrink: 0; }
.article img.summary-char         { width: 180px; height: 180px; border-radius: 0; flex-shrink: 0; }
.article img.score-star-img        { width: 26px;  height: 26px;  border-radius: 0; flex-shrink: 0; }
.article img.summary-score-star    { width: 56px;  height: 56px;  border-radius: 0; flex-shrink: 0; }
.article img.filter-card__img-photo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; object-fit: cover; display: none; }

/* ---- Screen management ---- */
.learn-screen         { display: none; }
.learn-screen.active  { display: block; }

/* ============================================================
   INDEX PAGE INTRO
   ============================================================ */

/* Gradient fallback + tighter bottom gap to match normal article spacing */
.article .article__banner {
  background: linear-gradient(135deg, #fff8f4 0%, #ffe5cc 60%, #ffd4aa 100%);
  margin-bottom: 12px;
}

.learn-page-intro { margin-bottom: 16px; }


/* ---- Exercise context overlay at TOP of banner (uebung.php) ---- */
.banner__top-context {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(255, 248, 244, 0.72);
  backdrop-filter: blur(6px);
}
.banner-context__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 400;
}

/* ---- bb-crumb as button (index.php wizard breadcrumb) ---- */
.bb-crumb--btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  text-decoration: none;
}
.bb-crumb--btn:hover { color: #fff; text-decoration: underline; }

/* ---- Tip block in learn-screens (explain screen) ---- */
.learn-screen .tip { margin: 0 0 28px; }
.article .tip__media img { border-radius: 0; }

/* Explain screen: breathe */
#screen-explain {
  padding-top: 36px;
}
#screen-explain .btn-explain-go {
  margin-top: 32px;
}

/* Vollbild: Mode-Screen vertikal zentrieren (Explain hat wenig Inhalt, braucht kein Stretch) */
body.boolearn-maximized #screen-mode.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - 128px); /* 80px maxbar + 48px subnav */
  padding-block: 32px;
  box-sizing: border-box;
}
body.boolearn-maximized #screen-explain.active {
  display: block;
}



/* ============================================================
   MODE SELECTION SCREEN
   ============================================================ */
.mode-header-card {
  background: linear-gradient(135deg, #fff8f4 0%, #ffe5cc 100%);
  border: 1px solid #fcd4b0;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.mode-header-card__badges {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.subject-pill {
  background: var(--brand);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.82rem;
  padding: 3px 12px;
  border-radius: 20px;
}
.grade-pill {
  background: rgba(29, 64, 82, 0.1);
  color: var(--text);
  font-family: 'Fredoka', sans-serif;
  font-size: 0.82rem;
  padding: 3px 12px;
  border-radius: 20px;
}

.mode-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mode-header__char {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex-shrink: 0;
}
.mode-header__title {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  color: var(--text);
  margin: 0;
  font-weight: 400;
  line-height: 1.2;
}

.mode-progress-info {
  display: none;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--panel);
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 16px;
}

.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}
@media (max-width: 420px) {
  .mode-cards { grid-template-columns: 1fr; }
}

.mode-card {
  background: var(--bg);
  border: 2px solid var(--ring);
  border-radius: var(--radius);
  padding: 20px 16px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
@media (hover: hover) {
  .mode-card:hover      { border-color: var(--brand); box-shadow: var(--shadow); }
}
.mode-card:active       { transform: scale(.98); }
.mode-card.selected     { border-color: var(--brand); background: #fff8f4; }

.mode-card__icon  { font-size: 2rem; margin-bottom: 8px; }
.mode-card__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  color: var(--text);
  margin: 0 0 4px;
}
.mode-card__desc  { font-size: 0.84rem; color: var(--muted); margin: 0; }

/* Time-picker groups */
.time-group {
  margin-top: 16px;
  display: none;
}
.time-group__label {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 8px;
}
.time-group__btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.time-btn {
  flex: 1;
  min-width: 60px;
  padding: 11px 8px;
  border: 2px solid var(--ring);
  border-radius: var(--radius-inner);
  background: var(--bg);
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (hover: hover) {
  .time-btn:hover        { border-color: var(--brand); }
}
.time-btn.selected       { border-color: var(--brand); background: var(--brand); color: #fff; }

.btn-start {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'Fredoka', sans-serif;
  font-size: 1.35rem;
  cursor: pointer;
  margin-top: 20px;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-start:hover    { opacity: .9; }
.btn-start:active   { transform: scale(.98); }
.btn-start:disabled { opacity: .35; cursor: not-allowed; }


.btn-explain-go {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'Fredoka', sans-serif;
  font-size: 1.35rem;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-explain-go:hover  { opacity: .9; }
.btn-explain-go:active { transform: scale(.98); }

/* ============================================================
   TASK SCREEN
   ============================================================ */
.task-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.score-section {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.35rem;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.progress-text {
  font-size: .82rem;
  color: var(--muted);
}

/* BooStars bar */
.boostar-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 10px;
  min-height: 24px;
}
/* Größe + Opacity direkt per JS inline gesetzt — CSS nur für Animation */
.boostar.just-earned { animation: star-pop .45s ease-out; }

@keyframes star-pop {
  0%   { transform: scale(0) rotate(-15deg); opacity: 1; }
  60%  { transform: scale(1.5) rotate(6deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0);       opacity: 1; }
}

/* Timer bar (Zeitrennen) */
.timer-section { margin-bottom: 10px; }
.timer-bar-wrap {
  height: 10px;
  background: var(--ring);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 4px;
}
.timer-bar {
  height: 100%;
  background: var(--brand);
  border-radius: 5px;
  transition: width 1s linear, background .5s;
}
.timer-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  color: var(--text);
  text-align: center;
}

/* Task card */
.learn-task-card {
  background: var(--bg);
  border: 2px solid var(--ring);
  border-radius: var(--radius);
  padding: 24px 20px 18px;
  margin-bottom: 16px;
  text-align: center;
  transition: border-color .2s, background .2s;
  box-shadow: var(--shadow);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.learn-task-card.correct { border-color: #4caf50; background: #f1faf2; }
.learn-task-card.wrong   { border-color: #ef5350; background: #fff5f5; }

.learn-question {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(2rem, 9vw, 3.2rem);
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.15;
}

.learn-answer-display {
  font-family: 'Fredoka', sans-serif;
  font-size: 2rem;
  color: var(--text);
  background: var(--panel);
  border: 2px solid var(--ring);
  border-radius: var(--radius-inner);
  padding: 10px 28px;
  min-width: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.learn-feedback-text {
  font-size: .9rem;
  font-weight: 700;
  min-height: 20px;
  margin: 0;
}
.learn-feedback-text.correct { color: #388e3c; }
.learn-feedback-text.wrong   { color: #d32f2f; }

/* ---- Numpad ---- */
.learn-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
}

.numpad-key {
  aspect-ratio: 1;
  border: 2px solid var(--ring);
  border-radius: var(--radius-inner);
  background: var(--bg);
  font-family: 'Fredoka', sans-serif;
  font-size: 1.8rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  transition: background .1s, transform .08s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
  box-shadow: 0 2px 0 var(--ring);
}
.numpad-key:active  { background: var(--panel-2); transform: scale(.94) translateY(2px); box-shadow: none; }

.numpad-key.submit  {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  font-size: 1.4rem;
  box-shadow: 0 2px 0 #e06a35;
}
.numpad-key.submit:active { background: #e06a35; box-shadow: none; }
.numpad-key.backspace { padding: 8px; }
.numpad-key.backspace svg { display: block; }

/* ---- Choice grid — lives inside .learn-task-card.choice-mode ---- */
.learn-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  align-content: start;
  margin-top: 16px;
}

/* Task card in choice mode: top-aligned, full-width children */
.learn-task-card.choice-mode {
  justify-content: flex-start;
  align-items: stretch;
  min-height: 0;
  text-align: center;
  padding-top: 36px;
  padding-bottom: 28px;
}
.learn-task-card.choice-mode .learn-question {
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  margin-bottom: 20px;
}
.learn-task-card.choice-mode .learn-feedback-text {
  margin-top: 12px;
}

.choice-btn {
  padding: 14px 12px;
  border: 2.5px solid var(--ring);
  border-radius: var(--radius-inner);
  background: var(--bg);
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  color: var(--text);
  cursor: pointer;
  min-height: 76px;
  transition: border-color .12s, background .12s, transform .08s, box-shadow .08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 3px 0 var(--ring);
}

/* 4 playful tinted colors — positions are random so no answer is "color-coded" */
.learn-choice-grid .choice-btn:nth-child(1) { background: #fff3eb; border-color: #fc9b68; box-shadow: 0 3px 0 #fca47a; }
.learn-choice-grid .choice-btn:nth-child(2) { background: #edf7ee; border-color: #66bb6a; box-shadow: 0 3px 0 #81c784; }
.learn-choice-grid .choice-btn:nth-child(3) { background: #e8f4fd; border-color: #42a5f5; box-shadow: 0 3px 0 #64b5f6; }
.learn-choice-grid .choice-btn:nth-child(4) { background: #fde8f2; border-color: #f06292; box-shadow: 0 3px 0 #f48fb1; }

.choice-btn:active          { transform: scale(.96) translateY(3px); box-shadow: none !important; }
@media (hover: hover) {
  .choice-btn:hover         { filter: brightness(.96); }
}
/* State overrides come after nth-child rules → win via cascade */
.choice-btn.correct-choice  { border-color: #4caf50; background: #f1faf2; color: #2e7d32; box-shadow: 0 3px 0 #81c784; }
.choice-btn.wrong-choice    { border-color: #ef5350; background: #fff5f5; color: #c62828; box-shadow: 0 3px 0 #ef9a9a; }
.choice-btn:disabled        { cursor: default; }

/* ============================================================
   SUMMARY SCREEN
   ============================================================ */
.learn-summary {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.8rem;
  padding: 16px 0;
}
.summary-char {
  width: 180px;
  height: 180px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.summary-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.summary-title {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  color: var(--text);
  margin: 0 0 4px;
  font-weight: 400;
}
.summary-score-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 8px 0 2px;
}
.summary-score {
  font-family: 'Fredoka', sans-serif;
  font-size: 3.5rem;
  color: var(--brand);
  line-height: 1;
}
.summary-of {
  font-size: .88rem;
  color: var(--muted);
  margin: 0 0 12px;
}
.summary-best-badge {
  background: var(--brand);
  color: #fff;
  border-radius: 24px;
  padding: 5px 16px;
  font-family: 'Fredoka', sans-serif;
  font-size: .95rem;
  margin-bottom: 12px;
}
.summary-message {
  background: var(--panel);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 20px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
.summary-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .learn-summary {
    flex-direction: column;
    align-items: center;
  }
  .summary-content {
    align-items: center;
    text-align: center;
  }
  .summary-score-wrap { justify-content: center; }
  .summary-actions    { justify-content: center; }
  .summary-message    { text-align: center; }
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-inner);
  padding: 13px 22px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  cursor: pointer;
  transition: opacity .15s, transform .08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-primary:hover  { opacity: .9; }
.btn-primary:active { transform: scale(.97); }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--ring);
  border-radius: var(--radius-inner);
  padding: 13px 22px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  cursor: pointer;
  transition: border-color .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  text-decoration: none;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--brand); }

/* ============================================================
   BOOTASTIC OVERLAY (fixed, covers everything)
   ============================================================ */
.bootastic-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(29,64,82,.9);
  backdrop-filter: blur(8px);
  padding: 24px;
  text-align: center;
  animation: boot-in .35s ease-out;
}
@keyframes boot-in {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

.bootastic-stars {
  font-size: 3.5rem;
  animation: star-pop .7s .1s both;
  display: block;
  margin-bottom: 12px;
}
.bootastic-title {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(2.2rem, 10vw, 3.8rem);
  color: var(--brand);
  margin: 0 0 8px;
  font-weight: 400;
  animation: boot-text .5s .2s both;
}
.bootastic-msg {
  color: #fff;
  font-size: 1.1rem;
  margin: 0 0 24px;
  animation: boot-text .5s .35s both;
  max-width: 400px;
}
.bootastic-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-inner);
  padding: 15px 36px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.35rem;
  cursor: pointer;
  animation: boot-text .5s .5s both;
  -webkit-tap-highlight-color: transparent;
}
.bootastic-btn:hover { opacity: .9; }

@keyframes boot-text {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* Confetti */
.confetti-piece {
  position: fixed;
  animation: confetti-fall linear forwards;
  pointer-events: none;
  z-index: 10000;
}
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}

/* ============================================================
   FILTER UI (index.php)
   ============================================================ */
.filter-section  { margin-bottom: 4px; }
.filter-group    { margin-bottom: 20px; }

.wizard-step { margin-bottom: 8px; }
.wizard-step__label {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 18px;
  text-align: center;
}

.filter-cards {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-card {
  flex: 1 1 140px;
  max-width: 210px;
  min-width: 120px;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: box-shadow .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 4px 20px rgba(29,64,82,.14);
}
@media (hover: hover) {
  .filter-card:hover { box-shadow: 0 10px 32px rgba(29,64,82,.22); transform: translateY(-3px); }
}
.filter-card:active { transform: scale(.97); }
.filter-card.active {
  box-shadow: 0 0 0 3px var(--brand), 0 4px 20px rgba(29,64,82,.14);
}

.filter-card__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
}
.filter-card__fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.2rem;
  line-height: 1;
  user-select: none;
  z-index: 1;
}
.filter-card__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 12px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.filter-card.active .filter-card__label {
  background: linear-gradient(transparent, rgba(252,133,80,.72));
}

@media (max-width: 460px) {
  .filter-card { flex: 1 1 calc(50% - 7px); max-width: calc(50% - 7px); }
}


/* ---- Exercise list (list view after filter) ---- */
.exercise-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.exercise-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--ring);
  background: var(--bg);
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
}
.exercise-list-item:last-child { border-bottom: none; }
.exercise-list-item:hover  { background: #fff8f4; }
.exercise-list-item:active { background: #ffe5cc; }

.exercise-list-item__img {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #fff8f4, #ffe5cc);
  border-radius: var(--radius-inner);
  border: 1px solid #fcd4b0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.exercise-list-item__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.exercise-list-item__emoji { font-size: 2.2rem; line-height: 1; }

.exercise-list-item__body { flex: 1; min-width: 0; }

.exercise-list-item__subject {
  font-size: .72rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 3px;
}
.exercise-list-item__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  color: var(--text);
  margin: 0 0 3px;
  font-weight: 400;
}
.exercise-list-item__desc { font-size: .84rem; color: var(--muted); margin: 0; }
.exercise-list-item__progress {
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 7px;
  border: 1.5px solid #fcd4b0;
  background: #fff8f4;
  border-radius: 20px;
  padding: 6px 12px 6px 8px;
  font-size: .75rem;
  color: var(--brand);
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.35;
  align-self: center;
}
.exercise-list-item__progress .progress-emoji {
  font-size: 1.7rem;
  line-height: 1;
  flex-shrink: 0;
}
.exercise-list-item__progress .progress-label {
  display: flex;
  flex-direction: column;
}
@media (max-width: 480px) {
  .exercise-list-item__progress {
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px;
    text-align: center;
  }
  .exercise-list-item__progress .progress-emoji {
    font-size: 1.4rem;
  }
}
.exercise-list-item__progress--poor {
  background: #fff5f5;
  border-color: #ef9a9a;
  color: #c62828;
}
.exercise-list-item__progress--ok {
  background: #fff8ee;
  border-color: #ffb74d;
  color: #e65100;
}
.exercise-list-item__progress--good {
  background: #f1faf2;
  border-color: #81c784;
  color: #2e7d32;
}

.exercise-list-item__arrow {
  font-size: 1.6rem;
  color: var(--ring);
  flex-shrink: 0;
  line-height: 1;
}

/* ============================================================
   OVERVIEW PAGE (index.php)
   ============================================================ */
.learn-overview-title {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--text);
  margin: 0 0 4px;
  font-weight: 400;
}
.grade-section   { margin-bottom: 32px; }

/* ── Vollbild-Modus ──────────────────────────────────────────────────────── */

/* Vollbild-Button im Banner (oben rechts) */
.boolearn-maximize-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  z-index: 5;
  transition: background 0.12s, box-shadow 0.12s;
  white-space: nowrap;
  line-height: 1;
}
.boolearn-maximize-btn:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
}

/* Vollbild-Leiste – 80px, gleiche Optik wie banoo.boo-Header */
#boolearn-maxbar {
  display: none;
  position: fixed;
  inset: 0 0 auto 0;
  height: 80px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(120%) blur(6px);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid var(--ring);
  z-index: 9000;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(14px, 4vw, 28px);
  box-sizing: border-box;
}

/* Logo – gleiche Größe wie auf banoo.boo (max-height 56px, proportional) */
#boolearn-maxbar .boolearn-maxbar__logo {
  flex-shrink: 0;
  line-height: 0;
}
#boolearn-maxbar .boolearn-maxbar__logo img {
  display: block;
  max-height: 56px;
  height: auto;
  width: auto;
}

/* Minimieren-Button – gleiche Pill-Optik wie Vollbild-Button */
#boolearn-maxbar .boolearn-maxbar__minimize {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #f2f4f6;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  transition: background 0.12s;
  white-space: nowrap;
  line-height: 1;
}
#boolearn-maxbar .boolearn-maxbar__minimize:hover { background: #e4e8eb; }

/* Subnav: in beiden Modi sichtbar */
.boolearn-subnav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 48px;
  padding: 4px 0;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-bottom: 1px solid var(--ring);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.boolearn-subnav::-webkit-scrollbar { display: none; }

.boolearn-subnav__crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.boolearn-subnav__crumb:hover { background: var(--panel-2); color: var(--text); }

.boolearn-subnav__sep {
  color: var(--ring);
  flex-shrink: 0;
  padding: 0 2px;
  user-select: none;
}

.boolearn-subnav__current {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff3eb;
  border: 1px solid #fcd4b0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Vollbild aktiv ── */
body.boolearn-maximized #boolearn-maxbar              { display: flex; }
body.boolearn-maximized .header,
body.boolearn-maximized .site-footer,
body.boolearn-maximized .sidebar,
body.boolearn-maximized .nav-overlay,
body.boolearn-maximized #reading-progress,
body.boolearn-maximized .article__banner,
body.boolearn-maximized .boolearn-maximize-btn        { display: none !important; }
body.boolearn-maximized .layout                       { display: block; }
body.boolearn-maximized                               { background: var(--bg); }
body.boolearn-maximized main                          { padding-top: 80px; }

/* Vollbild-Subnav: sticky direkt unter dem maxbar, weiß */
body.boolearn-maximized .boolearn-subnav {
  position: sticky;
  top: 80px;
  z-index: 500;
  background: #fff;
  border-bottom: 1px solid var(--ring);
  margin-left:  calc(-1 * clamp(16px, 4vw, 40px));
  margin-right: calc(-1 * clamp(16px, 4vw, 40px));
  padding-left:  clamp(16px, 4vw, 40px);
  padding-right: clamp(16px, 4vw, 40px);
  margin-top: 0;
  margin-bottom: 20px;
  /* width:auto + negative margins = full article border width (viewport width on mobile) */
  width: auto;
  max-width: none;
}

body.boolearn-maximized .article {
  max-width: 740px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
  border-radius: 0;
  background: #fff;
  /* overflow-x:clip clips horizontal bleed without creating a BFC.
     overflow-y:visible overrides the overflow-y:hidden set by
     .article.article--bleed in the main CSS — that hidden value would
     create a BFC and break position:sticky on the subnav. */
  overflow-x: clip;
  overflow-y: visible;
}
