/* Learning Center: teacher, subject and level pickers, lessons and results. */
.school-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.teacher-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 14px 16px; overflow: hidden; border: 3px solid #f2c14e; border-radius: 18px; background: #fffbea; box-shadow: 0 5px 0 #e8cf86; text-align: center; }
.teacher-stage { position: relative; width: calc(100% + 28px); height: 220px; margin: 0 -14px 6px; border-bottom: 3px solid #f2c14e; background: linear-gradient(#3f6b4f 0 62%, #c98f5a 62%); }
.teacher-stage::before { content: '2 + 3 = 5   ABC'; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); color: #f6f3e6; font: 900 15px 'Comic Sans MS', Nunito, sans-serif; white-space: nowrap; opacity: .8; }
.teacher-stage .avatar { bottom: 2px; transform: translateX(-50%) scale(.6); transform-origin: bottom center; }
.teacher-card h3 { margin: 0; color: #8a5a14; }
.teacher-role { margin: -2px 0 6px; color: #9a7a3a; font-size: 13px; font-weight: 800; }
.teacher-bubble { margin-top: 8px; }
.school-main { min-width: 0; padding: 18px; border: 3px solid #cfe0ea; border-radius: 18px; background: #fdfdf7; }
.school-step { margin: 0 0 10px; color: #2f5a6e; font-size: 17px; }
.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.subject-card { display: grid; gap: 4px; justify-items: center; padding: 14px 10px; border: 3px solid transparent; border-radius: 14px; color: #2f3f46; font: inherit; text-align: center; cursor: pointer; transition: transform .12s; }
.subject-card:hover { transform: translateY(-2px); }
.subject-card strong { font: 900 17px Nunito, system-ui, sans-serif; }
.subject-card span { font-size: 13px; line-height: 1.3; }
.subject-card small { color: #5f6f74; font-size: 11px; font-weight: 800; }
.subject-icon { font-size: 30px; }
.subject-math { background: #ffe9dc; }
.subject-words { background: #e3efff; }
.subject-logic { background: #e6f6e3; }
.subject-card[aria-pressed=true] { border-color: #2f6e8b; box-shadow: 0 4px 0 #2f6e8b55; }
.level-switch { display: inline-flex; gap: 4px; padding: 4px; border: 2px solid #c9d8e0; border-radius: 12px; background: #f1f6f8; }
.level-switch button { min-width: 88px; padding: 8px 12px; border: 0; border-radius: 9px; background: transparent; color: #2f5a6e; font: 900 14px Nunito, system-ui, sans-serif; cursor: pointer; }
.level-switch button[aria-pressed=true] { background: #2f6e8b; color: #fff; }
.level-reward { margin: 10px 0 14px; color: #6a7a6a; font-size: 13px; font-weight: 700; }
.lesson-top { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; color: #2f5a6e; font-weight: 800; }
.lesson-top b { color: #e0662e; }
.lesson-dots { display: flex; gap: 6px; margin: 10px 0; }
.lesson-dots i { width: 22px; height: 8px; border-radius: 99px; background: #dfe7ea; }
.lesson-dots i.now { background: #f2c14e; }
.lesson-dots i.right { background: #4fa55a; }
.lesson-dots i.wrong { background: #d9493f; }
.lesson-task { margin: 6px 0 4px; color: #6a7a7e; font-weight: 800; }
.lesson-prompt { margin: 6px 0 12px; padding: 18px 12px; border: 3px dashed #c9d8e0; border-radius: 14px; background: #fff; color: #1f3f4f; font: 900 clamp(26px, 4vw, 38px)/1.2 Nunito, system-ui, sans-serif; letter-spacing: 1px; text-align: center; overflow-wrap: anywhere; }
.lesson-hint { margin: -4px 0 10px; color: #8a6a2a; font-weight: 800; text-align: center; }
.lesson-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lesson-choice { min-height: 54px; border: 3px solid #c9d8e0; border-radius: 12px; background: #fff; color: #1f3f4f; font: 900 22px Nunito, system-ui, sans-serif; cursor: pointer; }
.lesson-choice:hover:not(:disabled) { border-color: #2f6e8b; background: #f1f8fb; }
.lesson-choice.right { border-color: #4fa55a; background: #e3f5e1; color: #2f6a3a; }
.lesson-choice.wrong { border-color: #d9493f; background: #fde6e3; color: #9a2f28; }
.lesson-form { display: flex; gap: 10px; }
.lesson-form input { flex: 1; min-width: 0; padding: 12px 14px; border: 3px solid #c9d8e0; border-radius: 12px; font: 900 20px Nunito, system-ui, sans-serif; letter-spacing: 1px; text-transform: lowercase; }
.lesson-feedback { min-height: 22px; margin: 12px 0 8px; font-weight: 900; text-align: center; }
.lesson-feedback.right { color: #2f8f4a; }
.lesson-feedback.wrong { color: #c2413a; }
#lesson-next { display: block; margin: 0 auto; min-width: 180px; }
#lesson-next[hidden] { display: none; }
.school-result { text-align: center; }
.school-result h3 { margin: 4px 0; color: #2f5a6e; font-size: 28px; }
.result-score { margin: 0; color: #e0662e; font: 900 26px Nunito, system-ui, sans-serif; }
.result-reward { display: flex; justify-content: center; align-items: center; gap: 6px; color: #7a6427; font-weight: 800; }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
@media (max-width: 900px) {
  .school-layout { grid-template-columns: 1fr; }
  .teacher-card { flex-direction: row; flex-wrap: wrap; justify-content: center; text-align: left; }
  .teacher-stage { height: 170px; }
}
@media (max-width: 650px) {
  .subject-grid { grid-template-columns: 1fr; }
  .subject-card { grid-template-columns: auto 1fr; justify-items: start; text-align: left; }
  .subject-icon { grid-row: span 3; }
  .level-switch { display: flex; }
  .level-switch button { flex: 1; min-width: 0; }
  .school-main { padding: 12px; }
}
