/* Показ слайда: редактор, ученик, занятие, печать */
.sld { position:relative; width:100%; container-type:inline-size; overflow:hidden; color:#1b1f2a; line-height:1.3; text-align:left; background:#fff; box-shadow:0 0 0 1px #e5e7eb }
.b { position:absolute; left:calc(var(--x)*1%); top:calc(var(--y)*1%); width:calc(var(--w)*1%); height:calc(var(--h)*1%); font-size:calc(var(--fs)*1cqw); overflow:hidden; box-sizing:border-box }
.b img { display:block; width:100%; height:100%; object-fit:contain; user-select:none; -webkit-user-drag:none }
.b img.cropped { position:absolute; max-width:none; object-fit:fill }
.b svg { display:block; overflow:visible }
.b-shape { overflow:visible }
.b .md > :first-child { margin-top:0 } .b .md > :last-child { margin-bottom:0 }
.md p { margin:.45em 0 } .md h1 { font-size:1.7em; margin:.3em 0; line-height:1.15 } .md h2 { font-size:1.35em; margin:.3em 0 } .md h3 { font-size:1.12em; margin:.3em 0 }
.md ul, .md ol { margin:.35em 0; padding-left:1.3em } .md li { margin:.2em 0 }
.md.ph { color:#a4abb8 }
.b-text { padding:.15em .25em; overflow:visible }
.b-task { display:flex; flex-direction:column; gap:.45em; padding:.6em .7em; background:#f6f9ff; border:.08em solid #cfe0ff; border-radius:.5em; overflow:auto }
.b-task .tk-img { width:auto; height:auto; max-width:100%; max-height:60%; object-fit:contain; align-self:flex-start; border-radius:.2em }
.tk-in { color:#a4abb8; border:.05em solid #d5dbe6; border-radius:.3em; padding:.3em .5em; background:#fff; font-size:.85em }
.tk-ok p, .tk-key p { display:inline; margin:0 }
.tk-key { color:#1f9d55; font-size:.8em } .tk-ok { color:#1f9d55; font-size:.9em } .tk-bad { color:#d23c3c; font-size:.9em }
.tk-ch { display:flex; flex-wrap:wrap; gap:.3em }
.tk-ch > * { flex:1 1 45%; border:.05em solid #d5dbe6; border-radius:.3em; padding:.3em .5em; background:#fff; font:inherit; color:inherit; text-align:left; line-height:1.25 }
.tk-ch button { cursor:pointer } .tk-ch button:hover { background:#eef2ff }
.tk-ch .right { border-color:#1f9d55; background:#ecfdf3 } .tk-ch .md p { margin:0 } .tk-ch p { margin:0 }
.tk-f { display:flex; gap:.3em; margin:0 }
.tk-f input { flex:1; min-width:0; width:auto; font:inherit; padding:.3em .5em; border:.05em solid #d5dbe6; border-radius:.3em }
.tk-f button { font:inherit; border:0; border-radius:.3em; padding:.3em .8em; background:#2f6df6; color:#fff; cursor:pointer }
.b-game button { font:inherit; font-weight:600; border:0; border-radius:.4em; padding:.35em 1.1em; background:#a8481c; color:#fff; cursor:pointer }
.b-game { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.25em; text-align:center; background:linear-gradient(160deg,#fff8ea,#f6e6c4); border:.06em solid #dcc48e; border-radius:.6em; box-shadow:0 .1em .3em rgba(90,60,20,.16); overflow:hidden }
.g-ic { font-size:2.2em; line-height:1 } .g-t { color:#6b7280; font-size:.8em }
/* столбик на телефоне */
.sld.flow { aspect-ratio:auto !important; display:flex; flex-direction:column; gap:12px; padding:14px; box-shadow:none; container-type:normal }
.sld.flow .b { position:static; width:auto; height:auto; order:var(--o); overflow:visible; font-size:calc(12px + var(--fs)*2px) }
.sld.flow .b-game { font-size:18px; padding:16px } .sld.flow .b-shape { display:none }
.sld.flow .b img { height:auto; max-height:none } .sld.flow .b img[src*="/pics/face-"] { width:72px; height:72px; border-radius:50% } .sld.flow .b img.cropped { position:static; width:100% !important; height:auto !important }
.sld.flow .b-task { font-size:17px } .sld.thumb { pointer-events:none; box-shadow:none }
.sld.thumb input { display:none } .sld.thumb .b-task { overflow:hidden }
.ink-sheet .sld { line-height:1.3; box-shadow:none }
.ink-sheet.pass canvas { pointer-events:none; cursor:auto }

/* Печать */
.print-root { display:none }
@media print {
  body > *:not(.print-root) { display:none !important }
  .print-root { display:block } .print-page { break-after:page; break-inside:avoid } .print-page:last-child { break-after:auto }
  .print-root .sld { box-shadow:none; -webkit-print-color-adjust:exact; print-color-adjust:exact }
}
/* Игра прямо на слайде */
.b-game.live { display:block; padding:0; background:none; border:0; box-shadow:none; border-radius:.35em; overflow:hidden }
.g-live { display:block; width:100%; height:100%; border:0; background:#fbf4e4 }
.g-done { position:absolute; right:.5em; top:.3em; padding:.1em .5em; border-radius:.4em; background:#ecfdf3 }
.sld.flow .b-game.live { height:640px; padding:0 } .sld.flow:has(.b-game.live) { padding:0; background:none }
.g-full { position:absolute; right:.4em; bottom:.4em; width:2em; height:2em; padding:0; border:0; border-radius:.4em; background:rgba(36,24,17,.7); color:#fff; font-size:.8em; cursor:pointer }
/* Игра на весь экран: кнопка становится выходом и стоит в углу, свободном у всех оболочек */
.b.live:fullscreen { background:#111 } .b.live:fullscreen .g-full { top:10px; right:10px; bottom:auto; width:auto; height:44px; padding:0 16px; border-radius:12px; font-size:0; background:#fff; color:#222; box-shadow:0 2px 8px rgba(0,0,0,.4) }
.b.live:fullscreen .g-full::after { content:"← Назад"; font-size:16px; font-weight:700 }
