/* Все общие цвета, размеры и кнопки меняются здесь. Цвета учебных картинок не переопределяются. */
:root{color-scheme:light;--page:#f3f4ed;--paper:#fffdf8;--ink:#253f49;--muted:#60747b;--line:#dbe4df;--accent:#246d60;--accent-hover:#19574c;--on-accent:#ffffff;--soft:#e7f1e8;--scene:#e8f4f5;--header-surface:#e5efe7;--header-ink:#29594d;--header-muted:#4e6e62;--header-font:'Trebuchet MS','Segoe UI',Arial,sans-serif;--warning:#86521a;--warning-soft:#fff0d9;--success:#246d49;--radius:22px;--button-radius:14px;--base-size:16px;font-family:'Segoe UI',Arial,sans-serif;font-size:var(--base-size);color:var(--ink);background:var(--page)}
:root[data-theme="blueberry"]{--page:#f0f1f7;--paper:#fffdfb;--ink:#303a54;--muted:#626c83;--line:#dee0ec;--accent:#545a9b;--accent-hover:#41477d;--soft:#ececf8;--scene:#edf0fa;--success:#446744}
:root[data-theme="apricot"]{--page:#f8f0e8;--paper:#fffdf8;--ink:#4e3a31;--muted:#79685d;--line:#eadfd4;--accent:#a64d2d;--accent-hover:#853a21;--soft:#f8e8d9;--scene:#fcf0df;--success:#3e6c46}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--accent);outline-offset:4px}button:disabled{opacity:.42}button{color:var(--ink)}a{color:var(--accent)}img{max-width:100%;user-select:none;-webkit-user-drag:none}h1,h2,p{margin:0}button svg{flex-shrink:0}svg.icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}[hidden]{display:none!important}.skip-link{position:absolute;left:16px;top:-70px;z-index:100;background:var(--paper);padding:12px}.skip-link:focus{top:8px}.muted{color:var(--muted)}.eyebrow{font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.button,.icon-button{border:1px solid var(--line);background:var(--paper);border-radius:var(--button-radius);min-height:48px;padding:11px 18px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-weight:600;text-decoration:none;line-height:1.3}.icon-button{width:48px;flex-shrink:0;padding:10px}.button.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.button.secondary{background:var(--soft);border-color:transparent;color:var(--accent)}.button:hover:enabled,.icon-button:hover{background:var(--soft)}.button.primary:hover:enabled{background:var(--accent-hover)}.button.full{width:100%}.button.ghost{background:transparent}.button small{font-weight:400}.text-button{padding:6px 0;border:0;background:transparent;color:var(--accent);text-decoration:underline;text-underline-offset:3px;min-height:44px}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;color:var(--on-accent);background:var(--accent);font-weight:700;font-size:1.3rem}
.catalog{max-width:1160px;padding:28px 28px 40px;margin:auto}.catalog-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:40px}.brand{display:flex;align-items:center;gap:12px}.brand strong{display:block;font-size:1rem;font-weight:650}.brand small{font-size:.75rem;color:var(--muted)}.header-actions{display:flex;gap:8px}.catalog-intro{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:28px}.catalog-intro h1{font-size:clamp(1.9rem,4vw,2.8rem);font-weight:680;letter-spacing:-.04em;margin:8px 0 10px}.catalog-intro p{color:var(--muted);max-width:520px;line-height:1.6}.course-stamp{padding:14px 18px;border-radius:18px;background:var(--soft);color:var(--accent);white-space:nowrap;text-align:center}.course-stamp strong{display:block;font-size:1.4rem}.course-stamp span{font-size:.8rem}.review-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--soft);padding:18px 22px;border-radius:var(--radius);margin:0 0 24px}.review-banner p{font-size:.9rem;color:var(--muted);margin-top:5px}.lesson-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.lesson-card{display:grid;grid-template-columns:148px 1fr;gap:20px;padding:24px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius)}.lesson-cover{background:var(--scene);border-radius:18px;display:flex;align-items:center;justify-content:center;min-height:178px;overflow:hidden}.lesson-cover img{object-fit:contain;max-height:148px;max-width:95%}.lesson-cover .cover-balloon{max-height:140px}.lesson-cover .cover-home{width:95%;border-radius:10px}.lesson-copy{min-width:0;display:flex;flex-direction:column;align-items:flex-start}.lesson-copy h2{font-size:1.3rem;font-weight:650;margin:7px 0 8px}.lesson-copy p{font-size:.875rem;color:var(--muted);line-height:1.5;margin-bottom:14px}.lesson-copy .button{margin-top:auto;min-width:130px}.lesson-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:.75rem;color:var(--muted);margin-bottom:14px}.status-dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:var(--accent);margin-right:5px}.catalog-note{font-size:.8rem;color:var(--muted);line-height:1.6;margin-top:24px}.words-link{font-size:.8rem;min-height:40px;margin-top:5px}.catalog-footer{display:flex;justify-content:space-between;gap:16px;margin-top:32px;color:var(--muted);font-size:.75rem}.catalog-footer button{font-size:.8rem}
.lesson-shell{max-width:1400px;margin:auto;min-height:100svh;display:grid;grid-template-rows:auto 1fr;background:var(--paper)}.lesson-header{display:flex;align-items:center;gap:20px;padding:14px 28px;border-bottom:1px solid var(--line)}.lesson-brand{flex:1;min-width:0}.lesson-brand h1{font-size:1.15rem;font-weight:650;margin-top:4px}.progress-block{width:180px;flex-shrink:0}.progress-copy{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:.75rem;margin-bottom:7px}.progress-track{height:6px;background:var(--line);border-radius:10px;overflow:hidden}.progress-fill{height:100%;background:var(--accent);transition:width .2s}.lesson-header .header-actions{gap:8px}.lesson-main{display:grid;grid-template-rows:auto minmax(240px,1fr) auto;min-width:0}.task-area{text-align:center;padding:20px 24px 14px;min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.task-area h2{font-size:clamp(1.1rem,2vw,1.4rem);font-weight:650}.stage-tag{font-size:.7rem;color:var(--muted);letter-spacing:.1em;text-transform:uppercase}.word-pill{display:inline-flex;align-items:center;justify-content:center;padding:8px 26px;background:var(--soft);border-radius:14px;min-width:140px;font-size:clamp(1.55rem,3.2vw,2.2rem);font-weight:650;letter-spacing:.02em;min-height:54px;line-height:1.2}.task-area.learn-task{min-height:90px}.arena{position:relative;isolation:isolate;background:var(--scene);border-radius:var(--radius);margin:0 28px;min-width:0;min-height:240px;display:flex;align-items:center;justify-content:center;padding:22px;--scene-height:clamp(240px,calc(100svh - 330px),470px)}.lesson-footer{position:sticky;bottom:0;z-index:5;padding:12px 28px max(18px,env(safe-area-inset-bottom));background:var(--paper)}.feedback{min-height:28px;font-size:.875rem;text-align:center;color:var(--muted);padding-bottom:8px;line-height:1.4}.feedback[data-kind="correct"]{color:var(--success)}.feedback[data-kind="wrong"]{color:var(--warning)}.lesson-controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;max-width:880px;margin:auto}.lesson-controls .button{width:100%;min-height:52px}.counter-note{font-size:.75rem;color:var(--muted)}
.study-card{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr);align-items:center;gap:40px;width:min(100%,780px);padding:10px}.study-picture{display:flex;justify-content:center;align-items:center;height:var(--scene-height);max-height:360px}.study-balloon{max-height:85%;max-width:75%;object-fit:contain}.study-object{max-width:90%;max-height:90%;object-fit:contain}.study-object.wide-image{border-radius:16px}.study-house{max-width:100%;max-height:100%;object-fit:contain}.study-copy h2{font-size:clamp(2.2rem,5vw,3.8rem);font-weight:650;letter-spacing:-.04em;margin:8px 0}.study-copy p{font-size:1.4rem;margin-bottom:22px}.study-caption{font-size:.8rem;color:var(--muted)}.study-reading{display:block;color:var(--muted);font-size:.875rem;line-height:1.6;max-width:280px}.study-number{font-size:clamp(6rem,18vw,12rem);font-weight:700;color:var(--accent);line-height:1}.room-crop{position:relative;width:100%;max-width:300px;aspect-ratio:1.16;overflow:hidden;border-radius:18px}.room-crop img{position:absolute;max-width:none;width:285.7%;left:calc(var(--crop-x)*-2.857%);top:calc(var(--crop-y)*-3.067%)}
.balloon-field{display:flex;justify-content:center;align-items:center;gap:clamp(16px,4vw,50px);flex-wrap:wrap;width:100%;padding:16px}.balloon-choice{position:relative;display:flex;align-items:center;justify-content:center;min-width:48px;border:0;background:transparent;padding:8px;width:clamp(80px,12vw,150px);height:clamp(160px,24vw,300px);border-radius:24px;transition:transform .18s}.balloon-choice img{object-fit:contain;max-height:100%;pointer-events:none}.balloon-choice:hover:enabled{transform:translateY(-5px)}.answer-check{display:none;position:absolute;right:8px;top:8px;background:var(--accent);color:var(--on-accent);width:32px;height:32px;align-items:center;justify-content:center;border-radius:50%;font-size:1.2rem;pointer-events:none}.is-correct>.answer-check{display:flex}.is-correct{outline:3px solid var(--accent);outline-offset:3px}.is-hinted{outline:3px dashed var(--accent);outline-offset:3px}.is-wrong{animation:nudge .25s ease}.object-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;width:100%;max-width:1080px}.object-choice{position:relative;min-height:190px;min-width:0;border:1px solid var(--line);border-radius:20px;background:var(--paper);padding:14px;display:flex;align-items:center;justify-content:center}.object-choice img{width:100%;max-height:170px;object-fit:contain;pointer-events:none}.object-choice:first-child img{border-radius:10px}.object-choice:hover{background:var(--soft)}.translation-choices{display:grid;grid-template-columns:1fr 1fr;gap:18px;width:min(100%,780px)}.translation-choice{position:relative;border:1px solid var(--line);border-radius:18px;background:var(--paper);padding:22px 40px;min-height:100px;font-size:1.3rem;font-weight:600}.translation-choice:hover{background:var(--soft)}
.rooms-layout{width:100%;display:flex;align-items:center;justify-content:center;gap:24px}.house-figure{position:relative;flex-shrink:1;width:min(100%,calc(var(--scene-height)*1.333));aspect-ratio:1448/1086}.house-image{width:100%;height:100%;display:block;border-radius:15px}.room-choice{position:absolute;border:2px solid transparent;background:transparent;border-radius:12px;min-width:44px;min-height:44px;padding:0}.room-choice:hover{background:#ffffff30;border-color:#ffffffc9}.room-choice.is-correct{background:#b4e5b33b;outline-offset:0}.placed-item{position:absolute;pointer-events:none}.house-tools{display:flex;flex-direction:column;gap:18px;align-items:center;flex-shrink:0;width:145px}.whole-house{position:relative;border:1px solid var(--line);border-radius:16px;background:var(--paper);padding:10px;max-width:145px;font-size:.85rem;display:flex;flex-direction:column;align-items:center;gap:4px}.whole-house img{max-height:95px;object-fit:contain}.item-tray{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;max-width:145px}.item-tray span{font-size:.75rem;color:var(--muted);line-height:1.5}.drag-item{max-width:85px;height:72px;object-fit:contain;cursor:grab;touch-action:none;position:relative;z-index:6}.drag-item.dragging{cursor:grabbing;z-index:10;filter:drop-shadow(0 8px 8px #0003)}
.cake-scene{display:flex;align-items:center;flex-direction:column;justify-content:center;width:100%;gap:8px}.cake-figure{position:relative;width:min(600px,100%);aspect-ratio:1.65}.cake-image{position:absolute;width:100%;height:100%;object-fit:contain;pointer-events:none}.candles{position:absolute;display:flex;justify-content:center;align-items:flex-end;left:7%;right:7%;top:1%;height:43%;gap:0}.candle{position:relative;width:10%;height:100%;min-height:70px;min-width:0;border:0;border-radius:12px;background:transparent;padding:0 2px;display:flex;align-items:flex-end;justify-content:center}.candle img{width:100%;height:76%;object-fit:contain;pointer-events:none}.candle:hover:enabled{background:#ffffff45}.flame{display:none;position:absolute;left:calc(50% - 6px);top:9%;width:12px;height:22%;min-height:15px;background:#ffc94e;border:2px solid #e68b2c;border-radius:65% 35% 65% 35%;transform:rotate(6deg);filter:drop-shadow(0 0 5px #ffc94e77)}.candle.lit .flame{display:block}.candle.lit{background:#ffce5c24}.candle-count{font-size:.875rem;color:var(--muted)}
.summary-area{max-width:800px;margin:auto;padding:48px 28px;text-align:center}.summary-symbol{display:grid;place-items:center;width:80px;height:80px;border-radius:28px;background:var(--soft);color:var(--accent);font-size:2.5rem;margin:0 auto 20px}.summary-area h1{font-size:2rem;margin-bottom:12px}.summary-area>p{line-height:1.6;color:var(--muted);margin-bottom:24px}.summary-stats{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}.summary-stat{padding:22px;background:var(--soft);border-radius:18px}.summary-stat strong{font-size:2rem;display:block;color:var(--accent)}.summary-stat span{font-size:.85rem}.word-list{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:24px 0}.word-chip{border:1px solid var(--line);background:var(--paper);border-radius:12px;padding:10px 14px;display:flex;align-items:center;gap:8px;min-height:44px}.word-chip span{color:var(--muted);font-size:.8rem}.summary-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px}.vocabulary-page{max-width:900px;margin:0 auto;padding:24px}.vocabulary-header{display:flex;gap:16px;align-items:center;margin-bottom:28px}.vocabulary-header h1{font-size:1.5rem}.vocabulary-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}.vocabulary-word{display:flex;align-items:center;gap:16px;background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:16px}.vocabulary-word div{flex:1}.vocabulary-word strong{display:block;font-size:1.2rem;margin-bottom:5px}.vocabulary-word p{color:var(--muted);font-size:.9rem}.vocabulary-word small{display:block;font-size:.75rem;color:var(--muted);margin-top:5px}
dialog{width:min(480px,calc(100% - 32px));max-height:calc(100svh - 32px);overflow:auto;border:1px solid var(--line);border-radius:24px;padding:24px;background:var(--paper);color:var(--ink);box-shadow:0 24px 80px #0003}dialog::backdrop{background:#132e3866;backdrop-filter:blur(3px)}.settings-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.settings-header h2{font-size:1.3rem}dialog>.muted{font-size:.9rem;margin:8px 0 24px}fieldset{border:0;padding:0;margin:0 0 24px}legend{font-weight:600;margin-bottom:12px}.theme-options{display:flex;gap:10px;flex-wrap:wrap}.theme-options label{display:flex;align-items:center;gap:7px;min-height:48px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;font-size:.85rem;cursor:pointer}.theme-options input{accent-color:var(--accent)}.theme-dot{display:inline-block;width:14px;height:14px;border-radius:50%}.theme-dot.meadow{background:#246d60}.theme-dot.blueberry{background:#545a9b}.theme-dot.apricot{background:#a64d2d}.size-label{display:flex;justify-content:space-between;gap:8px;font-weight:600}.size-label output{font-weight:400;color:var(--muted);font-size:.85rem}input[type="range"]{width:100%;accent-color:var(--accent);margin:14px 0;min-height:44px}.settings-note{color:var(--muted);font-size:.8rem;line-height:1.6;margin:12px 0 20px}#storage-notice{position:fixed;bottom:12px;left:12px;right:12px;z-index:100;background:var(--warning-soft);color:var(--warning);border-radius:12px;padding:12px;max-width:600px;margin:auto;font-size:.85rem}
@keyframes nudge{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
@media(min-width:1500px){.lesson-shell{border-left:1px solid var(--line);border-right:1px solid var(--line)}}
@media(max-width:1000px){.lesson-card{grid-template-columns:110px 1fr;padding:20px;gap:16px}.lesson-cover{min-height:160px}.object-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-width:700px}.object-choice{min-height:135px}.object-choice img{max-height:110px}.balloon-field{gap:12px}}
@media(max-width:680px){.catalog{padding:20px 16px}.catalog-header{margin-bottom:30px}.brand strong{font-size:.9rem}.catalog-intro{align-items:flex-start}.catalog-intro h1{font-size:2rem}.course-stamp{display:none}.lesson-grid{grid-template-columns:1fr;gap:14px}.lesson-card{grid-template-columns:106px 1fr;padding:16px}.lesson-copy h2{font-size:1.15rem}.lesson-cover{min-height:170px}.lesson-cover img{max-height:130px}.review-banner{align-items:flex-start;flex-direction:column;padding:16px}.catalog-footer{flex-direction:column}.lesson-header{flex-wrap:wrap;gap:10px;padding:10px 14px}.lesson-header .back-label{display:none}.lesson-header .back-button{padding:10px;width:48px}.lesson-brand h1{font-size:1rem}.lesson-brand .eyebrow{font-size:.6rem}.lesson-header .header-actions{gap:6px}.lesson-header .icon-button{width:44px;min-height:44px;padding:8px}.progress-block{width:100%;order:4}.progress-copy{font-size:.7rem;margin-bottom:5px}.task-area{padding:16px 14px 12px;min-height:125px;gap:9px}.task-area h2{font-size:1.05rem}.word-pill{font-size:1.65rem;min-height:48px}.arena{margin:0 12px;padding:14px;--scene-height:260px;min-height:270px}.lesson-main{grid-template-rows:auto minmax(270px,1fr) auto}.lesson-footer{padding:10px 12px max(14px,env(safe-area-inset-bottom))}.lesson-controls{gap:7px}.lesson-controls .button{font-size:.8rem;padding:10px 5px;gap:5px;min-height:50px}.lesson-controls svg{width:18px;height:18px}.feedback{font-size:.8rem;min-height:34px}.study-card{grid-template-columns:1fr;gap:8px;padding:0;text-align:center}.study-picture{height:175px;min-height:150px}.study-copy h2{font-size:2.2rem;margin:5px 0}.study-copy p{font-size:1.2rem;margin-bottom:12px}.study-reading{max-width:280px;margin:auto;font-size:.8rem}.study-caption{display:none}.study-number{font-size:7rem}.room-crop{max-width:205px;max-height:175px}.balloon-field{gap:8px 14px;padding:0;max-width:370px}.balloon-choice{width:76px;height:125px;padding:4px}.object-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.object-choice{min-height:115px;padding:10px}.object-choice img{max-height:92px}.object-choice:first-child{grid-column:1/-1;min-height:100px}.object-choice:first-child img{max-height:95px;width:auto;max-width:95%}.translation-choices{grid-template-columns:1fr;gap:10px}.translation-choice{padding:14px 38px;min-height:58px;font-size:1.1rem}.rooms-layout{flex-direction:column;gap:10px}.house-tools{flex-direction:row;justify-content:center;gap:16px;width:100%;height:82px}.whole-house{width:95px;padding:5px;font-size:.7rem}.whole-house img{max-height:48px}.item-tray{flex-direction:row;max-width:200px;gap:8px}.drag-item{width:46px;height:55px}.item-tray span{font-size:.65rem}.house-figure{width:100%;max-width:430px}.cake-figure{width:100%;min-height:190px;aspect-ratio:1.5}.candles{left:0;right:0;top:2%;height:42%}.candle{padding:0;min-height:70px}.flame{width:9px;left:calc(50% - 4px)}.summary-area{padding:30px 18px}.summary-area h1{font-size:1.6rem}.summary-stat{padding:16px 8px}.summary-stat span{font-size:.75rem}.vocabulary-page{padding:18px 14px}.vocabulary-list{grid-template-columns:1fr}.vocabulary-header h1{font-size:1.1rem}.theme-options{gap:6px}.theme-options label{padding:8px;font-size:.75rem}}
@media(max-height:560px) and (orientation:landscape){.lesson-header{flex-wrap:nowrap;padding:6px 18px;gap:12px}.progress-block{order:0;width:140px}.lesson-header .header-actions{gap:6px}.lesson-header .icon-button,.lesson-header .back-button{min-height:44px;width:44px}.lesson-brand .eyebrow{font-size:.6rem}.lesson-brand h1{font-size:1rem}.task-area{min-height:68px;padding:8px 18px;flex-direction:row;gap:16px}.stage-tag{display:none}.task-area h2{font-size:1rem}.word-pill{font-size:1.4rem;min-height:40px;padding:6px 18px}.task-area.learn-task{min-height:50px}.arena{margin:0 18px;padding:8px 16px;min-height:145px;--scene-height:clamp(145px,calc(100svh - 240px),250px)}.lesson-main{grid-template-rows:auto minmax(145px,1fr) auto}.lesson-footer{padding:5px 18px max(8px,env(safe-area-inset-bottom))}.feedback{font-size:.75rem;min-height:23px;padding-bottom:4px}.lesson-controls .button{min-height:44px;padding:8px 14px;font-size:.85rem}.study-card{grid-template-columns:1fr 1fr;width:600px;gap:22px;text-align:left}.study-picture{height:var(--scene-height);max-height:210px;min-height:120px}.study-copy h2{font-size:2rem;margin:4px 0}.study-copy p{font-size:1.1rem;margin-bottom:7px}.study-reading{font-size:.7rem;margin:0}.study-caption{display:none}.room-crop{max-width:200px}.balloon-choice{width:70px;height:140px;padding:2px}.balloon-field{flex-wrap:nowrap;max-width:700px;gap:24px}.object-grid{grid-template-columns:repeat(5,minmax(0,1fr));max-width:850px;gap:12px}.object-choice{min-height:120px;padding:10px}.object-choice:first-child{grid-column:auto}.object-choice img{max-height:100px}.rooms-layout{flex-direction:row;gap:20px}.house-figure{width:calc(var(--scene-height)*1.333);max-width:350px}.house-tools{flex-direction:column;width:130px;height:auto;gap:8px}.whole-house{padding:4px;font-size:.65rem;width:80px}.whole-house img{height:45px}.item-tray{flex-direction:row;width:130px;gap:6px}.item-tray span{font-size:.6rem}.drag-item{height:45px;width:42px}.room-choice{min-height:44px;min-width:44px}.translation-choices{grid-template-columns:1fr 1fr;max-width:700px;gap:10px}.translation-choice{min-height:58px;padding:12px 35px;font-size:1rem}.cake-scene{flex-direction:row;gap:20px}.cake-figure{width:260px;min-height:145px;max-height:180px;aspect-ratio:1.65}.candles{height:45%;top:0;left:-7%;right:-7%}.candle{min-height:60px}.candle-count{font-size:.75rem}.summary-area{padding:18px}.summary-symbol{width:50px;height:50px;font-size:1.6rem;margin-bottom:12px}}
@media(max-width:359px){.catalog .header-actions .icon-button:first-child{display:none}.brand-mark{width:36px;height:36px}.lesson-card{grid-template-columns:86px 1fr;gap:12px;padding:12px}.lesson-copy p{font-size:.8rem}.lesson-header{padding-inline:10px;gap:7px}.lesson-brand h1{font-size:.9rem}.lesson-header .header-actions{gap:3px}.lesson-controls .button{font-size:.7rem}.lesson-controls svg{width:15px;height:15px}.balloon-field{gap:6px 9px}.balloon-choice{width:70px;height:122px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.candle-panel{width:min(520px,100%);text-align:center}.candle-toggles{display:grid;grid-template-columns:repeat(10,minmax(44px,1fr));gap:5px;margin-top:10px}.candle-toggle{min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:12px;background:var(--paper);font-weight:600}.candle-toggle.lit{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.room-crop{aspect-ratio:1.53}.room-crop img{top:calc(var(--crop-y)*-3.279%)}
@media(max-width:680px){.candle-toggles{grid-template-columns:repeat(5,minmax(44px,1fr));gap:6px}.cake-figure{min-height:160px;width:min(100%,370px)}.cake-scene{gap:4px}}
@media(max-height:560px) and (orientation:landscape){.candle-panel{width:270px;flex-shrink:0}.candle-toggles{grid-template-columns:repeat(5,minmax(44px,1fr));gap:5px}.cake-scene{gap:20px}.cake-figure{width:260px;min-height:145px}.candle-count{font-size:.75rem}.candle-toggle{min-height:44px}}
.progress-copy{white-space:nowrap}
.lesson-controls{grid-template-columns:repeat(3,minmax(0,1fr));min-width:0}.lesson-controls .button{min-width:0}.task-area,.lesson-footer{min-width:0}
.lesson-footer{position:static}
.scene-rooms{--scene-height:clamp(330px,calc(100svh - 290px),650px);padding:12px}
.scene-rooms .house-figure{width:min(100%,calc(var(--scene-height)*1.333))}
.house-intro{border:0;background:transparent;display:flex;align-items:center;flex-direction:column;gap:6px;font-size:1.4rem;color:var(--ink)}
.house-intro img{max-height:var(--scene-height);object-fit:contain}
.house-intro strong{font-size:2rem}
.decorate-tray{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:170px}.item-select{border:1px solid var(--line);border-radius:14px;background:var(--paper);padding:8px;min-height:80px}.item-select.selected{outline:2px solid var(--accent)}.item-select .drag-item{max-width:60px;height:60px}.decorate-tray>span{grid-column:1/-1;font-size:.75rem;text-align:center;color:var(--muted);line-height:1.5}
.scene-rooms .house-tools:has(.decorate-tray){width:180px}.scene-rooms .house-tools:not(:has(.decorate-tray)){display:none}
@media(max-width:680px){.scene-rooms .house-tools:has(.decorate-tray){width:100%;height:auto}.decorate-tray{grid-template-columns:repeat(4,1fr);width:100%;gap:8px}.item-select{min-height:65px;padding:5px}.item-select .drag-item{max-width:48px;height:48px}}
.room-choice[class-focus]{background:#fff8b52e}
@media(max-width:680px){.lesson-header .header-actions{gap:3px}.lesson-header .header-actions .icon-button{width:40px;min-height:44px;padding:8px}.scene-rooms{--scene-height:330px;padding:8px}.scene-rooms .house-figure{width:100%}.scene-rooms .house-tools:has(.whole-house:only-child){display:none}}
@media(max-height:560px) and (orientation:landscape){.scene-rooms{--scene-height:210px}.scene-rooms .house-figure{width:280px}.house-intro img{max-height:160px}}
#storage-notice{position:static;max-width:none;margin:12px}
/* Появление на изображении, чтобы не сдвигать кнопки и зоны выбора. */
@media(prefers-reduced-motion:no-preference){.balloon-choice img,.study-balloon{animation:balloon-arrive 920ms cubic-bezier(.2,.78,.25,1) var(--enter-delay,0ms) both}}
@keyframes balloon-arrive{from{opacity:0;transform:translateY(85px) scale(.65) rotate(-7deg)}70%{opacity:1;transform:translateY(-8px) scale(1.02) rotate(2deg)}to{opacity:1;transform:translateY(0) scale(1) rotate(0)}}
:root[data-word-style="pink"] .word-pill{background:#fce0ef;color:#9c165c;border:2px solid #e88cba;box-shadow:0 5px 0 #f3c6dd;font-size:clamp(1.9rem,4vw,2.7rem)}
:root[data-word-style="field"] .word-pill{background:#fffdf8;color:#9c165c;border:3px solid #c2367d;border-radius:12px;min-width:240px;box-shadow:0 6px 0 #f5dfeb;font-size:clamp(2rem,4vw,2.8rem);padding:10px 28px}
:root[data-word-style="card"] .word-pill{background:#70294f;color:#ffffff;border:0;border-radius:20px;min-width:250px;padding:13px 30px;font-size:clamp(2.15rem,4.5vw,3rem);box-shadow:0 7px 0 #ebd6e2}
@media(max-height:560px) and (orientation:landscape){:root[data-word-style] .word-pill{font-size:1.7rem;min-width:150px;padding:6px 20px;min-height:42px}}
@media(max-width:359px){:root[data-word-style] .word-pill{min-width:200px}}
/* Экран урока всегда равен доступному окну. Размер иллюстрации зависит от оставшегося места. */
html:has(.lesson-shell),body:has(.lesson-shell){height:100%;overflow:hidden}
.lesson-shell{height:100dvh;min-height:0;grid-template-rows:auto minmax(0,1fr)}
.lesson-main{min-height:0;grid-template-rows:auto minmax(0,1fr) auto}
.arena,.scene-rooms{min-height:0;min-width:0;overflow:hidden;padding:10px;--scene-height:var(--fit-height,200px)}
.rooms-layout{height:100%;min-height:0;gap:16px}
.scene-rooms .house-figure{width:min(calc(var(--fit-height,200px)*1.333),calc(var(--fit-width,500px) - 205px));max-height:100%;flex-shrink:0}
.scene-rooms .rooms-layout:not(:has(.decorate-tray)) .house-figure{width:min(calc(var(--fit-height,200px)*1.333),var(--fit-width,500px))}
.house-intro{height:100%;min-height:0;gap:0}.house-intro img{height:100%;max-height:100%;width:auto;min-height:0;object-fit:contain}.house-intro strong,.house-intro>span{display:none}
.item-placed{visibility:hidden}
.lesson-main:focus{outline:none}
.tree-interior{position:relative;aspect-ratio:1672/941;width:min(var(--fit-width,800px),calc(var(--fit-height,400px)*1.777));flex-shrink:0;isolation:isolate}
.tree-background{display:block;width:100%;height:100%;border-radius:16px}
.interior-object{position:absolute;border:0;background:transparent;padding:0;transition:filter .2s;z-index:2}
.interior-object img{display:block;width:100%;height:auto;pointer-events:none}
.tree-roof{left:20.8%;top:1.2%;width:61.5%;height:35.5%;clip-path:polygon(0 100%,17% 42%,50% 0,83% 42%,100% 100%)}
.tree-chair{left:33.074%;top:40.489%;width:7.356%}
.tree-table-group{position:absolute;z-index:2;left:40.55%;top:41.02%;width:14.055%;height:18.37%;pointer-events:none}
.tree-table{left:0;top:34.132%;width:100%;pointer-events:auto}
.tree-radio{left:26.382%;top:0;width:37.446%;pointer-events:auto;z-index:3}
.tree-bed{left:55.801%;top:40.064%;width:16.866%}
.interior-object.is-hinted,.interior-object.is-correct{outline:0;filter:drop-shadow(0 0 7px #ffdf54)}
.tree-roof.is-hinted,.tree-roof.is-correct{background:#ffde6160}
.number-scene-grid{width:min(850px,100%);height:min(100%,330px);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:14px}
.number-scene-choice{position:relative;border:1px solid var(--line);border-radius:20px;background:var(--paper);font-size:clamp(1.8rem,5vw,4rem);font-weight:650;min-height:44px;min-width:44px}
.number-scene-choice:hover{background:var(--soft)}
.already-arrived img{animation:none!important}
.pop-field{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));max-width:900px;gap:5px 18px}
.pop-field .balloon-choice{width:100%;height:100%;min-height:0;padding:3px}
.pop-field .is-popped{visibility:hidden;pointer-events:none}
.cake-scene:has(.candle-panel[hidden]) .cake-figure{height:100%;width:min(700px,100%);max-height:100%}
.candles .candle{width:10%;flex-shrink:0}
@media(max-width:680px){.number-scene-grid{gap:8px}.number-scene-choice{border-radius:14px}.pop-field{gap:4px}.tree-interior{width:min(var(--fit-width,350px),calc(var(--fit-height,300px)*1.777))}}
@media(prefers-reduced-motion:no-preference){.is-popped img{animation:author-pop .3s ease-out forwards!important}.pop-field .is-popped{visibility:visible}.pop-field .is-popped::after{content:'';position:absolute;inset:20%;border:3px solid #ffffffb0;border-radius:50%;animation:author-pop .3s ease-out forwards}}
@keyframes author-pop{to{opacity:0;transform:scale(1.4)}}
.candles [role="button"]{cursor:pointer;touch-action:manipulation;pointer-events:auto}
.candles [role="button"]:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.candles [role="button"]:hover{background:#ffffff55}
.scene-balloons .balloon-choice.is-hinted{outline:0;filter:drop-shadow(0 0 8px #ffdb5577)}
.lesson-header .progress-copy{font-size:.7rem}
.lesson-header .progress-copy span{white-space:normal;text-align:right}
@media(min-width:1001px){.lesson-header{grid-template-columns:auto minmax(100px,160px) minmax(0,1fr) 85px auto}.stage-track{flex-wrap:nowrap}.stage-chip{padding:6px 7px;font-size:.64rem;gap:4px}}
.stage-bridge{position:absolute;inset:0;z-index:10;display:grid;place-items:center;padding:16px;background:#e0f7ffb8;backdrop-filter:blur(3px);border-radius:inherit}
.stage-bridge-card{padding:24px;text-align:center;border-radius:24px;background:var(--paper);color:var(--ink);box-shadow:0 15px 40px #29445b26;max-width:480px}.stage-bridge-card h2{font-size:1.6rem}.stage-bridge-card p{margin:14px 0 20px;line-height:1.5;color:var(--muted)}
.completion-confetti{position:fixed;inset:0;z-index:5;overflow:hidden;pointer-events:none}.completion-confetti span{position:absolute;left:calc(var(--i)*3.12%);top:-25px;width:10px;height:16px;border-radius:2px;background:#ef709a;animation:author-confetti 2.8s ease-in calc(var(--i)*25ms) both}.completion-confetti span:nth-child(3n){background:#66c1e2}.completion-confetti span:nth-child(3n+1){background:#ffd65e}
@keyframes author-confetti{to{transform:translate(var(--drift),110vh) rotate(760deg);opacity:0}}
@media(prefers-reduced-motion:reduce){.completion-confetti{display:none}}
/* Авторские фоны и расположение шариков сохраняются в пропорциях исходной иллюстрации. */
.colour-author-scene{--colour-width:min(var(--fit-width,900px),calc(var(--fit-height,450px)*1.777));position:relative;width:var(--colour-width);aspect-ratio:1672/941;--basket-x:calc(var(--colour-width)*-.378);--basket-y:calc(var(--colour-width)*.197)}
.colour-scenery{position:absolute;inset:0;width:100%;height:100%;border-radius:16px;pointer-events:none}
.colour-author-scene .balloon-field{position:absolute;inset:0;width:100%;height:100%;padding:0;max-width:none;display:block}
.colour-author-scene .balloon-choice{position:absolute;left:var(--x);top:var(--y);width:13%;height:52%;min-height:0;min-width:0;max-height:none;transform:translate(-50%,-50%);padding:0;border-radius:22px}
.colour-presentation .balloon-choice{width:24%;height:74%}
.colour-author-scene .pop-field .balloon-choice{width:11%;height:42%}
.colour-author-scene .balloon-choice:hover{transform:translate(-50%,-50%)}
.colour-author-scene .balloon-choice img{height:100%;width:100%;object-fit:contain;filter:drop-shadow(0 9px 9px #37557029)}
@media(prefers-reduced-motion:no-preference){.colour-author-scene .balloon-choice img{animation:fly-from-author-basket 920ms cubic-bezier(.2,.78,.25,1) var(--enter-delay,0ms) both}.colour-author-scene .balloon-choice.is-popped img{animation:author-pop .3s ease-out forwards!important}}
@keyframes fly-from-author-basket{0%{opacity:0;transform:translate(var(--basket-x),var(--basket-y)) scale(.18) rotate(-8deg)}65%{opacity:1}82%{transform:translate(0,-8px) scale(1.04) rotate(2deg)}100%{opacity:1;transform:translate(0,0) scale(1) rotate(0)}}
.scene-balloons{background:var(--scene);padding:8px}
.scene-cake{background:#dff2ff url('assets/numbers/background.png') center/cover no-repeat}
.number-scene-choice{background:#fffdf5eb;box-shadow:0 5px 12px #273e4820}
.lesson-card-links{display:flex;gap:18px;flex-wrap:wrap}
.stage-track{display:flex;justify-content:center;align-items:center;gap:5px;flex-wrap:wrap}
.stage-chip{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:20px;background:color-mix(in srgb,var(--paper) 75%,var(--header-surface));font-size:.68rem;color:var(--header-muted);font-weight:600;white-space:nowrap;letter-spacing:0}
.stage-chip>span{display:grid;place-items:center;min-width:18px;height:18px;border-radius:50%;background:var(--header-surface);font-size:.65rem}
.stage-chip.active{background:var(--accent);color:var(--on-accent)}.stage-chip.active>span{background:#ffffff30}.stage-chip.complete{color:var(--accent)}
.lesson-header{grid-template-columns:auto minmax(90px,.8fr) minmax(280px,3fr) 85px auto;gap:12px}.header-stage{font-size:inherit}
.task-area,.task-area.learn-task{min-height:0;padding:10px 16px}
.lesson-word-row{display:flex;justify-content:center;align-items:center;padding-bottom:9px;min-height:0}
.lesson-word-row:has([hidden]){display:none}
:root[data-word-style] .lesson-word-row .word-pill{font-size:clamp(2.4rem,4.5vw,3.7rem);line-height:1.05;min-width:230px;min-height:64px;padding:7px 30px;font-weight:700}
.lesson-footer{padding-top:8px}
@media(max-width:1000px){.lesson-header{grid-template-columns:48px minmax(90px,1fr) 95px auto}.lesson-header>.back-button{grid-column:1;grid-row:1}.lesson-header>.lesson-brand{grid-column:2;grid-row:1}.lesson-header>.progress-block{grid-column:3;grid-row:1;width:95px}.lesson-header>.header-actions{grid-column:4;grid-row:1}.lesson-header>.header-stage{grid-column:1/-1;grid-row:2}.stage-chip{font-size:.65rem;padding:5px 8px}}
@media(max-width:680px){.lesson-header{grid-template-columns:44px minmax(0,1fr) auto;gap:5px;padding:6px 10px}.lesson-header>.header-actions{grid-column:3;grid-row:1}.lesson-header>.progress-block{grid-row:3;grid-column:1/-1;width:100%;display:flex;align-items:center;gap:12px}.lesson-header .progress-copy{flex-shrink:0;margin:0;font-size:.6rem}.lesson-header .progress-track{flex:1}.stage-track{gap:3px}.stage-chip{padding:4px 6px;font-size:.57rem;gap:3px}.stage-chip>span{min-width:15px;height:15px;font-size:.55rem}.task-area{padding:7px 10px}.task-area h2{font-size:.85rem}:root[data-word-style] .lesson-word-row .word-pill{font-size:2.1rem;min-height:48px;min-width:190px;padding:5px 20px}.lesson-word-row{padding-bottom:7px}.lesson-footer .feedback{font-size:.65rem}.lesson-controls .button{min-height:44px}.colour-author-scene{--colour-width:min(var(--fit-width,350px),calc(var(--fit-height,240px)*1.777))}}
@media(max-height:560px) and (orientation:landscape){.lesson-header{padding:4px 10px;gap:4px}.stage-chip{font-size:.55rem;padding:3px 6px}.stage-chip>span{min-width:14px;height:14px}.task-area,.task-area.learn-task{padding:4px 10px}.task-area h2{font-size:.8rem}:root[data-word-style] .lesson-word-row .word-pill{font-size:2rem;min-height:42px;padding:3px 22px}.lesson-word-row{padding-bottom:5px}.lesson-footer{padding-top:4px}.lesson-controls .button{min-height:42px}}
@media(min-width:681px) and (min-height:561px){.scene-cake .candle-toggles{display:none}.scene-cake .cake-figure{height:calc(100% - 35px)}}
@media(max-height:560px) and (orientation:landscape){.lesson-header:has(.scene-cake) .progress-block{width:110px}}
.scene-rooms .house-tools:has(.decorate-tray){height:auto;max-height:100%;width:180px}
.scene-rooms .house-tools .whole-house{display:none}
.study-card{height:100%;min-height:0}.study-picture{height:100%;min-height:0;max-height:100%}
.balloon-field{height:100%;min-height:0;align-content:center;gap:6px 14px;padding:0}.balloon-choice{height:min(90%,250px)}
.object-grid{height:100%;min-height:0}.object-choice{min-height:0;overflow:hidden}.object-choice img{max-height:100%;height:100%;object-fit:contain}
.translation-choices{max-height:100%}.translation-choice{min-height:44px;padding:12px 38px}
.cake-scene{height:100%;min-height:0}.cake-figure{min-height:0;height:calc(100% - 80px);width:min(600px,100%)}.candle-panel{flex-shrink:0}
@media(max-width:680px){
 .task-area,.task-area.learn-task{min-height:0;padding:8px 12px;gap:6px}.task-area h2{font-size:.95rem}
 :root[data-word-style] .word-pill{font-size:1.65rem;min-height:42px;padding:5px 22px}
 .lesson-header{padding:7px 10px;gap:6px}.lesson-brand h1{font-size:.9rem}
 .lesson-footer{padding:6px 10px max(8px,env(safe-area-inset-bottom))}.feedback{min-height:0;font-size:.75rem;padding-bottom:6px}
 .rooms-layout{flex-direction:column;gap:6px}
 .scene-rooms .house-figure{width:min(calc((var(--fit-height,300px) - 100px)*1.333),var(--fit-width,350px))}
 .scene-rooms .rooms-layout:not(:has(.decorate-tray)) .house-figure{width:min(calc(var(--fit-height,300px)*1.333),var(--fit-width,350px))}
 .scene-rooms .house-tools:has(.decorate-tray){height:90px;width:100%;flex-shrink:0}
 .decorate-tray{grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:6px}.decorate-tray>span{font-size:.6rem}.item-select{min-height:48px;height:53px}.item-select .drag-item{height:40px;max-width:44px}
 .balloon-choice{height:calc((var(--fit-height,240px) - 18px)/2);max-height:150px;width:24%}
 .study-card{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;gap:4px}.study-copy h2{font-size:1.7rem}.study-copy p{font-size:1rem;margin-bottom:4px}.study-reading{font-size:.65rem}
 .object-choice:first-child{min-height:0}.object-choice:first-child img{max-height:100%}.object-grid{grid-template-rows:repeat(3,minmax(0,1fr))}
 .cake-figure{height:calc(100% - 120px);width:100%}.candle-toggles{margin-top:4px;gap:4px}.candle-toggle{min-height:40px}.candle-count{font-size:.75rem}
 .translation-choices{gap:6px}.translation-choice{padding:8px 35px;font-size:1rem}
}
@media(max-height:560px) and (orientation:landscape){
 .task-area,.task-area.learn-task{min-height:0;padding:5px 14px}.task-area h2{font-size:.9rem}
 :root[data-word-style] .word-pill{font-size:1.5rem;min-height:36px;padding:3px 18px}
 .lesson-header{padding:5px 12px}.lesson-footer{padding:4px 12px 6px}.feedback{min-height:0;padding-bottom:4px;font-size:.7rem}
 .scene-rooms .rooms-layout{flex-direction:row}
 .scene-rooms .house-figure{width:min(calc(var(--fit-height,150px)*1.333),calc(var(--fit-width,700px) - 200px))}
 .scene-rooms .house-tools:has(.decorate-tray){width:180px;height:auto}.decorate-tray{grid-template-columns:repeat(2,minmax(0,1fr));width:180px;gap:5px}.item-select{height:48px;min-height:44px}.item-select .drag-item{height:34px}.decorate-tray>span{font-size:.6rem}
 .study-card{grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr)}.study-picture{height:100%;min-height:0}
 .object-grid{grid-template-rows:minmax(0,1fr)}.object-choice{min-height:0}.balloon-choice{height:95%;max-height:150px}
 .cake-figure{height:100%;width:260px}.cake-scene{flex-direction:row}.candle-panel{width:270px}
}
@media(max-width:359px){.lesson-controls [data-next] svg{display:none}}
@media(max-height:560px) and (orientation:landscape){.lesson-header .back-label{display:none}.lesson-header .back-button{padding:8px;flex-shrink:0}.progress-block{width:170px}.progress-copy{font-size:.65rem}.lesson-brand h1{font-size:.95rem}.lesson-brand .eyebrow{font-size:.55rem}}
/* Название этапа встречается один раз, по центру общей верхней панели. */
.lesson-header{display:grid;grid-template-columns:auto minmax(110px,1fr) minmax(180px,1.4fr) minmax(90px,1fr) auto;gap:18px}
.header-stage{font-size:1.25rem;font-weight:650;text-align:center;line-height:1.25}
.lesson-header{background:var(--header-surface);color:var(--header-ink);border-bottom-color:color-mix(in srgb,var(--header-ink) 15%,var(--header-surface));font-family:var(--header-font)}
.lesson-header .header-stage{color:var(--header-ink);font-weight:700;letter-spacing:.01em}
.lesson-header .eyebrow,.lesson-header .progress-copy{color:var(--header-muted)}
.lesson-header .lesson-brand h1{color:var(--header-ink)}
.lesson-header .button,.lesson-header .icon-button{color:var(--header-ink);background:color-mix(in srgb,var(--paper) 82%,var(--header-surface));border-color:color-mix(in srgb,var(--header-ink) 18%,var(--header-surface))}
.lesson-header .button:hover,.lesson-header .icon-button:hover{background:var(--paper)}
:root[data-theme="blueberry"]{--header-surface:#e9e7f4;--header-ink:#474475;--header-muted:#646080}
:root[data-theme="apricot"]{--header-surface:#fae7d5;--header-ink:#7e432c;--header-muted:#805f4c}
.lesson-header .progress-block{width:min(150px,100%);justify-self:end;order:0}
.lesson-header .progress-copy{justify-content:flex-end}
.task-area{min-height:110px;padding-top:14px;padding-bottom:14px}
.task-area.learn-task{min-height:65px}
@media(max-width:680px){
 .lesson-header{grid-template-columns:48px minmax(0,1fr) auto;gap:10px}
 .lesson-header .back-button{grid-column:1;grid-row:1}
 .lesson-header .lesson-brand{grid-column:2;grid-row:1}
 .lesson-header .header-actions{grid-column:3;grid-row:1}
 .header-stage{grid-column:1/3;grid-row:2;text-align:left;font-size:1rem}
 .lesson-header .progress-block{grid-column:3;grid-row:2;width:90px}
 .task-area{min-height:105px}
}
@media(max-height:560px) and (orientation:landscape){
 .lesson-header{grid-template-columns:44px minmax(110px,1fr) minmax(160px,1.3fr) 80px auto;gap:12px}
 .header-stage{font-size:1rem;grid-column:auto;grid-row:auto;text-align:center}
 .lesson-header .progress-block{width:80px;grid-column:auto;grid-row:auto}
 .task-area{min-height:62px;padding:8px 18px}
 .task-area.learn-task{min-height:44px}
}
/* Последние общие правила компоновки: авторские этапы, слово внизу. */
@media(min-width:1001px){.lesson-header{grid-template-columns:auto minmax(100px,160px) minmax(0,1fr) 85px auto;gap:12px}.stage-track{flex-wrap:nowrap}.stage-chip{padding:6px 7px;font-size:.64rem;gap:4px}}
@media(max-width:1000px){.lesson-header{grid-template-columns:48px minmax(90px,1fr) 95px auto;gap:8px}.lesson-header>.back-button{grid-column:1;grid-row:1}.lesson-header>.lesson-brand{grid-column:2;grid-row:1}.lesson-header>.progress-block{grid-column:3;grid-row:1}.lesson-header>.header-actions{grid-column:4;grid-row:1}.lesson-header>.header-stage{grid-column:1/-1;grid-row:2}}
@media(max-width:680px){.lesson-header{grid-template-columns:44px minmax(0,1fr) auto;gap:5px}.lesson-header>.header-actions{grid-column:3;grid-row:1}.lesson-header>.progress-block{grid-column:1/-1;grid-row:3;width:100%;display:flex;align-items:center;gap:12px}.lesson-header .progress-track{flex:1}.lesson-header>.header-stage{grid-column:1/-1;grid-row:2}.stage-track{flex-wrap:wrap;gap:3px}.task-area,.task-area.learn-task{min-height:0;padding:7px 10px}}
@media(max-height:560px) and (orientation:landscape){.task-area,.task-area.learn-task{min-height:0;padding:4px 10px}.lesson-header{padding:4px 10px;gap:4px}.stage-chip{font-size:.55rem;padding:3px 6px}}
/* Перевод читается отдельно, без повтора английского слова. */
.lesson-footer .feedback[data-kind="translation"]{font-size:1.25rem;font-weight:600;color:var(--ink);line-height:1.3;padding:3px 0 10px}
@media(max-width:680px){.lesson-footer .feedback[data-kind="translation"]{font-size:1.1rem;padding-bottom:7px}}
@media(max-height:560px) and (orientation:landscape){.lesson-footer .feedback[data-kind="translation"]{font-size:1rem;padding:2px 0 5px}}
/* Авторское название текущей мини-игры. */
.task-area h2{font-size:clamp(1.3rem,2.7vw,2rem);font-weight:700;line-height:1.2}
@media(max-width:680px){.task-area h2{font-size:1.15rem}}
@media(max-height:560px) and (orientation:landscape){.task-area h2{font-size:1.1rem}}
/* Игровая область занимает всё место между шапкой и нижним словом. */
.lesson-main{grid-template-rows:minmax(0,1fr) auto}
.arena .task-area{position:absolute;z-index:4;top:8px;left:50%;transform:translateX(-50%);width:max-content;max-width:94%;padding:6px 14px;background:#fffdf8dd;border-radius:14px;min-height:0;text-align:center}
.arena .task-area h2{font-size:clamp(1.2rem,2.4vw,1.85rem);line-height:1.15}
.study-counter{position:absolute;z-index:4;right:16px;bottom:12px;padding:6px 12px;border-radius:12px;background:var(--paper);color:var(--ink);font-size:.9rem;font-weight:600}
.scene-balloons .colour-author-scene .balloon-choice{height:45%;width:12%}
.scene-balloons .colour-presentation .balloon-choice{height:59%;width:21%;top:46%}
.scene-balloons .colour-author-scene .pop-field .balloon-choice{height:34%;width:10%}
.scene-balloons .balloon-choice img,.scene-balloons .balloon-choice.is-hinted,.scene-balloons .balloon-choice.is-correct{filter:none;box-shadow:none;outline:none}
.scene-balloons .colour-author-scene .balloon-choice img{filter:none;image-rendering:auto}
.lesson-footer{padding-top:5px;padding-bottom:max(10px,env(safe-area-inset-bottom))}
.lesson-word-row{padding-bottom:4px}
@media(max-width:680px){.arena .task-area{top:5px;padding:4px 8px}.arena .task-area h2{font-size:1rem}.study-counter{font-size:.75rem;right:8px;bottom:8px;padding:4px 8px}}
@media(max-height:560px) and (orientation:landscape){.arena .task-area h2{font-size:.95rem}.arena .task-area{top:4px;padding:3px 8px}.study-counter{font-size:.7rem;bottom:5px}}
