:root {
  --bg: #FFF6E5; --grass: #CFE7BD; --road: #E8CAA4; --ink: #35464D; --accent: #EF8D67; --accent2: #72BFC4;
  --yellow: #F1CE76; --card: #FFFDF8;
  font-family: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.art svg, .art img { display: block; width: 100%; height: 100%; }
.art.photo img { object-fit: cover; border-radius: 50%; }

/* ---------------------------------------------------------------- карта */
.map-wrap { height: 100vh; overflow-y: auto; overflow-x: hidden; padding-bottom: 150px; }
.map { display: block; width: 100%; max-width: 560px; margin: 0 auto; height: auto; }
.stop { cursor: pointer; }
.stop-disc { fill: var(--card); stroke: var(--ink); stroke-width: 4; }
.stop.future .stop-disc { fill: none; stroke-dasharray: 6 6; stroke-width: 3; opacity: .7; }
.stop.future image { opacity: .35; }
.stop-dot { fill: var(--ink); opacity: .35; }
.stop.current .stop-disc { fill: #fff; stroke: var(--accent); stroke-width: 6; animation: pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.stop.done .stop-disc { fill: #E9F5DF; }
.leaf circle { fill: #7DBE6A; stroke: var(--ink); stroke-width: 2; }
.leaf path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pin { fill: var(--accent); stroke: var(--ink); stroke-width: 3; animation: hop 1.2s ease-in-out infinite; }
.pin-dot { fill: #fff; animation: hop 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.1); } }
@keyframes hop { 50% { transform: translateY(-6px); } }

.map-shelf { position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); width: min(420px, 90vw); pointer-events: none; }
.map-shelf .shelf { width: 100%; height: auto; }
.souvenirs { position: absolute; left: 12%; right: 12%; top: -6%; display: flex; gap: 6px; justify-content: center; }
.souvenir-mini { width: 54px; height: 54px; }

.gear { position: fixed; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.6); font-size: 22px; opacity: .55; transition: background 1.5s linear; }
.gear.hold { background: var(--accent); opacity: 1; }

.card-dialog { position: fixed; inset: 0; background: rgba(53,70,77,.35); display: grid; place-items: center; z-index: 20; }
.sheet { position: relative; background: var(--card); border: 4px solid var(--ink); border-radius: 32px; padding: 24px 28px;
  width: min(380px, 88vw); text-align: center; box-shadow: 0 10px 0 rgba(53,70,77,.25); }
.sheet-icon { width: 150px; height: 150px; margin: 0 auto 8px; }
.sheet-title { font-size: 28px; font-weight: 800; }
.sheet-sub { font-size: 14px; opacity: .7; margin: 6px 0 16px; }
.soon { font-size: 20px; opacity: .6; padding: 16px; }
.close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 22px; opacity: .5; }
.big-btn { font-size: 34px; font-weight: 800; padding: 14px 40px; border-radius: 999px; border: 4px solid var(--ink);
  background: var(--accent); color: #fff; box-shadow: 0 6px 0 var(--ink); }
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }

/* ---------------------------------------------------------------- урок */
.lesson { position: fixed; inset: 0; overflow: hidden; }
.lesson .bg { position: absolute; inset: 0; z-index: 0; }
.lesson .bg svg { width: 100%; height: 100%; }
.actors { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 18px; z-index: 2; pointer-events: none; }
.actor { position: relative; display: flex; align-items: flex-start; gap: 8px; pointer-events: auto; }
.actor.friend { flex-direction: row-reverse; }
.fox { width: clamp(110px, 16vw, 180px); height: auto; aspect-ratio: 200/220; }
.portrait { width: clamp(110px, 15vw, 170px); aspect-ratio: 1; border-radius: 50%; border: 6px solid #fff; padding: 0; overflow: hidden;
  background: var(--card); box-shadow: 0 0 0 4px var(--ink); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bubble { max-width: min(32vw, 340px); background: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 10px 16px;
  font-size: clamp(18px, 2.4vw, 28px); line-height: 1.2; opacity: 0; transform: scale(.8); transition: .2s; margin-top: 18px; }
.bubble b { color: var(--accent); }
.bubble i { font-style: normal; opacity: .75; font-size: .85em; }
.actor.talking .bubble { opacity: 1; transform: none; }
.actor.talking .fox, .actor.talking .portrait { animation: talk .35s ease-in-out infinite alternate; }
@keyframes talk { to { transform: translateY(-4px) scale(1.02); } }
.actor.glow .portrait { box-shadow: 0 0 0 4px var(--ink), 0 0 0 14px rgba(241,206,118,.9); animation: hop 1s infinite; }
.actor.happy .portrait, .actor.happy .fox { animation: joy .5s ease-in-out 3; }
@keyframes joy { 50% { transform: translateY(-14px) rotate(-4deg); } }

/* лисёнок: шарниры из web/art/MANIFEST.md (id уникализируются суффиксом, поэтому селектор по префиксу) */
.fox [id^="fox-arm-right"] { transform-box: view-box; transform-origin: 129px 137px; transition: transform .3s; }
.fox [id^="fox-head"] { transform-box: view-box; transform-origin: 100px 118px; transition: transform .4s; }
.fox [id^="fox-tail"] { transform-box: view-box; transform-origin: 137px 165px; animation: tail 2.4s ease-in-out infinite; }
@keyframes tail { 50% { transform: rotate(8deg); } }
.guide.wave [id^="fox-arm-right"] { animation: wave .5s ease-in-out infinite alternate; }
@keyframes wave { from { transform: rotate(-60deg); } to { transform: rotate(-100deg); } }
.guide.look [id^="fox-head"] { transform: rotate(14deg); }
.guide.point [id^="fox-arm-right"] { transform: rotate(-35deg); }
.guide.listening [id^="fox-head"] { transform: rotate(-12deg); }
.guide.shh .fox { animation: shh .8s ease-in-out 2; }
@keyframes shh { 50% { transform: scale(.94); } }

.arena { position: absolute; inset: 22vh 4vw 12vh; display: flex; justify-content: center; align-items: center; gap: 8vw; z-index: 1; }
.card { width: clamp(150px, 26vw, 300px); aspect-ratio: 1; border-radius: 36px; border: 5px solid var(--ink); background: var(--card);
  padding: 0; display: grid; place-items: center; box-shadow: 0 8px 0 rgba(53,70,77,.3); transition: transform .25s, opacity .4s; touch-action: manipulation; }
.card.big { width: clamp(200px, 34vw, 380px); }
.card.small { width: clamp(100px, 14vw, 160px); }
.card:active { transform: scale(.96); }
.card.pop { animation: pop .45s ease-out; }
@keyframes pop { 40% { transform: scale(1.15); } }
.card.grow { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(241,206,118,.8), 0 8px 0 rgba(53,70,77,.3); }
.card.wiggle { animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 20%, 60% { transform: rotate(-7deg); } 40%, 80% { transform: rotate(7deg); } }
.card.fade { opacity: .25; }
.card.bounce .art { animation: bounce .9s cubic-bezier(.3,0,.5,1) 3; }
@keyframes bounce { 50% { transform: translateY(-22%) scaleY(1.04); } 90% { transform: scaleY(.9); } }
.card.drive .art { animation: idle-drive 1.4s ease-in-out 2; }
@keyframes idle-drive { 30% { transform: translateX(-12%); } 70% { transform: translateX(12%); } }
.card.drive.go { animation: drive-away 1.4s ease-in forwards; }
@keyframes drive-away { 20% { transform: translateX(-8%); } to { transform: translateX(120vw); } }

.hand { position: absolute; width: 120px; height: 120px; z-index: 5; pointer-events: none; animation: tapme 1s ease-in-out infinite; }
.hand.hidden { display: none; }
@keyframes tapme { 50% { transform: translate(-10px, -10px); } }

.hud { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; z-index: 3; }
.hud-btn { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--ink); background: rgba(255,255,255,.8); font-size: 26px; opacity: .7; }
.ear { position: relative; font-size: 30px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.6); transition: .2s; }
.ear.off, .ear.unsupported, .ear.denied { opacity: .25; filter: grayscale(1); }
.ear.listening { box-shadow: 0 0 0 4px var(--accent2); animation: pulse 1.6s infinite; }
.ear.paused { opacity: .6; }
.ear.heard::after { content: attr(data-heard); position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 4px 10px; font-size: 14px; }

.finish { position: relative; width: min(600px, 80vw); display: flex; justify-content: center; }
.finish .shelf { width: 100%; height: auto; }
.card.souvenir { position: absolute; bottom: 55%; width: clamp(110px, 16vw, 170px); animation: drop .9s cubic-bezier(.3,1.4,.6,1); }
@keyframes drop { from { transform: translateY(-60vh) rotate(-30deg); } }
.arena .big-btn { position: absolute; bottom: -6vh; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------------------------------------------------------------- взрослый */
body[data-view="parent"] { overflow: auto; }
.parent { max-width: 860px; margin: 0 auto; padding: 16px 16px 60px; font-size: 16px; user-select: text; }
.parent h1 { margin: 8px 0 16px; }
.parent section { background: #fff; border: 2px solid #e4d8c4; border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; }
.parent h2 { margin: 0 0 8px; font-size: 18px; }
.parent table { border-collapse: collapse; width: 100%; font-size: 14px; }
.parent td, .parent th { border-bottom: 1px solid #eee; padding: 4px 6px; text-align: left; }
.parent textarea { width: 100%; font-family: monospace; }
.parent .note { font-size: 13px; opacity: .75; }
.parent .log { max-height: 260px; overflow: auto; font-size: 13px; }
.parent .log div { padding: 3px 0; border-bottom: 1px dashed #eee; }
.parent .danger { color: #b33; }
.parent .heard { font-style: italic; }
.parent .back { border: 0; background: none; font-size: 16px; padding: 0; opacity: .7; }

/* стартовая кнопка урока: жест пользователя разрешает звук */
.gate { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(255,246,229,.55); }
.gate .big-btn { font-size: 72px; padding: 24px 64px; animation: pulse 1.6s ease-in-out infinite; }

.art.raster img { object-fit: contain; }

/* табло задания (taskboard.js) */
/* слоговое чтение: согласные синие, гласные красные (оба ≥ 4.5:1 на белом), Ь/Ъ серые; слог — белая плашка.
   Стоит по центру сверху между лисёнком и портретом: ширина = экран минус их колонки (clamp как у .fox/.portrait). */
.taskboard { --tb-en: clamp(28px, 4.5vw, 56px); --tb-scale: 1; --tb-blue: #2F6FD1; --tb-red: #D63F2A; --tb-grey: #6B7378;
  position: absolute; top: clamp(10px, 2vh, 20px); left: 50%; transform: translateX(-50%); z-index: 1;
  width: max-content; max-width: calc(100vw - 2 * (clamp(110px, 16vw, 180px) + 40px)); box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: .3em; pointer-events: none;
  font-family: "Nunito", "Varela Round", "Comfortaa", "Arial Rounded MT Bold", "Trebuchet MS", Verdana, system-ui, sans-serif;
  font-weight: 800; line-height: 1; font-size: calc(var(--tb-en) * var(--tb-scale)); }
.taskboard-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .2em .55em; max-width: 100%; }
.taskboard-ru { font-size: .8em; }
.taskboard--measure .taskboard-line { flex-wrap: nowrap; justify-content: flex-start; overflow: hidden; }
.taskboard-word { display: inline-flex; align-items: baseline; gap: .14em; white-space: nowrap; }
.taskboard-syl { display: inline-block; background: #fff; border-radius: .26em; padding: .1em .14em .14em;
  box-shadow: 0 1px 0 rgba(53,70,77,.16), 0 2px 6px rgba(53,70,77,.14); letter-spacing: .02em; }
.taskboard-c { color: var(--tb-blue); }
.taskboard-v { color: var(--tb-red); }
.taskboard-s { color: var(--tb-grey); }
.taskboard-punct, .taskboard-p { color: var(--ink, #35464D); }
.taskboard-punct { margin-left: -.06em; }

/* табло в уроке: над карточками; пока идёт задание, пузырь лисёнка не перекрывает табло */
.lesson .board { position: absolute; top: 1.5vh; left: 0; right: 0; z-index: 2; pointer-events: none; }
.lesson.tasking .guide .bubble { display: none; }

/* игровые сценки уроков 2–3: прятки за кустом, кубик на башню */
.scene-play { position: relative; display: flex; align-items: flex-end; justify-content: center; }
.scene-play .tapzone { cursor: pointer; touch-action: manipulation; }
.scene-play.peekaboo { width: min(46vw, 62vh); aspect-ratio: 1; }
.peekaboo .scene-item { position: absolute; left: 21%; bottom: 0; width: 58%; height: 58%; z-index: 1;
  transition: transform .9s cubic-bezier(.3,1.5,.5,1); animation: peekwiggle 2.4s ease-in-out infinite; }
.peekaboo .scene-deco { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; z-index: 2; }
.peekaboo.out .scene-item { transform: translateY(-72%); animation: none; }
@keyframes peekwiggle { 0%, 70%, 100% { transform: translateY(0) rotate(0); } 80% { transform: translateY(-6%) rotate(-4deg); } 90% { transform: translateY(-3%) rotate(4deg); } }
.scene-play.stack { gap: 7vw; align-items: flex-end; height: 100%; }
.stack .scene-deco { height: min(56vh, 42vw); aspect-ratio: 2 / 3; }
.stack .scene-item { width: clamp(130px, 20vw, 230px); aspect-ratio: 1; filter: drop-shadow(0 6px 0 rgba(53,70,77,.25)); z-index: 2; }
.stack .scene-deco.thud { animation: pop .35s ease-out; }

/* поиск на поле: несколько предметов, с уровня 3 двигаются (lesson.js startField) */
.arena.field { display: block; }
.arena.field .card.roam { position: absolute; border-width: 4px; border-radius: 28px; }
.card.roam.moving[data-word="duck"] .art { animation: swim 1.4s ease-in-out infinite; }
.card.roam.moving[data-word="ball"] .art { animation: hopball .9s cubic-bezier(.3,0,.5,1) infinite; }
.card.roam.moving[data-word="car"] .art { animation: rumble .5s linear infinite; }
.card.roam.moving[data-word="bear"] .art { animation: waddle 1.2s ease-in-out infinite; }
@keyframes swim { 50% { transform: translateY(-5%) rotate(-6deg); } }
@keyframes hopball { 50% { transform: translateY(-12%); } }
@keyframes rumble { 50% { transform: translateY(-2%); } }
@keyframes waddle { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }

/* переключатель русской озвучки: карточка урока и HUD урока */
.ru-toggle { border: 3px solid var(--ink); border-radius: 22px; background: #fff; font-size: 17px; font-weight: 700; padding: 8px 14px; cursor: pointer; }
.ru-toggle.off { background: #F3E3E0; color: #8a4b3f; }
.sheet-ru { margin-top: 14px; }
.hud-right { display: flex; gap: 12px; align-items: center; }
.hud .ru-toggle { opacity: .8; height: 56px; }

/* сценка «кто как говорит»: животное крупно, касание — прыжок радости */
.scene-play.sound { width: min(44vw, 58vh); aspect-ratio: 1; }
.sound .scene-item { width: 100%; height: 100%; animation: waddle 2.4s ease-in-out infinite; }
.sound.out .scene-item { animation: joy .5s ease-in-out 4; }

/* запись голосов семьи (панель взрослого) */
.rec-who { border: 2px solid var(--ink); border-radius: 18px; background: #fff; padding: 6px 12px; font-size: 16px; }
.rec-who.on { background: var(--accent); color: #fff; }
.rec-table td { padding: 4px 8px; font-size: 18px; }
.rec-btn { width: 48px; height: 48px; border-radius: 50%; border: 3px solid #b3261e; background: #fff; color: #b3261e; font-size: 22px; }
.rec-btn.live { background: #b3261e; color: #fff; animation: pulse 1s ease-in-out infinite; }
.rec-play, .rec-del { border: 2px solid var(--ink); border-radius: 12px; background: #fff; padding: 4px 10px; }

/* прятки за сараем: животное целиком за сараем, выглядывает мордой сбоку; касание — выходит вправо */
.scene-play.peekaboo.side { width: min(48vw, 64vh); }
.peekaboo.side .scene-deco { left: 4%; right: 4%; bottom: 0; height: 92%; }
.peekaboo.side .scene-item { left: 30%; bottom: 19%; width: 60%; height: 60%; transform: translateX(22%); animation: peekside 2.6s ease-in-out infinite; }
.peekaboo.side.out .scene-item { transform: translateX(105%); animation: none; z-index: 3; }
@keyframes peekside { 0%, 65%, 100% { transform: translateX(22%); } 80% { transform: translateX(30%); } }

/* режим разработчика: регуляторы в уроке */
.devpanel { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dev-toggle { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: rgba(255,255,255,.9); font-size: 20px; }
.dev-body { background: rgba(255,255,255,.96); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; width: 300px; }
.dev-body.hidden { display: none; }
.dev-body label { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.dev-body input[type=range] { flex: 1; }
.dev-info { font-family: monospace; opacity: .7; }

/* предмет на карточке — почти во всю карточку (раньше padding в % считался от ширины поля и съедал половину) */
.card > .art { width: 96%; height: 96%; }
.card > .art.photo { width: 100%; height: 100%; }

/* пузыри со звуком животного: Moo! / Oink! Oink! */
.sound-bubbles { position: absolute; z-index: 6; display: flex; gap: 10px; align-items: flex-end; pointer-events: none; transition: opacity .5s; }
.sound-bubbles.gone { opacity: 0; }
.sound-bubble { position: relative; background: #fff; border: 4px solid var(--ink); border-radius: 28px; padding: 10px 20px;
  font-size: clamp(28px, 4.5vw, 54px); font-weight: 900; color: #D63F2A; letter-spacing: .02em; transform: scale(0);
  animation: bubble-in .45s cubic-bezier(.3,1.6,.5,1) forwards; box-shadow: 0 6px 0 rgba(53,70,77,.25); }
.sound-bubble::after { content: ''; position: absolute; left: 18px; bottom: -18px; border: 9px solid transparent; border-top: 12px solid var(--ink); }
.sound-bubble:nth-child(2) { margin-bottom: 34px; }
@keyframes bubble-in { to { transform: scale(1); } }

/* поиск в сцене: фон по теме, предметы без карточек, укрытия впереди */
.arena.scene-mode { display: block; inset: 20vh 3vw 11vh; }
.scene-stage { position: absolute; inset: 0; border-radius: 28px; overflow: hidden; background-size: cover; background-position: center bottom;
  border: 4px solid var(--ink); box-shadow: 0 8px 0 rgba(53,70,77,.25); }
.card.in-scene { position: absolute; aspect-ratio: 1; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.card.in-scene > .art { width: 100%; height: 100%; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
.card.in-scene.behind > .art { animation: peekhide 3.2s ease-in-out infinite; }
@keyframes peekhide { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-5%) rotate(-3deg); } 90% { transform: translateY(-2%) rotate(3deg); } }
.card.in-scene.reveal { transform: translateY(-6%) scale(1.08); transition: transform .6s cubic-bezier(.3,1.5,.5,1); }
.card.in-scene.reveal > .art { animation: none; }
.card.in-scene.grow { box-shadow: none; filter: drop-shadow(0 0 14px rgba(241,206,118,1)); }
.card.in-scene.fade { opacity: .35; }
.scene-hide { position: absolute; pointer-events: none; }
.scene-hide img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
/* mjhides (ZT4HB): масштаб укрытия задан здесь, а не в scenes.json — размер укрытия считает startScene, у всех один.
   Дерево парка выше скамейки: растёт вверх от земли; касание по увеличенной кроне всплывает до .scene-hide */
.scene-hide img[src$="/park/park-tree.png"] { transform: scale(1.5); transform-origin: 50% 100%; }
/* дерево улицы (MJ) узкое и высокое: ×1.3 — крона закрывает предмет и дерево выше гаража */
.scene-hide img[src$="/street/street-tree.png"] { transform: scale(1.3); transform-origin: 50% 100%; }

.devpanel .dev-info { white-space: pre; background: rgba(30,40,45,.85); color: #fff; opacity: 1; border-radius: 10px; padding: 8px 10px;
  font-size: 12px; line-height: 1.45; max-width: min(460px, 60vw); overflow: hidden; text-overflow: ellipsis; }
/* режим разработчика: плашка внизу справа, над кнопками — не закрывает карточки */
.devpanel { top: auto; bottom: 78px; transform: none; }

/* === mapperf 2026-11-16 === */
.nested-map { padding: 0 10px 150px; }
.map-heading { display:flex; align-items:center; justify-content:center; gap:16px; padding:16px 0 0; }
.map-heading h1 { font-size:clamp(20px, 4vw, 30px); text-align:center; }
.map-back { min-width:80px; min-height:64px; font-size:32px; padding:8px; }
.short-road { max-width:780px; overflow:visible; }
.short-road-line { fill:none; stroke:#d6bc87; stroke-width:30; stroke-linecap:round; stroke-linejoin:round; }
.map-symbol { text-anchor:middle; font-size:30px; fill:var(--ink); }
.map-label { text-anchor:middle; font-size:17px; font-weight:700; fill:var(--ink); }
.map-progress { text-anchor:middle; font-size:17px; fill:var(--ink); }
@media(max-width:520px) { .nested-map {padding-left:0;padding-right:0;} .map-label,.map-progress {font-size:19px;} }
.short-road .stop.current .stop-disc { animation:none; }

/* === engine 2026-11-16 === новые игровые форматы (pop, shadow, sort, missing, puzzle), проверка навыков, ментор.
   Анимации — только transform/opacity; filter только статичный (силуэт тени). */
.arena.game { display: block; }
.game-field { position: absolute; inset: 0; }
.game-field button:not(.card) { padding: 0; background: none; border: 0; }
.game-field button { touch-action: none; -webkit-user-select: none; user-select: none; }
.game-field .art img { pointer-events: none; -webkit-user-drag: none; }
.game-field .fade { opacity: .3; transition: opacity .4s; }
@keyframes eng-wiggle { 20%, 60% { transform: rotate(-7deg); } 40%, 80% { transform: rotate(7deg); } }
@keyframes eng-pop { 40% { transform: scale(1.15); } }

/* pop: пузыри (позиция — transform из rAF; лопание — отдельный слой кольца) */
.pop-field { overflow: hidden; border-radius: 28px; }
.pop-bubble { position: absolute; left: 0; top: 0; will-change: transform; cursor: pointer; border-radius: 50%; }
.pop-ring { position: absolute; inset: 0; border-radius: 50%; border: 4px solid rgba(114,191,196,.95);
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.95) 0 7%, rgba(255,255,255,.25) 9% 40%, rgba(114,191,196,.22) 70%, rgba(114,191,196,.45) 100%);
  box-shadow: inset -8px -10px 0 rgba(255,255,255,.35); }
.pop-art { position: absolute; inset: 14%; width: 72%; height: 72%; }
.pop-bubble.hint .pop-ring { border-color: var(--yellow); border-width: 7px; }
.pop-bubble.popped .pop-ring { animation: eng-burst .35s ease-out forwards; }
.pop-bubble.popped .pop-art { animation: eng-popart .5s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes eng-burst { to { transform: scale(1.6); opacity: 0; } }
@keyframes eng-popart { 50% { transform: scale(1.3); } to { transform: scale(1.15); } }

/* shadow: силуэты внизу, цветной предмет сверху */
.shadow-field { display: flex; flex-direction: column; align-items: center; justify-content: space-around; }
.shadow-src { position: relative; animation: hop 1.6s ease-in-out infinite; }
.shadow-src > .art { width: 100%; height: 100%; }
.shadow-row { display: flex; gap: clamp(10px, 3vw, 40px); justify-content: center; }
.shadow-slot { position: relative; border-radius: 28px !important; background: rgba(255,255,255,.55) !important; border: 4px dashed rgba(53,70,77,.35) !important; cursor: pointer; }
.shadow-slot > .art { position: absolute; inset: 6%; width: 88%; height: 88%; }
.shadow-slot > .art.sil img { filter: brightness(0); opacity: .78; }
.shadow-slot > .art.col { opacity: 0; transition: opacity .5s; }
.shadow-slot.lit > .art.col { opacity: 1; }
.shadow-slot.lit { border-style: solid !important; border-color: var(--accent2) !important; animation: eng-pop .45s ease-out; }
.shadow-slot.hint { transform: scale(1.08); border-color: var(--yellow) !important; border-style: solid !important; transition: transform .3s; }
.shadow-slot.wiggle, .missing-slot.wiggle, .sort-item.wiggle { animation: eng-wiggle .5s ease-in-out; }
/* деталь пазла держит разброс inline-transform'ом — качаем картинку внутри, а не саму деталь */
.puzzle-piece.hint > .art { animation: eng-wiggle .6s ease-in-out 2; }

/* sort: цветные гаражи и предметы */
.sort-field { display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 1vh 0; }
.sort-items, .sort-bins { display: flex; gap: clamp(14px, 4vw, 60px); justify-content: center; width: 100%; }
.sort-item { width: clamp(110px, min(20vw, 26vh), 210px); aspect-ratio: 1; position: relative; cursor: grab; border-radius: 50% !important; transition: transform .35s; }
.sort-item > .art { width: 100%; height: 100%; }
.sort-item.tinted { background: radial-gradient(circle, var(--tint) 0 46%, transparent 47%) !important; }
.sort-item.tinted > .art { position: absolute; inset: 10%; width: 80%; height: 80%; }
.sort-item.picked { transform: translateY(-14px) scale(1.1); }
.sort-item.picked::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 5px solid var(--yellow); }
.sort-item.dragging { transition: none; z-index: 10; cursor: grabbing; }
.sort-item.hint { transform: scale(1.08); }
.sort-item.done { pointer-events: none; }
.sort-bin { width: clamp(120px, min(22vw, 30vh), 230px); aspect-ratio: 10/9; cursor: pointer; transition: transform .3s; }
.sort-bin svg { width: 100%; height: 100%; display: block; }
.sort-bin.hint { transform: scale(1.08); }
.sort-bin.filled { animation: eng-pop .45s ease-out; }

/* missing: ряд предметов и занавес */
.missing-field { display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 28px; }
.missing-row { display: flex; gap: clamp(12px, 4vw, 56px); justify-content: center; }
.missing-slot { width: clamp(110px, min(24vw, 44vh), 250px); aspect-ratio: 1; position: relative; border-radius: 30px !important;
  background: var(--card) !important; border: 5px solid var(--ink) !important; box-shadow: 0 8px 0 rgba(53,70,77,.3); cursor: pointer; }
.missing-slot > .art { width: 92%; height: 92%; margin: 4%; transition: opacity .3s, transform .3s; }
.missing-slot.gone { background: rgba(255,255,255,.35) !important; border-style: dashed !important; box-shadow: none; }
.missing-slot.gone > .art { opacity: 0; transform: scale(.4); }
.missing-slot.hint { transform: scale(1.08); border-color: var(--yellow) !important; transition: transform .3s; }
.missing-slot.pop, .missing-slot.back { animation: eng-pop .45s ease-out; }
.missing-curtain { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, #D9584A 0 36px, #C2463A 36px 72px);
  transform: translateY(-101%); transition: transform .7s cubic-bezier(.5,0,.3,1); border-radius: 28px; z-index: 4; pointer-events: none; }
.missing-curtain.down { transform: none; }
/* missingvoice: ряд в колонке с силуэтом-подсказкой сверху и карточками-вариантами снизу; называемый предмет — крупнее */
.missing-field { flex-direction: column; gap: 14px; }
.missing-row { transition: gap .3s; }
.missing-slot.naming { transform: scale(1.08); border-color: var(--yellow) !important; transition: transform .3s; z-index: 2; }
.missing-ghost { display: none; width: clamp(90px, 14vh, 140px); aspect-ratio: 1; }
.missing-ghost.on { display: block; animation: eng-pop .45s ease-out; }
.missing-ghost > .art { width: 100%; height: 100%; filter: brightness(0); opacity: .28; }
.missing-choices { display: none; gap: 18px; justify-content: center; }
.missing-choices.on { display: flex; }
.missing-choice { width: clamp(100px, 16vh, 150px); aspect-ratio: 1; border-radius: 22px !important; background: #fff !important;
  border: 4px dashed var(--ink) !important; box-shadow: 0 6px 0 rgba(53,70,77,.25); cursor: pointer; padding: 0; }
.missing-choice > .art { width: 90%; height: 90%; margin: 5%; }
.missing-choice.pop { animation: eng-pop .45s ease-out; }
.child-prompt .cp-judge .cp-adult-no { margin-top: 6px; font-size: 15px; background: #fff5f2; }

/* puzzle: рамка с бледным контуром, части с clip-path */
.puzzle-frame { position: absolute; border-radius: 26px; border: 4px dashed rgba(53,70,77,.35); background: rgba(255,255,255,.5); }
.puzzle-frame > .art { width: 100%; height: 100%; opacity: .16; }
.puzzle-frame.done { border-style: solid; border-color: var(--accent2); }
.puzzle-piece { position: absolute; cursor: pointer; transition: transform .6s cubic-bezier(.3,1.3,.5,1); will-change: transform; }
.puzzle-piece > .art { width: 100%; height: 100%; }
.puzzle-piece.placed { pointer-events: none; }
.puzzle-piece.done { animation: eng-pop .5s ease-out; }

/* проверка навыков */
.test-row { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 44px); }
.test-row .card.test-card { flex: none; }
.chosen { animation: eng-pop .45s ease-out; }
.card.chosen { box-shadow: 0 0 0 8px rgba(241,206,118,.9), 0 8px 0 rgba(53,70,77,.3); }
.test-judge { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 10px; opacity: .55; }
.test-judge button { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: rgba(255,255,255,.9); font-size: 18px; padding: 0; }
.medal-wrap { display: flex; align-items: center; justify-content: center; gap: 4vw; }
.medal { position: relative; width: clamp(150px, 26vh, 240px); aspect-ratio: 1; animation: drop .9s cubic-bezier(.3,1.4,.6,1); }
.medal-disc { position: absolute; inset: 22% 11% 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF3B8, #F1CE76 45%, #D9A93A);
  border: 6px solid var(--ink); display: grid; place-items: center; font-size: clamp(60px, 12vh, 110px); color: #fff; text-shadow: 0 3px 0 rgba(53,70,77,.35); }
.medal-ribbon { position: absolute; left: 30%; right: 30%; top: 0; height: 36%; background: linear-gradient(90deg, var(--accent) 0 50%, var(--accent2) 50%); border: 4px solid var(--ink); border-bottom: 0; }
.medal-sticker { width: clamp(110px, 20vh, 190px); aspect-ratio: 1; animation: drop 1.1s cubic-bezier(.3,1.4,.6,1); }

/* ментор урока вместо фото члена семьи */
.portrait.mentor { background: #EAF6FB; }
.portrait.mentor img { object-fit: contain; transform-origin: 50% 90%; }
.actor.talking .portrait.mentor img, .actor.talking .portrait.mentor .mentor-emoji { animation: eng-sway .6s ease-in-out infinite alternate; }
@keyframes eng-sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg) translateY(-3px); } }
.mentor-emoji { display: grid; place-items: center; width: 100%; height: 100%; font-size: clamp(56px, 8vw, 96px); }

/* === mapphoto 2026-11-16 === */
.photo-map { position:relative; isolation:isolate; background: #f4f2df; }
.photo-map::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(rgba(255,251,238,.36),rgba(255,251,238,.56)),var(--map-photo, url('/art/map/bg.jpg')) center / cover no-repeat; }
.photo-map .map-heading { position:relative; padding:12px 8px 0; }
.photo-map .map-heading h1 { padding:8px 16px; border-radius:18px; background:rgba(255,251,238,.94); }
.photo-map .short-road { max-width:600px; }
.photo-map .short-road-line { stroke:#f9f0d6; stroke-width:26; }
.photo-map .stop.future .stop-disc { fill:#fff8e9; opacity:1; stroke:#82918a; }
.photo-map .map-caption { fill:rgba(255,251,238,.96); }
.photo-map .map-cover { pointer-events:none; }
.photo-map .map-cover.muted { opacity:.46; }
.photo-map .map-symbol { font-size:20px; font-weight:800; }
.photo-map .map-badge { fill:#fffbee; stroke:#53695d; stroke-width:2; }
.photo-map .map-label { font-size:17px; }
.photo-map .map-progress { font-size:16px; }
.photo-map .map-back { box-shadow:0 3px 0 rgba(53,70,77,.2); }
@media(max-width:520px) {
  .photo-map:not(.chapter-photo-map)::before { background-image:linear-gradient(rgba(255,251,238,.36),rgba(255,251,238,.56)),url('/art/map/bg-portrait.jpg'); }
  .photo-map .map-label {font-size:19px;}
  .photo-map .map-heading {gap:8px;}
  .photo-map .map-heading h1 {padding:8px;font-size:22px;}
}

/* Keep chapter photography vivid even when its lessons are still locked. */
.photo-map .stop.future .map-cover:not(.muted) { opacity:1; }

.photo-map::before { background-image:linear-gradient(rgba(255,251,238,.57),rgba(255,251,238,.65)),var(--map-photo,url('/art/map/bg.jpg')); }
@media(max-width:520px) { .photo-map:not(.chapter-photo-map)::before { background-image:linear-gradient(rgba(255,251,238,.57),rgba(255,251,238,.65)),url('/art/map/bg-portrait.jpg'); } }

/* === boss 2026-11-16 === */
.lesson.boss-active .arena { top: 43vh; bottom: 10vh; }
.boss-arena { position:absolute; top:22vh; left:6vw; right:6vw; height:19vh; max-height:152px; z-index:1; border-radius:22px; background:#dff3d7; overflow:hidden; pointer-events:none; box-shadow:0 2px 7px #294e3822; }
.boss-track { position:relative; margin:6px 14px 0; height:110px; }
.boss-race .boss-track { background:repeating-linear-gradient(90deg,transparent 0 32px,#fff9 32px 52px) center/100% 3px no-repeat,#cbd0d5; border-radius:15px; }
.boss-jump { background:linear-gradient(#c5eaff,#f8f7e7); }
.boss-jump .boss-track { background:repeating-linear-gradient(165deg,transparent 0 24px,#91cfa8 25px 30px,transparent 31px 40px); }
.boss-dive { background:linear-gradient(#a4ecfa,#429dcc); }
.boss-dive .boss-track { background:radial-gradient(circle at 20% 25%,#ffffffaa 0 3px,transparent 4px),radial-gradient(circle at 60% 65%,#ffffff99 0 5px,transparent 6px); }
.boss-token { position:absolute; top:0; left:0; width:58px; height:42px; transition:transform .65s ease-out; will-change:transform; }
.boss-token img { position:absolute; width:32px; height:32px; object-fit:contain; top:0; left:13px; }
.boss-vehicle { position:absolute; bottom:-5px; font-size:40px; line-height:1; }
.boss-rival img { width:29px; height:29px; }
.boss-goal { position:absolute; right:0; top:22px; font-size:32px; }
.boss-jump .boss-goal { top:0; }
.boss-dive .boss-goal { top:65px; }
.boss-status { position:absolute; bottom:2px; width:100%; text-align:center; font:600 12px/18px system-ui; color:#173c4c; }
.boss-stuck .boss-vehicle { animation:boss-wiggle .5s ease-in-out infinite alternate; }
.boss-confetti { position:absolute; inset:8px 0 0; text-align:center; font-size:30px; animation:boss-salute .9s ease-out both; }
@keyframes boss-wiggle { to { transform:rotate(-12deg) translateX(3px); } }
@keyframes boss-salute { from { transform:translateY(45px); opacity:0; } to { transform:translateY(0); opacity:1; } }
@media (prefers-reduced-motion:reduce) { .boss-token { transition:none; } .boss-stuck .boss-vehicle,.boss-confetti { animation:none; } }
@media (max-height:650px) { .boss-track { height:85px; } .boss-arena { height:20vh; } }

/* === outcomes 2026-11-16 === ОР (🎓): значок для взрослого на узлах карты, в шапке и карточке; плашка ОР */
.or-badge { cursor: pointer; -webkit-touch-callout: none; touch-action: manipulation; }
.or-badge .or-hit { fill: transparent; }
.or-badge .or-disc { fill: rgba(255,253,248,.82); stroke: rgba(53,70,77,.35); stroke-width: 1.5; }
.or-badge .or-cap { font-size: 16px; text-anchor: middle; opacity: .55; pointer-events: none; }
.or-badge:hover .or-cap, .or-badge.or-holding .or-cap { opacity: 1; }
.or-badge.or-holding .or-disc { stroke: var(--accent2); stroke-width: 3; }
.or-btn { font-size: 15px; line-height: 1; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(53,70,77,.3);
  background: rgba(255,253,248,.75); opacity: .6; cursor: pointer; -webkit-touch-callout: none; touch-action: manipulation; vertical-align: middle; }
.or-btn:hover, .or-btn.or-holding { opacity: 1; }
.or-btn.or-holding { box-shadow: 0 0 0 3px var(--accent2); }
.or-btn.or-map { flex: 0 0 auto; }
.or-btn.or-card { margin-left: 8px; }
.or-btn.or-parent { width: auto; padding: 6px 12px; border-radius: 12px; opacity: 1; font-size: 15px; }
.or-btn.or-parent::after { content: ' ОР курса'; }
.or-dialog { position: fixed; inset: 0; z-index: 60; background: rgba(53,70,77,.45); display: grid; place-items: center; }
.or-sheet { position: relative; box-sizing: border-box; width: min(760px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: var(--card); border: 3px solid var(--ink); border-radius: 22px;
  padding: 22px 26px 18px; font-size: 16px; line-height: 1.4; user-select: text; text-align: left; }
.or-close { position: sticky; top: 0; float: right; margin: -6px -10px 0 8px; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--ink); background: #fff; font-size: 20px; cursor: pointer; z-index: 1; }
.or-head h2 { margin: 2px 0 2px; font-size: 24px; }
.or-kicker { font-size: 14px; opacity: .7; }
.or-sub { font-size: 14px; opacity: .7; }
.or-goal { margin: 8px 0 4px; font-weight: 600; }
.or-plan { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #EDE6D6; color: #6B5B3E; vertical-align: middle; }
.or-sheet section { margin-top: 12px; }
.or-sheet h3 { margin: 0 0 4px; font-size: 16px; color: var(--accent); }
.or-sheet ul, .or-sheet ol { margin: 0; padding-left: 22px; }
.or-sheet li { margin: 2px 0; }
.or-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.or-chip { padding: 3px 10px; border-radius: 999px; border: 1.5px solid rgba(53,70,77,.25); background: #fff; font-size: 15px; }
.or-chip.or-mastered { background: #E3F2DA; border-color: #7DBE6A; }
.or-chip.or-learning { background: #FFF1D0; border-color: #E6B94F; }
.or-chip.or-none { color: #6B7378; }
.or-note { font-size: 14px; opacity: .8; }
.or-legend, .or-how { margin-top: 14px; font-size: 13px; }
@media (max-width: 600px) {
  .or-dialog { place-items: stretch; }
  .or-sheet { width: 100vw; max-height: none; height: 100%; border-radius: 0; border: 0; padding: 16px 16px 24px; }
  .or-head h2 { font-size: 21px; }
}

/* === boss 2026-11-16 — character medallions, clear of actors === */
.boss-arena { top:25vh; height:16vh; max-height:128px; }
.boss-track { height:94px; }
.boss-token img { width:36px; height:36px; top:-2px; left:11px; border:2px solid #fff; border-radius:50%; background:#fff; object-fit:contain; box-shadow:0 1px 3px #2345; }
.boss-rival img { border-color:#f5cf85; }
.boss-dive .boss-goal { top:53px; }

/* === boss 2026-11-16 — treasure chest and two-line captions === */
.boss-status { font-size:11px; line-height:14px; padding:0 4px; box-sizing:border-box; }
.boss-dive .boss-goal { width:28px; height:22px; top:57px; border:3px solid #e4b83f; border-radius:7px 7px 3px 3px; background:#96532b; font-size:0; }
.boss-dive .boss-goal::before { content:''; position:absolute; left:-3px; right:-3px; top:5px; height:3px; background:#e4b83f; }
.boss-dive .boss-goal::after { content:''; position:absolute; width:6px; height:9px; left:8px; top:3px; border-radius:2px; background:#ffe185; }

/* === dinoformers 2026-11-16 === */
.boss-arena { top:22vh; height:20vh; max-height:160px; }
.boss-track { height:calc(20vh - 34px); max-height:126px; }
.boss-token img { object-fit:cover; }
.boss-jump .boss-token, .boss-dive .boss-token { height:40px; }
.boss-confetti { top:0; pointer-events:none; }
@media (max-height:650px) { .boss-track { height:calc(20vh - 34px); } }

/* === engine hints 2026-11-16 === подсказки в 3 ступени: ярче → моргание ×2 → лягушонок-помощник (рука hand.png больше не
   показывается). Анимируются только transform/opacity; brightness — статично и на картинке цели, не на поле. */
.hint-glow { box-shadow: 0 0 0 6px rgba(241,206,118,.8), 0 0 26px 8px rgba(241,206,118,.55) !important; }
.hint-glow > .art img, .hint-glow > .art svg, .hint-glow .pop-art img { filter: brightness(1.15) saturate(1.1); }
.card.in-scene.hint-glow, .pop-bubble.hint-glow, .puzzle-piece.hint-glow { box-shadow: none !important; }
.card.in-scene.hint-glow > .art { filter: brightness(1.15) drop-shadow(0 0 12px rgba(241,206,118,1)); }
.hint-blink:not(.gone) > .art, .hint-blink > .pop-ring, .hint-blink > svg { animation: eng-blink .45s ease-in-out 4 alternate; }
@keyframes eng-blink { to { opacity: .3; } }
.frog-helper { position: absolute; z-index: 6; pointer-events: none; aspect-ratio: 120/100; transform: translateY(130%); opacity: 0;
  transition: transform .6s cubic-bezier(.3,1.4,.5,1), opacity .3s; }
.frog-helper.in { transform: none; opacity: 1; }
.frog-paw { position: absolute; height: 22px; margin-top: -11px; transform-origin: 0 50%; z-index: -1;
  transform: rotate(var(--ang, 0rad)) scaleX(.15); }

/* === dinoformers 2026-11-16 — separate lanes from the first paint === */
.boss-rival { top:44px; }

/* === ch10shapes 2026-11-16 === */
/* Inline vector shapes need the same silhouette as raster objects in the sorter. */
.shadow-slot > .art.sil svg { filter: brightness(0); opacity: .78; }

/* === coordinator 2026-11-16: плашка разработчика не перехватывает касания ребёнка (гейт ch9 r2, P1) === */
.devpanel .dev-info { pointer-events: none; }

/* === levels 2026-11-16 === уровни ★/★★/★★★: плашка выбора, медали узлов, счётчик «шаг N/M», stack/peekaboo уровней */
.level-pick { display: flex; gap: 14px; justify-content: center; margin: 10px 0 4px; flex-wrap: wrap; }
.level-btn { min-width: 88px; min-height: 88px; padding: 0 12px; border-radius: 24px; border: 4px solid var(--ink); background: #EDE6D6;
  font-size: 30px; line-height: 1; color: #9C8F78; opacity: .55; transition: transform .2s, opacity .2s; }
.level-btn.done { opacity: 1; color: #fff; }
.level-btn.lv1.done { background: #C98B4F; }
.level-btn.lv2.done { background: #A9B4BE; }
.level-btn.lv3.done { background: #E8B931; }
.level-btn.next { opacity: 1; transform: scale(1.06); box-shadow: 0 0 0 5px rgba(241,206,118,.85); }
.level-btn:active { transform: scale(.95); }
.level-note { font-size: 13px; opacity: .6; text-align: center; margin-bottom: 6px; }
.map-badge-medal, g.level-medal .map-badge { stroke: var(--ink); stroke-width: 3; }
g.level-medal.bronze .map-badge { fill: #C98B4F; }
g.level-medal.silver .map-badge { fill: #B9C3CC; }
g.level-medal.gold .map-badge { fill: #F2C230; }
g.level-medal .map-symbol { fill: #fff; }
.step-counter { position: absolute; left: 84px; bottom: 22px; z-index: 3; pointer-events: none; display: flex; align-items: baseline; gap: 4px;
  padding: 3px 9px; border-radius: 12px; background: rgba(255,255,255,.55); color: var(--ink); opacity: .6; font-size: 15px; }
.step-counter small { font-size: 10px; opacity: .8; }
.stack-field .stack-tower { position: absolute; }
.stack-piece { position: absolute; cursor: pointer; transition: transform .3s; }
.stack-piece > .art { width: 100%; height: 100%; }
.stack-piece.bounce-off { animation: eng-bounceoff .55s ease-out; }
@keyframes eng-bounceoff { 30% { transform: translateY(-18%) rotate(-8deg); } 60% { transform: translateY(4%) rotate(5deg); } }
.stack-tower.thud { animation: eng-pop .45s ease-out; }
.peek-field { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 2vh; }
.peek-field.peek-scene { background-size: cover; background-position: center bottom; border-radius: 28px; border: 4px solid var(--ink); overflow: hidden; }
.peek-row { display: flex; gap: clamp(8px, 3vw, 40px); align-items: flex-end; justify-content: center; }
.peek-hide { position: relative; cursor: pointer; }
.peek-hide > .peek-cover { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.peek-hide > .peek-cover img { object-fit: contain; object-position: bottom; }
.peek-hide > .peek-item { position: absolute; left: 15%; width: 70%; height: 70%; bottom: 10%; z-index: 1; transition: transform .8s cubic-bezier(.3,1.5,.5,1); }
.peek-hide.out > .peek-item { transform: translateY(-62%); }
.peek-hide.wiggle { animation: eng-wiggle .5s ease-in-out; }
/* сцена поиска: высота карточки задана явно — картинка вписывается, не вылезает вниз за край (гейт ch9 r2 P2) */
/* в grid-карточке процент высоты .art считался от авто-ряда (= высоте картинки): 231×231 карточка, 299 px картинка */
.card.in-scene > .art { position: absolute; inset: 0; width: 100%; height: 100%; }
.card.in-scene > .art img { object-fit: contain; object-position: 50% 100%; }

/* === frog 2026-11-16 === лягушонок «как на образце»: web/art/helpers/frog-body.svg + frog-arm.svg (переопределяет блок
   .frog-helper выше). Только transform/opacity. Цикл руки 5.6 с: тянется 0.5 с, держит/покачивает ~1.5 с, убирает 0.5 с,
   ждёт ~3 с. */
/* z 2: над полем (.arena z 1), под кнопками .hud (z 3) — на узком экране лягушонок не закрывает «РУ» и «?» */
.frog-helper { z-index: 2; aspect-ratio: 200/360; transform: translateY(105%); }
.frog-helper.in { transform: none; }
.frog-body img { width: 100%; height: auto; display: block; }
.frog-helper.flip .frog-body img { transform: scaleX(-1); }
.frog-paw { height: auto; margin-top: 0; z-index: 1; transform-origin: 0 50%; opacity: 0;
  transform: rotate(calc(var(--ang, 0rad) + var(--tuck, 60deg))) scale(.35); }
.frog-paw img { position: relative; width: 100%; height: 100%; display: block; }
/* круглое плечо: картинка руки на левом краю обрезана, кружок под ней закрывает срез (толщина --ah от движка) */
.frog-paw::before { content: ""; position: absolute; left: calc(var(--ah, 40px) * -.45); top: 9%; width: calc(var(--ah, 40px) * .82);
  height: 82%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #A9F04E, #4DBE1C); border: 3px solid #1F6B12; }
.frog-helper.flip .frog-paw img { transform: scaleY(-1); }
.frog-helper.in .frog-paw { animation: frog-reach 5.6s ease-in-out .5s infinite; }
@keyframes frog-reach {
  0%, 45%, 100% { transform: rotate(calc(var(--ang, 0rad) + var(--tuck, 60deg))) scale(.35); opacity: 0; }
  9%, 27%, 36% { transform: rotate(var(--ang, 0rad)) scale(1); opacity: 1; }
  18% { transform: rotate(calc(var(--ang, 0rad) - var(--wag, 7deg))) scale(1.05); opacity: 1; } }

/* === curr-impl 2026-11-16 === экран «Программа» (web/js/curriculum.js) */
.prog-btn { margin-top: 8px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid rgba(53,70,77,.3); background: #fff; font-size: 15px; cursor: pointer; }
.prog-btn:hover { background: #F4F1EA; }
.prog-sum { display: grid; gap: 6px; }
.prog-band-sum { margin: 0; padding: 8px 12px; border-radius: 12px; background: #F4F1EA; }
.prog-band-sum b { display: block; font-size: 17px; }
.prog-band h4 { margin: 10px 0 4px; font-size: 15px; }
.or-sheet .prog-list { list-style: none; padding: 0; margin: 0; }
.prog-obj { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-top: 1px solid rgba(53,70,77,.12); }
.prog-icon { flex: 0 0 22px; font-size: 18px; line-height: 1.2; text-align: center; color: #9AA3A7; }
.prog-met .prog-icon { color: #C99A2E; }
.prog-works .prog-icon { color: #6FA35C; }
.prog-confirmed .prog-icon { color: #3E8A3A; }
.prog-text { min-width: 0; overflow-wrap: anywhere; }
.prog-text code { font-size: 12px; }
.prog-confirmed .prog-status { color: #3E8A3A; font-weight: 700; }
.prog-works .prog-status { color: #5C8F4A; font-weight: 700; }
.prog-in-or { border-top: 1px dashed rgba(53,70,77,.25); padding-top: 8px; }

/* === polish1 2026-11-16 === спрятанная цель в подсказках, пауза разработчика, башня */
/* укрытие (куст, сарай, остановка) — цель подсказок, когда предмет спрятан: ярче и «дышит» яркостью, а не прозрачностью
   (прозрачное укрытие показало бы спрятанное); касание укрытия = касание предмета за ним */
.scene-hide { pointer-events: auto; cursor: pointer; }
.scene-hide.hint-glow, .scene-deco.hint-glow, .peek-hide.hint-glow { box-shadow: none !important; }
.scene-hide.hint-glow img, .scene-deco.hint-glow img, .scene-deco.hint-glow svg, .peek-hide.hint-glow > .peek-cover img {
  filter: brightness(1.18) drop-shadow(0 0 14px rgba(241,206,118,1)); }
.scene-hide.hint-blink img, .scene-deco.hint-blink img, .scene-deco.hint-blink svg { animation: p1-hideblink .45s ease-in-out 4 alternate; }
.peek-hide.hint-blink > .art { animation: none !important; }
.peek-hide.hint-blink > .peek-cover img { animation: p1-hideblink .45s ease-in-out 4 alternate; }
@keyframes p1-hideblink { to { filter: brightness(1.45) drop-shadow(0 0 18px rgba(241,206,118,1)); } }
/* укрытие вздрагивает, предмет на миг (0,9 с) выглядывает краешком и прячется обратно — z-index не меняется */
.hide-shake, .scene-deco.hide-shake, .peek-cover.hide-shake { animation: p1-shake .6s ease-in-out; }
@keyframes p1-shake { 20%, 60% { transform: rotate(-3deg); } 40%, 80% { transform: rotate(3deg); } }
.card.in-scene.behind.peek-once > .art { animation: p1-peek-scene .9s ease-in-out 1; }
@keyframes p1-peek-scene { 40%, 60% { transform: translateY(-14%); } }
.peekaboo .scene-item.peek-once { animation: p1-peek-up .9s ease-in-out 1; }
@keyframes p1-peek-up { 40%, 60% { transform: translateY(-24%); } }
.peekaboo.side .scene-item.peek-once { animation: p1-peek-side .9s ease-in-out 1; }
@keyframes p1-peek-side { 0%, 100% { transform: translateX(22%); } 40%, 60% { transform: translateX(42%); } }
.peek-hide > .peek-item.peek-once { animation: p1-peek-up .9s ease-in-out 1; }

/* ⏸ режима разработчика: всё в уроке замирает (CSS-анимации; WAAPI и уже идущие — lesson.setPaused) */
.lesson.paused, .lesson.paused *:not(.devpanel):not(.devpanel *) { animation-play-state: paused !important; }
.lesson.paused .arena, .lesson.paused .board { cursor: not-allowed; }
.dev-pause { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font-size: 24px; line-height: 1; }
.devpanel.is-paused .dev-pause { background: #F1CE76; }
.devpanel.is-paused .dev-info { outline: 3px solid #F1CE76; }
/* счётчик для взрослого: «задание 5/9» (подпись перед числом) */
.step-counter small { order: -1; }

/* === frog 2026-11-16 (дополнение: муха) === сценарий «муха» — муха садится на цель, лягушонок ловит её языком (transform/opacity; касаний не ловят) */
.frog-helper.fly-mode .frog-paw { animation: none; opacity: 0; }
.frog-tongue { position: absolute; z-index: 2; pointer-events: none; border-radius: 999px; transform-origin: 0 50%;
  background: linear-gradient(#F9B3C3, #E8768F); border: 2px solid #9E2236; transform: rotate(var(--tang, 0rad)) scaleX(0); }
.frog-tongue::after { content: ""; position: absolute; right: -4px; top: 50%; width: calc(var(--th, 12px) * 1.7); height: calc(var(--th, 12px) * 1.7);
  transform: translateY(-50%); border-radius: 50%; background: #F59AAE; border: 2px solid #9E2236; }
.frog-tongue.lick { animation: frog-lick .3s ease-in-out; } /* enginepolish: язык ~0,3 с (frog P3) */
@keyframes frog-lick { 0%, 100% { transform: rotate(var(--tang, 0rad)) scaleX(0); } 38%, 52% { transform: rotate(var(--tang, 0rad)) scaleX(1); } }
.frog-helper.chew .frog-body { transform-origin: 50% 100%; animation: frog-chew .32s ease-in-out 3; }
@keyframes frog-chew { 50% { transform: scale(1.04, .96); } }
.frog-fly { position: absolute; z-index: 2; pointer-events: none; opacity: 0; }
.frog-fly > .art, .frog-fly svg { width: 100%; height: 100%; display: block; }
.frog-fly.sit .fly-wing { animation-play-state: paused; }
.frog-fly.sit .fly-leg-front { transform-box: fill-box; animation: fly-rub .18s ease-in-out infinite alternate; }
.frog-fly.sit .fly-leg-front-l { transform-origin: 100% 100%; }
.frog-fly.sit .fly-leg-front-r { transform-origin: 0 100%; animation-direction: alternate-reverse; }
@keyframes fly-rub { from { transform: rotate(-14deg); } to { transform: rotate(18deg); } }

/* === polish2 2026-11-16 === ✓/✗ в задании say — только для взрослого (W8H4C): ручка 👂 в левом верхнем углу,
   открывается кликом мышью или удержанием 0,6 с; в режиме разработчика открыто сразу */
.test-judge { top: 6px; left: 6px; bottom: auto; transform: none; opacity: 1; align-items: center; gap: 8px; }
.test-judge .judge-yes, .test-judge .judge-no { display: none; }
.test-judge.open .judge-yes, .test-judge.open .judge-no { display: block; width: 44px; height: 44px; opacity: .9; }
.test-judge .judge-handle { width: 30px; height: 30px; font-size: 15px; opacity: .3; border-width: 1.5px; border-color: rgba(53,70,77,.3); }
.test-judge .judge-handle:hover, .test-judge.open .judge-handle { opacity: .8; }
.test-judge .judge-handle.holding { opacity: 1; box-shadow: 0 0 0 3px var(--accent2); }
/* polish1: кнопки плашки разработчика (⏸, 🛠) — в нижней полосе у HUD, под ареной: не перекрывают карточки и цель
   (проба content-ch9); текст «что происходит» остаётся над ареной, но касаний не перехватывает (pointer-events: none) */
.devpanel { top: auto; bottom: 22px; right: 184px; transform: none; flex-direction: row; align-items: center; }
.devpanel .dev-win { position: absolute; right: -170px; bottom: 60px; } /* engfix: окно (ручка + плашка) вместо самой плашки */
.devpanel .dev-body { position: absolute; right: -170px; bottom: 60px; z-index: 21; max-height: 70vh; overflow: auto; }
.dev-pause { width: 44px; height: 44px; font-size: 20px; border-width: 2px; }

/* === coordinator 2026-11-16 20:4x: персонажи арены крупнее («что за мелкашка» — родитель) === */
.boss-token { width:clamp(76px, 12vh, 112px); height:clamp(70px, 11vh, 104px); }
.boss-token img, .boss-rival img { width:72%; height:auto; aspect-ratio:1; top:0; left:14%; border-width:3px; }
.boss-vehicle { font-size:clamp(40px, 6vh, 58px); bottom:-8px; }
.boss-race .boss-rival { top:auto; bottom:0; }
.boss-jump .boss-token, .boss-dive .boss-token { height:clamp(70px, 11vh, 104px); }

/* === maproad 2026-11-16 === карта — дорога сверху вниз: тропа с краями, пройденное окрашено, впереди пунктир; финиш-босс */
.photo-map .short-road.road-map { max-width:600px; }
.photo-map .short-road.road-wide { max-width:min(900px, 96vw); }
.road-edge { fill:none; stroke:#b89463; stroke-width:40; stroke-linecap:round; stroke-linejoin:round; opacity:.9; }
.road-surface { fill:none; stroke:#f3e3bd; stroke-width:30; stroke-linecap:round; stroke-linejoin:round; }
.road-done { fill:none; stroke:#7cbf5a; stroke-width:12; stroke-linecap:round; }
.road-next { fill:none; stroke:#a1835a; stroke-width:6; stroke-linecap:round; stroke-dasharray:2 16; opacity:.85; }
.map-tile { fill:#efe9da; stroke:#82918a; stroke-width:2; stroke-dasharray:6 6; }
.map-tile-symbol { text-anchor:middle; font-size:44px; opacity:.6; }
.stop.boss .boss-disc { fill:#fff4cf; stroke:var(--ink); stroke-width:5; }
.stop.boss .boss-glow { fill:rgba(242,194,48,.35); stroke:none; transform-box:fill-box; transform-origin:center; }
.stop.boss.current .boss-glow { animation:pulse 1.6s ease-in-out infinite; }
.stop.boss.current .boss-disc { stroke:var(--accent); stroke-width:7; }
.stop.boss.future .boss-glow { fill:rgba(130,145,138,.18); }
.stop.boss.future .boss-disc { fill:#f1ede2; stroke:#82918a; stroke-dasharray:8 7; }
.stop.boss.passed .boss-disc { fill:#fde58a; }
.boss-icon { text-anchor:middle; font-size:76px; }
.boss-icon.muted { opacity:.45; filter:grayscale(1); }
.boss-pole { stroke:var(--ink); stroke-width:4; stroke-linecap:round; }
.boss-flag { fill:#e4574a; stroke:var(--ink); stroke-width:2.5; stroke-linejoin:round; }
.stop.boss.future .boss-flag { fill:#c9c2b3; }
.photo-map .map-label.boss-label { font-size:20px; }
.photo-map .map-progress.boss-sub { font-size:13px; opacity:.7; }
.boss-arena { top:15vh; height:25vh; max-height:200px; }
.boss-track { height:calc(25vh - 30px); max-height:170px; }
.boss-race .boss-token { height:clamp(64px, 10vh, 84px); }
@media (min-width:700px) { .boss-arena { left:190px; right:190px; } }

/* === repeat 2026-11-16 === «повтори за образцом»: картинка, микрофон «твоя очередь», лисёнок с лапой у уха */
.repeat-field { display: flex; align-items: center; justify-content: center; gap: 4vw; }
.repeat-mic { font-size: clamp(56px, 9vw, 96px); line-height: 1; opacity: .25; filter: grayscale(1); transition: opacity .3s, filter .3s; pointer-events: none; }
.repeat-mic.on { opacity: 1; filter: none; animation: rp-mic 1s ease-in-out infinite; }
@keyframes rp-mic { 50% { transform: scale(1.18); filter: drop-shadow(0 0 16px rgba(241,206,118,1)); } }
.guide.listen-ear::after { content: '👂'; position: absolute; right: -6%; top: 22%; font-size: clamp(30px, 4vw, 48px);
  animation: rp-ear 1.2s ease-in-out infinite; pointer-events: none; }
@keyframes rp-ear { 50% { transform: rotate(-12deg) scale(1.15); } }
.ear.turn { opacity: 1 !important; animation: rp-mic 1s ease-in-out infinite; }
@media (max-width: 600px) { .repeat-field { flex-direction: column; gap: 3vh; } }
.photo-map.chapter-photo-map::before, .photo-map::before { position:fixed; } /* фон стоит на месте, пока длинная дорога прокручивается */
.photo-map .map-heading { position:sticky; top:0; z-index:2; } /* «назад» и название главы не уезжают с длинной дорогой */
/* maproad, дополнение: нарисованный пейзаж (восхождение) и острова; полка сувениров не перекрывает карту */
.map-wrap.road-scene, .map-wrap.island-scene { height:calc(100vh - 112px); padding-bottom:0; }
.photo-map.road-scene::before { background:linear-gradient(#e4f3f9, #cfeab0 28%, #9ad673 70%, #8fd16a); }
.photo-map.island-scene::before { background:linear-gradient(#7fcbe6, #4fa9d3); }
.photo-map .short-road.road-wide { max-width:min(1040px, 100%); }
.road-scene .short-road, .island-scene .short-road { overflow:hidden; }
.scene .snow { fill:#f7fbfd; }
.scene .snow-drift { fill:#fff; opacity:.85; }
.scene .mountain { fill:#b7c4cc; }
.scene .mountain-cap { fill:#fff; }
.scene .river { fill:none; stroke:#4fb3e3; stroke-width:54; stroke-linecap:round; }
.scene .river-shine { fill:none; stroke:#9edcf5; stroke-width:12; stroke-linecap:round; stroke-dasharray:26 40; opacity:.8; }
.bridge-deck { fill:#c98b4f; stroke:#6b4527; stroke-width:4; }
.bridge-plank { stroke:#8a5a3b; stroke-width:3; }
.bridge-rail { stroke:#6b4527; stroke-width:7; stroke-linecap:round; }
.signpost rect { fill:#8a5a3b; }
.signpost .sign-board { fill:#d9a066; stroke:#6b4527; stroke-width:3; stroke-linejoin:round; }
.signpost .sign-text { font-size:15px; font-weight:800; fill:#5a3a22; text-anchor:middle; dominant-baseline:middle; transform:translateY(-6px); }
.road-scene .road-edge { stroke:#d39b4e; stroke-width:44; }
.road-scene .road-surface { stroke:#f6d78c; stroke-width:34; }
.sea .sea-water { fill:#5bb4dc; }
.sea .wave { fill:none; stroke:#fff; stroke-width:3; stroke-linecap:round; opacity:.45; }
.sea-route { fill:none; stroke:#fbefc9; stroke-width:9; stroke-linecap:round; stroke-dasharray:14 14; }
.sea-route.done { stroke:#f2c230; }
.island-shallow { fill:#8fd4ec; opacity:.7; }
.island-sand { fill:#f3d999; }
.island-grass { fill:#82c55a; }
.island-chest .chest-box { fill:#a8683a; stroke:#5a3a22; stroke-width:2.5; }
.island-chest .chest-lid { fill:#c4824a; stroke:#5a3a22; stroke-width:2.5; }
.island-chest .chest-lock { fill:#f2c230; stroke:#5a3a22; stroke-width:1.5; }
.island-chest .chest-gold { fill:#f2c230; }
.island-chest.locked .chest-box, .island-chest.locked .chest-lid { fill:#b8b2a6; }
.island-crown path { fill:#f2c230; stroke:#a4781c; stroke-width:3; stroke-linejoin:round; }
.island-crown circle { fill:#e15554; }
.lvl-star { fill:#fffbee; stroke:#a39b86; stroke-width:2; stroke-linejoin:round; }
.lvl-star.on { fill:#f2c230; stroke:#a4781c; }
.stop.future .lvl-star { opacity:.6; }

/* === helpers 2026-11-16 === «помоги герою»: герой в правом углу поля просит о помощи; арена уступает ему место */
.lesson.with-helper .arena { right: calc(4vw + clamp(120px, 13vw, 190px)); }
.lesson.with-helper .arena.scene-mode { right: calc(3vw + clamp(120px, 13vw, 190px)); }
.helper-hero { position: absolute; right: 2vw; bottom: 13vh; width: clamp(110px, 12vw, 180px); aspect-ratio: 1; z-index: 3; pointer-events: none;
  animation: hp-bob 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
.helper-hero > img:first-child { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); transition: filter .5s; }
@keyframes hp-bob { 50% { transform: translateY(-5%) rotate(2deg); } }
/* wear: герой «надевает» цвет — цветной ореол вокруг силуэта и цветная звёздочка-значок */
.helper-hero.wear > img:first-child { filter: drop-shadow(0 0 0 var(--wear)) drop-shadow(0 0 10px var(--wear)) drop-shadow(0 0 18px var(--wear)); }
.helper-hero.wear::after { content: '★'; position: absolute; right: -6%; top: -6%; font-size: clamp(30px, 3.4vw, 48px); color: var(--wear);
  -webkit-text-stroke: 2px #35464D; animation: hp-pop .5s cubic-bezier(.3,1.6,.5,1); }
/* hold / wear-thing: рядом с героем появляется вещь (картинка предмета) */
.helper-hero .helper-thing { position: absolute; left: -22%; bottom: -4%; width: 55%; height: 55%; object-fit: contain; animation: hp-pop .5s cubic-bezier(.3,1.6,.5,1);
  filter: drop-shadow(0 4px 3px rgba(0,0,0,.25)); }
.helper-hero.cheer { animation: hp-jump .45s ease-out 3, hp-bob 2.6s ease-in-out 1.4s infinite; }
@keyframes hp-jump { 40% { transform: translateY(-22%) scale(1.06); } }
@keyframes hp-pop { from { transform: scale(0); } }
/* неверный ответ — мягкое «нет-нет» */
.helper-hero.no-no { animation: hp-no .6s ease-in-out, hp-bob 2.6s ease-in-out .6s infinite; }
@keyframes hp-no { 20%, 60% { transform: rotate(-9deg); } 40%, 80% { transform: rotate(9deg); } }
@media (max-width: 600px) {
  .lesson.with-helper .arena, .lesson.with-helper .arena.scene-mode { right: 96px; }
  .helper-hero { width: 84px; right: 6px; bottom: 96px; }
}
.photo-map .short-road.road-wide { max-width:100%; }
.road-scene .map-heading { background:linear-gradient(rgba(234,246,251,.96) 70%, rgba(234,246,251,0)); padding-bottom:14px; }
.island-scene .map-heading { background:linear-gradient(rgba(127,203,230,.96) 70%, rgba(127,203,230,0)); padding-bottom:14px; }

/* === coordinator 2026-11-16 20:5x: явная галочка взрослого в «повтори за образцом» (решение родителя) === */
.test-judge .repeat-adult-ok { position: fixed; right: 18px; bottom: 96px; width: auto; height: auto; padding: 10px 16px;
  border-radius: 14px; font-size: 16px; font-weight: 600; background: #fff; border: 2px solid var(--ink); opacity: .92; }
.nested-map.road-scene, .nested-map.island-scene { padding-left:0; padding-right:0; }
.helper-hero > img:first-child { border-radius: 18%; } /* у части картинок героев белый прямоугольный фон — скругляем */
/* coordinator 21:0x (баг родителя): пузыри в сражении с боссом пролетают ПОВЕРХ трассы, а не прячутся под неё */
.lesson.boss-active .arena { z-index: 3; }
.lesson.boss-active .pop-field { overflow: visible; }

/* === coordinator 21:0x (родитель): карта без прокрутки и без пустой полосы внизу — дорога/острова целиком в экран === */
.map-wrap.road-scene, .map-wrap.island-scene { height:100vh; overflow:hidden; padding-bottom:0; }
.map-wrap.road-scene, .map-wrap.island-scene { display:flex; flex-direction:column; }
.map-wrap.road-scene > .map-heading, .map-wrap.island-scene > .map-heading { flex:none; }
.photo-map .short-road.road-map, .photo-map .short-road.road-wide { display:block; flex:1 1 0; min-height:0; width:100%;
  max-width:100%; height:auto; margin:0 auto; }

/* === ch11body 2026-11-16 === «сделай движение» (action) и чант про тело */
.arena.game .action-field { display: flex; align-items: center; justify-content: center; gap: 5vw; }
.action-hero { width: clamp(150px, 18vw, 250px); aspect-ratio: 1; flex: none; }
.action-hero img { width: 100%; height: 100%; object-fit: contain; border-radius: 18%; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
.action-hero.act-touch { animation: ac-nod .7s ease-in-out 3; }
.action-hero.act-clap { animation: ac-pulse .35s ease-in-out 6; }
.action-hero.act-stamp, .action-hero.cheer { animation: ac-hop .4s ease-out 4; }
@keyframes ac-nod { 50% { transform: rotate(-8deg) translateY(-4%); } }
@keyframes ac-pulse { 50% { transform: scale(1.08); } }
@keyframes ac-hop { 40% { transform: translateY(-16%); } }
.action-stage { position: relative; display: grid; place-items: center; }
.action-demo { position: relative; display: grid; place-items: center; }
.action-card.card { width: clamp(190px, 22vw, 300px); pointer-events: none; }
.action-icon { position: absolute; width: 38%; pointer-events: none; filter: drop-shadow(0 4px 3px rgba(0,0,0,.25)); }
/* touch: палец снизу-слева тянется к середине картинки и «трогает» */
.act-touch .action-icon { left: -12%; bottom: -14%; }
.act-touch.on .action-icon { animation: ac-touch 1.4s ease-in-out 2; }
.act-touch.loop .action-icon { animation: ac-touch 1.4s ease-in-out infinite; }
@keyframes ac-touch { 0%, 100% { transform: translate(0, 0); } 45%, 60% { transform: translate(85%, -95%) scale(.9); } }
/* clap: две ладошки по бокам сходятся — «хлоп» */
.act-clap .action-icon { top: 30%; left: -22%; }
.act-clap .action-icon.second { left: auto; right: -22%; transform: scaleX(-1); }
.act-clap.on .action-icon { animation: ac-clap-l .45s ease-in-out 5; }
.act-clap.on .action-icon.second { animation: ac-clap-r .45s ease-in-out 5; }
.act-clap.loop .action-icon { animation: ac-clap-l .45s ease-in-out infinite; }
.act-clap.loop .action-icon.second { animation: ac-clap-r .45s ease-in-out infinite; }
@keyframes ac-clap-l { 50% { transform: translateX(55%) rotate(12deg); } }
@keyframes ac-clap-r { 0%, 100% { transform: scaleX(-1); } 50% { transform: scaleX(-1) translateX(55%) rotate(12deg); } }
/* stamp: две ножки под картинкой поочерёдно топают, картинка вздрагивает */
.act-stamp .action-icon { bottom: -26%; left: 8%; width: 34%; }
.act-stamp .action-icon.second { left: auto; right: 8%; transform: scaleX(-1); }
.act-stamp.on .action-icon, .act-stamp.loop .action-icon { animation: ac-stamp .5s ease-in infinite; }
.act-stamp.on .action-icon.second, .act-stamp.loop .action-icon.second { animation: ac-stamp-r .5s ease-in .25s infinite; }
.act-stamp.on .action-card, .act-stamp.loop .action-card { animation: ac-thud .5s ease-in infinite; }
@keyframes ac-stamp { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-30%); } }
@keyframes ac-stamp-r { 0%, 100% { transform: scaleX(-1) translateY(0); } 40% { transform: scaleX(-1) translateY(-30%); } }
@keyframes ac-thud { 50% { transform: translateY(3px); } }
.action-listen { font-size: clamp(90px, 12vw, 160px); animation: rp-ear 1.2s ease-in-out infinite; }
.guide.act-turn::after { content: '🙌'; position: absolute; right: -8%; top: 18%; font-size: clamp(30px, 4vw, 48px); animation: ac-pulse .6s ease-in-out infinite; pointer-events: none; }
/* чант: ряд частей тела, текущая строка подсвечена */
.chant-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(8px, 1.6vw, 22px); max-width: 100%; }
.card.chant-card { width: clamp(96px, 11vw, 150px); transition: transform .25s, box-shadow .25s; }
.card.chant-card.chant-on { transform: scale(1.18) translateY(-6%); box-shadow: 0 0 0 6px rgba(241,206,118,.9), 0 0 26px 8px rgba(241,206,118,.6); }
@media (max-width: 600px) {
  .arena.game .action-field { flex-direction: column; gap: 2vh; }
  .action-hero { width: 110px; }
  .action-card.card { width: 170px; }
}

/* === mapfit 2026-11-16 === карта по пропорциям экрана: шапка компактная и непрозрачная (P3-2), острова богаче и
   прокручиваются по вертикали (родитель 21:1x), заголовок курса убран — 🎓 «весь курс» в углу */
.map-wrap.road-scene > .map-heading, .map-wrap.island-scene > .map-heading { padding:6px 60px 6px 8px; gap:12px; }
.map-wrap.road-scene > .map-heading { background:#eaf6fb; box-shadow:0 2px 0 rgba(53,70,77,.12); }
.map-wrap.island-scene > .map-heading { background:#6fbfe0; box-shadow:0 2px 0 rgba(53,70,77,.12); }
.map-wrap > .map-heading .map-back { min-height:52px; min-width:72px; font-size:26px; padding:4px 8px; }
.map-wrap > .map-heading h1 { margin:0; padding:6px 16px; font-size:clamp(20px, 2.4vw, 28px); }
.map-wrap.island-scene > .map-heading.corner { position:fixed; top:8px; left:8px; padding:0; background:none; box-shadow:none; z-index:3; }
.map-wrap.map-scroll { overflow-y:auto; overflow-x:hidden; }
.map-wrap.map-scroll > svg.short-road { flex:none; }
.scene .grass-tuft { fill:none; stroke:#5fae45; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; opacity:.6; }
.sea .sea-glint { fill:#fff; opacity:.28; }
.sea .wave { opacity:.5; }
.island-shadow { fill:#1f5f86; opacity:.28; }
.island-shallow { fill:#9fe0f2; opacity:.55; }
.island-foam { fill:none; stroke:#fff; stroke-width:5; stroke-linecap:round; stroke-dasharray:16 10; opacity:.75; }
.island-sand, .island-cliff { stroke:#b38a48; stroke-width:2; }
.island-grass { stroke:#4f9a3c; stroke-width:3; }
.island-tuft { fill:none; stroke:#4f9a3c; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; opacity:.65; }
.sea-route-edge { fill:none; stroke:#9c6f3c; stroke-width:17; stroke-linecap:butt; stroke-dasharray:22 12; opacity:.9; }
.sea-route { stroke:#f6e3b4; stroke-width:11; stroke-linecap:butt; stroke-dasharray:22 12; }
.sea-route.done { stroke:#f2c230; }
.island-chest .chest-shadow { fill:#000; opacity:.18; }
.island-chest .chest-side { fill:#7a4a24; stroke:#5a3a22; stroke-width:2; }
.island-chest .chest-band { fill:none; stroke:#e0a93a; stroke-width:4; }
.island-chest.locked .chest-side { fill:#8f897d; }
.island-chest.locked .chest-band { stroke:#cfc8b8; }

/* === engine3 2026-11-16 === речь всегда видна: у говорящего «эквалайзер» и покачивание (и в задании, проверке, медали) */
.talk-bars { position: absolute; display: none; gap: 5px; align-items: flex-end; height: 40px; padding: 6px 9px; z-index: 7;
  border-radius: 12px; background: rgba(255,255,255,.92); border: 2px solid var(--ink); pointer-events: none; }
.talk-bars i { display: block; width: 8px; height: 30%; border-radius: 3px; background: var(--accent2, #E77F3C); animation: e3-bar .42s ease-in-out infinite alternate; }
.talk-bars i:nth-child(2) { animation-delay: .14s; } .talk-bars i:nth-child(3) { animation-delay: .28s; }
@keyframes e3-bar { to { height: 100%; } }
.actor.talking .talk-bars { display: flex; }
.actor.guide .talk-bars { left: clamp(90px, calc(16vw - 22px), 160px); top: 6px; }
.actor.friend .talk-bars { right: clamp(90px, calc(15vw - 18px), 152px); top: 6px; }
.actor.talking .fox { animation: e3-talk .32s ease-in-out infinite alternate; transform-origin: 50% 90%; }
.actor.talking .portrait { animation: e3-talk .32s ease-in-out infinite alternate; }
@keyframes e3-talk { from { transform: translateY(0) rotate(0); } to { transform: translateY(-7px) rotate(-2deg) scale(1.03); } }

/* === bossbig 2026-11-16 === арена босса: две колонны по бокам (герой слева, злодей справа), лица ≥180px на 1280×800,
   перекрытий нет ни в одном виде; задание — в центре между колоннами (родитель 21:5x: «сделай больше… ×2 ×3») */
.boss-arena.boss-lanes { inset:0; top:0; left:0; right:0; height:auto; max-height:none; background:none; box-shadow:none; border-radius:0; overflow:visible; }
.boss-lanes .boss-lane { position:absolute; top:max(214px, 20vh); bottom:max(84px, 8.5vh); width:min(clamp(120px, 16.8vw, 340px), 46%); container-type:inline-size;
  border-radius:24px; overflow:hidden; box-shadow:0 2px 8px #294e3833; border:3px solid #fffc; box-sizing:border-box; }
.boss-lanes .boss-lane-hero { left:max(8px, 1.2vw); }
.boss-lanes .boss-lane-rival { right:max(8px, 1.2vw); }
.boss-race .boss-lane { background:repeating-linear-gradient(180deg,#fffd 0 26px,transparent 26px 50px) center/6px 100% no-repeat,
  linear-gradient(90deg,#9aa1a8 0 5%,#c3c8cd 5% 95%,#9aa1a8 95%); }
.boss-jump .boss-lane { background:radial-gradient(ellipse 30% 4% at 25% 20%,#fff 98%,transparent),radial-gradient(ellipse 30% 4% at 75% 45%,#fff 98%,transparent),
  radial-gradient(ellipse 30% 4% at 30% 70%,#fff 98%,transparent),linear-gradient(#bfe6ff,#f6f8e6); }
.boss-dive .boss-lane { background:radial-gradient(circle at 25% 30%,#fffa 0 4px,transparent 5px),radial-gradient(circle at 70% 55%,#fff9 0 6px,transparent 7px),
  radial-gradient(circle at 40% 80%,#fff8 0 3px,transparent 4px),linear-gradient(#a4ecfa,#2f86b8); }
.boss-lanes .boss-lane .boss-token { top:0; bottom:auto; left:5%; width:90%; height:auto; aspect-ratio:1 / 1.15; z-index:1; }
.boss-lanes .boss-lane .boss-token img { position:absolute; top:0; left:0; width:100%; height:auto; aspect-ratio:1; border:4px solid #fff;
  border-radius:50%; background:#fff; object-fit:cover; box-sizing:border-box; box-shadow:0 2px 6px #2346; z-index:1; }
.boss-lanes .boss-lane .boss-rival img { border-color:#f5cf85; }
.boss-lanes .boss-lane .boss-vehicle { left:50%; bottom:0; transform:translateX(-50%); font-size:40cqw; line-height:1; z-index:0; }
.boss-lanes .boss-lane.boss-lane .boss-stuck .boss-vehicle { animation:bossbig-wiggle .5s ease-in-out infinite alternate; }
@keyframes bossbig-wiggle { from { transform:translateX(-50%); } to { transform:translateX(-46%) rotate(-12deg); } }
.boss-lanes .boss-fallback { position:absolute; top:0; left:0; width:100%; aspect-ratio:1; display:grid; place-items:center; font-size:60cqw; z-index:1; }
.boss-lanes .boss-finish { position:absolute; left:0; right:0; top:6px; text-align:center; font-size:30cqw; line-height:1; z-index:0; }
.boss-dive .boss-finish { top:auto; bottom:10px; left:30%; right:auto; width:40%; height:22cqw; border:4px solid #e4b83f; border-radius:10px 10px 4px 4px;
  background:linear-gradient(#e4b83f,#e4b83f) 0 30%/100% 4px no-repeat,#96532b; box-sizing:border-box; font-size:0; }
.boss-lanes .boss-status { position:absolute; top:auto; bottom:max(90px, 10vh); left:calc(min(clamp(120px, 16.8vw, 340px), 46%) + 3vw); right:calc(min(clamp(120px, 16.8vw, 340px), 46%) + 3vw);
  width:auto; height:auto; padding:0; font:600 clamp(13px, 1.9vh, 20px)/1.3 system-ui; color:#173c4c; text-align:center; }
.boss-lanes .boss-confetti { inset:auto 0 16vh; top:auto; font-size:clamp(30px, 6vh, 64px); }
.lesson.boss-active .arena, .lesson.boss-active .arena.scene-mode, .lesson.boss-active.with-helper .arena {
  top:18vh; bottom:max(130px, 16vh); left:calc(min(clamp(120px, 16.8vw, 340px), 46%) + 3vw); right:calc(min(clamp(120px, 16.8vw, 340px), 46%) + 3vw); }
@media (prefers-reduced-motion:reduce) { .boss-lanes .boss-lane .boss-stuck .boss-vehicle { animation:none; } }

/* === islandart 2026-11-16 === */
/* острова, сундук, корона, море — картинки (web/art/map/islands); вектор — запасной при ошибке загрузки */
.island-art .map-art { pointer-events:none; }
.island-chest .map-art { filter:drop-shadow(0 3px 2px rgba(20,50,70,.35)); }
.island-chest.locked .map-art { filter:grayscale(.35) drop-shadow(0 3px 2px rgba(20,50,70,.35)); }
.island-chest.ready .map-art { filter:drop-shadow(0 0 6px rgba(255,226,120,.95)) drop-shadow(0 3px 2px rgba(20,50,70,.35)); }
.island-crown .map-art { filter:drop-shadow(0 3px 2px rgba(20,50,70,.35)); }
.sea .sea-glint { opacity:.22; }
.sea .wave { opacity:.16; }
.stop.future .island-chest .map-art, .stop.future .island-crown .map-art { opacity:1; } /* старое «.stop.future image» гасило картинку сундука */
/* engine3: субтитры .say-sub — заменены строкой речи speechviz (блок «speechviz» в конце файла) */
/* coordinator 22:4x (родитель: «не понял, куда нажать, что упражнение выполнено» — кнопку закрывала плашка отладки):
   кнопка взрослого — внизу по центру, крупная и заметная, поверх плашки разработчика */
.test-judge .repeat-adult-ok { right: auto; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 60;
  font-size: 20px; padding: 14px 26px; background: #fff7d6; border: 3px solid var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.18); opacity: 1; }

/* === polish3 2026-11-16 === легенда экрана «Программа»: список статусов для родителя */
.prog-legend { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: #FBF8F1; }
.prog-legend > b { display: block; margin-bottom: 4px; font-size: 15px; }
.prog-legend ul { margin: 2px 0; padding-left: 18px; }
.prog-legend li { margin: 3px 0; }
.prog-legend > ul { padding-left: 0; list-style: none; }
.prog-legend p { margin: 6px 0 0; }

/* formats-b: expressive turns, counter stays in the lesson HUD. */
.formats-b-field { display:flex; align-items:center; justify-content:center; gap:38px; flex-wrap:wrap; padding:30px 40px 110px; }
.formats-b-hero { width:200px; height:240px; animation:formats-b-sway 2s ease-in-out infinite alternate; }
.formats-b-hero img { width:100%; height:100%; object-fit:contain; background:#fff; border:5px solid var(--ink); border-radius:28px; box-sizing:border-box; padding:6px; }
/* rebalance (P3-1 formats-b): карточка строго квадратная (.card.big задавал ширину 380 при высоте 250 — картинка
   вылезала за рамку), предмет вписан целиком; «выглядывание» name — движение картинки внутри рамки, а не обрезка рамки */
.card.formats-b-card { width:250px; height:250px; aspect-ratio:1; overflow:hidden; }
.formats-b-card > .art { width:88%; height:88%; }
.formats-b-card > .art img { object-fit:contain; }
.name-field .formats-b-card > .art { animation:formats-b-peek 2s ease-in-out infinite alternate; }
.ask-field .formats-b-card { border-bottom:24px solid #b67b48; }
.ask-field .delivered { transform:translateX(-100px) rotate(-8deg); transition:transform .7s; }
.formats-b-lyric { width:100%; text-align:center; font-size:32px; font-weight:700; }
.formats-b-lyric span { display:inline-block; margin:0 6px; opacity:.45; }
.formats-b-lyric span.on { opacity:1; color:#277e61; transform:scale(1.08); }
.formats-b-hourglass { font-size:90px; animation:formats-b-sway 2s ease-in-out infinite alternate; }
.formats-b-hero[data-move="stamp"] { animation:formats-b-stamp .5s ease-in-out infinite alternate; }
.formats-b-hero[data-move="touch"] { transform:rotate(-12deg); }
@keyframes formats-b-sway { to { transform:rotate(5deg) translateY(-8px); } }
@keyframes formats-b-peek { from { transform:translateY(5%); } to { transform:translateY(-5%); } } /* поле 6% — не выходит за рамку */
@keyframes formats-b-stamp { to { transform:translateY(15px); } }
@media(prefers-reduced-motion:reduce) { .formats-b-hero,.formats-b-hourglass,.name-field .formats-b-card > .art { animation:none; } }

/* formats-b: adult control stays clear of the right-hand developer panel. */
.formats-b-judge .repeat-adult-ok { left:24px; right:auto; bottom:104px; transform:none; max-width:740px; white-space:normal; }
.formats-b-hero { position:relative; }
.formats-b-gesture { position:absolute; right:-15px; bottom:5px; font-size:72px; }

/* === formats-a 2026-11-17 (R4VFM): place (in/on/under), count (счёт до 5), story (история из картинок) === */
.fa-item > .art { width: 100%; height: 100%; }
.fa-item.wiggle > .art { animation: eng-wiggle .5s ease-in-out; }
.fa-item.picked > .art, .fa-item.placed-pop > .art, .story-thing.placed-pop > .art { animation: eng-pop .45s ease-out; }
.story-thing.wiggle > .art { animation: eng-wiggle .5s ease-in-out; }
/* place: ящик на столбиках из кубиков; предмет двигается transform (left/top = 0) */
.place-box, .place-leg, .place-zone { position: absolute; }
.place-box { z-index: 2; pointer-events: none; }
.place-box > .art, .place-leg > .art { width: 100%; height: 100%; }
.place-leg { z-index: 1; pointer-events: none; }
.game-field button.place-zone { z-index: 4; border: 4px dashed transparent; border-radius: 26px; cursor: pointer; transition: border-color .25s, background-color .25s; }
.place-field.zones-on button.place-zone { border-color: rgba(53,70,77,.35); }
.place-zone.over { border-color: var(--accent2) !important; background: rgba(114,191,196,.18); }
.place-zone.hint-glow { box-shadow: none !important; border-color: rgba(241,206,118,1) !important; background: rgba(241,206,118,.22); }
.place-zone.hint-blink { animation: eng-blink .45s ease-in-out 4 alternate; border-color: rgba(241,206,118,1) !important; }
.place-item { position: absolute; left: 0; top: 0; z-index: 3; cursor: grab; touch-action: none; transform-origin: 50% 100%;
  transition: transform .45s cubic-bezier(.3,1.2,.5,1); will-change: transform; }
.place-item.is-in { z-index: 1; }
.place-item.drag { transition: none; z-index: 6; cursor: grabbing; }
.place-item.drag > .art, .place-item.selected > .art { filter: drop-shadow(0 0 10px rgba(114,191,196,1)); }
.place-item.hint-glow { box-shadow: none !important; }
.place-item.hint-glow > .art { filter: brightness(1.15) drop-shadow(0 0 12px rgba(241,206,118,1)); }
/* count: ряд предметов, над посчитанными — цифра; внизу карточки-ответы (цифра + точки) */
.arena.game .count-field { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5vh; padding-top: 5vh; }
.count-row { display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-end; gap: 2vw; }
.count-item { position: relative; border-radius: 28px; cursor: pointer; transition: background-color .3s, box-shadow .3s; }
.count-item.counted { background: rgba(114,191,196,.25); box-shadow: 0 0 0 5px var(--accent2); }
.count-badge { position: absolute; top: -18px; right: -10px; min-width: 52px; height: 52px; border-radius: 50%; background: var(--accent);
  color: #fff; font: 800 34px/52px system-ui, sans-serif; text-align: center; box-shadow: 0 3px 0 rgba(0,0,0,.18); animation: eng-pop .4s ease-out; }
.count-digits { display: flex; gap: 3vw; min-height: 10px; }
.count-digit.card { width: clamp(120px, 13vw, 170px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.count-digit b { font: 900 clamp(64px, 7vw, 96px)/1 system-ui, sans-serif; color: var(--ink); }
.count-dots { display: flex; gap: 6px; }
.count-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.count-field.asking .count-row { transform: scale(.82); transform-origin: 50% 100%; transition: transform .4s; }
/* story: лента кадров сверху, крупный кадр, в конце — две картинки «What's next?» */
.arena.game .story-field { display: flex; flex-direction: column; align-items: center; gap: 2.2vh; padding-top: 1vh; }
.story-strip { display: flex; gap: 12px; }
.story-thumb { width: 74px; height: 58px; border-radius: 12px; border: 3px solid rgba(53,70,77,.3); background: rgba(255,255,255,.6);
  display: grid; place-items: center; font: 800 24px system-ui, sans-serif; color: rgba(53,70,77,.5); overflow: hidden; }
.story-thumb .art { width: 100%; height: 100%; }
.story-thumb.now { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(239,141,103,.3); color: var(--accent); }
.story-thumb.done { border-color: var(--accent2); }
.story-stage { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; padding-bottom: 2vh; }
.story-panel { position: relative; width: min(64vw, 820px); height: min(56vh, 470px); border-radius: 34px; border: 5px solid var(--ink); overflow: hidden;
  background: linear-gradient(#BFE6F5 0 62%, #A8D98F 62%); display: flex; align-items: flex-end; justify-content: center; }
.story-panel.mood-night, .story-panel.mood-sleep { background: linear-gradient(#2E3F6E 0 62%, #4F7A52 62%); }
.story-panel.mood-sun { background: linear-gradient(#FFE79A 0 62%, #A8D98F 62%); }
.story-sky { position: absolute; top: 4%; right: 6%; font-size: clamp(40px, 6vh, 70px); pointer-events: none; }
.story-ground { display: flex; gap: 3%; justify-content: center; align-items: flex-end; width: 100%; height: 70%; padding: 0 4% 3%; }
.story-thing { position: relative; height: 92%; aspect-ratio: 1; max-width: 32%; cursor: pointer; }
.story-thing > .art { width: 100%; height: 100%; }
.story-zzz { position: absolute; top: -6%; right: 4%; font: 800 28px system-ui, sans-serif; color: #fff; text-shadow: 0 2px 3px rgba(0,0,0,.4); pointer-events: none; }
.mood-night .story-thing > .art, .mood-sleep .story-thing > .art { filter: brightness(.82); }
.story-thing.hint-glow { box-shadow: none !important; }
.story-thing.hint-glow > .art { filter: brightness(1.2) drop-shadow(0 0 14px rgba(241,206,118,1)); }
.story-pair { display: flex; gap: 4vw; }
.story-pair .story-panel { width: min(38vw, 470px); height: min(46vh, 380px); cursor: pointer; }
.story-pair .story-thing { pointer-events: none; }
.story-panel.chosen { box-shadow: 0 0 0 8px var(--accent2); animation: eng-pop .5s ease-out; }
.story-panel.wiggle { animation: eng-wiggle .5s ease-in-out; }
.story-panel.hint-glow { box-shadow: 0 0 0 8px rgba(241,206,118,.9) !important; }
.story-hero { position: absolute; left: 1vw; top: 34%; width: clamp(110px, 12vw, 170px); aspect-ratio: 1; pointer-events: none; }
.story-hero img { width: 100%; height: 100%; object-fit: contain; border-radius: 18%; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
.story-hero.talking img { animation: eng-sway .6s ease-in-out infinite alternate; }

/* === speechviz 2026-11-17 === строка речи любого говорящего (speechline.js) и табло «Ждём от ребёнка» (childprompt.js).
   Низ экрана: полоса --band — строка речи по центру (ухо 👂 уходит влево, к счётчику); над ней — табло; поле урока
   на время табло ужимается снизу, чтобы табло не перекрывало карточки. Кнопка взрослого ✓ — внутри табло. */
.lesson { --band: max(12vh, 98px); --cp-h: 132px; --cp-h-hint: 56px; }
.lesson .hud > .ear { position: absolute; left: 212px; bottom: 12px; } /* правее счётчика «16/16» */
.say-line { position: absolute; left: 50%; bottom: 4px; translate: -50% 0; z-index: 8; width: max-content;
  max-width: min(calc(100vw - 600px), 1000px); min-width: min(380px, calc(100vw - 600px)); box-sizing: border-box;
  display: flex; align-items: center; gap: 12px; padding: 5px 16px 5px 8px; border-radius: 18px; background: rgba(255,255,255,.96);
  border: 3px solid rgba(53,70,77,.55); box-shadow: 0 3px 0 rgba(53,70,77,.18); opacity: 0; pointer-events: none; transition: opacity .15s, border-color .15s; }
.say-line.on { opacity: 1; }
.say-line.speaking { border-color: var(--accent); }
.say-line .say-who { display: flex; flex-direction: column; align-items: center; flex: none; width: 66px; font-size: inherit; }
.say-line .say-face { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 2px solid var(--ink); background: #EAF6FB;
  display: grid; place-items: center; font-size: 24px; line-height: 1; }
.say-line .say-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.say-line .say-face.tall img { object-position: 50% 8%; }
.say-line .say-name { max-width: 66px; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.say-line .say-text { display: flex; flex-direction: column; min-width: 0; }
.say-line .say-en { font-size: clamp(18px, 1.9vw, 28px); line-height: 1.12; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.say-line .say-ru { font-style: normal; font-size: clamp(14px, 1.35vw, 19px); line-height: 1.2; opacity: .8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.say-line .say-s { border-radius: 6px; transition: color .15s, background-color .15s; }
.say-line .say-s.now { color: var(--accent); background: #FFF0BF; }
.say-line .say-ru .say-s.now { color: #B5532F; }

.child-prompt { position: absolute; left: 50%; bottom: calc(var(--band) + 4px); translate: -50% 0; /* translate, не transform: его занимает eng-pop */ z-index: 9; box-sizing: border-box;
  width: max-content; max-width: min(calc(100vw - 400px), 1000px); max-height: calc(var(--cp-h) - 8px); overflow: hidden; display: flex; align-items: center; gap: 14px;
  padding: 8px 12px 8px 14px; border-radius: 22px; background: #FFF3C4; border: 4px solid #E0A526; box-shadow: 0 4px 0 rgba(53,70,77,.22);
  animation: eng-pop .35s ease-out; }
.child-prompt .cp-icon { font-size: 46px; line-height: 1; flex: none; }
.child-prompt .cp-body { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 14px; min-width: 0; }
.child-prompt .cp-label { grid-row: 1; grid-column: 1; font-size: 15px; font-weight: 700; color: #7A5A12; }
.child-prompt .cp-mic { grid-row: 1; grid-column: 2; justify-self: end; font-size: 15px; font-weight: 700; color: rgba(53,70,77,.6); white-space: nowrap; }
.child-prompt .cp-mic[data-state="off"] { white-space: pre-line; font-size: 13px; line-height: 1.15; text-align: right; } /* коротко в 2–3 строки */
.child-prompt .cp-mic[data-state="listen"] { color: #1F7F86; animation: cp-listen 1.2s ease-in-out infinite alternate; }
.child-prompt .cp-mic[data-state="heard"] { color: #277E61; }
.child-prompt .cp-phrase { grid-column: 1 / -1; font-size: clamp(26px, 2.6vw, 40px); font-weight: 800; line-height: 1.1; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.child-prompt .cp-phrase.long { font-size: clamp(22px, 2vw, 30px); }
.child-prompt .cp-en { grid-column: 1 / -1; font-size: 16px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes cp-listen { from { opacity: .55; } to { opacity: 1; } }
/* кнопка взрослого в табло: прежние .test-judge / .repeat-adult-ok ставили её fixed по углам — здесь она в потоке */
.child-prompt .cp-judge { position: static; transform: none; opacity: 1; display: block; flex: none; margin: 0; }
.child-prompt .cp-judge .repeat-adult-ok { position: static; transform: none; left: auto; right: auto; bottom: auto; top: auto; z-index: auto;
  width: auto; height: auto; max-width: 250px; white-space: normal; text-align: left; font-size: 17px; font-weight: 700; line-height: 1.2;
  padding: 10px 14px; border-radius: 16px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.18); opacity: 1; }
.child-prompt.hint { padding: 4px 14px; border-width: 2px; border-radius: 16px; background: rgba(255,255,255,.94); gap: 8px; max-height: var(--cp-h-hint); }
.child-prompt.hint .cp-icon { font-size: 22px; }
.child-prompt.hint .cp-body { display: flex; align-items: baseline; gap: 8px; }
.child-prompt.hint .cp-label { font-size: 14px; color: rgba(53,70,77,.75); font-weight: 600; }
.child-prompt.hint .cp-phrase { font-size: 20px; font-weight: 700; }
.child-prompt.hint .cp-mic { font-size: 13px; }
.lesson.cp-on .arena { bottom: calc(var(--band) + var(--cp-h)) !important; }
.lesson.cp-on.cp-hint .arena { bottom: calc(var(--band) + var(--cp-h-hint)) !important; }
.lesson.cp-on .formats-b-field { padding-bottom: 12px; }
/* строка состояния гонки с боссом («Go, go, go!») — над строкой речи; пока табло на экране — табло важнее, она скрыта */
.lesson .boss-lanes .boss-status { bottom: calc(var(--band) + 4px); }
.lesson.cp-on .boss-lanes .boss-status { opacity: 0; }
/* speechvizfix: плашка разработчика и без табло — над полосой строки речи (была на 82px от низа, а строка речи выше,
   когда переносится, — перекрытие на 1280, ch6-l2 peekaboo) */
.lesson .devpanel .dev-win, .lesson .devpanel .dev-body { bottom: calc(var(--band) - 16px); }
/* speechvizfix: сцена «прятки»/«звук» квадратная (min(46–48vw, 62–64vh)) и на 1920 выше поля, ужатого под табло
   (поле сверху 22vh), — выходила под табло; ограничиваем сторону высотой поля */
.lesson.cp-on .arena .scene-play.peekaboo, .lesson.cp-on .arena .scene-play.sound { max-width: calc(78vh - var(--band) - var(--cp-h)); }
.lesson.cp-on.cp-hint .arena .scene-play.peekaboo, .lesson.cp-on.cp-hint .arena .scene-play.sound { max-width: calc(78vh - var(--band) - var(--cp-h-hint)); }
/* плашка разработчика «что происходит» — над табло, а не поверх него */
.lesson.cp-on .devpanel .dev-win, .lesson.cp-on .devpanel .dev-body { bottom: calc(var(--band) + var(--cp-h) - 16px); }
.lesson.cp-on.cp-hint .devpanel .dev-win, .lesson.cp-on.cp-hint .devpanel .dev-body { bottom: calc(var(--band) + var(--cp-h-hint) - 16px); }
@media (max-width: 900px) {
  .say-line { bottom: 76px; max-width: calc(100vw - 24px); min-width: 0; }
  .child-prompt { bottom: 160px; max-width: calc(100vw - 24px); }
  .lesson .hud > .ear { position: static; }
  .lesson.cp-on .arena { bottom: calc(160px + var(--cp-h)) !important; }
}

/* === verbviz 2026-11-17 === анимация глагола в строке речи (web/js/verbviz.js) и караоке слов. Плитка — внутри
   .say-line (справа от текста), высотой в полосу строки речи: табло, карточки и плашку разработчика не перекрывает.
   Место под плитку резервируется при показе реплики — строка не прыгает, когда глагол зазвучит. */
.say-line .vv-strip { display: flex; gap: 6px; flex: none; align-self: center; }
.say-line .vv-strip[hidden] { display: none; }
.say-line:has(.vv-strip:not([hidden])) { padding-top: 3px; padding-bottom: 3px; }
/* высота строки с плиткой ≤ полоса − 14 px: табло над строкой «подпрыгивает» (eng-pop, scale 1.15) и не должно её задевать */
.say-line .vv-tile { --vv: min(calc(var(--band, 98px) - 20px), 116px); width: var(--vv); height: var(--vv); margin: -3px 0; flex: none; box-sizing: border-box;
  border-radius: 14px; background: #FFFDF6; border: 3px solid rgba(53,70,77,.25); overflow: hidden; }
.say-line .vv-tile.empty { border-style: dashed; background: transparent; }
.say-line .vv-tile.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(239,141,103,.25); }
.say-line .vv-stage { position: relative; width: 100%; height: 100%; }
.say-line .vv-img { position: absolute; object-fit: contain; pointer-events: none; }
.say-line .say-w { border-radius: 5px; transition: background-color .12s, color .12s; }
.say-line .say-v { font-weight: 900; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.say-line .say-w.hl { background: #FFC94D; box-shadow: 0 0 0 2px #FFC94D; color: var(--ink); }
.say-line .say-v.said { color: #C4552F; }
.say-line .say-v.hl { background: var(--accent); color: #fff; }
@media (max-width: 900px) { .say-line .vv-tile { --vv: 60px; } }

/* parentfix 2026-11-17 (родитель: «сделай чтобы я текст выделять мог где это текст а не картинка»): body по-прежнему
   user-select: none — это защищает касания ребёнка; выделение разрешено только там, где это текст для взрослого. */
.bubble, .say-line .say-who, .say-line .say-text, .child-prompt .cp-body, .child-prompt .cp-label, .child-prompt .cp-phrase,
.child-prompt .cp-en, .devpanel .dev-info, .or-sheet, .prog-dialog, .card-dialog .sheet-title, .card-dialog .sheet-sub, .level-note,
.taskboard, .parent, .map-heading { -webkit-user-select: text; user-select: text; cursor: text; }
.map-label { -webkit-user-select: text; user-select: text; } /* подпись главы кликабельна — курсор остаётся рукой */
/* запрет — на карточках, картинках, кнопках и полях перетаскивания (выделение мешает касанию) */
.card, .card *, .game-field, .game-field *, .portrait, .art, button, .child-prompt button, .or-sheet button, .devpanel button,
.devpanel input { -webkit-user-select: none; user-select: none; }
.child-prompt button, .or-sheet button, .devpanel button { cursor: pointer; }
/* parentfix: описания шагов в плашке длинные и понятные — переносятся, а не режутся многоточием; выделять мышью можно
   на ⏸ (урок заморожен — касаний ребёнка нет; в ходе урока плашка касаний не перехватывает, гейт ch9 r2 P1) */
.devpanel .dev-info { white-space: pre-wrap; text-overflow: clip; width: min(520px, 40vw); max-width: none; }
.devpanel.is-paused .dev-info { pointer-events: auto; }
/* parentfix (гейт ревью P1): строка речи — pointer-events: none (не перехватывает касания поля); текст и имя говорящего
   принимают мышь, чтобы взрослый мог их выделить */
.say-line.on .say-who, .say-line.on .say-text { pointer-events: auto; }

/* === parentfix2 2026-11-17 (гейт parentfix P2/P3) ===
   Табло задания (.taskboard, .lesson .board) по-прежнему pointer-events: none — пустые места табло касаний поля не
   перехватывают; события получают только строки текста (их рамка = сам текст), поэтому взрослый выделяет фразу мышью.
   На ⏸ lesson.js пропускает только pointerdown по .taskboard-line (начало выделения), click/pointerup гасятся. */
.taskboard .taskboard-line { pointer-events: auto; -webkit-user-select: text; user-select: text; cursor: text; }
.taskboard--measure .taskboard-line { pointer-events: none; }
/* devpanel — плашка взрослого: НИКОГДА не накрывает игровые цели (на 1280 лежит над сценой story) — в ходе урока
   прозрачна для касаний; мышь принимает на ⏸ (.is-paused, выше) и пока взрослый держит Shift/Alt (.dev-grab, devpanel.js) */
.devpanel.dev-grab .dev-info { pointer-events: auto; }
/* showscene (родитель 2026-11-17): шаг show — слово в своей среде (web/js/showscene.js). Кадр 16:9 по центру поля урока,
   снизу поле поднято над строкой речи (--band); предмет движется только внутри кадра, рамка обрезает на всякий случай. */
.arena.show-mode { display: flex; bottom: calc(var(--band) + 10px); }
.show-scene { position: relative; flex: none; overflow: hidden; border-radius: 28px; border: 5px solid var(--ink);
  box-shadow: 0 8px 0 rgba(53,70,77,.3); background: #cfe3ea; box-sizing: content-box; }
.show-scene .show-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; }
.show-scene .show-obj { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
.show-scene .show-pose, .show-scene .show-pose img { display: block; width: 100%; height: 100%; }
.show-scene .show-pose img { object-fit: contain; object-position: 50% 100%; transform-origin: 50% 100%; pointer-events: none;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }
/* нет среды — прежняя карточка, но анимация не выходит за её край: рисунок мельче, качание и прыжок — в пределах полей */
.card.show-card { overflow: hidden; }
.card.show-card.drive > .art, .card.show-card.bounce > .art { width: 76%; height: 76%; }
.card.show-card.drive .art { animation: show-idle-drive 1.4s ease-in-out 2; }
@keyframes show-idle-drive { 30% { transform: translateX(-10%); } 70% { transform: translateX(10%); } }
.card.show-card.bounce .art { animation: show-bounce .9s cubic-bezier(.3,0,.5,1) 3; }
@keyframes show-bounce { 50% { transform: translateY(-12%) scaleY(1.03); } 90% { transform: scaleY(.94); } }
/* devnav: ⏮ ↻ ⏭ — переход по шагам урока в режиме отладки. Столбиком над ⌂ у левого края: в ряду с ⏸ они наезжали
   на строку речи (проба speechviz), справа над ⏸ — плашка dev-info */
.devpanel .dev-nav { position: fixed; left: 24px; bottom: 84px; display: flex; flex-direction: column-reverse; gap: 6px; }
/* engfix: кнопки ⏮↻⏭ — свой блок на подложке (подложка касаний не ловит, только сами кнопки) */
.devpanel .dev-nav { left: 17px; bottom: 77px; padding: 7px; border-radius: 30px; background: rgba(58,64,92,.88); box-shadow: 0 0 0 2px rgba(150,160,210,.55); pointer-events: none; }
.devpanel .dev-nav button { pointer-events: auto; }
.devpanel .dev-nav button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; font-size: 18px; line-height: 1; padding: 0; }
.devpanel .dev-nav button:disabled { opacity: .35; }

/* === frogvideo 2026-11-17 === 3-я ступень подсказки «лягушонок показывает»: ролик Midjourney (frog-point.webm, альфа) вместо
   SVG с вытягивающейся рукой. Сидит рядом с целью (frogPlace в web/js/frogvideo.js), касаний не ловит; справа от цели — зеркально.
   Запасной mp4 на белом — multiply (белое исчезает на светлом фоне урока). Выход — opacity/transform, 0.35 с. */
.frog-video { position: absolute; z-index: 7; pointer-events: none; opacity: 0; transform: translateY(12px) scale(.94);
  transform-origin: 50% 100%; transition: opacity .35s ease, transform .35s ease; }
.frog-video.in { opacity: 1; transform: none; }
.frog-video video { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
.frog-video.flip video { transform: scaleX(-1); }
/* multiply — на самом .frog-video: у него transform/opacity (своя группа наложения), на <video> внутри белое смешалось бы с
   пустым фоном группы и осталось белым прямоугольником (снимок frogvideo-1280-mp4-fallback) */
.frog-video.no-alpha { mix-blend-mode: multiply; }

/* === chbg 2026-11-17 (родитель: «фоны внутри островов — на MJ»): экран главы стоит на своём фоне-растре === */
/* --map-photo ставит map.js: url(chN.jpg), url(bg.jpg) — второй слой запасной. Вуаль светлая, но слабее общей:
   рисованного пейзажа под тропой больше нет, фото должно читаться, а тропа и подписи — оставаться на светлых плашках. */
.photo-map.road-scene.chbg::before { background:#e4f3f9; background-image:linear-gradient(rgba(255,251,238,.30),rgba(255,251,238,.42)),var(--map-photo);
  background-size:cover; background-position:center; background-repeat:no-repeat; }
.photo-map.road-scene.chbg .map-heading { background:linear-gradient(rgba(255,251,238,.9) 70%, rgba(255,251,238,0)); }
.photo-map.chbg .scene .river { stroke:#5fb8e0; opacity:.62; } /* река-переправа к боссу остаётся, но не спорит с фото */
.photo-map.chbg .scene .river-shine { opacity:.5; }

/* === lessonbg 2026-11-17: поле урока — фото-фон (Midjourney, web/art/lesson/bg.jpg) вместо нарисованного пейзажа.
   Кадр прижат к низу (как прежний SVG xMidYMax slice): на широком экране срезается небо, а не холмы. Светлая тёплая
   вуаль сверху (лисёнок, портрет, табло) и чуть слабее в центре — карточки и строка речи читаются на спокойном фото. */
.lesson .bg.photo-bg { background:#f4f1df; overflow:hidden; }
.lesson .bg.photo-bg img { width:100%; height:100%; object-fit:cover; object-position:center bottom; display:block; }
.lesson .bg.photo-bg::after { content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(rgba(255,250,236,.42), rgba(255,250,236,.26) 55%, rgba(255,250,236,.18)); }

/* === engfix 2026-11-17 (родитель: «явно разделять в дев логах разделы — цветами или фоном… жирнота не подойдёт. И окно можно
   двигать — под ним часто кубик») ===
   Окно .dev-win (тянуть за любое место, devpanel.js) = плашка .dev-info из блоков .dev-sec + кнопки .dev-tools: у каждого
   раздела свой спокойный фон на тёмной подложке и полоса слева того же тона, между блоками — зазор. */
.devpanel .dev-win { display: flex; flex-direction: column; pointer-events: none; }
.devpanel .dev-win.moved { z-index: 30; }
/* окно тянется за любое место (devpanel.js, по геометрии на window) и при этом прозрачно для касаний — короткое касание
   идёт в игру под окном; кнопки в углу и (на ⏸ / с Shift/Alt) текст плашки принимают мышь */
.devpanel .dev-tools button { pointer-events: auto; }
.devpanel .dev-tools { position: absolute; top: 9px; right: 9px; display: flex; gap: 4px; }
.devpanel .dev-tools button { font: 11px/1.2 system-ui, sans-serif; padding: 2px 8px; border-radius: 8px; border: 1px solid #8fa3ad;
  background: #2c3a42; color: #e7eef1; }
.devpanel .dev-tools button:disabled { opacity: .35; cursor: default; }
.devpanel .dev-tools .dev-copy.done { background: #2f6b3a; border-color: #8fd27f; }
.devpanel .dev-info { display: flex; flex-direction: column; gap: 6px; padding: 6px; background: rgba(16,22,26,.9); border-radius: 10px; }
/* кнопки в правом верхнем углу — первый блок не залезает под них */
.devpanel .dev-info > .dev-sec:first-child { padding-right: 150px; }
.devpanel .dev-sec { border-radius: 6px; padding: 3px 8px 3px 9px; border-left: 4px solid; white-space: pre-wrap; color: #fff; }
.devpanel .dev-sec-pause { background: #6b5214; border-color: #f1ce76; }
.devpanel .dev-sec-head  { background: #27435f; border-color: #7fb0e0; }
.devpanel .dev-sec-this  { background: #1f5249; border-color: #6fd0bd; }
.devpanel .dev-sec-next  { background: #3b3b5c; border-color: #a5a5e0; }
.devpanel .dev-sec-now   { background: #2c5229; border-color: #8fd27f; }
.devpanel .dev-sec-sub   { background: #55432b; border-color: #d8b27a; }
.devpanel .dev-sec-anim  { background: #552c50; border-color: #da94cf; }
.devpanel .dev-sec-lvl   { background: #24484f; border-color: #7fd0dc; } /* levelboost: что даёт ★ */
.devpanel .dev-sec-hint  { background: #5e2f2f; border-color: #e39a8f; }
.devpanel .dev-sec-foot  { background: transparent; border-color: transparent; color: #b8c4c9; padding-top: 0; padding-bottom: 0; }

/* === mjroad 2026-11-17 === тропа главы в фото-стиле Midjourney (web/art/map/road): камни, ручей, мостик, замок, указатель, замок-висячий */
.road-scene .road-edge, .photo-map.chbg .road-scene .road-edge { stroke:rgba(52,38,22,.42); stroke-width:46; opacity:1; transform:translateY(5px); }
.road-scene .road-surface { stroke-width:38; } /* stroke = паттерн камней (атрибут), запасной цвет — у плитки .road-stones-base */
.road-stones-base { fill:#d9c9a8; }
.road-mask { fill:none; stroke:#fff; stroke-width:36; stroke-linecap:round; stroke-linejoin:round; }
.road-scene .road-done { stroke:rgba(255,236,170,.30); stroke-width:30; stroke-dasharray:none; }   /* пройдено — тёплый солнечный отсвет */
.road-scene .road-next { stroke:rgba(40,32,20,.16); stroke-width:30; stroke-dasharray:none; opacity:1; } /* впереди — камни чуть в тени */
/* mjroadfix: ручей — заливка контура (не обводка), полупрозрачная фото-вода поверх фона; берег — размытая влажная земля */
.scene .river.creek, .photo-map.chbg .scene .river.creek { opacity:.7; }
.scene .river-bank { fill:rgba(60,64,40,.5); stroke:none; }
.road-water-base { fill:#7fb2c2; }
.bridge-art image { filter:drop-shadow(0 6px 5px rgba(30,24,14,.45)); }
.signpost.sign-art image { filter:drop-shadow(0 4px 3px rgba(30,24,14,.4)); }
.signpost.sign-art .sign-text { font-size:19px; font-weight:900; fill:#4a2c14; stroke:rgba(255,240,210,.55); stroke-width:3px; paint-order:stroke; transform:none; }
.stop.boss .boss-disc.boss-hit { fill:transparent; stroke:none; }
.stop.boss.current .boss-disc.boss-hit { stroke:var(--accent); stroke-width:5; stroke-dasharray:10 9; opacity:.75; }
.stop.boss .boss-glow, .stop.boss:not(.current) .boss-glow { fill:none; } /* замок стоит сам, без диска; подсветка — только у текущего (пульс) */
.stop.boss.current .boss-glow { fill:rgba(255,226,140,.32); }
.stop.boss .boss-castle { filter:drop-shadow(0 8px 6px rgba(30,24,14,.4)); }
.stop.boss image.boss-castle.muted { filter:grayscale(.6) drop-shadow(0 8px 6px rgba(30,24,14,.3)); opacity:.9; } /* закрыт — приглушён, но читается */
.stop.boss .boss-icon.castle-fallback { display:none; }
.stop.boss.castle-missing .boss-icon.castle-fallback { display:inline; }
.stop.boss.castle-missing .boss-disc.boss-hit { fill:#fff4cf; stroke:var(--ink); stroke-width:5; stroke-dasharray:none; opacity:1; }
.stop.boss.future.castle-missing .boss-disc.boss-hit { fill:#f1ede2; stroke:#82918a; stroke-dasharray:8 7; }
.stop.boss.current.castle-missing .boss-disc.boss-hit { stroke:var(--accent); stroke-width:7; }
.stop.boss.castle-missing .boss-icon.trophy { font-size:76px; transform:translateY(-36px); } /* запасной вид: кубок по центру диска, как до mjroad */
.stop.boss .boss-icon.trophy { font-size:46px; }
.lock-hidden { display:none; }
.lock-art { filter:drop-shadow(0 2px 2px rgba(30,24,14,.35)); pointer-events:none; }
.stop.future image.lock-art, .stop image.lock-art { opacity:1; } /* старое «.stop.future image {opacity:.35}» гасило замок */
/* === /mjroad === */

/* === centerviz 2026-11-17 === произносимый глагол — крупно по центру поля урока (verbviz.js center()). Место и размер
   (≈48 % высоты поля) ставит JS по .arena; строка речи внизу остаётся как была — для родителя. */
.lesson .cv-center { position: absolute; z-index: 4; pointer-events: none; border-radius: 28px; }
/* foxvideofix (гейт foxvideo P2-2): белый radial-gradient давал ореол вокруг видео на фото-фоне — вместо него мягкая тень по силуэту */
.lesson .cv-center .cv-video, .lesson .cv-center .vv-actor, .lesson .cv-center .cv-item { filter: drop-shadow(0 8px 14px rgba(30,24,14,.28)); }
.lesson .cv-center[hidden] { display: none; }
.lesson .cv-center .vv-stage { position: relative; width: 100%; height: 100%; }
.lesson .cv-center .vv-img { position: absolute; object-fit: contain; pointer-events: none; }
.lesson .cv-center .cv-video { left: 0; top: 0; width: 100%; height: 100%; }

/* === wordintro 2026-11-17 === новое слово тройкой в одной сцене (web/js/games/wordintro.js): кадр 16:9 как у showscene,
   три предмета на своих местах (центр — лисёнок, справа — член семьи, слева — ребёнок), над каждым — кто его назвал. */
.arena.intro-mode { display: flex; align-items: center; justify-content: center; }
.intro-scene.plain { background: radial-gradient(ellipse at 50% 85%, #fff6d8 0%, #e6f1d6 55%, #cfe3ea 100%); }
.intro-scene .intro-item { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
.intro-scene .intro-pose { width: 100%; height: 100%; transform-origin: 50% 100%; }
.intro-scene .intro-pose .art { width: 100%; height: 100%; }
.intro-scene .intro-pose .art img, .intro-scene .intro-pose .art svg { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); pointer-events: none; }
.intro-scene .intro-tag { position: absolute; left: 50%; top: -14%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 3px; border-radius: 999px; background: rgba(255,255,255,.88); box-shadow: 0 2px 0 rgba(53,70,77,.25);
  white-space: nowrap; font-size: clamp(13px, 1.4vw, 18px); color: var(--ink); pointer-events: none; }
.intro-scene .intro-tag img, .intro-scene .intro-emoji { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-size: 24px; }
.intro-scene .intro-item.child-own::after { content: '✨'; position: absolute; right: -6%; top: 4%; font-size: clamp(26px, 3vw, 44px);
  animation: intro-spark 1.2s ease-in-out 3; pointer-events: none; }
@keyframes intro-spark { 0%, 100% { opacity: 0; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }
/* engfix: табло «Ждём от ребёнка» — автопереход выключен, шаг ждёт ✓ взрослого (childprompt.js) */
.child-prompt .cp-judge .cp-wait { font: 600 12px/1.2 system-ui, sans-serif; color: #7a5a12; text-align: center; margin-top: 4px; }
/* === foxvideo 2026-11-17 === лисёнок из MJ: в углу — растровый кадр (guide/fox.png, вместо fox.svg); жесты угла — мягкие
   движения всей фигуры (у PNG нет частей). Финал: сувенир сбоку, центр поля — лисёнку (verbviz center). */
.guide .fox.raster img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.guide.wave .fox.raster { animation: fx-wave .45s ease-in-out 4 alternate; transform-origin: 50% 100%; }
.guide.point .fox.raster, .guide.look .fox.raster { transform: rotate(6deg); transform-origin: 50% 100%; transition: transform .3s; }
.guide.listening .fox.raster { transform: rotate(-6deg); transform-origin: 50% 100%; transition: transform .3s; }
@keyframes fx-wave { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.arena .finish.fx-side { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: min(30%, 380px); }
/* engfix2: autoAdvance выкл. — ребёнок сказал, шаг ждёт взрослого: ✓ подсвечен (подсказка), «услышал: …» держится */
.cp-suggest { box-shadow: 0 0 0 4px #ffd54a, 0 0 18px 6px rgba(255, 196, 0, .75) !important; animation: cp-suggest 1.1s ease-in-out infinite alternate; }
@keyframes cp-suggest { from { filter: brightness(1); } to { filter: brightness(1.18); } }
.child-prompt.cp-held .cp-mic { color: #1f6b2a; font-weight: 700; }
/* foxvideo: в центре — тот, кто говорит: портрет члена семьи/ментора крупно в круге (реплики не лисёнка) */
.lesson .cv-center .cv-portrait { border-radius: 50%; object-fit: cover; border: 6px solid #fff; box-shadow: 0 6px 24px rgba(0,0,0,.18); background: #fff; }

/* ---- givedrag (родитель 2026-11-17 21:4x) ----
   1) «Пузыри всегда должны быть поверх всего»: в шаге pop (.lesson.pop-over, games/pop.js) поле урока — над хедером (табло,
      портреты), футером (HUD, счётчик), строкой речи (8) и табло ребёнка (9); ниже — devpanel (20, 30) и модальные окна
      взрослого (.card-dialog 20, .gate 30, .or-dialog 60). Пустое поле касаний не ловит — только сами пузыри; лягушонок-
      подсказка — над пузырями (он показывает на пузырь).
   2) «Give Mummy the ball»: предмет тянут к портрету родного (lesson.js giveStep), стрелка-подсказка «тяни к маме». */
.lesson.pop-over .arena { z-index: 12; pointer-events: none; }
.lesson.pop-over .pop-field { overflow: visible; }
.lesson.pop-over .pop-bubble { pointer-events: auto; }
.lesson.pop-over .frog-helper, .lesson.pop-over .frog-video, .lesson.pop-over .frog-fly, .lesson.pop-over .frog-fly-mj, .lesson.pop-over .hand { z-index: 13; }
.card.give-drag { touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; position: relative; z-index: 2; }
.card.give-drag.dragging { cursor: grabbing; transition: none; filter: drop-shadow(0 10px 8px rgba(53,70,77,.3)); }
.card.give-drag.back { transition: transform .45s cubic-bezier(.3,1.4,.5,1); }
.card.give-drag img { pointer-events: none; -webkit-user-drag: none; }
.give-arrow { position: fixed; z-index: 11; pointer-events: none; height: 26px; transform-origin: 0 50%; opacity: 0; filter: drop-shadow(0 2px 2px rgba(53,70,77,.35)); }
.give-arrow::before { content: ""; position: absolute; left: 0; right: 30px; top: 7px; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(242,183,5,.55), #f2b705); }
.give-arrow::after { content: ""; position: absolute; right: 0; top: -4px; border-left: 34px solid #f2b705;
  border-top: 17px solid transparent; border-bottom: 17px solid transparent; }
.give-arrow.on { animation: give-arrow 1.6s ease-in-out 3; }
@keyframes give-arrow { 0% { opacity: 0; clip-path: inset(0 100% 0 0); } 20% { opacity: 1; } 70% { opacity: 1; clip-path: inset(0 0 0 0); } 100% { opacity: 0; clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .give-arrow.on { animation: none; opacity: 1; } }
/* foxvideo: финал закрепляет все слова урока — предметы ложатся на полку в ряд (сувенир сбоку, центр — картинке слова) */
.arena .finish.fx-side .fx-row { position: absolute; left: 4%; right: 4%; bottom: 55%; display: flex; justify-content: center; align-items: flex-end; gap: 4%; }
.arena .finish.fx-side .fx-row .card.souvenir { position: relative; bottom: auto; width: calc(min(46%, 92% / var(--fx-n, 1))); }

/* === levelboostfix 2026-11-17 (гейт levelboost P2: «плашка закрывает цели и во время игры») ===
   В режиме разработчика (.lesson.dev-on, lesson.js) поле урока уступает плашке правую колонку --dev-w, а кнопкам ⏮↻⏭ —
   полосу слева: поле и цели с плашкой не пересекаются ни в игре, ни на ⏸. Плашка стоит в этой колонке под портретом
   родного и не выше него (max-height); не влезший хвост (подсказка про мышь) обрезается снизу. Ребёнок без режима
   разработчика видит прежнее поле. Перетащенное взрослым окно (.moved) — его выбор, колонка остаётся свободной. */
.lesson.dev-on { --dev-w: 352px; --dev-top: 196px; }
.lesson.dev-on:not(.boss-active) .arena, .lesson.dev-on:not(.boss-active) .arena.scene-mode { right: var(--dev-w) !important; left: max(4vw, 88px) !important; }
.lesson.dev-on.with-helper:not(.boss-active) .arena, .lesson.dev-on.with-helper:not(.boss-active) .arena.scene-mode { right: calc(var(--dev-w) + clamp(120px, 13vw, 190px)) !important; }
.lesson.dev-on .helper-hero { right: calc(var(--dev-w) + 1vw); }
.lesson.dev-on.boss-active .arena { right: max(var(--dev-w), calc(min(clamp(120px, 16.8vw, 340px), 46%) + 3vw)) !important; }
.lesson.dev-on .devpanel .dev-win { width: calc(var(--dev-w) - 26px); box-sizing: border-box; overflow: hidden;
  max-height: calc(100vh - var(--band) - 6px - var(--dev-top)); }
.lesson.dev-on.cp-on .devpanel .dev-win { max-height: calc(100vh - var(--band) - var(--cp-h) - 6px - var(--dev-top)); }
.lesson.dev-on.cp-on.cp-hint .devpanel .dev-win { max-height: calc(100vh - var(--band) - var(--cp-h-hint) - 6px - var(--dev-top)); }
.lesson.dev-on .devpanel .dev-win.moved { max-height: 70vh; }
.lesson.dev-on .devpanel .dev-info { width: auto; font-size: 12px; }
.lesson.dev-on .devpanel .dev-info > .dev-sec:first-child { padding-right: 140px; }

/* engfix3: голосовая стоп-команда при выключенном автопереходе — предложение взрослому (childprompt.js offerFinish) */
.cp-finish { position: absolute; left: 50%; top: 10px; translate: -50% 0; z-index: 70; box-sizing: border-box; display: flex; align-items: center; gap: 12px;
  width: max-content; max-width: min(calc(100vw - 32px), 900px); padding: 8px 12px 8px 14px; border-radius: 22px; background: #FFF3C4;
  border: 4px solid #E0A526; box-shadow: 0 4px 0 rgba(53,70,77,.22); animation: eng-pop .35s ease-out; font-family: inherit; }
.cp-finish .cp-icon { font-size: 36px; line-height: 1; }
.cp-finish-msg { flex: 1 1 auto; min-width: 0; font-size: 20px; font-weight: 800; color: #35464D; }
.cp-finish button { flex: none; width: auto; height: auto; min-width: 0; white-space: nowrap; line-height: 1.2; font: inherit; font-size: 17px; font-weight: 800; border-radius: 14px; padding: 8px 14px; cursor: pointer; border: 3px solid #35464D; }
.cp-finish-yes { background: #FFD5C2; color: #35464D; }
.cp-finish-no { background: #fff; color: #35464D; }
/* === wordvideo 2026-11-18 === тройка нового слова — три ролика MJ в ряд (web/js/wordvideo.js, games/wordintro.js);
   шаг show с роликом — один ролик крупно на весь кадр сцены. Ролик играет один раз и стоит на последнем кадре. */
.intro-scene .intro-vslot .intro-pose { border-radius: 18px; overflow: hidden; border: 4px solid #fff; box-shadow: 0 6px 16px rgba(30,24,14,.3); background: #cfe3ea; }
.intro-scene .intro-vslot .word-video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.intro-scene .intro-vslot .intro-tag { top: -22%; }
.intro-scene .intro-vslot.child-own::after { right: -3%; top: -10%; }
.show-scene .show-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.intro-scene.video-mode { background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }

/* === frogfix 2026-11-18 === подсказка «муха»: муха MJ (fly-mj.png) садится на цель, видео-лягушонок (frog-tongue.webm)
   слизывает её языком; поверх карточек (арена — z 1), касаний не ловит. Улёт в рот — WAAPI из lesson.js (showFrogVideo). */
.frog-fly-mj { position: absolute; z-index: 8; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.frog-fly-mj.in { opacity: 1; }
.frog-fly-mj img { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.frog-fly-mj.face-left img { transform: scaleX(-1); }
/* frogfix: появление/уход — только прозрачность и лёгкий масштаб от низа (без сдвига вниз на 12px: у нижнего края сцены
   лягушонок на миг вылезал за кадр и на строку речи — проба frogfix, сцена) */
.frog-video { transform: scale(.94); }
.frog-video.in { transform: none; }

/* === sayviz 2026-11-18 === (родитель 13:38: «на моменте приветствия анимация лисёнка дёрганая»)
   Центр: смена сцены — кроссфейд двух слоёв (verbviz center(): .cv-stage поверх, старая .cv-out гаснет).
   Угловой лисёнок: речь (translate/scale) и жесты (rotate) — РАЗНЫЕ свойства, поэтому не перебивают друг друга. Было:
   .guide.wave (fx-wave ±5°, 4 раза) и .actor.talking (e3-talk) — оба через transform/animation, при смене класса кадр
   прыгал на 5° / 17 px (замер sayviz). Амплитуда речи --sv-talk плавно уходит в 0 (transition), а не обрывается. */
.lesson .cv-center .cv-stage { position: absolute; inset: 0; }
@property --sv-talk { syntax: '<number>'; inherits: false; initial-value: 0; }
@keyframes sv-talk { from { translate: 0 0; scale: 1; } to { translate: 0 calc(-7px * var(--sv-talk)); scale: calc(1 + .03 * var(--sv-talk)); } }
@keyframes sv-wave { 0%, 100% { rotate: 0deg; } 25% { rotate: -5deg; } 75% { rotate: 5deg; } }
.lesson .actor.guide .fox.raster { transform: none; transform-origin: 50% 100%; --sv-talk: 0; transition: --sv-talk .3s ease-out, rotate .3s ease-in-out;
  animation: sv-talk .32s ease-in-out infinite alternate; }
.lesson .actor.guide.talking .fox.raster { --sv-talk: 1; }
.lesson .actor.guide.wave .fox.raster { animation: sv-talk .32s ease-in-out infinite alternate, sv-wave .9s ease-in-out 2; }
.lesson .actor.guide.point .fox.raster, .lesson .actor.guide.look .fox.raster { rotate: 6deg; }
.lesson .actor.guide.listening .fox.raster { rotate: -6deg; }
.lesson .actor.guide.happy .fox.raster { animation: sv-talk .32s ease-in-out infinite alternate, joy .5s ease-in-out 3; }
.lesson .actor.guide.shh .fox.raster { animation: sv-talk .32s ease-in-out infinite alternate, shh .8s ease-in-out 2; }
/* === /sayviz === */
