/* Платформа курсів. Кольори й шрифти — з tokens.css сайту (копіює tools/deploy.sh і tools/dev.sh). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page-bg, #fffaf6); color: #444; font: 17px/1.6 var(--font-body, 'Montserrat', sans-serif); overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--font-heading, 'Comfortaa', cursive); color: var(--heading-color, #222); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
h2 { font-size: clamp(1.15rem, 4vw, 1.45rem); }
h3 { font-size: 1.05rem; margin-top: 1.4em; }
a { color: var(--brand-color, #70388e); }
img { max-width: 100%; height: auto; border-radius: 12px; }
.top { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; justify-content: space-between; padding: .9rem 16px; background: #fff; border-bottom: 1px solid #eee4dc; }
.brand { font-family: var(--font-heading, 'Comfortaa', cursive); font-weight: 700; font-size: 1.1rem; color: var(--brand-color, #70388e); text-decoration: none; }
.menu { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; align-items: center; font-size: .95rem; }
.menu form { margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-color, #70388e); text-decoration: underline; cursor: pointer; }
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 64px; }
.card { background: #fff; border: 1px solid #eee4dc; border-radius: 16px; padding: 22px 20px; margin: 0 0 20px; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.course h2 { margin-bottom: .4em; }
.over { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #8d8d8d; margin: 0 0 .4em; }
.note, .hint, .small { font-size: .88rem; color: #777; }
.hint { font-weight: 400; }
.empty { padding: 18px; background: #fff; border: 1px dashed #dccfc4; border-radius: 12px; color: #777; }
.error { background: #fdecec; color: var(--error-color, #c62828); border-radius: 10px; padding: 10px 14px; }
.mark { color: #2e7d32; font-weight: 600; }
.tag { font-size: .75rem; background: #f1e9f5; color: var(--brand-color, #70388e); border-radius: 6px; padding: 2px 8px; font-family: var(--font-body, sans-serif); }
.price { font-size: 1.6rem; font-weight: 700; color: var(--brand-color, #70388e); margin: 0 0 .5em; }
label { display: block; font-weight: 600; margin: 0 0 14px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=date], select {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; border: 1px solid #d5c9be; border-radius: 10px; background: #fff; min-height: 48px; }
input:focus-visible, select:focus-visible, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #b38bc6; outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 20px; height: 20px; flex: none; }
.btn { display: inline-block; padding: 12px 22px; min-height: 48px; font: inherit; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
  color: #fff; background: var(--brand-color, #70388e); border: 2px solid var(--brand-color, #70388e); border-radius: var(--btn-radius, 7px 25px 25px 25px); }
.btn:hover { background: var(--brand-hover, #543a62); border-color: var(--brand-hover, #543a62); }
.btn.ghost { background: transparent; color: var(--brand-color, #70388e); }
.btn.ghost:hover { background: #f6eff9; }
.actions, .links, .nav { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 14px 0 0; }
.links.small { margin-top: 8px; }
.crumbs { font-size: .9rem; color: #777; margin: 0 0 12px; }
.week { margin: 26px 0; }
.lessons { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid #eee4dc; border-radius: 14px; }
.lessons li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; padding: 13px 16px; border-top: 1px solid #f1e8e0; }
.lessons li:first-child { border-top: 0; }
.lessons a { text-decoration: none; font-weight: 600; }
.lessons .mark { font-size: .85rem; font-weight: 400; }
.lesson .text { margin: 0 0 20px; }
.lesson .text p { margin: 0 0 1em; }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0 0 22px; background: #000; border-radius: 12px; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
audio { display: block; width: 100%; margin: 0 0 22px; }
.lesson-foot { border-top: 1px solid #eee4dc; margin-top: 28px; padding-top: 18px; }
.lesson-foot form { margin: 0; }
.nav { justify-content: space-between; }
.plain { list-style: none; padding: 0; margin: 0 0 14px; }
.plain li { padding: 6px 0; border-bottom: 1px solid #f1e8e0; }
.inline { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 0 0 14px; }
.inline label { margin: 0; flex: 1 1 220px; }
.row { border-top: 1px solid #f1e8e0; padding: 12px 0; }
.scroll { overflow-x: auto; background: #fff; border: 1px solid #eee4dc; border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #f1e8e0; vertical-align: top; }
.gate { margin-top: 28px; border-top: 1px solid #eee4dc; padding-top: 16px; }

/* ---------- Курс: зміст зліва, день праворуч (рішення Івана 16.11.2026) ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap.wide { max-width: 1240px; padding-top: 18px; }
.cframe { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.cnav { position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border: 1px solid #eee4dc; border-radius: 16px; font-size: .9rem; line-height: 1.35; }
.cnav-toggle { display: none; }
.cnav-head { padding: 16px 16px 12px; border-bottom: 1px solid #f1e8e0; }
.cnav-title { display: block; font-family: var(--font-heading, 'Comfortaa', cursive); font-weight: 700; font-size: 1.02rem; color: var(--heading-color, #222); text-decoration: none; margin: 0 0 10px; }
.cnav-title:hover { color: var(--brand-color, #70388e); }
.cnav-progress { height: 6px; background: #f1e9f5; border-radius: 6px; overflow: hidden; }
.cnav-progress span { display: block; height: 100%; background: var(--brand-color, #70388e); border-radius: 6px; transition: width .3s ease; }
.cnav-meta { margin: 8px 0 0; font-size: .8rem; color: #8a8a8a; }
.cnav-week { border-bottom: 1px solid #f4ede6; }
.cnav-week > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; cursor: pointer; list-style: none; user-select: none; }
.cnav-week > summary::-webkit-details-marker { display: none; }
.cnav-week > summary::before { content: ''; flex: none; width: 7px; height: 7px; border-right: 2px solid #b9a9c3; border-bottom: 2px solid #b9a9c3; transform: rotate(-45deg); transition: transform .15s ease; margin-right: 4px; }
.cnav-week[open] > summary::before { transform: rotate(45deg); }
.cnav-week > summary:hover { background: #fbf7fc; }
.cnav-wk { flex: 1; font-weight: 700; color: #333; }
.cnav-wk small { display: block; font-weight: 400; color: #8a8a8a; font-size: .78rem; margin-top: 1px; }
.cnav-wk-count { flex: none; font-size: .75rem; color: #9a8ea3; background: #f6f1f8; border-radius: 10px; padding: 1px 7px; }
.cnav-wk-count.full { color: #2e7d32; background: #eaf5ea; }
.cnav-week ol { list-style: none; margin: 0; padding: 0 8px 8px; }
.cnav-week a { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 12px; border-radius: 9px; color: #444; text-decoration: none; }
.cnav-week a:hover { background: #f8f3fa; color: var(--brand-color, #70388e); }
.cnav-week a[aria-current="page"] { background: #f1e9f5; color: var(--brand-color, #70388e); font-weight: 600; }
.dot { flex: none; width: 16px; height: 16px; border: 2px solid #d6c9de; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.is-done .dot { border-color: #43a047; background: #43a047; }
.is-done .dot::after { content: ''; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: translate(0, -1px) rotate(45deg); }
.cnav-week a[aria-current="page"] .dot { border-color: var(--brand-color, #70388e); }
.is-done[aria-current="page"] .dot { border-color: #43a047; }
.cnav-day { flex: 1; }
.cnav-tg { display: block; margin: 10px 12px 14px; padding: 9px 12px; text-align: center; border: 1px solid #d9c8e3; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: .85rem; }
.cnav-tg:hover { background: #f8f3fa; }
.cmain { min-width: 0; background: #fff; border: 1px solid #eee4dc; border-radius: 16px; padding: 26px 32px 22px; outline: none; transition: opacity .15s ease; }
.cmain.loading { opacity: .45; }
.cmain h1 { font-size: clamp(1.35rem, 3.2vw, 1.75rem); margin-bottom: .7em; }
.cmain .over { margin-bottom: .25em; }
.cmain h2 { font-size: 1.08rem; margin: 1.5em 0 .5em; color: #333; }
.cmain .lesson > h2:first-of-type { margin-top: .4em; }
.cmain .text { font-size: 1rem; line-height: 1.65; color: #444; }
.cmain .video, .cmain audio { margin-bottom: 18px; }
.cmain .empty { padding: 12px 14px; font-size: .92rem; }
.badge { display: inline-block; vertical-align: middle; font-family: var(--font-body, sans-serif); font-size: .78rem; font-weight: 600; color: #2e7d32; background: #eaf5ea; border-radius: 12px; padding: 3px 10px; }
.start p { max-width: 60ch; }
.start .btn { margin-top: 6px; }
.btn.sm { padding: 9px 18px; min-height: 42px; font-size: .95rem; }
.lesson-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; }
.lesson-foot .mark { margin: 0; }

@media (max-width: 899px) {
  .wrap.wide { padding-top: 12px; }
  .cframe { grid-template-columns: 1fr; gap: 14px; }
  .cnav { position: static; max-height: none; }
  .cnav-toggle { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; font-weight: 700; cursor: pointer; list-style: none; }
  .cnav-toggle::-webkit-details-marker { display: none; }
  .cnav-toggle::after { content: '▾'; color: #9a8ea3; margin-left: 8px; }
  .cnav-box[open] > .cnav-toggle::after { content: '▴'; }
  .cnav-box[open] > .cnav-toggle { border-bottom: 1px solid #f1e8e0; }
  .cnav-count { margin-left: auto; font-weight: 400; font-size: .8rem; color: #8a8a8a; }
  .cmain { padding: 18px 16px 16px; border-radius: 14px; }
}

/* ---------- Шрифт заголовків на edu — без засічок (Іван, 16.11.2026); текст щільніший ---------- */
:root { --font-heading: var(--font-body, 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif); }
body { font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
h1, h2, h3, .brand, .cnav-title { font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; letter-spacing: -.01em; }
.cmain h1 { font-weight: 700; }
.cmain h2 { font-weight: 700; font-size: 1rem; }
.cmain .text { line-height: 1.55; }
.cmain .text p { margin: 0 0 .65em; }
.cmain .text p:last-child, .cmain .text ul:last-child { margin-bottom: 0; }
.elist { list-style: none; margin: 0 0 .65em; padding: 0; }
.elist li { margin: 0 0 .15em; }
.cmain .text ul:not(.elist) { margin: 0 0 .65em; padding-left: 1.3em; }

/* ---------- Плеєри: свої кнопки, без написів і меню YouTube та браузера ---------- */
.mbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f6f1f8; border-radius: 12px; }
.mbar button { flex: none; display: grid; place-items: center; border: 0; cursor: pointer; font: inherit; color: var(--brand-color, #70388e); background: none; padding: 0; }
.m-play { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-color, #70388e) !important; }
.m-play::before { content: ''; margin-left: 3px; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; }
.is-playing .m-play::before { margin-left: 0; width: 12px; height: 14px; border: 0; border-left: 4px solid #fff; border-right: 4px solid #fff; box-sizing: border-box; }
.m-seek { flex: 1; min-width: 60px; height: 22px; margin: 0; background: transparent; accent-color: var(--brand-color, #70388e); cursor: pointer; }
.m-time { flex: none; font-size: .8rem; color: #6d6275; font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.m-speed { min-width: 38px; height: 28px; font-size: .8rem !important; font-weight: 700; border-radius: 8px; background: #fff !important; border: 1px solid #e3d6ea !important; }
.m-full { width: 30px; height: 30px; }
.m-full::before { content: ''; width: 14px; height: 14px; border: 2px solid var(--brand-color, #70388e); border-radius: 2px; clip-path: polygon(0 0,40% 0,40% 15%,15% 15%,15% 40%,0 40%,0 60%,15% 60%,15% 85%,40% 85%,40% 100%,60% 100%,60% 85%,85% 85%,85% 60%,100% 60%,100% 40%,85% 40%,85% 15%,60% 15%,60% 0,100% 0,100% 100%,0 100%); }
.aplayer { margin: 0 0 16px; }
.aplayer audio { display: none; }
.vplayer { margin: 0 0 16px; border-radius: 14px; overflow: hidden; background: #000; }
.vplayer .mbar { border-radius: 0; background: #241a2b; }
.vplayer .m-time { color: #d9cfe0; }
.vplayer .m-speed { background: transparent !important; border-color: #5a4866 !important; color: #fff; }
.vplayer .m-full::before { border-color: #fff; }
.vplayer .m-seek { accent-color: #c9a3dc; }
.vp-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.vp-stage iframe { position: absolute; left: 0; width: 100%; border: 0; pointer-events: none;
  /* Рамка YouTube вища за видиму: відео лишається по центрі, а назва, логотип і кнопки YouTube, що причеплені до країв
     рамки, виходять за межі й обрізаються (overflow: hidden у .vp-stage). */
  top: -150%; height: 400%; }   /* утричі вища: темні градієнти YouTube рахуються від висоти рамки й теж ідуть за край (прийом Plyr) */
.vp-shield { position: absolute; inset: 0; cursor: pointer; }
.vp-cover { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: #1d1424 center / cover no-repeat; display: grid; place-items: center; }
.vp-cover::before { content: ''; position: absolute; inset: 0; background: rgba(30, 15, 40, .28); }
.vp-big { position: relative; width: 72px; height: 72px; border-radius: 50%; background: var(--brand-color, #70388e); box-shadow: 0 6px 24px rgba(0,0,0,.3); display: grid; place-items: center; transition: transform .15s ease; }
.vp-big::before { content: ''; margin-left: 5px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff; }
.vp-cover:hover .vp-big { transform: scale(1.06); }
.vplayer.is-playing.is-warm .vp-cover { display: none; }
.vplayer.is-playing:not(.is-warm) .vp-big::before { border: 0; margin: 0; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: vpspin .8s linear infinite; }
@keyframes vpspin { to { transform: rotate(360deg); } }
.vplayer:fullscreen { display: flex; flex-direction: column; border-radius: 0; }
.vplayer:fullscreen .vp-stage { flex: 1; aspect-ratio: auto; }
.vplayer .video { margin: 0; }

/* ---------- «Усі відео / Усі аудіо курсу» ---------- */
.cnav-media { padding: 8px; border-bottom: 1px solid #f4ede6; }
.cnav-media a { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 9px; color: #444; text-decoration: none; font-weight: 600; }
.cnav-media a:hover { background: #f8f3fa; color: var(--brand-color, #70388e); }
.cnav-media a[aria-current="page"] { background: #f1e9f5; color: var(--brand-color, #70388e); }
.ico { flex: none; width: 16px; height: 16px; display: grid; place-items: center; }
.ico-video::before { content: ''; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; margin-left: 2px; }
.ico-audio::before { content: ''; width: 10px; height: 12px; border-radius: 6px 6px 3px 3px; border: 2px solid currentColor; border-bottom-width: 4px; }
.mitem { padding: 16px 0 6px; border-top: 1px solid #f1e8e0; }
.mitem:first-of-type { border-top: 0; padding-top: 4px; }
.mitem-head { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 10px; }
.mitem-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #f1e9f5; color: var(--brand-color, #70388e); font-size: .8rem; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.cmain .mitem h2 { margin: 0 0 2px; }
.mitem-from { font-size: .82rem; color: #8a7d93; text-decoration: none; }
.mitem-from:hover { color: var(--brand-color, #70388e); text-decoration: underline; }

/* ---------- Шапка й підвал у кольорах сайту, компактні (Іван, 16.11.2026) ---------- */
.top { display: none; }
.hdr { position: sticky; top: 0; z-index: 40; background: var(--brand-color, #70388e); color: #fff; }
.hdr-in { display: flex; align-items: center; gap: 16px; max-width: 860px; height: 60px; margin: 0 auto; padding: 0 16px; }
.hdr-in.wide, .ftr-in.wide, .ftr-bar.wide { max-width: 1240px; }
.hdr-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: none; }
.hdr-logo img { width: 180px; height: auto; border-radius: 0; }   /* напис «НЕПОВТОРНА», як у підвалі (Іван, 19.11.2026) */
.hdr-name { display: flex; flex-direction: column; font-weight: 700; font-size: 1rem; line-height: 1.1; letter-spacing: .01em; }
.hdr-name small { font-weight: 400; font-size: .74rem; opacity: .8; letter-spacing: .06em; text-transform: uppercase; }
.hdr-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: .9rem; font-weight: 500; }
.hdr-nav a { color: #fff; text-decoration: none; }
.hdr-nav a:hover, .hdr-out:hover { color: #e3cdf0; }
.hdr-nav form { margin: 0; }
.hdr-user { opacity: .75; font-weight: 400; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.3); }
.hdr-out { background: none; border: 1px solid rgba(255,255,255,.55); border-radius: 16px; color: #fff; font: inherit; padding: 4px 12px; cursor: pointer; }
.cnav { top: 74px; max-height: calc(100vh - 88px); }
.ftr { background: var(--brand-color, #70388e); color: #fff; font-size: .85rem; line-height: 1.5; margin-top: 8px; }
.ftr a { color: #fff; text-decoration: none; }
.ftr a:hover { text-decoration: underline; }
.ftr-in { display: flex; align-items: center; gap: 28px 40px; flex-wrap: wrap; max-width: 860px; margin: 0 auto; padding: 22px 16px 16px; }
.ftr-brand { flex: 1 1 260px; display: flex; align-items: center; gap: 18px; }
.ftr-brand img { width: 160px; height: auto; border-radius: 0; flex: none; }
.ftr-brand p { margin: 0; opacity: .85; max-width: 230px; font-size: .8rem; }
.ftr-contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ftr-contacts li { display: flex; align-items: center; gap: 8px; }
.ftr-contacts svg { width: 16px; height: 16px; flex: none; color: #fff; fill: currentColor; }
.ftr-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.ftr-social a { display: block; width: 26px; height: 26px; border-radius: 6px; overflow: hidden; }
.ftr-social svg { display: block; width: 26px; height: 26px; fill: #fff; }
.ftr-soc--facebook { background: #3b5998; }
.ftr-soc--instagram { background: radial-gradient(circle at 30% 107%, #ffd87a 0%, #f5b471 22%, #eb8d65 34%, #e36058 45%, #cd3694 68%, #6668b0 100%); }
.ftr-soc--youtube { background: #ff0000; }
.ftr-soc--telegram { background: #2ca5e0; }
.ftr-bar { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; max-width: 860px; margin: 0 auto; padding: 12px 16px 16px; border-top: 1px solid rgba(255,255,255,.22); font-size: .78rem; opacity: .85; }
@media (max-width: 640px) {
  .hdr-in { height: 56px; gap: 10px; }
  .hdr-logo img { width: 132px; }
  .hdr-nav { gap: 12px; font-size: .85rem; }
  .hdr-nav a[href*="shop"], .hdr-user { display: none; }
  .ftr-brand { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ftr-bar { flex-direction: column; }
}

/* ---------- Захист від копіювання: стримування (Іван, 16.11.2026) ---------- */
.cmain { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cmain::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background-image: var(--wm); background-repeat: repeat; opacity: 0; transition: opacity .15s ease; }
.vp-stage::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background-image: var(--wm); background-repeat: repeat; opacity: 0; transition: opacity .15s ease; }
/* Водяний знак прихований; з'являється лише при спробі скопіювати чи зняти екран (слово Івана 16.11.2026). */
.wm-on .cmain::after { opacity: .2; }
.wm-on .vp-stage::after, .vplayer.wm-on .vp-stage::after { opacity: .55; }
.vp-cover { z-index: 2; }
.cmain img { -webkit-user-drag: none; pointer-events: none; }
.vplayer:fullscreen.wm-on .vp-stage::after { opacity: .6; }
.nocopy-msg { display: none; }
@media print {
  .cframe, .hdr, .ftr { display: none !important; }
  .nocopy-msg { display: block !important; font: 16px sans-serif; padding: 40px; }
}

/* ---------- Заголовок і підзаголовок уроку (specs/003) ---------- */
.cmain .b-heading { font-size: 1.25rem; font-weight: 700; margin: 1.4em 0 .5em; color: #222; clear: both; }
.cmain .b-sub { font-size: 1rem; font-weight: 700; margin: 1.3em 0 .45em; color: #333; clear: both; }
/* малий відступ першого заголовка уроку — тепер за позначкою is-first (views/lesson.php, specs/005) */

/* ---------- Розмір і положення складників (specs/003, сц. 15–17; слова Івана про обтікання) ----------
   sz-1…4 — ширина ¼, ½, ¾, уся (слово Івана 17.11.2026); pl-1 ліворуч, pl-2 посередині, pl-3 праворуч.
   Ліворуч і праворуч текст після складника йде збоку від його верху й далі під ним; посередині — лише над і під.
   Заголовки, підзаголовки й інші медіа завжди починаються з нового рядка. Класи не під .cmain — той самий вигляд
   у конструкторі. */
.bx { margin: 4px 0 16px; clear: both; }
.bx img { display: block; width: 100%; height: auto; border-radius: 12px; }
.bx .vplayer, .bx .aplayer { margin: 0; }
.bx.sz-1 { width: 25%; } .bx.sz-2 { width: 50%; } .bx.sz-3 { width: 75%; } .bx.sz-4 { width: 100%; }
.bx.pl-1:not(.sz-4) { float: left; margin-right: 22px; }
.bx.pl-2 { margin-left: auto; margin-right: auto; }
.bx.pl-3:not(.sz-4) { float: right; margin-left: 22px; }
.bx.pl-4 { margin-left: 0; margin-right: auto; } .bx.pl-5 { margin-left: auto; margin-right: 0; }   /* ліворуч / праворуч без обтікання: текст лише зверху й знизу (слово Івана 19.11.2026) */
.bx.sz-1 .m-seek, .bx.sz-1 .m-speed, .bx.sz-1 .m-full { display: none; }
.bx.sz-1 .mbar { padding: 6px 8px; gap: 6px; }
.bx.sz-1 .m-time { min-width: 0; font-size: .72rem; }
.b-heading, .b-sub, .lesson .empty { clear: both; }
.lesson::after { content: ''; display: block; clear: both; }
.slides { position: relative; background: #f6f1f8; border-radius: 12px; overflow: hidden; }
.sl-track img { display: block; width: 100%; height: auto; border-radius: 0; }
.sl-track img[hidden] { display: none; }
.sl-bar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px; }
.sl-bar button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #e3d6ea; background: #fff; color: var(--brand-color, #70388e); font-size: 1.2rem; cursor: pointer; }
.sl-n { font-size: .82rem; color: #6d6275; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) {
  .bx[class*="sz-"] { width: 100%; float: none; margin-left: 0; margin-right: 0; }
}
.ico-slides::before { content: ''; width: 12px; height: 9px; border: 2px solid currentColor; border-radius: 2px; }

/* ---------- Конструктор: меню модуля (specs/003, блок Б) ---------- */
.ed-list { display: flex; flex-direction: column; gap: 8px; }
.ed-list .over { margin: 14px 0 2px; }
.ed-mod { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #fff; border: 1px solid #eee4dc; border-radius: 12px; text-decoration: none; color: #333; }
.ed-mod:hover { border-color: #d9c8e3; background: #fdfaff; }
.ed-mod-t { font-weight: 700; flex: 1; }
.ed-go { color: var(--brand-color, #70388e); font-weight: 600; font-size: .9rem; }
.ed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ed-head h1 { margin: 0; }
.ed-ok { background: #eaf5ea; color: #2e7d32; border-radius: 10px; padding: 8px 14px; margin: 12px 0; }
.ed-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 16px 0; padding: 10px 16px; background: #fff; border: 1px solid #eee4dc; border-radius: 12px; font-size: .92rem; }
.ed-menu .check { margin: 0; font-weight: 500; align-items: center; }
.ed-menu .check input { margin: 0; }
.ed-menu-t { font-weight: 700; color: #555; }
.ed-tree { display: flex; flex-direction: column; gap: 12px; }
.ed-tree.ed-busy { opacity: .5; pointer-events: none; }
.ed-week { background: #fff; border: 1px solid #eee4dc; border-radius: 14px; padding: 4px 0 10px; }
.ed-week-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f1e8e0; }
.ed-week-t { flex: 1; min-width: 0; }
.ed-week-t span { color: #8a7d93; font-size: .9rem; }
.ed-grip { cursor: grab; color: #b9a9c3; letter-spacing: -3px; font-weight: 700; padding: 2px 6px; user-select: none; }
.ed-days { list-style: none; margin: 0; padding: 6px 8px; min-height: 34px; }
.ed-day { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; }
.ed-day:hover { background: #faf6fc; }
.ed-day.ed-dragging, .ed-week.ed-dragging { opacity: .45; outline: 2px dashed #c9a3dc; }
.ed-day-t { flex: 1; min-width: 0; color: #333; text-decoration: none; font-weight: 500; }
.ed-day-t:hover { color: var(--brand-color, #70388e); text-decoration: underline; }
.ed-marks { font-size: .75rem; color: #2e7d32; background: #eaf5ea; border-radius: 10px; padding: 1px 8px; }
.ed-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ed-inline { margin: 0; display: inline; }
.ed-btn { font: inherit; font-size: .8rem; padding: 4px 9px; border: 1px solid #e3d6ea; border-radius: 8px; background: #fff; color: #5a3570; cursor: pointer; list-style: none; }
.ed-btn:hover { background: #f6eff9; }
.ed-btn::-webkit-details-marker { display: none; }
.ed-danger { color: #b3261e; border-color: #f0cfcc; }
.ed-pop { position: relative; }
.ed-pop[open] > .ed-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px; background: #fff; border: 1px solid #e3d6ea; border-radius: 12px; padding: 14px; box-shadow: 0 10px 30px rgba(60, 30, 80, .15); }
.ed-form label { font-size: .85rem; margin-bottom: 10px; }
.ed-form input[type=text] { min-height: 40px; padding: 8px 10px; }
.ed-add { display: flex; gap: 8px; padding: 4px 14px 0; flex-wrap: wrap; }
.ed-add input[type=text] { flex: 1 1 200px; margin: 0; min-height: 40px; padding: 8px 12px; }
.ed-add-week { margin: 16px 0 8px; padding: 12px 14px; background: #fff; border: 1px dashed #d9c8e3; border-radius: 14px; }
@media (max-width: 700px) { .ed-day { flex-wrap: wrap; } .ed-day .ed-tools { width: 100%; padding-left: 30px; } }

/* ---------- Бібліотека модуля ---------- */
.ed-lib { background: #fff; border: 1px solid #eee4dc; border-radius: 14px; padding: 18px 20px; margin: 16px 0; }
.ed-lib h2 { font-size: 1.1rem; }
.ed-paste textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; font-size: .9rem; border: 1px solid #d5c9be; border-radius: 10px; resize: vertical; }
.ed-paste label { font-weight: 500; font-size: .9rem; }
.ed-report { list-style: none; padding: 10px 14px; margin: 12px 0; background: #faf7fc; border-radius: 10px; font-size: .88rem; }
.ed-report li { padding: 2px 0; }
.ed-report .is-added { color: #2e7d32; } .ed-report .is-kept { color: #6d6275; } .ed-report .is-bad { color: #b3261e; }
.ed-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }
.ed-v { margin: 0; border: 1px solid #f1e8e0; border-radius: 12px; overflow: hidden; background: #fff; }
.ed-v img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0; }
.ed-v figcaption { padding: 8px 10px; font-size: .82rem; line-height: 1.35; display: flex; flex-direction: column; gap: 3px; }
.ed-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.ed-upload input[type=file] { font: inherit; font-size: .88rem; }
.ed-thumb { width: 44px; height: 30px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 8px; }

/* ---------- Конструктор уроку (specs/003, блок Г) ---------- */
.le-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.le-top h1 { margin: 0; font-size: 1.5rem; }
.le-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.le-status { font-size: .82rem; color: #2e7d32; } .le-status.is-bad { color: #b3261e; }
.le { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.le-canvas { background: #fff; border: 1px solid #eee4dc; border-radius: 16px; padding: 22px 26px; min-height: 300px; }
.le-side { position: sticky; top: 74px; max-height: calc(100vh - 88px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.le-box { background: #fff; border: 1px solid #eee4dc; border-radius: 14px; padding: 14px; }
.le-h { font-weight: 700; margin: 0 0 10px; color: #333; }
.le-sub { font-weight: 600; font-size: .85rem; margin: 14px 0 6px; color: #555; }
.le-hint { margin: 8px 0 0; }
.le-pal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.le-pal button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; font: inherit; font-size: .78rem; font-weight: 600; color: #5a3570; background: #faf6fc; border: 1px solid #ecdff3; border-radius: 10px; cursor: grab; }
.le-pal button:hover { background: #f3e9f8; border-color: #d9c3e6; }
.ico-k { width: 22px; height: 16px; border: 2px solid currentColor; border-radius: 3px; opacity: .8; }
.ico-k-heading, .ico-k-subheading { border: 0; border-top: 4px solid currentColor; border-bottom: 2px solid currentColor; height: 10px; }
.ico-k-subheading { border-top-width: 2px; }
.ico-k-text { border: 0; height: 14px; background: repeating-linear-gradient(currentColor 0 2px, transparent 2px 5px); }
.ico-k-video, .ico-k-audio { border-radius: 50%; width: 18px; height: 18px; }
.ico-k-link { border-radius: 9px; height: 10px; }
.le-empty { padding: 40px 20px; text-align: center; color: #8a7d93; border: 2px dashed #e3d6ea; border-radius: 12px; }
.ez { height: 8px; margin: 2px 0; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: height .1s; }
.ez span { display: none; font-size: .75rem; color: #70388e; font-weight: 600; }
.is-dragging .ez { height: 14px; background: #f8f3fa; }
.is-dragging .ez.is-on { height: 34px; background: #efe2f6; outline: 2px dashed #b38bc6; }
.is-dragging .ez.is-on span { display: block; }
.eb { position: relative; border: 1px solid transparent; border-radius: 10px; padding: 4px 6px 2px; cursor: pointer; }
.eb:not(.eb-media) { clear: none; }
.eb.bx { margin-top: 0; margin-bottom: 8px; }
.eb .eb-view .bx { width: 100%; float: none; margin: 0; }
.eb-view::after { content: ''; display: block; clear: none; }
.eb:hover { border-color: #ecdff3; }
.eb.is-sel { border-color: #b38bc6; box-shadow: 0 0 0 3px #f1e6f7; }
.eb-bar { display: none; align-items: center; gap: 4px; margin: -2px 0 4px; }
.eb:hover .eb-bar, .eb.is-sel .eb-bar { display: flex; }
.eb-name { flex: 1; font-size: .72rem; font-weight: 700; color: #8a6fa0; text-transform: uppercase; letter-spacing: .04em; }
.eb-grip { cursor: grab; color: #b9a9c3; font-weight: 700; letter-spacing: -3px; padding: 0 6px; }
.eb-btn { font: inherit; font-size: .78rem; min-width: 26px; height: 24px; border: 1px solid #e3d6ea; border-radius: 6px; background: #fff; color: #5a3570; cursor: pointer; }
.eb-btn:hover { background: #f6eff9; }
.eb-view { pointer-events: none; }
.eb-view > .b-heading, .eb-view > .b-sub { margin-top: .2em; }
.eb-view .vp-cover { display: grid !important; }
.le-f { display: block; font-size: .85rem; font-weight: 600; margin: 0 0 10px; }
.le-f input, .le-f textarea { display: block; width: 100%; margin-top: 5px; padding: 8px 10px; font: inherit; font-weight: 400; font-size: .92rem; border: 1px solid #d5c9be; border-radius: 8px; min-height: 0; }
.le-f textarea { resize: vertical; line-height: 1.5; }
.le-tt { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.le-tt button { font: inherit; font-size: .8rem; padding: 4px 10px; border: 1px solid #e3d6ea; border-radius: 6px; background: #fff; cursor: pointer; }
.le-tt button:first-child { font-weight: 800; } .le-tt button:nth-child(2) { font-style: italic; }
.le-seg { margin: 0 0 10px; }
.le-seg-t { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; }
.le-seg-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.le-seg-row button { height: 34px; border: 1px solid #e3d6ea; border-radius: 8px; background: #fff; cursor: pointer; display: grid; place-items: center; padding: 0 5px; }
.le-seg-row button.is-on { border-color: #70388e; background: #f3e9f8; box-shadow: inset 0 0 0 1px #70388e; }
.le-seg-row button:disabled { opacity: .3; cursor: not-allowed; }
.le-seg-ic { position: relative; width: 100%; height: 14px; border-radius: 3px; background: #efe6f4; }
.le-seg-ic::before { content: ''; position: absolute; top: 0; bottom: 0; border-radius: 3px; background: #70388e; }
.le-sz-1::before { left: 0; width: 25%; } .le-sz-2::before { left: 0; width: 50%; } .le-sz-3::before { left: 0; width: 75%; } .le-sz-4::before { left: 0; width: 100%; }
.le-pl-1::before, .le-pl-2::before, .le-pl-3::before { width: 40%; }
.le-pl-1::before { left: 0; } .le-pl-2::before { left: 30%; } .le-pl-3::before { right: 0; }
.le-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 260px; overflow-y: auto; }
.le-pi { display: flex; flex-direction: column; gap: 3px; padding: 4px; border: 1px solid #ecdff3; border-radius: 8px; background: #fff; cursor: pointer; font: inherit; font-size: .7rem; text-align: left; color: #444; }
.le-pi img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 5px; }
.le-pi-ic { display: grid; place-items: center; aspect-ratio: 16 / 10; background: #f6f1f8; border-radius: 5px; color: #70388e; font-weight: 700; }
.le-pi-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.le-pi.is-on { border-color: #70388e; box-shadow: inset 0 0 0 2px #70388e; }
.le-up { margin-top: 10px; } .le-up input { font: inherit; font-size: .82rem; }
.le-note { white-space: pre-line; }
.le-sl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.le-sl li { display: flex; align-items: center; gap: 6px; font-size: .78rem; }
.le-sl img { width: 46px; height: 30px; object-fit: cover; border-radius: 4px; }
.le-sl span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 960px) { .le { grid-template-columns: minmax(0, 1fr); } .le-side { position: static; max-height: none; } .le-canvas { padding: 16px; } }
.btn:disabled { opacity: .45; cursor: default; }
.ed-people { margin: 16px 0; }
.ed-people > summary { list-style: none; display: inline-block; }
.ed-people > summary::-webkit-details-marker { display: none; }
.ed-invite { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; margin: 12px 0 6px; padding: 14px; background: #fff; border: 1px solid #eee4dc; border-radius: 12px; }
.ed-invite label { margin: 0; font-size: .85rem; }
.ed-invite input, .ed-invite select { min-height: 40px; padding: 8px 10px; }
.ed-here { margin: -6px 0 14px; }
.ed-course { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.ed-course-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.ed-course-h .over { margin: 0; }
.ed-course .ed-add { padding: 0; }
.ed-settings { margin: 10px 0; }
.ed-settings > summary { display: inline-block; }
.le-ph { margin: 6px 0; color: #9a8ea3; font-style: italic; }
.hdr-nav a, .hdr-out { white-space: nowrap; }
@media (max-width: 440px) { .hdr-logo img { width: 108px; } .hdr-nav { gap: 10px; } }   /* менеджерка: лого + 3 пункти вміщаються в 375 px */

/* Панель «Додати в урок» завжди видно (слово Івана 17.11.2026): гортаються лише налаштування під нею. */
.le-side { overflow: hidden; height: calc(100vh - 88px); }
.le-side > .le-box:first-child { flex: none; padding: 10px; }
.le-side > .le-box:first-child .le-h { margin-bottom: 6px; font-size: .9rem; }
.le-pal button { flex-direction: row; justify-content: flex-start; gap: 6px; padding: 7px 8px; font-size: .76rem; }
.le-pal .ico-k { flex: none; width: 16px; height: 12px; }
.le-pal .ico-k-video, .le-pal .ico-k-audio { width: 12px; height: 12px; }
.le-hint { display: none; }
#le-props { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.le-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.le-pi img { max-height: 70px; }
@media (max-width: 960px) {
  .le-side { height: auto; overflow: visible; }
  .le-side > .le-box:first-child { position: sticky; top: 60px; z-index: 30; box-shadow: 0 6px 16px rgba(60, 30, 80, .12); }
  #le-props { overflow: visible; }
}
.wrap.is-editor { padding-bottom: 16px; }
@media (min-width: 961px) {
  .is-editor .le { min-height: calc(100vh - 110px); }
  .is-editor .le-side { top: 72px; height: calc(100vh - 92px); }
}
.le-pal button { flex-direction: column; justify-content: center; gap: 3px; padding: 6px 2px; font-size: .74rem; line-height: 1.15; overflow-wrap: normal; word-break: keep-all; }
/* Панель складників ліворуч від уроку (слово Івана 17.11.2026). */
@media (min-width: 961px) { .le { grid-template-columns: 340px minmax(0, 1fr); } .le-side { order: -1; } }

/* Без спливних смужок і зсувів (слово Івана 17.11.2026): рамка є завжди, лише змінює колір; зони вставки не ростуть. */
.eb-bar { display: none !important; }
.eb { cursor: pointer; border: 1px solid transparent; outline: 0; }
.eb:hover { border-color: #f0e6f5; }
.eb.is-sel { border-color: #b38bc6; box-shadow: none; outline: 2px solid #efe2f6; outline-offset: 0; }
.eb[draggable="true"] { cursor: grab; }
.is-dragging .ez, .is-dragging .ez.is-on { height: 8px; outline: 0; }
.is-dragging .ez.is-on { background: #b38bc6; }
.is-dragging .ez.is-on span { display: none; }
.le-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; }
.le-acts .eb-btn { height: 30px; padding: 0 10px; }
.le-acts .eb-btn:disabled { opacity: .35; cursor: default; }
/* Верх відео чи картинки збоку — врівень із верхом великих літер першого рядка тексту (слово Івана 17.11.2026). */
.bx.pl-1:not(.sz-4), .bx.pl-3:not(.sz-4) { margin-top: calc((1.55em - 1em) / 2 + .14em); }
.eb.eb-media.bx.pl-1:not(.sz-4), .eb.eb-media.bx.pl-3:not(.sz-4) { margin-top: calc((1.55em - 1em) / 2 + .14em + 4px); }   /* у редакторі текст має ще й рамку з відступом */
.ed-btn.ed-edit { background: var(--brand-color, #70388e); color: #fff; border-color: var(--brand-color, #70388e); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.ed-btn.ed-edit:hover { background: #543a62; }

/* Редактор «як документ» (specs/004): одна смуга кнопок угорі, ліворуч зміст і налаштування, праворуч урок як у учасниці.
   Нічого не спливає над уроком і нічого не зсувається: вибір вставки — лише колір рамки. */
.de-bar { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; padding: 8px 10px; background: #fff; border: 1px solid #eee4dc; border-radius: 12px; box-shadow: 0 4px 12px rgba(60, 30, 80, .06); }
.de-grp { display: flex; flex-wrap: nowrap; gap: 4px; padding-right: 10px; border-right: 1px solid #f0e6f5; }
.de-grp:last-child { border-right: 0; padding-right: 0; }
.de-grp [data-cmd] { font: inherit; font-size: .84rem; height: 32px; padding: 0 10px; border: 1px solid #e3d6ea; border-radius: 8px; background: #fff; color: #5a3570; cursor: pointer; white-space: nowrap; }
.de-grp [data-cmd]:hover { background: #f6eff9; }
.de-end { margin-left: auto; align-items: center; gap: 8px; }
.de { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.de-side { position: sticky; top: 62px; height: calc(100vh - 76px); display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.de-outline-box { flex: 0 1 auto; max-height: 40%; overflow-y: auto; padding: 10px 12px; }
.de-outline-box .le-h { margin-bottom: 6px; font-size: .9rem; }
.de-outline { list-style: none; margin: 0; padding: 0; }
.de-outline li { margin: 0; }
.de-outline li.is-sub { padding-left: 14px; }
.de-outline button { display: block; width: 100%; text-align: left; font: inherit; font-size: .82rem; padding: 3px 6px; border: 0; border-radius: 6px; background: none; color: #444; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.de-outline li:not(.is-sub) button { font-weight: 600; color: #222; }
.de-outline button:hover { background: #f6eff9; }
#de-panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.de-page { min-height: calc(100vh - 140px); }
.doc { outline: 0; font-size: 1rem; line-height: 1.55; color: #444; min-height: 200px; caret-color: #70388e; }
.doc::after { content: ''; display: block; clear: both; }
.doc > p { margin: 0 0 1em; }
.doc > ul:not(.elist) { margin: 0 0 .65em; padding-left: 1.3em; }
.doc a { color: #70388e; }
.doc .atom { position: relative; cursor: pointer; user-select: none; -webkit-user-select: none; outline: 2px solid transparent; outline-offset: 3px; border-radius: 12px; }
.doc .atom:hover { outline-color: #f0e6f5; }
.doc .atom.is-sel { outline-color: #b38bc6; }
.doc .atom * { pointer-events: none; }                /* у редакторі відео й аудіо не грають — клік вибирає вставку */
.doc .atom:not(.bx) { margin: 0 0 1em; }
.doc .atom:not(.bx) > p { margin: 0; }
.doc .atom.note { padding: 8px 12px; background: #fff7e6; border: 1px dashed #e0b25c; font-size: .88rem; color: #6a4b12; }
.doc h2.b-heading:first-child, .doc h3.b-sub:first-child { margin-top: .4em; }
@media (max-width: 960px) {
  .de { grid-template-columns: minmax(0, 1fr); }
  .de-side { position: static; height: auto; }
  .de-outline-box { max-height: none; }
  #de-panel { overflow: visible; }
  .de-bar { overflow-x: auto; flex-wrap: nowrap; }
}
.cmain.de-page { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }   /* у редакторі текст виділяється й редагується */
.cmain.de-page::after { display: none; }
.de-bar { gap: 6px 8px; padding: 7px 8px; }
.de-grp { gap: 3px; padding-right: 8px; }
.de-grp [data-cmd] { font-size: .8rem; height: 30px; padding: 0 8px; }
.de-bar .btn { min-height: 30px; height: 30px; padding: 0 14px; font-size: .84rem; }
.de-end { gap: 6px; }
/* чужі файли (specs/004, T441): попередження з галочкою в меню ліворуч */
.de-ext { padding: 10px 12px; background: #fff7e6; border: 1px solid #e0b25c; border-radius: 8px; margin: 0 0 12px; }
.de-ext ul { margin: 4px 0 8px; padding-left: 18px; word-break: break-all; }
.le-check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.le-check input { margin-top: 3px; }
/* Картки «Мої курси» / «Інші курси» (слово Івана 17.11.2026): обкладинка модуля вгорі (немає — фірмова заглушка з логотипом);
   дві кнопки поруч — у лівої гострий кут зліва вгорі, у правої дзеркально справа вгорі. */
.card.course { padding-top: 0; overflow: hidden; }
.course .cover { margin: 0 -20px 16px; aspect-ratio: 16 / 9; background: #f6eff9; }
.course .cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.course .cover.is-empty { display: grid; place-items: center; background: linear-gradient(135deg, #70388e, #543a62); }
.course .cover.is-empty img { width: 44%; height: auto; object-fit: contain; opacity: .9; }
.grid:has(> .course) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.actions.pair { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; }
.actions.pair .btn { display: flex; align-items: center; justify-content: center; padding-left: 16px; padding-right: 16px; white-space: nowrap; }
@media (max-width: 440px) { .actions.pair .btn { padding-left: 10px; padding-right: 10px; font-size: .9rem; } }
.actions.pair .btn + .btn:not(.wide) { border-radius: 25px 7px 25px 25px; }
.actions.pair .btn.wide { grid-column: 1 / -1; }
/* Шапка редактора уроку (слово Івана 17.11.2026): окремого напису «Збережено» немає — стан показує сама кнопка
   (фіолетова «Зберегти» → зелена «Збережено»), ширина однакова в усіх станах; «Опублікувати» й «Зберегти» — пара з
   дзеркальними гострими кутами; смужка з кнопками лишається вгорі під час прокрутки. Червоний напис — лише для помилок. */
.le-top { position: sticky; top: 60px; z-index: 35; margin: 0 -8px 12px; padding: 8px; background: var(--page-bg, #fffaf6); }
@media (min-width: 961px) { .is-editor .le-side, .le-side { top: 132px; max-height: calc(100vh - 144px); height: calc(100vh - 144px); } }
.le-status:empty { display: none; }
#le-save { min-width: 9.2em; }
#le-publish + #le-save { border-radius: 25px 7px 25px 25px; }
#le-save.is-saved, #le-save.is-saved:disabled { opacity: 1; background: #2e7d32; border-color: #2e7d32; color: #fff; cursor: default; }
.le-pick > p { grid-column: 1 / -1; }
/* Шапка редактора одним рядком (слово Івана 17.11.2026): над меню — шлях, скорочений «…» у межах колонки меню;
   над уроком — назва уроку й кнопки. */
.le-top .crumbs { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.le-top h1 { min-width: 0; }
@media (min-width: 961px) {
  .le-top { display: grid; grid-template-columns: 340px minmax(0, 1fr) auto; column-gap: 20px; align-items: center; }
}
@media (max-width: 960px) { .le-top .crumbs { flex-basis: 100%; } }
/* Меню «Додати в урок» (слово Івана 17.11.2026): текстові складники — самим шрифтом, інші — значок зліва від назви. */
.le-pal button, .le-side .le-pal button { flex-direction: row; justify-content: flex-start; align-items: center; gap: 6px; min-height: 38px; padding: 6px 8px; line-height: 1.1; text-align: left; white-space: nowrap; }
.le-pal .pal-ico { flex: none; width: 18px; height: 18px; }
.le-pal .pal-heading { font-size: 1rem; font-weight: 800; color: #2f1a3d; }
.le-pal .pal-subheading { font-size: .84rem; font-weight: 700; color: #3f2650; }
.le-pal .pal-text { font-size: .8rem; font-weight: 400; color: #444; }
.le-pal button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Поле «Текст» без знаків ** (слово Івана 17.11.2026): виглядає як поле вводу, усередині — як в уроці. */
.le-rich { display: block; margin-top: 5px; min-height: 260px; max-height: 60vh; overflow-y: auto; padding: 8px 10px; font-weight: 400; font-size: .92rem; line-height: 1.5; color: #333; background: #fff; border: 1px solid #d5c9be; border-radius: 8px; outline: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.le-rich:focus { border-color: #b38bc6; box-shadow: 0 0 0 3px #f1e6f7; }
.le-rich a { color: var(--brand-color, #70388e); text-decoration: underline; }
.le-rich b, .le-rich strong { font-weight: 700; }
/* Писати прямо в уроці (слово Івана 17.11.2026): вибрана частина — поле на тому самому місці, у тому самому вигляді. */
.eb.is-inline { cursor: text; }
.eb-view .le-inl { pointer-events: auto; outline: 0; cursor: text; -webkit-user-select: text; user-select: text; }
.eb-view .le-inl:empty::before { content: attr(data-ph); color: #b3a7bb; font-weight: 400; }
.eb-view .le-rich { position: relative; min-height: 3em; max-height: none; overflow: visible;   /* overflow:auto робив поле окремою колонкою біля відео — текст переставав обтікати при редагуванні (слово Івана 19.11.2026) */
   margin: 0; padding: 2px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: inherit; line-height: inherit; color: inherit; }
.eb-view .le-rich:focus { box-shadow: none; }
.eb-view .le-rich.is-empty::before { content: attr(data-ph); position: absolute; top: 2px; left: 0; color: #b3a7bb; pointer-events: none; }
.eb-view .btn.le-inl { min-width: 8em; cursor: text; }
/* меню: напис не обрізається на вужчій колонці — значок менший, напис може перенестися */
.le-pal { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.le-pal button, .le-side .le-pal button { padding: 6px 6px; gap: 5px; white-space: normal; overflow-wrap: normal; word-break: normal; }
.le-pal .pal-ico { width: 16px; height: 16px; }
.le-pal button span { overflow: visible; text-overflow: clip; }
.le-pal .pal-heading { font-size: .92rem; } .le-pal .pal-subheading { font-size: .78rem; } .le-pal .pal-text { font-size: .76rem; }
.le-pal button, .le-side .le-pal button { padding: 6px 5px; }
/* Перетягування (слово Івана 17.11.2026): смужок між частинами не видно; лише одна фіолетова лінія там, куди стане. */
.ez, .is-dragging .ez, .is-dragging .ez.is-on { height: 6px; margin: 0; background: transparent; outline: 0; transition: none; }
.is-dragging .ez.is-on { background: #70388e; border-radius: 3px; }
.is-dragging .ez span { display: none; }
.le-canvas.is-dragging, .is-dragging { cursor: copy; }
/* Кнопки шапки редактора — як «Детальніше про курс» на сайті (слово Івана 17.11.2026): нижчі, 14 px, великі літери. */
.le-actions .btn { min-height: 0; height: auto; padding: 12px 26px; font-size: 14px; font-weight: 500; line-height: 1; text-transform: uppercase; letter-spacing: .02em; }
#le-save { min-width: 0; width: 158px; padding-left: 10px; padding-right: 10px; }
/* Панель під вибраною частиною уроку, як у Gmail (слово Івана 17.11.2026): оформлення тексту + дії з частиною. */
.le-fmt { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 8px 0 4px; padding: 4px 6px; background: #f4f1f8; border-radius: 22px; cursor: default; }
.le-fmt button { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px; font: inherit; font-size: .82rem; color: #3d2a4a; background: none; border: 0; border-radius: 16px; cursor: pointer; }
.le-fmt button svg { width: 18px; height: 18px; }
.le-fmt button:hover:not(:disabled) { background: #e7def0; }
.le-fmt button:disabled { opacity: .35; cursor: default; }
.le-fmt-sep { width: 1px; height: 20px; margin: 0 4px; background: #d6cbe0; }
.le-fmt-gap { flex: 1 1 8px; }
.le-fmt .le-act { padding: 0 10px; font-weight: 500; }
.le-fmt .le-act.is-del { color: #b3261e; }
.le-fmt .le-act.is-del:hover { background: #fbe9e7; }
.le-emo { position: absolute; z-index: 20; top: 100%; left: 40%; display: grid; grid-template-columns: repeat(6, 36px); gap: 2px; margin-top: 4px; padding: 6px; background: #fff; border: 1px solid #e3d6ea; border-radius: 12px; box-shadow: 0 8px 24px rgba(60, 30, 80, .15); }
.le-emo[hidden] { display: none; }
.le-emo button { width: 36px; height: 36px; font-size: 1.15rem; }
/* хрестик «прибрати» на частині — при наведенні й на вибраній */
.eb .eb-x { position: absolute; top: 4px; right: 4px; z-index: 5; display: none; width: 28px; height: 28px; padding: 0; font: 700 18px/26px sans-serif; color: #b3261e; background: #fff; border: 1px solid #f0d4d0; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.eb:hover .eb-x, .eb.is-sel .eb-x { display: block; }
.eb .eb-x:hover { background: #fbe9e7; }
.le-fmt .le-sz { min-width: 36px; color: #b9a3c9; }
.le-fmt .le-sz svg { width: 24px; height: 24px; }
.le-fmt .le-sz.is-on { color: #70388e; background: #fff; box-shadow: 0 0 0 1.5px #b38bc6; }
.le-fmt .le-act { padding: 0 6px; min-width: 32px; }
/* Оформлення тексту уроку (specs/005) — однакове в уроці й у редакторі. Лише фірмові шрифти, розміри й кольори. */
.cmain .text h2 { font-size: 1.25rem; font-weight: 700; margin: 1.4em 0 .5em; color: #222; clear: both; }
.cmain .text h3 { font-size: 1rem; font-weight: 700; margin: 1.3em 0 .45em; color: #333; clear: both; }
/* малий відступ — лише в першого заголовка кожного виду в уроці (позначає views/lesson.php), як було з окремими заголовками */
.cmain .lesson h2.is-first, .cmain .lesson h3.is-first { margin-top: .4em; }
.cmain .text ol { margin: 0 0 .65em; padding-left: 1.5em; }
.cmain .text li > ul, .cmain .text li > ol { margin: .2em 0 .2em; }
.cmain .text blockquote { margin: 0 0 .9em; padding: .55em 1em; border-left: 3px solid #b38bc6; background: #faf6fc; border-radius: 0 10px 10px 0; color: #4a3a55; }
.cmain .text blockquote p:last-child { margin-bottom: 0; }
.text .al-c { text-align: center; } .text .al-r { text-align: right; } .text .al-j { text-align: justify; }
.text .hy { -webkit-hyphens: auto; hyphens: auto; } .text .nohy { -webkit-hyphens: none; hyphens: none; }   /* переноси (слово Івана 19.11.2026) */
.text .ind-1 { margin-left: 1.5em; } .text .ind-2 { margin-left: 3em; } .text .ind-3 { margin-left: 4.5em; }
.text .ff-m, .le-rich font[face="ff-m"] { font-family: 'Edu Montserrat', sans-serif; }
.text .ff-c, .le-rich font[face="ff-c"] { font-family: 'Edu Comfortaa', sans-serif; }
.text .ff-l, .le-rich font[face="ff-l"] { font-family: 'Edu Lora', Georgia, serif; }
.text .ff-cv, .le-rich font[face="ff-cv"] { font-family: 'Edu Caveat', cursive; font-size: 1.3em; line-height: 1.3; }
.text .ff-i, .le-rich font[face="ff-i"] { font-family: 'Edu Inter', sans-serif; }
.text .fs-s, .le-rich font[size="1"], .le-rich font[size="2"] { font-size: .85em; }
.text .fs-l, .le-rich font[size="4"] { font-size: 1.25em; }
.text .fs-xl, .le-rich font[size="5"], .le-rich font[size="6"], .le-rich font[size="7"] { font-size: 1.6em; line-height: 1.3; }
.text .c-1 { color: #70388e; } .text .c-2 { color: #4b2463; } .text .c-3 { color: #c2185b; } .text .c-4 { color: #b5562b; } .text .c-5 { color: #2e7d32; } .text .c-6 { color: #1f5fa8; }
.text .hl-1 { background: #fff1a8; border-radius: 3px; padding: 0 .1em; } .text .hl-2 { background: #f1e3f7; border-radius: 3px; padding: 0 .1em; }
/* Панель як у Gmail (specs/005): випадні меню, зразки кольорів, A− A+. */
.le-menu { position: relative; display: inline-flex; }
.le-fmt .le-menu-b { gap: 2px; padding: 0 8px; }
.le-menu-t { font-size: .82rem; font-weight: 500; }
.le-menu-b svg { width: 18px; height: 18px; }
.le-caret { font-size: .6rem; opacity: .7; }
.le-pop { position: absolute; z-index: 30; top: 100%; left: 0; min-width: 170px; margin-top: 4px; padding: 6px; background: #fff; border: 1px solid #e3d6ea; border-radius: 12px; box-shadow: 0 8px 24px rgba(60, 30, 80, .15); }
.le-pop[hidden] { display: none; }
.le-pop.is-wide { min-width: 220px; }
.le-fmt .le-pop-i { display: flex; justify-content: flex-start; gap: 8px; width: 100%; height: auto; min-height: 32px; padding: 4px 10px; border-radius: 8px; text-align: left; white-space: nowrap; }
.le-pop-i svg { width: 18px; height: 18px; flex: none; }
.le-pop hr { margin: 4px 2px; border: 0; border-top: 1px solid #eee4f2; }
.le-pop-row { display: flex; align-items: center; }
.le-pop-row .le-pop-i { flex: 1; }
.le-fmt .le-pop-x { min-width: 26px; height: 26px; color: #b3261e; font-size: 1.1rem; }
.le-pop .text h2, .le-pop .text h3 { margin: 0; font-size: 1rem; }
.le-sw { display: inline-block; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.le-sw.is-none { background: linear-gradient(135deg, #fff 45%, #b3261e 46%, #b3261e 54%, #fff 55%); }
.le-aa { font-weight: 700; font-size: .95rem; } .le-aa small { font-size: .7rem; }
.le-a-col { font-weight: 700; border-bottom: 3px solid #70388e; line-height: 1.1; }
.le-a-mark { font-weight: 700; background: #fff1a8; padding: 0 3px; border-radius: 3px; }
.le-rich font[face="ff-none"] { font-family: inherit; }
.le-rich font[size="3"] { font-size: 1em; }
.le-rich p { margin: 0 0 .65em; }
.le-canvas .text h2 { font-size: 1.25rem; font-weight: 700; margin: 1.1em 0 .5em; color: #222; }
.le-canvas .text h3 { font-size: 1rem; font-weight: 700; margin: 1em 0 .45em; color: #333; }
.le-canvas .text > h2:first-child, .le-canvas .text > h3:first-child { margin-top: .2em; }
.le-canvas .text ol { padding-left: 1.5em; } .le-canvas .text ul:not(.elist) { padding-left: 1.3em; }
.le-canvas .text blockquote { margin: 0 0 .9em; padding: .55em 1em; border-left: 3px solid #b38bc6; background: #faf6fc; border-radius: 0 10px 10px 0; color: #4a3a55; }
.le-pal button.pal-text { font-size: .76rem; font-weight: 600; color: #5a3570; }
.le-fmt .le-pop-i { font-size: .95rem; }
.le-fmt .le-pop-i span[style*="Caveat"] { font-size: 1.25rem; }
/* відступ сильніший за загальний «абзац уроку» (.cmain .text p { margin: … }) — інакше на сторінці учасниці зникав */
.cmain .text .ind-1, .le-canvas .text .ind-1 { margin-left: 1.5em; }
.cmain .text .ind-2, .le-canvas .text .ind-2 { margin-left: 3em; }
.cmain .text .ind-3, .le-canvas .text .ind-3 { margin-left: 4.5em; }
/* Caveat дрібний сам по собі: розміри для нього — з тією ж поправкою */
.text .ff-cv.fs-s { font-size: 1.1em; } .text .ff-cv.fs-l { font-size: 1.6em; } .text .ff-cv.fs-xl { font-size: 2.1em; }
/* редактор на телефоні: закріплена шапка компактніша (шлях — лише на ширшому екрані) */
@media (max-width: 640px) {
  .le-top { padding: 6px 8px; gap: 6px 10px; }
  .le-top .crumbs { display: none; }
  .le-top h1 { font-size: 1.1rem; }
  .le-actions .btn { padding: 10px 14px; font-size: 13px; }
  #le-save { width: 130px; }
}
/* Панель під довгим текстом завжди видно (слово Івана 17.11.2026: «треба щоб було видно постійно»):
   прилипає до низу екрана, поки частина уроку не скінчиться; меню тоді відкриваються вгору. */
.le-canvas .le-fmt { position: sticky; bottom: 8px; z-index: 20; box-shadow: 0 -2px 12px rgba(60, 30, 80, .10); }
.le-pop.is-up { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 4px; }

/* Перемикання між уроками в конструкторі (слово Івана 19.11.2026): ‹ Попередній · Урок N з M ▾ · Наступний › */
.le-lnav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.le-lnav .is-off { opacity: .4; pointer-events: none; }
.le-jump { position: relative; }
.le-jump > summary { list-style: none; cursor: pointer; }
.le-jump > summary::-webkit-details-marker { display: none; }
.le-jump-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; width: min(380px, 86vw); max-height: min(70vh, 560px); overflow-y: auto;
  background: #fff; border: 1px solid #eee4dc; border-radius: 14px; box-shadow: 0 12px 32px rgba(60, 30, 80, .16); padding: 8px 6px; }
.le-jump-sec { margin: 8px 8px 4px; font-size: .78rem; font-weight: 700; color: #7a6a86; text-transform: none; }
.le-jump-list ol { list-style: none; margin: 0; padding: 0; }
.le-jump-list a { display: block; padding: 7px 10px; border-radius: 8px; color: #333; text-decoration: none; font-size: .9rem; line-height: 1.3; }
.le-jump-list a:hover { background: #f6eff8; }
.le-jump-list a[aria-current] { background: #efe3f5; font-weight: 700; color: #5b2d7a; }

/* Значки дій у меню модуля (слово Івана 19.11.2026) */
.ed-btn.ed-i { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 32px; padding: 0; }
.ed-ico { width: 18px; height: 18px; }
.ed-btn.ed-edit.ed-i { width: 40px; }
.ed-eye.is-hidden { color: #a99bb3; background: #f7f3f9; }

/* Керування — компактно (слово Івана 19.11.2026): нижчі поля й кнопки; учасниці лишаються великі для телефона */
.is-manage input[type=text], .is-manage input[type=email], .is-manage input[type=password], .is-manage input[type=tel],
.is-manage input[type=search], .is-manage input[type=date], .is-manage select { padding: 6px 10px; min-height: 36px; border-radius: 8px; }
.is-manage .btn { padding: 6px 16px; min-height: 36px; font-size: .95rem; }
.is-manage .btn.sm { padding: 4px 12px; min-height: 32px; font-size: .88rem; }
.is-manage label { margin-bottom: 10px; }
.is-manage .card { padding: 16px 18px; }
.is-manage .card h2 { font-size: 1.15rem; margin: 0 0 10px; }
.row-form { display: flex; gap: 8px; align-items: center; }
.row-form input { margin: 0 !important; flex: 1 1 auto; min-width: 0; }
.row-form .btn { flex: none; }

/* Таблиця оплат: дата, учасниця, сума й стан — в один рядок; переноситься лише назва (слово Івана 19.11.2026) */
.pay-table td, .pay-table th { white-space: nowrap; padding-top: 8px; padding-bottom: 8px; }
.pay-table td:nth-child(3) { white-space: normal; min-width: 220px; }
.mail-card { max-width: 560px; margin-left: 0; }
.is-manage h2 { margin-top: 18px; }
.ed-btn.is-blank { visibility: hidden; }
/* Верх конструктора уроку одним рядком (слово Івана 19.11.2026): шлях · назва · перемикання уроків … праворуч «Опублікувати / Збережено» */
@media (min-width: 961px) {
  .le-top { grid-template-columns: 340px minmax(0, auto) auto minmax(max-content, 1fr); }
  .le-top .le-actions { justify-self: end; }
}
@media (max-width: 960px) { .le-top { justify-content: flex-start; } .le-top .le-actions { margin-left: auto; } }
/* Перемикання уроків не розсипається на два рядки, коли поруч «Опублікувати» (чернетка): назва уроку скорочується «…» */
.le-lnav { flex-wrap: nowrap; white-space: nowrap; }
@media (min-width: 961px) {
  .le-top h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .le-top { grid-template-columns: 340px minmax(0, auto) max-content minmax(max-content, 1fr); column-gap: 14px; }
}
.le-lnav > a.btn, .le-lnav > span.btn { min-width: 34px; padding-left: 0; padding-right: 0; font-size: 1.15rem; line-height: 1; }
.tt-u { text-transform: uppercase; } .tt-l { text-transform: lowercase; }   /* ВЕЛИКІ / малі в тексті уроку */
/* Обтікання в конструкторі (слово Івана 19.11.2026: «відео з обтіканням не клікається»): блок, що стоїть збоку,
   має бути НАД сусіднім текстом — інакше рамка тексту (на всю ширину, під відео) перехоплює клацання. */
.le-canvas .eb.bx.pl-1:not(.sz-4), .le-canvas .eb.bx.pl-3:not(.sz-4) { z-index: 3; }

/* Розміщення й розмір картинки/відео — два чіткі рядки з підписами (слово Івана 19.11.2026) */
.le-fmt .le-mt { flex: 1 1 100%; display: grid; gap: 6px; padding: 2px 2px 6px; }
.le-mt-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.le-mt-l { flex: 1 1 100%; font-size: .72rem; font-weight: 600; color: #8a7896; text-transform: uppercase; letter-spacing: .04em; margin-bottom: -2px; }
.le-fmt .le-mt { grid-template-columns: repeat(auto-fit, minmax(210px, max-content)); column-gap: 22px; row-gap: 8px; }
.le-mt-row { flex-wrap: wrap; row-gap: 3px; } .le-mt-row .le-mt-l { flex: 0 0 100%; margin: 0; }
.le-fmt .le-mt-b { padding: 0 9px; font-size: .78rem; white-space: nowrap; }
.le-fmt .le-mt-b { display: inline-flex; align-items: center; gap: 6px; width: auto; min-width: 40px; height: 32px; padding: 0 12px;
  font: inherit; font-size: .82rem; font-weight: 600; color: #5a3570; background: #fff; border: 1px solid #e3d6ea; border-radius: 8px; cursor: pointer; }
.le-fmt .le-mt-b:hover:not(:disabled) { background: #f6eff9; border-color: #c9b1d8; }
.le-fmt .le-mt-b.is-on { color: #fff; background: #70388e; border-color: #70388e; }
.le-fmt .le-mt-b:disabled { opacity: .4; cursor: default; }
.le-fmt .le-mt-b svg { width: 28px; height: 18px; flex: none; }

/* Назва уроку між стрілками ‹ › — сама і є вибором іншого уроку (слово Івана 19.11.2026) */
@media (min-width: 961px) { .le-top { grid-template-columns: minmax(0, 340px) minmax(0, max-content) max-content; justify-content: space-between; } }
.le-lnav { min-width: 0; }
.le-jump { min-width: 0; }
.le-jump-t { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 10px; border-radius: 10px; cursor: pointer; }
.le-jump-t:hover { background: #f6eff9; }
.le-jump-t h1 { margin: 0; font-size: 1.5rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.le-jump-t .le-jump-ch { flex: none; width: 20px; height: 20px; color: #70388e; }
.le-jump[open] .le-jump-ch { transform: rotate(180deg); }
.le-jump-t .tag { flex: none; }
.le-jump-list { right: auto; left: 0; }
.le-actions .le-view { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.le-actions .le-view svg { width: 16px; height: 16px; flex: none; }
.le-pal .pal-link { grid-column: span 2; }   /* «Кнопка з посиланням» в один рядок */

/* Панель картинки/відео — якомога менше рядків (слово Івана 19.11.2026): усе в один рядок, підписи перед кнопками,
   кнопки ↑ ↓ ⧉ 🗑 у тому ж рядку; у вузькому блоці переноситься лише те, що не вміщається. */
.le-fmt .le-mt { display: flex; flex-wrap: wrap; align-items: center; flex: 0 1 auto; gap: 6px 16px; padding: 2px 2px; }
.le-mt-row { flex-wrap: nowrap; gap: 4px; }
.le-mt-row .le-mt-l { flex: none; margin: 0 2px 0 0; font-size: .68rem; }
.le-fmt .le-mt-b { height: 30px; padding: 0 8px; }
.le-fmt .le-mt-b svg { width: 24px; height: 16px; }
.le-mt-row .le-mt-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* підписи — лише для читалки екрана; кнопки самі зрозумілі, підказка при наведенні */
.le-mt-row + .le-mt-row { padding-left: 14px; border-left: 1px solid #ddd0e6; }
.le-fmt .le-mt { gap: 6px 12px; }
.le-fmt .le-mt-row + .le-mt-row { margin-left: -2px; }
.le-fmt .le-mt { display: contents; }   /* групи — прямо в смузі кнопок, щоб ↑ ↓ ⧉ 🗑 ставали в той самий рядок */
/* Довга назва уроку між стрілками не вилазить за поля — скорочується «…» (слово Івана 19.11.2026) */
.le-top .le-lnav { min-width: 0; overflow: hidden; }
.le-top .le-lnav > a, .le-top .le-lnav > span { flex: none; }
.le-top .le-jump { flex: 0 1 auto; min-width: 0; }
.le-top .le-jump > summary { min-width: 0; max-width: 100%; }
.le-top .le-jump[open] { overflow: visible; }
.le-top .le-lnav:has(.le-jump[open]) { overflow: visible; }
/* «Переглянути»: зміст курсу ліворуч, урок праворуч — як в учасниці */
.le-pv { margin-top: 4px; }
/* × на картинці у виборі — видалити з бібліотеки (слово Івана 19.11.2026) */
.le-pi-w { position: relative; min-width: 0; }
.le-pi-w > .le-pi { width: 100%; }
.le-pi-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; font: inherit; font-size: 15px; line-height: 22px;
  color: #fff; background: rgba(60, 30, 80, .72); cursor: pointer; opacity: 0; transition: opacity .12s; }
.le-pi-w:hover .le-pi-x, .le-pi-x:focus-visible { opacity: 1; }
.le-pi-x:hover { background: #b3261e; }
@media (hover: none) { .le-pi-x { opacity: .85; } }
.le-top .crumbs { padding: 0 11px; box-sizing: border-box; }   /* шлях рівно з кнопками панелі під ним, не до краю (слово Івана 19.11.2026) */
/* ‹ назва › — рівно з лівим краєм поля уроку (слово Івана 19.11.2026): верх у тій самій сітці, що й панель + урок під ним */
@media (min-width: 961px) {
  .le-top { grid-template-columns: 340px minmax(0, 1fr) max-content; column-gap: 20px; justify-content: normal; }
  .le-top .le-lnav { justify-self: start; }
}
@media (min-width: 961px) { .le-pv.cframe { grid-template-columns: 340px minmax(0, 1fr); column-gap: 20px; } }   /* перегляд у тій самій сітці, що й верх і редактор */
