.school-dashboard {display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:32px;margin-top:32px}
.school-dashboard>section,.studio-curriculum,.school-course-band {min-width:0}
.school-list-row {display:flex;width:100%;align-items:center;gap:14px;border:0;border-bottom:1px solid var(--line);padding:18px 12px;background:var(--surface);color:var(--text);text-align:left;font:inherit;border-radius:0;min-height:72px}
button.school-list-row {cursor:pointer}
button.school-list-row:hover {background:var(--surface-2)}
.school-list-row>span:not(.lesson-no):not(.status-badge) {flex:1;min-width:0}
.school-list-row strong,.school-list-row small {display:block;overflow-wrap:anywhere;line-height:1.5}
.school-list-row small {font-size:12px;color:var(--text-soft);margin-top:4px}
.school-list-row>svg {width:20px;height:20px;flex-shrink:0;color:var(--primary)}
.school-search {display:flex;align-items:center;gap:10px;min-width:0;max-width:500px;background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:0 12px;min-height:42px}
.school-search svg {width:18px;flex-shrink:0;color:var(--text-soft)}
.school-search input {border:0;background:none;box-shadow:none;outline:none;min-width:0;width:100%;font:inherit;color:var(--text);padding:10px 0}
.school-search:focus-within {outline:2px solid var(--primary)}
.school-filter {display:flex;gap:12px;margin:18px 0}
.school-filter .school-search {flex:1}
.school-filter select {border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:6px;padding:8px 12px;font:inherit;max-width:180px}
.school-entry {display:flex;gap:18px;align-items:center;padding:20px 16px;border-bottom:1px solid var(--line);background:var(--surface)}
.school-entry-copy {flex:1;min-width:0;overflow-wrap:anywhere}
.school-entry h3 {font-size:16px;margin:0 0 6px;line-height:1.5}
.school-entry p,.school-entry small {margin:0;display:block;color:var(--text-soft);font-size:13px;line-height:1.5;white-space:pre-wrap}
.school-entry a {display:inline-flex;align-items:center;gap:8px;margin-top:8px;font-size:13px}
.school-entry a svg {width:16px}
.school-members {border:1px solid var(--line);border-radius:6px;max-height:240px;overflow:auto;margin:0 0 20px;padding:12px}
.school-members legend {font-size:13px;font-weight:700}
.school-members label {display:flex;align-items:center;gap:12px;padding:8px 0;font-size:14px}
.school-members input {width:16px;height:16px;flex-shrink:0}
.school-members small {display:block;color:var(--text-soft);font-size:12px;overflow-wrap:anywhere}
.school-members span {min-width:0;overflow-wrap:anywhere}
.school-task-list {margin-bottom:24px}
.school-course-band {margin-bottom:32px}
.school-course-band>h3 {font-size:18px;margin:0 0 16px}
.studio-top {display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:0 0 18px;flex-wrap:wrap}
.studio-title {flex:1;min-width:180px;max-width:100%}
.studio-title h2 {font-size:19px;line-height:1.45;margin:0;overflow-wrap:anywhere}
.studio-title>span {color:var(--text-soft);font-size:12px}
.studio-mode {display:flex;border:1px solid var(--line);padding:3px;border-radius:6px;background:var(--surface-2)}
.studio-mode button {display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border:0;background:transparent;color:var(--text-soft);font:inherit;font-size:12px;border-radius:4px;cursor:pointer}
.studio-mode button[aria-selected=true] {color:var(--primary);background:var(--surface);font-weight:700}
.studio-mode svg {width:16px;height:16px}
.studio-layout {display:grid;grid-template-columns:minmax(0,1fr) 248px;gap:28px;align-items:start;padding-top:24px}
.studio-canvas {min-width:0;background:var(--surface);padding:24px 28px;min-height:520px}
.studio-section-head {display:flex;align-items:center;gap:16px;margin-bottom:16px}
.studio-section-head h2 {flex:1;min-width:0;font-size:23px;line-height:1.45;overflow-wrap:anywhere;margin:0}
.studio-block {border-bottom:1px solid var(--line);padding:12px 0 24px;min-width:0}
.studio-block-content {min-width:0;overflow-wrap:anywhere;line-height:1.7}
.studio-block-content h3 {font-size:18px;line-height:1.5;margin:0 0 12px}
.studio-block-tools {display:flex;gap:8px;justify-content:space-between;align-items:center;margin-bottom:10px;flex-wrap:wrap}
.studio-block-tools>span:last-child {display:flex;gap:2px;flex-wrap:wrap}
.studio-block-tools .icon-btn,.studio-section-tools .icon-btn {height:30px;width:30px;min-width:30px;padding:6px}
.studio-block-tools .icon-btn svg,.studio-section-tools .icon-btn svg {width:16px;height:16px}
.studio-block-kind {font-size:11px;text-transform:uppercase;color:var(--text-soft);font-weight:700}
.studio-add-block {display:flex;align-items:center;justify-content:center;gap:10px;background:var(--primary-soft);color:var(--primary);border:1px dashed var(--primary);border-radius:6px;min-height:48px;width:100%;margin-top:24px;padding:12px;font:inherit;cursor:pointer}
.studio-add-block svg {width:20px;flex-shrink:0}
.studio-sections {min-width:0;position:sticky;top:100px}
.studio-sections>h3 {font-size:15px;margin:0 0 18px}
.studio-section-row {margin-bottom:8px;border-bottom:1px solid var(--line);padding-bottom:8px}
.studio-section-link {display:flex;width:100%;align-items:flex-start;gap:10px;padding:12px;border:0;border-radius:6px;background:transparent;color:var(--text);text-align:left;cursor:pointer;font:inherit}
.studio-section-link.active {background:var(--primary-soft);color:var(--primary)}
.studio-section-link strong {min-width:0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.studio-section-link>span {font-size:12px;line-height:1.6}
.studio-section-tools {display:flex;justify-content:flex-end}
.studio-outline-meta {display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-soft);margin-top:24px;border-top:1px solid var(--line);padding-top:16px}
.studio-video {display:block;width:100%;aspect-ratio:16/9;min-height:0;border:0;background:#111;object-fit:contain}
.studio-image {display:block;max-width:100%;max-height:600px;object-fit:contain;margin:0 auto}
.studio-block-content audio,.studio-student-block audio {width:100%;max-width:100%}
.studio-resource {display:flex;gap:12px;align-items:center;padding:14px 0;overflow-wrap:anywhere}
.studio-resource>span {min-width:0;flex:1}
.studio-resource>svg {width:20px;flex-shrink:0}
.studio-quiz-summary {display:flex;gap:18px;align-items:center;background:var(--cyan-soft);padding:20px;border-radius:6px}
.studio-quiz-summary>svg {width:30px;height:30px;flex-shrink:0;color:var(--cyan)}
.studio-quiz-summary p {margin:0;font-size:13px;color:var(--text-soft)}
.studio-prose {white-space:normal;line-height:1.7}
.studio-prose p {margin:0 0 12px}
.studio-note {border-left:3px solid var(--primary);padding:12px 16px;background:var(--primary-soft)}
.studio-prose.ql-container {font:inherit;border:0;height:auto}
.studio-prose .ql-editor {padding:0;overflow:visible;white-space:pre-wrap;line-height:1.7}
.studio-note .ql-editor {padding:12px 16px}
.studio-prose .ql-editor h1 {font-size:25px}
.studio-prose .ql-editor h2 {font-size:21px}
.studio-prose .ql-editor h3 {font-size:18px}
.studio-rich-field{min-width:0;margin:18px 0}
.studio-rich-editor{width:100%;min-width:0;min-height:180px;max-height:450px;overflow-y:auto;overflow-x:hidden;font:inherit;background:var(--surface);color:var(--text)}
#studioRichEditor{min-height:240px;margin-bottom:20px}
.studio-gallery-rich-editor{min-height:150px;max-height:300px}
.studio-rich-editor .ql-editor{min-height:150px;overflow-wrap:anywhere}
.studio-gallery-rich-editor .ql-editor{min-height:110px}
.ql-toolbar.ql-snow,.ql-container.ql-snow {border-color:var(--line)}
.ql-toolbar.ql-snow{display:flex;flex-wrap:wrap;align-items:center;gap:3px;min-width:0;max-width:100%}
.ql-toolbar.ql-snow .ql-formats{display:inline-flex;align-items:center;margin-right:7px}
.ql-toolbar.ql-snow .ql-picker.ql-font{width:150px}
.ql-toolbar.ql-snow .ql-picker.ql-size{width:95px}
.ql-snow .ql-stroke {stroke:var(--text-soft)}
.ql-snow .ql-fill {fill:var(--text-soft)}
.ql-snow .ql-picker {color:var(--text)}
.ql-snow .ql-picker-options {background:var(--surface)}
.ql-snow .ql-picker.ql-header .ql-picker-label::before,.ql-snow .ql-picker.ql-header .ql-picker-item::before{content:'Абзац'}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before{content:'Заголовок 1'}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before{content:'Заголовок 2'}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before{content:'Заголовок 3'}
.ql-snow .ql-picker.ql-font .ql-picker-label::before,.ql-snow .ql-picker.ql-font .ql-picker-item::before{content:'Обычный'}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="arial"]::before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="arial"]::before{content:'Arial';font-family:Arial,sans-serif}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="times"]::before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="times"]::before{content:'Times New Roman';font-family:'Times New Roman',serif}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="georgia"]::before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="georgia"]::before{content:'Georgia';font-family:Georgia,serif}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before{content:'С засечками';font-family:serif}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before{content:'Моноширинный';font-family:monospace}
.ql-snow .ql-picker.ql-size .ql-picker-label::before,.ql-snow .ql-picker.ql-size .ql-picker-item::before{content:'Обычный'}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before{content:'Мелкий'}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before{content:'Крупный'}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before{content:'Очень крупный'}
.ql-font-arial{font-family:Arial,Helvetica,sans-serif}
.ql-font-times{font-family:'Times New Roman',Times,serif}
.ql-font-georgia{font-family:Georgia,serif}
.ql-font-serif{font-family:serif}
.ql-font-monospace{font-family:monospace}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-size-small{font-size:.82em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-size-large{font-size:1.35em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-size-huge{font-size:1.8em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-align-justify{text-align:justify}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-align-center{text-align:center}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-align-right{text-align:right}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-indent-1{margin-left:1.5em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-indent-2{margin-left:3em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-indent-3{margin-left:4.5em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-indent-4{margin-left:6em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-indent-5{margin-left:7.5em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-indent-6{margin-left:9em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-indent-7{margin-left:10.5em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) .ql-indent-8{margin-left:12em}
:is(.lesson-player-copy,.studio-intro,.studio-video-note,.studio-prose) :is(ul,ol){padding-left:24px}
:is(.studio-intro,.studio-video-note,.studio-prose) img,.studio-rich-editor .ql-editor img{max-width:100%;height:auto}
.studio-template-group>h3 {font-size:14px;color:var(--text-soft);margin:24px 0 12px}
.studio-template-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.studio-template {min-height:124px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:8px;font:inherit;cursor:pointer;padding:14px}
.studio-template:hover {border-color:var(--primary);background:var(--primary-soft)}
.studio-template>span {display:grid;place-items:center;width:48px;height:48px;background:var(--cyan-soft);color:var(--cyan);border-radius:8px}
.studio-template:nth-child(2n)>span {background:var(--primary-soft);color:var(--primary)}
.studio-template:nth-child(3n)>span {background:var(--coral-soft);color:var(--coral)}
.studio-template strong {font-size:13px;overflow-wrap:anywhere}
.studio-course-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.studio-course {background:var(--surface);border:1px solid var(--line);border-radius:8px;overflow:hidden;min-width:0}
.studio-course>div:last-child {padding:20px}
.studio-course h3 {font-size:18px;line-height:1.5;overflow-wrap:anywhere;margin:8px 0 12px}
.studio-course p {font-size:13px;line-height:1.6;color:var(--text-soft);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.page-head .school-section-description {max-width:760px;line-height:1.6;white-space:normal;overflow-wrap:anywhere}
html.embed-mode .page-head:has(.school-section-description) {justify-content:space-between;gap:20px;align-items:flex-start}
html.embed-mode .page-head:has(.school-section-description)>div:first-child {display:block;min-width:0;flex:1}
html.embed-mode .page-head:has(.school-section-description) h2 {display:none}
html.embed-mode .page-head:has(.school-section-description)>.btn {flex-shrink:0}
.studio-course-cover {height:140px;display:grid;place-items:center;background:var(--cyan-soft);color:var(--cyan)}
.studio-course-cover img {width:100%;height:140px;object-fit:cover}
.studio-course-cover svg {width:44px;height:44px}
.studio-module {margin-bottom:28px;border-top:1px solid var(--line);padding-top:16px}
.studio-module>header {display:flex;align-items:center;gap:12px;margin-bottom:12px}
.studio-module h3 {flex:1;margin:0;font-size:18px;overflow-wrap:anywhere}
.studio-module>.btn {margin-top:14px}
html.embed-mode .page-head:has(#studioCourses)>div:first-child {display:block;min-width:0}
html.embed-mode .page-head:has(#studioCourses) {justify-content:space-between;gap:16px;flex-wrap:wrap}
html.embed-mode .page-head:has(#studioCourses) h2 {font-size:20px;line-height:1.4;overflow-wrap:anywhere;margin:12px 0 0}
.studio-student-section {border-top:1px solid var(--line);padding:24px 0}
.studio-student-section>h2 {font-size:23px;margin:0 0 20px;overflow-wrap:anywhere}
.studio-student-block {margin:0 0 28px;overflow-wrap:anywhere}
.studio-student-block .lesson-quiz.panel,.studio-block .lesson-quiz.panel {border:0;box-shadow:none;padding:0;border-radius:0;background:transparent}
.studio-student-block .panel-head,.studio-block .lesson-quiz .panel-head {padding:12px 0}
.studio-student-block .lesson-quiz form,.studio-block .lesson-quiz form {padding:0}
.studio-student-block h3 {font-size:18px;line-height:1.5}
.studio-block.is-preview {border:0}
.icon-btn:disabled {opacity:.35;cursor:default}
@media (max-width:1200px){.studio-layout {grid-template-columns:minmax(0,1fr) 210px;gap:16px}.studio-canvas {padding:20px}.studio-course-grid {grid-template-columns:repeat(2,minmax(0,1fr))}.school-dashboard{grid-template-columns:minmax(0,1fr)}}
@media (max-width:800px){.studio-layout {display:flex;flex-direction:column}.studio-sections {position:static;order:-1;width:100%}.studio-sections>div:first-of-type {display:flex;gap:8px;overflow-x:auto}.studio-section-row {min-width:150px;max-width:210px;flex-shrink:0}.studio-section-tools,.studio-outline-meta {display:none}.studio-canvas {width:100%;padding:18px}.studio-sections>h3{margin-bottom:8px}.school-entry {flex-wrap:wrap;gap:12px}.school-entry .page-actions {margin-left:auto}.school-entry-copy {flex-basis:calc(100% - 80px)}.studio-top>.btn.primary{margin-left:auto}.studio-template-grid {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:480px){.studio-course-grid {grid-template-columns:minmax(0,1fr)}.studio-title{order:-1;flex-basis:100%}.studio-top{gap:8px}.studio-mode button {font-size:11px;padding:8px}.studio-canvas{padding:14px}.studio-section-head h2 {font-size:20px}.school-filter{flex-wrap:wrap}.school-search{max-width:100%}.school-list-row{gap:8px;padding:14px 8px;flex-wrap:wrap}.school-entry .status-badge {font-size:10px}.studio-template{padding:10px}.studio-block-tools{gap:6px}}
.studio-swatch-panel{position:fixed;z-index:120;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:5px;width:min(248px,calc(100vw - 16px));max-height:calc(100vh - 16px);overflow-y:auto;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.studio-swatch-panel[hidden]{display:none!important}
.studio-swatch-title{grid-column:1/-1;margin-bottom:2px;font-size:12px;font-weight:700;line-height:1.4;color:var(--text)}
.studio-course-module{position:relative}
.studio-drag-handle{position:absolute;top:12px;left:6px;z-index:2;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--text-soft);cursor:grab;padding:7px}
.studio-drag-handle:active{cursor:grabbing}
.studio-course-module.is-dragging{opacity:.55}
.profile-photo{width:72px;height:72px;object-fit:cover;border-radius:50%}
.dictionary-panel{padding:8px 20px}
.dictionary-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 4px;border-bottom:1px solid var(--line)}
.dictionary-row:last-child{border-bottom:0}
.dictionary-row>div{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;min-width:0}
.dictionary-row small{color:var(--text-soft)}
.dictionary-image{width:88px;height:64px;object-fit:contain;border:1px solid var(--line);border-radius:6px}
.studio-video-block{display:grid;gap:12px}
.studio-video-chapters{display:flex;gap:8px;flex-wrap:wrap}
.studio-video-note{border:1px solid var(--line);border-radius:8px;padding:12px 16px;background:var(--surface)}
.studio-video-note summary{cursor:pointer;font-weight:600}
.studio-video-note>div{padding-top:10px;color:var(--text-soft);line-height:1.6}
.studio-swatch-panel button.studio-swatch{float:none;width:100%;height:auto;aspect-ratio:1;padding:0;border:1px solid color-mix(in srgb,var(--text) 25%,var(--line));border-radius:4px;background:var(--studio-swatch-color);cursor:pointer}
.studio-swatch-panel button.studio-swatch:hover,.studio-swatch-panel button.studio-swatch[aria-pressed="true"]{box-shadow:0 0 0 2px var(--primary)}
.studio-color-custom{grid-column:1/-1;display:grid;gap:5px;padding-top:5px;border-top:1px solid var(--line);color:var(--text);font-size:11px;font-weight:700}
.studio-color-custom>div{display:flex;align-items:center;gap:6px;min-width:0}
.studio-color-custom input[type="color"]{flex:0 0 34px;width:34px;height:30px;padding:2px;border:1px solid var(--line);border-radius:5px;background:var(--surface);cursor:pointer}
.studio-color-custom input[type="text"]{flex:1 1 auto;min-width:0;height:30px;padding:4px 6px;border:1px solid var(--line);border-radius:5px;background:var(--surface);color:var(--text);font:inherit;font-size:12px;text-transform:uppercase}
.studio-swatch-panel button.studio-color-apply{float:none;flex:0 0 30px;width:30px;height:30px;padding:5px;border:1px solid var(--line);border-radius:5px;background:var(--surface-2);color:var(--text);cursor:pointer}
.studio-swatch-panel button.studio-color-apply:hover{border-color:var(--primary);color:var(--primary)}
.studio-color-apply svg{width:16px;height:16px}
.studio-swatch-panel button.studio-swatch-reset{grid-column:1/-1;float:none;width:100%;height:auto;padding:6px 8px;border:1px solid var(--line);border-radius:5px;background:var(--surface-2);color:var(--text-soft);font:inherit;font-size:11px;text-align:center;cursor:pointer}
.studio-swatch-panel button.studio-swatch-reset:hover{color:var(--primary);border-color:var(--primary)}
.ql-toolbar .studio-ql-image,.ql-toolbar .studio-ql-color,.ql-toolbar .studio-ql-bg{width:28px;height:24px;padding:3px 5px;border:0;background:transparent;color:var(--text-soft);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.ql-toolbar .studio-ql-image:hover,.ql-toolbar .studio-ql-color:hover,.ql-toolbar .studio-ql-bg:hover{color:var(--primary)}
.ql-toolbar .studio-ql-image:disabled{opacity:.35;cursor:not-allowed;color:var(--text-soft)}
.ql-toolbar .studio-ql-image svg,.ql-toolbar .studio-ql-color svg,.ql-toolbar .studio-ql-bg svg{width:16px;height:16px}
.ql-custom-bg{border-radius:3px;padding:0 2px}
.ql-color-purple{color:#7c2d91}.ql-color-magenta{color:#a63cc4}.ql-color-blue{color:#1f5fa8}.ql-color-graphite{color:#23232b}
.ql-color-gray{color:#5b5b68}.ql-color-green{color:#1f7a3d}.ql-color-red{color:#c62828}.ql-color-amber{color:#9a6400}
.ql-bg-yellow{background:#fdf1c7;border-radius:3px;padding:0 2px}
.ql-bg-green{background:#dcf3e2;border-radius:3px;padding:0 2px}
.ql-bg-red{background:#fbe0e0;border-radius:3px;padding:0 2px}
.ql-bg-blue{background:#dfeafb;border-radius:3px;padding:0 2px}
.ql-bg-purple{background:#f3e9f6;border-radius:3px;padding:0 2px}
.ql-bg-gray{background:#eceef2;border-radius:3px;padding:0 2px}
[data-theme="dark"] .ql-color-purple{color:#d9a8e8}
[data-theme="dark"] .ql-color-magenta{color:#e3a6ef}
[data-theme="dark"] .ql-color-blue{color:#7fb4e8}
[data-theme="dark"] .ql-color-graphite{color:#d6d4e0}
[data-theme="dark"] .ql-color-gray{color:#b7b5c3}
[data-theme="dark"] .ql-color-green{color:#7bd99a}
[data-theme="dark"] .ql-color-red{color:#f08a75}
[data-theme="dark"] .ql-color-amber{color:#f0c36d}
[data-theme="dark"] .ql-bg-yellow{background:#4a3b12}
[data-theme="dark"] .ql-bg-green{background:#1f3b28}
[data-theme="dark"] .ql-bg-red{background:#4a2320}
[data-theme="dark"] .ql-bg-blue{background:#1f3347}
[data-theme="dark"] .ql-bg-purple{background:#3a2942}
[data-theme="dark"] .ql-bg-gray{background:#34333f}
.studio-prose .ql-editor img,#studioRichEditor .ql-editor img{max-width:100%;height:auto;border-radius:8px;display:block;margin:10px 0}
.studio-prose .ql-editor blockquote,#studioRichEditor .ql-editor blockquote{border-left:3px solid var(--primary);margin:0 0 12px;padding-left:14px;color:var(--text-soft)}
.studio-prose .ql-editor code,#studioRichEditor .ql-editor code{background:var(--surface-2);border-radius:4px;padding:1px 5px;font-size:.92em}
@media (max-width:480px){.ql-toolbar.ql-snow{padding:6px}}
.lesson-player-copy{line-height:1.7;overflow-wrap:anywhere}
.lesson-player-copy>:first-child{margin-top:0}
.lesson-player-copy>:last-child{margin-bottom:0}
.lesson-player-copy p{margin:0 0 14px}
.lesson-player-copy h1,.lesson-player-copy h2,.lesson-player-copy h3{line-height:1.35;margin:22px 0 12px;overflow-wrap:anywhere}
.lesson-player-copy h1{font-size:26px}
.lesson-player-copy h2{font-size:22px}
.lesson-player-copy h3{font-size:19px}
.lesson-player-copy ul,.lesson-player-copy ol{margin:0 0 14px;padding-left:24px}
.lesson-player-copy li{margin-bottom:6px}
.lesson-player-copy blockquote{margin:0 0 14px;padding:2px 16px;border-left:3px solid var(--primary);color:var(--text-soft)}
.lesson-player-copy code{background:var(--surface-2);border-radius:4px;padding:1px 5px;font-size:.92em}
.lesson-player-copy img{max-width:100%;height:auto;border-radius:8px;display:block;margin:12px 0}
.lesson-player-copy .ql-align-center{text-align:center}
.lesson-player-copy .ql-align-right{text-align:right}

/* Файл из хранилища не открылся: показываем это словами, а не пустым плеером. */
.studio-media-error{margin:8px 0;padding:12px 14px;border-radius:12px;border:1px dashed var(--border);color:var(--text-soft);font-size:14px}

/* Галерея материалов: аккордеон и слайдер (studioGalleryHTML в lesson-studio.js). */
.studio-gallery{display:grid;gap:12px;min-width:0;max-width:100%}
.studio-gallery-toolbar{display:flex;justify-content:flex-end;gap:8px}
.studio-gallery-item{border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.studio-gallery-item>summary{display:flex;align-items:center;gap:10px;padding:12px 16px;cursor:pointer;font-weight:600;list-style:none}
.studio-gallery-item>summary::-webkit-details-marker{display:none}
.studio-gallery-item[open]>summary svg{transform:rotate(180deg)}
.studio-gallery-index{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;border-radius:50%;background:var(--primary-soft);color:var(--primary);font-size:12px;flex-shrink:0}
.studio-gallery-item>summary>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
.studio-gallery-body{padding:0 16px 16px}
.studio-gallery-track{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none;min-width:0}
.studio-gallery-track::-webkit-scrollbar{display:none}
.studio-gallery-slide{flex:0 0 100%;min-width:0;margin:0;scroll-snap-align:start}
.studio-gallery-nav{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:8px}
.studio-gallery-counter{font-size:12px;color:var(--text-soft);min-width:48px;text-align:center}
.studio-gallery figcaption{margin-top:8px;color:var(--text-soft);font-size:13px;text-align:center;overflow-wrap:anywhere}
.studio-pdf{display:grid;gap:8px}
.studio-pdf canvas{display:block;width:100%;height:auto;max-height:75vh;object-fit:contain;border:1px solid var(--line);border-radius:8px;background:#fff}
.studio-pdf-nav{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}
@media (max-width:700px){.studio-gallery-nav [data-gallery-prev],.studio-gallery-nav [data-gallery-next]{display:none}.studio-gallery-body{padding:0 12px 12px}}
@media (prefers-reduced-motion:reduce){.studio-gallery-track{scroll-behavior:auto}}

/* Редактор галереи в конструкторе уроков. */
.studio-gallery-editor-row{display:flex;gap:12px;align-items:flex-start;border:1px solid var(--line);border-radius:8px;padding:10px;margin-bottom:8px}
.studio-gallery-thumb{width:56px;height:56px;object-fit:cover;border-radius:6px;flex-shrink:0;background:var(--surface-2)}
.studio-gallery-thumb-icon{display:grid;place-items:center;color:var(--text-soft)}
.studio-gallery-editor-body{flex:1;min-width:0}
.studio-gallery-editor-body input,.studio-gallery-editor-body textarea{width:100%}
.studio-gallery-editor-tools{display:flex;gap:2px;flex-shrink:0}
.studio-gallery-editor-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}

/* Прописи: карточки иероглифов. Разметка learn-hanzi-* фиксирована для hanzi-ui.js,
   здесь только сетка и внешний вид, поведение кнопок навешивает HanziUI.bind(). */
.learn-hanzi-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px}
.learn-hanzi-card{border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:14px;display:grid;gap:10px;justify-items:center;text-align:center}
.learn-hanzi-target{width:100%;aspect-ratio:1;max-width:180px;border:1px dashed var(--line);border-radius:8px;background:var(--surface-2)}
.learn-hanzi-caption strong{font-size:22px;display:block}
.learn-hanzi-caption small{color:var(--text-soft)}
.learn-hanzi-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}

/* Материалы уроков: чипы типов и пагинация (renderSchoolMaterials в school-ui.js). */
.material-chips{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}
.material-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--surface);color:var(--text-soft);border-radius:20px;padding:8px 14px;font:inherit;font-size:13px;cursor:pointer}
.material-chip:hover{background:var(--surface-2);color:var(--text)}
.material-chip.active{border-color:var(--primary);background:var(--primary-soft);color:var(--primary);font-weight:700}
.material-chip-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--surface-2);color:inherit;font-size:11px}
.material-chip.active .material-chip-count{background:var(--surface)}
.material-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin:20px 0;color:var(--text-soft);font-size:13px}
@media (max-width:480px){.material-chips{gap:6px}.material-chip{padding:7px 10px;font-size:12px}}
/* Вступление над материалом (data.intro/data.intro_ops, studioIntroHTML в lesson-studio.js):
   короткий абзац над видео/словарём/галереей и т.п., раньше был отдельным блоком. */
.studio-intro{color:var(--text-soft);font-size:15px;line-height:1.6;margin:0 0 12px}
.studio-intro p{margin:0 0 12px}
.studio-intro p:last-child{margin-bottom:0}

/* Медиатека: подбор уже загруженного видео из хранилища в редакторе блока
   (studioBindVideoPicker в lesson-studio.js). Панель разворачивается под полем
   ссылки внутри того же модального окна редактирования блока. */
.studio-video-picker-trigger{margin:6px 0 4px}
.studio-video-picker{margin:6px 0 16px;border:1px solid var(--line);border-radius:8px;padding:14px;background:var(--surface-2)}
.studio-video-picker[hidden]{display:none}
.studio-video-picker-list{display:flex;flex-direction:column;gap:6px;max-height:320px;overflow:auto;margin-top:10px}
.studio-video-picker-row{display:flex;flex-direction:column;gap:2px;width:100%;text-align:left;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--text);padding:10px 12px;font:inherit;cursor:pointer}
.studio-video-picker-row:hover{border-color:var(--primary);background:var(--primary-soft)}
.studio-video-picker-row strong{font-size:13px;overflow-wrap:anywhere}
.studio-video-picker-row small{color:var(--text-soft);font-size:12px}
.studio-video-picker #studioVideoPickerMore{margin-top:10px}
@media (max-width:480px){.studio-video-picker{padding:10px}.studio-video-picker-list{max-height:260px}}

/* Шапка курса/модуля в конструкторе: двухколоночная сетка, чтобы кнопки справа
   не переносились вразнобой рядом с описанием. Левая колонка: назад/эйброу/
   заголовок/описание, правая: вертикальный стек кнопок (иконка настроек первой,
   все кнопки одной ширины); на узких экранах сетка схлопывается в одну колонку,
   а кнопки становятся рядом с переносом по правому краю. Составной селектор
   нужен, чтобы надёжно перебить .studio-library-head из figma-system.css. */
.page-head.studio-library-head.studio-course-head{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:24px;row-gap:14px;align-items:start}
.page-head.studio-library-head.studio-course-head>div:first-child{min-width:0}
.page-head.studio-library-head.studio-course-head>.page-actions{flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start;gap:8px}
.page-head.studio-library-head.studio-course-head>.page-actions>.btn{width:100%;flex:none;justify-content:center}
.page-head.studio-library-head.studio-course-head>.page-actions>.icon-btn{align-self:flex-end;flex:none}
@media (max-width:800px){
  .page-head.studio-library-head.studio-course-head{grid-template-columns:minmax(0,1fr)}
  .page-head.studio-library-head.studio-course-head>.page-actions{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}
  .page-head.studio-library-head.studio-course-head>.page-actions>.btn{width:auto;flex:none}
  .page-head.studio-library-head.studio-course-head>.page-actions>.icon-btn{align-self:center}
}
