/* Локальная версия webapp. Состояния обучения остаются в lesson.js. */
html, body { font-family: Arial, sans-serif; overflow-x: hidden; }
body, input, select, button, .tekst, .plitka b { font-family: Arial, sans-serif; }
.bold-arial body, .bold-arial input, .bold-arial select, .bold-arial button, .bold-arial .tekst { font-weight: 700; }
.shapka { justify-content: flex-end; }
.upravlenie { width: 100%; }
.vkladki { display: flex; }
.vkladka { min-width: 40px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.schetchik { background: var(--glass-bg); color: var(--page-text); width: 94px; text-align: center; font: inherit; font-variant-numeric: tabular-nums; }
.lenta { display: flex; flex-wrap: nowrap; width: 100%; min-width: 0; gap: 3px; }
.lenta button { flex: 0 1 26px; min-width: 0; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.lenta button::after { content: ''; position: absolute; left: 0; right: 0; top: 9px; height: 5px; border-radius: 3px; background: var(--glass-border); }
.lenta button.tekushchee::after { background: #38bdf8; height: 7px; }
.lenta button.znayu::after { background: var(--success-green); }
.lenta button.ne-znayu::after { background: var(--error-pink); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }
#nazad, #vpered { touch-action: none; user-select: none; }
.doska { touch-action: pan-y; }
.obertka { min-width: 0; max-width: 100%; }
.history-list { padding-left: 22px; overflow-wrap: anywhere; }
.video-dialog { width: min(680px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 16px; border: 1px solid var(--glass-border); border-radius: 16px; background: var(--page-bg); color: var(--page-text); overflow: auto; }
.video-dialog::backdrop { background: rgba(0,0,0,.65); }
.video-dialog[data-size="s"] { width: min(480px, calc((100vw - 24px) * .7)); }
.video-dialog[data-size="m"] { width: min(680px, calc((100vw - 24px) * .82)); }
.video-dialog[data-size="l"] { width: min(900px, calc((100vw - 24px) * .92)); }
.video-dialog[data-size="xl"] { width: min(1200px, calc(100vw - 24px)); }
.video-head { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.video-head h2 { font-size: 17px; margin: 0; }
.video-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.video-controls label { display: flex; gap: 6px; align-items: center; }
.video-controls select, .video-dialog button { font: inherit; color: inherit; background: var(--page-bg); border: 1px solid var(--glass-border); border-radius: 8px; padding: 8px; }
.video-slot { aspect-ratio: 16 / 9; background: #000; position: relative; }
.video-slot iframe, .video-slot a { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-slot a { display: flex; align-items: center; justify-content: center; color: white; text-align: center; }
.video-dialog a { color: #38bdf8; }
.video-note { font-size: 13px; line-height: 1.5; }
@media (max-width:640px) { .schetchik { width: 100%; } .lenta { margin-top: -4px; } }
@media (max-height:500px) and (orientation:landscape) { .vkladki { display:flex; } .lenta { display:flex; } .video-dialog { padding:10px; } }
