/* the lesson player: focus mode, no navigation */
.lesson { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.lesson-top { display: flex; align-items: center; gap: 12px; padding: 14px clamp(12px, 3vw, 28px); max-width: 880px; width: 100%; margin: 0 auto; }
.lesson-top .progress { flex: 1; min-width: 0; height: 16px; }
.lesson-top .close { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; border-radius: 12px; color: var(--ink-2); display: grid; place-items: center; flex: none; }
.lesson-top .close:hover { background: var(--surface-2); } .lesson-top .close svg { width: 26px; height: 26px; }
.hearts { display: inline-flex; align-items: center; gap: 4px; color: var(--danger); font-weight: 900; flex: none; }
.hearts svg { width: 26px; height: 26px; }
.lesson-body { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 8px clamp(14px, 4vw, 28px) 200px; }
.q-title { font-size: clamp(1.3rem, 4.8vw, 1.75rem); font-weight: 900; margin: 6px 0 14px; }
.q-sub { color: var(--ink-2); font-weight: 700; margin-bottom: 12px; }
.q-sentence { font-size: clamp(1.25rem, 5vw, 1.6rem); font-weight: 800; padding: 14px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; margin-bottom: 16px; overflow-wrap: anywhere; display: flex; gap: 10px; align-items: center; }
.passage { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; line-height: 1.7; }
.blank { display: inline-block; min-width: 4.5em; border-bottom: 3px solid var(--ink-2); text-align: center; color: var(--brand-ink); font-weight: 900; }
.speak { width: 54px; height: 54px; border-radius: 16px; border: 0; background: var(--info-btn, #1f5cb0); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 0 color-mix(in srgb, var(--info) 65%, #000); flex: none; }
.speak svg { width: 28px; height: 28px; } .speak.slow { background: var(--surface); color: var(--info); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.options { display: grid; gap: 12px; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); box-shadow: 0 3px 0 var(--line); cursor: pointer; font-weight: 800; font-size: 1.05rem; min-height: 56px; overflow-wrap: anywhere; }
.option:hover { background: var(--surface-2); }
.option .key { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; font-size: .8rem; color: var(--ink-2); flex: none; }
.option[aria-pressed="true"], .option.selected { border-color: var(--info); background: var(--info-soft); box-shadow: 0 3px 0 color-mix(in srgb, var(--info) 55%, transparent); }
.option[aria-pressed="true"] .key { border-color: var(--info); color: var(--info); }
.option:disabled { cursor: default; }
.option.right { border-color: var(--ok); background: var(--ok-soft); } .option.wrong { border-color: var(--danger); background: var(--danger-soft); }
.answer-input { font-size: 1.3rem; font-weight: 800; min-height: 60px; text-align: center; }
.tile-area { min-height: 62px; padding: 8px; border-radius: 16px; border: 2px dashed var(--line); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-content: flex-start; background: var(--surface); }
.tile-area.answer { border-style: solid; min-height: 72px; }
.tile { min-width: 46px; min-height: 48px; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); box-shadow: 0 3px 0 var(--line); font-weight: 900; font-size: 1.1rem; cursor: pointer; }
.tile:hover { background: var(--surface-2); } .tile.used { visibility: hidden; }
.tile.letter { text-transform: uppercase; min-width: 44px; padding: 8px 10px; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match .col { display: grid; gap: 10px; align-content: start; }
.match .option { justify-content: center; text-align: center; font-size: 1rem; }
.match .option.done { opacity: .45; border-color: var(--ok); background: var(--ok-soft); }
.match .option.bad { border-color: var(--danger); background: var(--danger-soft); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.lesson-foot { position: fixed; left: 0; right: 0; bottom: 0; border-top: 2px solid var(--line); background: var(--surface); padding: 14px clamp(14px, 4vw, 28px) calc(14px + env(safe-area-inset-bottom)); z-index: 40; }
.lesson-foot .inner { max-width: 680px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.lesson-foot .btn { min-width: 150px; flex: 0 1 auto; }
.lesson-foot.good { background: var(--ok-soft); border-color: var(--ok); } .lesson-foot.bad { background: var(--danger-soft); border-color: var(--danger); }
.feedback { flex: 1 1 240px; min-width: 0; }
.feedback b { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.feedback .xp { color: var(--gold-ink); font-weight: 900; margin-left: 6px; }
.lesson-foot.good .feedback b { color: var(--ok); } .lesson-foot.bad .feedback b { color: var(--danger); }
.feedback p { margin: 4px 0 0; font-weight: 700; }
.feedback .correct-answer { font-weight: 900; }
.result { max-width: 560px; margin: 0 auto; text-align: center; padding: 24px 16px 120px; }
.result img { width: 140px; height: 140px; }
.result h1 { margin-top: 6px; }
.result-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.result-stats .card { padding: 12px 6px; } .result-stats b { display: block; font-size: 1.6rem; }
.result-stats .xp b { color: var(--gold-ink); } .result-stats .acc b { color: var(--brand-ink); }
.review-list { text-align: left; list-style: none; padding: 0; margin: 0; }
.review-list li { padding: 10px 0; border-bottom: 2px solid var(--surface-2); }
@media (max-width: 480px) { .lesson-foot .inner { gap: 10px; } .lesson-foot .btn { width: 100%; } .lesson-body { padding-bottom: 230px; } .option { padding: 12px 14px; } .match { gap: 8px; } }
