/* Learn Now: the approved calm-card system across the existing application. */
:root{--ln-green:#367357;--ln-green-soft:#eff8f2;--ln-green-line:#b9d8c5;--ln-red:#ad4349;--ln-red-soft:#fff3f3;--ln-red-line:#dca5aa;--ln-field:#f8fafc;--ln-popover-shadow:0 12px 36px #2632471a;}
html[data-theme=dark]{--ln-green:#a3d0b4;--ln-green-soft:#21382e;--ln-green-line:#476a56;--ln-red:#eca4aa;--ln-red-soft:#3a272f;--ln-red-line:#83505a;--ln-field:#1a202b;--ln-popover-shadow:0 12px 36px #0004;}
html:has(body.ln-product){background:var(--ln-page);color:var(--ln-ink);font-family:var(--ln-font);}
body.ln-product{background:var(--ln-page);color:var(--ln-ink);font:400 14px/1.5 var(--ln-font);-webkit-font-smoothing:antialiased;}
body.ln-product *{box-sizing:border-box;}
body.ln-product>main{max-width:1240px;padding:32px 28px 48px;min-height:calc(100vh - 80px);}
body.ln-product>header{height:auto;min-height:64px;padding:12px max(24px,calc((100vw - 1180px)/2));gap:16px;flex-wrap:wrap;border-bottom:1px solid var(--ln-line);background:var(--ln-paper);box-shadow:none;}
body.ln-product header .brand.brand-wordmark{font-size:25px;letter-spacing:-.9px;color:var(--ln-blue);}
body.ln-product header .brand-wordmark i{width:8px;height:8px;flex-basis:8px;background:var(--ln-yellow);}
body.ln-product>header #role-navigation{gap:4px;max-width:100%;}
body.ln-product>header #role-navigation>button,body.ln-product>header #nav-profile{height:auto;min-height:36px;margin:0;padding:8px 10px;border:1px solid transparent;border-radius:8px;font:500 12px/1.3 var(--ln-font);color:var(--ln-muted);background:transparent;box-shadow:none;}
body.ln-product>header #role-navigation>button.active-role{background:var(--ln-blue-soft);color:var(--ln-blue);}
body.ln-product>header #nav-profile{color:var(--ln-blue);border-color:var(--ln-line);}
body.ln-product :is(h1,h2,h3){color:var(--ln-ink);overflow-wrap:anywhere;letter-spacing:-.3px;}
body.ln-product h1{font:600 30px/1.2 var(--ln-font);letter-spacing:-.7px;margin:0 0 8px;}
body.ln-product h2{font:600 21px/1.35 var(--ln-font);margin:0 0 12px;}
body.ln-product h3{font:600 16px/1.4 var(--ln-font);}
body.ln-product :is(p,.note){color:var(--ln-muted);line-height:1.6;}
body.ln-product .page-title{margin:0 0 28px;gap:16px;align-items:center;}
body.ln-product .page-title>.eyebrow,body.ln-product .page-title>div>.eyebrow{display:none;}
body.ln-product :is(button,a.primary,a.secondary){min-width:0;border-radius:8px;font:400 14px/1.35 var(--ln-font);transition:background-color .15s,border-color .15s,color .15s;}
body.ln-product button:not(:disabled):hover{box-shadow:none;}
body.ln-product button:not(:disabled):active{transform:none;box-shadow:none;}
body.ln-product :is(button.primary,a.primary){background:var(--ln-blue);color:var(--ln-paper);border:1px solid var(--ln-blue);padding:10px 15px;font-weight:500;box-shadow:none;}
html[data-theme=dark] body.ln-product :is(button.primary,a.primary){background:#244f9e;color:#fff;border-color:#4268ac;}
body.ln-product :is(button.secondary,a.secondary,.back-button){background:var(--ln-paper);border:1px solid var(--ln-line);color:var(--ln-ink);padding:9px 13px;box-shadow:none;}
body.ln-product button.quiet{background:transparent;color:var(--ln-blue);border-color:transparent;box-shadow:none;}
body.ln-product :is(button.secondary,a.secondary,.back-button):hover{background:var(--ln-field);border-color:#aab9cf;}
body.ln-product button.danger{color:var(--ln-red);}
body.ln-product :is(button.success,.answer-correct,.page-completed){background:var(--ln-green-soft);border-color:var(--ln-green-line);color:var(--ln-green);}
body.ln-product :is(button,input,select,textarea,summary,a):focus-visible{outline:2px solid #6888bd;outline-offset:3px;}
body.ln-product :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea,select){max-width:100%;padding:10px 12px;border:1px solid var(--ln-line);border-radius:8px;background:var(--ln-paper);color:var(--ln-ink);font:400 14px/1.5 var(--ln-font);}
body.ln-product :is(input,textarea)::placeholder{color:var(--ln-muted);opacity:.8;}
body.ln-product :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:var(--ln-blue);}
body.ln-product label{color:var(--ln-ink);font:400 13px/1.5 var(--ln-font);}
body.ln-product .toolbar{gap:8px;align-items:center;flex-wrap:wrap;}
body.ln-product .editor-toolbar{gap:8px;flex-wrap:wrap;margin:16px 0 20px;min-width:0;}
body.ln-product .room-grid{gap:16px;align-items:stretch;}
body.ln-product :is(.room-card,.create-card,.profile-panel,.profile-summary,.user-group,.login-card,.lesson-preview){border:1px solid var(--ln-line);border-radius:14px;background:var(--ln-paper);color:var(--ln-ink);box-shadow:none;}
body.ln-product .room-card{padding:20px;min-height:0;}
body.ln-product .row-menu>summary{color:var(--ln-muted);background:transparent;border:0;border-radius:8px;font-size:22px;}
body.ln-product .row-menu-body{max-width:min(300px,calc(100vw - 32px));padding:6px;border:1px solid var(--ln-line);border-radius:10px;background:var(--ln-paper);box-shadow:var(--ln-popover-shadow);}
body.ln-product .row-menu-body button{display:block;width:100%;margin:0;padding:8px 10px;min-height:36px;border:0;border-radius:6px;background:transparent;text-align:left;justify-content:flex-start;font:400 13px/1.4 var(--ln-font);color:var(--ln-ink);}
body.ln-product .row-menu-body button:hover{background:var(--ln-field);}
body.ln-product .row-menu-body .danger{color:var(--ln-red);}
/* Dashboard and library: preserve all four existing destinations. */
body.ln-product #teacher-cabinet-menu{display:flex;width:100%;gap:8px;padding:0 0 20px;margin:0 0 32px;border-bottom:1px solid var(--ln-line);overflow:visible;}
body.ln-product #teacher-cabinet-menu>.cabinet-menu-button{flex:1 1 0;min-width:0;width:auto;min-height:40px;padding:9px 10px;border:0;background:transparent;box-shadow:none;color:var(--ln-muted);font-weight:400;white-space:normal;}
body.ln-product #teacher-cabinet-menu>.cabinet-menu-button.is-selected{background:var(--ln-blue-soft);color:var(--ln-blue);font-weight:500;}
body.ln-product #teacher-cabinet-menu>.cabinet-menu-button:hover{background:var(--ln-blue-soft);color:var(--ln-blue);}
body.ln-product #cabinet-materials>.library-heading .eyebrow{display:none;}
body.ln-product #cabinet-materials>.library-heading{margin-bottom:24px;}
body.ln-product #cabinet-materials>.library-heading h2{font-size:28px;}
body.ln-product .library-actions{border-bottom:1px solid var(--ln-line);padding:0 0 16px;gap:12px;}
body.ln-product .library-actions :is(button,a){margin:0;}
body.ln-product #course-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
body.ln-product #course-list .compact-course-card{display:grid;grid-template-columns:54px minmax(0,1fr);gap:14px;align-items:center;padding:20px;min-height:0;background:var(--ln-paper);border:1px solid var(--ln-line);border-radius:14px;}
body.ln-product #course-list .course-open{border-color:#9bb1d0;background:var(--ln-blue-soft);}
body.ln-product .course-thumbnail{width:54px;height:74px;flex-basis:54px;background:var(--ln-field);color:var(--ln-muted);font-size:23px;border:1px solid var(--ln-line);border-radius:6px;}
body.ln-product #course-list .compact-course-info h2{color:var(--ln-ink);font:600 16px/1.4 var(--ln-font);margin:0 0 6px;letter-spacing:0;}
body.ln-product .course-meta{font-size:12px;color:var(--ln-muted);}
body.ln-product .compact-course-actions{grid-column:1/-1;justify-content:space-between;padding-top:12px;margin-top:0;border-top:1px solid var(--ln-line);}
body.ln-product .compact-course-actions>button{background:transparent;border:0;color:var(--ln-blue);font-weight:500;padding:4px 0;}
body.ln-product #current-course{margin:24px 0 12px;color:var(--ln-ink);font-size:18px;font-weight:600;}
body.ln-product .course-create-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:20px;}
body.ln-product .course-create-actions>button{margin:0;}
body.ln-product #library.library-list{gap:12px;}
body.ln-product #library .compact-module,body.ln-product #library .compact-lesson-group:not(.compact-module){padding:0;margin:0;border:1px solid var(--ln-line);border-radius:14px;background:var(--ln-paper);}
body.ln-product #library .compact-module .module-heading{padding:16px 20px;gap:12px;}
body.ln-product #library .compact-module .module-heading h3{font:600 18px/1.4 var(--ln-font);color:var(--ln-ink);background:transparent;margin:0;padding:0;}
body.ln-product .module-kind{display:inline-flex;gap:6px;align-items:center;color:var(--ln-muted);font-size:10px;letter-spacing:.8px;margin:0 0 5px;}
body.ln-product .module-kind::before{content:'';width:5px;height:5px;background:var(--ln-yellow);border-radius:50%;}
body.ln-product .module-count{font-size:12px;color:var(--ln-muted);}
body.ln-product #library .compact-lesson-group .lesson-rows{padding:0 20px 8px 46px;}
body.ln-product #library .compact-lesson-group:not(.compact-module) .lesson-rows{padding:0 20px;}
body.ln-product #library .compact-lesson-group .lesson-row{min-height:56px;padding:10px 0;gap:12px;border:0;border-top:1px solid var(--ln-line);background:transparent;}
body.ln-product #library .compact-lesson-group .lesson-row-info{min-width:0;}
body.ln-product #library .compact-lesson-group .lesson-name{color:var(--ln-ink);font:400 15px/1.5 var(--ln-font);}
body.ln-product #library .compact-lesson-group .lesson-row-info>.note{color:var(--ln-muted);font-size:12px;}
body.ln-product .drag-handle{color:var(--ln-muted);font-size:20px;}
/* Constructor: existing preview and modal editing, with a navigable outline. */
body.ln-product #editor>.page-title{margin-bottom:24px;}
body.ln-product #editor>.page-title p{max-width:65ch;font-size:13px;margin-bottom:0;}
body.ln-product .editor-lesson-settings{display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,1fr);gap:20px;padding:20px;border:1px solid var(--ln-line);border-radius:14px;background:var(--ln-paper);margin-bottom:16px;}
body.ln-product .editor-lesson-settings label{display:block;margin:0 0 6px;color:var(--ln-muted);font-size:12px;}
body.ln-product .editor-lesson-settings :is(input,select){width:100%;margin:0;}
body.ln-product .editor-workspace{display:grid;grid-template-columns:210px minmax(0,1fr);align-items:start;gap:24px;margin-top:24px;}
body.ln-product .editor-working-column{min-width:0;}
body.ln-product .editor-outline{position:sticky;top:20px;max-height:calc(100dvh - 40px);overflow:auto;background:var(--ln-paper);border:1px solid var(--ln-line);border-radius:14px;padding:16px;}
body.ln-product .editor-outline h2{font-size:14px;margin:0 0 12px;letter-spacing:0;}
body.ln-product .editor-outline-page{margin-bottom:12px;}
body.ln-product .editor-outline button{display:flex;align-items:flex-start;gap:8px;width:100%;min-width:0;min-height:36px;margin:2px 0;padding:8px;border:0;border-radius:8px;background:transparent;color:var(--ln-muted);text-align:left;font-size:12px;line-height:1.45;overflow-wrap:anywhere;}
body.ln-product .editor-outline .is-current{background:var(--ln-blue-soft);color:var(--ln-blue);font-weight:500;}
body.ln-product .editor-outline .outline-number{color:var(--ln-blue);flex:0 0 18px;}
body.ln-product .editor-outline button>span:last-child{min-width:0;}
body.ln-product .editor-outline button:hover{background:var(--ln-field);}
body.ln-product :is(#editor-pages,#page-controls){margin-top:0;}
body.ln-product :is(#editor-pages,#editor-pages-bottom,#page-controls,#page-controls-bottom){padding:14px;background:var(--ln-paper);border:1px solid var(--ln-line);border-radius:14px;min-width:0;}
body.ln-product .page-panel-label{font-size:11px;color:var(--ln-muted);font-weight:400;}
body.ln-product .page-tabs{gap:8px;min-width:0;flex-wrap:wrap;}
body.ln-product .page-tab-group{padding:0;border:0;background:transparent;min-width:0;}
body.ln-product .page-tab-group>button{font-size:12px;min-height:32px;padding:7px 10px;margin:0;}
body.ln-product .page-reorder-actions{justify-content:center;gap:6px;}
body.ln-product .page-reorder-actions button{min-height:24px;padding:2px 8px;font-size:13px;}
body.ln-product .page-add-button{min-width:32px;min-height:32px;background:transparent;color:var(--ln-muted);border:1px solid var(--ln-line);}
body.ln-product .lesson-section-switch{background:var(--ln-line);border-color:var(--ln-line);margin:0 0 20px;}
body.ln-product .section-switch-thumb{background:var(--ln-paper);box-shadow:none;}
body.ln-product .lesson-section-switch .section-switch-option{color:var(--ln-muted);font-size:13px;}
body.ln-product .lesson-section-switch .is-selected{color:var(--ln-blue);}
body.ln-product .page-bottom-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:20px 0;}
body.ln-product .page-bottom-actions>button{margin:0;}
body.ln-product #editor-batch{padding:12px 16px;background:var(--ln-blue-soft);border:1px solid var(--ln-line);border-radius:10px;margin-bottom:16px;gap:8px;flex-wrap:wrap;}
/* Shared exercise surface and authored typography. */
body.ln-product .exercise-cards{gap:18px;min-width:0;}
body.ln-product .exercise-card{padding:24px;border:1px solid var(--ln-line);border-radius:14px;box-shadow:none;min-width:0;overflow-wrap:anywhere;scroll-margin-top:24px;}
body.ln-product .exercise-card:not(.colored-note){background:var(--ln-paper);color:var(--ln-ink);}
body.ln-product .exercise-card .exercise-title{font-size:20px;line-height:1.4;font-weight:600;letter-spacing:-.25px;margin:0 0 10px;white-space:pre-wrap;}
body.ln-product .editor-heading-row .exercise-title{padding:0;margin:0;}
body.ln-product .editor-heading-row{margin-bottom:12px;}
body.ln-product .exercise-card>.exercise-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 14px;}
body.ln-product .exercise-top>span:not(.tag){display:inline-flex;align-items:center;justify-content:center;min-width:26px;min-height:24px;padding:3px 7px;border:0;border-radius:5px;background:var(--ln-blue-soft);color:var(--ln-blue);font:500 12px/1.4 var(--ln-font);}
body.ln-product .exercise-top .tag{background:transparent;color:var(--ln-muted);font:400 11px/1.5 var(--ln-font);padding:0;}
body.ln-product .exercise-card .exercise-instruction{color:var(--ln-ink);font:400 16px/1.65 var(--ln-font);margin:0 0 16px;max-width:68ch;white-space:pre-wrap;}
body.ln-product .rich-content{font-size:17px;line-height:1.8;font-weight:400;max-width:68ch;color:var(--ln-ink);}
body.ln-product .rich-content p{font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;margin:0 0 16px;}
body.ln-product .rich-content>:last-child{margin-bottom:0;}
body.ln-product .rich-content :is(strong,b){font-weight:700;}
body.ln-product .rich-content :is(em,i){font-style:italic;}
body.ln-product .rich-content img{max-width:100%;height:auto;}
body.ln-product .teacher-note{padding:24px;background:var(--ln-field)!important;border-color:var(--ln-line);}
body.ln-product .teacher-note .rich-content{font-size:15px;line-height:1.7;color:var(--ln-muted);}
body.ln-product .teacher-note-visibility{font-size:11px;color:var(--ln-muted);margin:0 0 12px;}
body.ln-product .colored-note :is(.rich-content,.rich-content p,.exercise-instruction){color:#263247;}
body.ln-product .gap-sentence{font:400 17px/2.25 var(--ln-font);color:var(--ln-ink);white-space:pre-wrap;max-width:68ch;}
body.ln-product :is(.gap-sentence .inline-gap,.teacher-dropdown-trigger){display:inline-block;width:auto;min-width:60px;max-width:100%;min-height:30px;padding:3px 8px;margin:0 3px;border:1px solid #cbd4e4;border-radius:6px;background:var(--ln-field);color:var(--ln-ink);font:400 16px/1.4 var(--ln-font);vertical-align:baseline;}
body.ln-product .teacher-key-tooltip{font-size:12px;line-height:1.4;max-width:min(300px,80vw);background:var(--ln-green-soft);color:var(--ln-green);border:1px solid var(--ln-green-line);border-radius:8px;}
body.ln-product .teacher-dropdown-options{border:1px solid var(--ln-line);border-radius:8px;background:var(--ln-paper);box-shadow:var(--ln-popover-shadow);max-width:calc(100vw - 40px);}
body.ln-product .answer-area .choice,body.ln-product .question-row .choice{padding:9px 12px;min-height:38px;margin:6px 0;border:1px solid var(--ln-line);border-radius:8px;background:var(--ln-paper);color:var(--ln-ink);font-size:16px;font-weight:400;line-height:1.45;}
body.ln-product .choice.selected{outline:2px solid #7599d1;outline-offset:0;border-color:#7599d1;background:var(--ln-blue-soft);}
body.ln-product .choice.teacher-correct{background:var(--ln-green-soft);border-color:var(--ln-green-line);color:var(--ln-ink);}
body.ln-product .choice.selected.teacher-correct{outline:2px solid #7599d1;}
body.ln-product .question-row{padding:16px 0;border:0;border-bottom:1px solid var(--ln-line);background:transparent;}
body.ln-product .question-row:first-child{padding-top:0;}
body.ln-product .question-row h3{font-size:17px;font-weight:500;line-height:1.6;margin:0 0 10px;}
body.ln-product .answer-input{width:100%;min-height:100px;font-size:16px;line-height:1.7;background:var(--ln-field);}
body.ln-product .answer-area textarea{font-size:16px;}
body.ln-product .answer-confirm-actions{margin-top:16px;}
body.ln-product .answer-confirm-actions button{font-size:13px;}
body.ln-product .feedback-box{padding:12px 14px;margin-top:16px;border:1px solid var(--ln-line);border-radius:8px;background:var(--ln-field);color:var(--ln-ink);font-size:13px;line-height:1.6;}
body.ln-product .feedback-box.correct{background:var(--ln-green-soft);border-color:var(--ln-green-line);color:var(--ln-green);}
body.ln-product .feedback-box.retry{background:var(--ln-red-soft);border-color:var(--ln-red-line);color:var(--ln-red);}
body.ln-product :is(.answer-error,.answer-wrong){background:var(--ln-red-soft)!important;border-color:var(--ln-red-line)!important;}
body.ln-product .save-state{font-size:11px;color:var(--ln-muted);margin-top:8px;}
body.ln-product .card-feedback{padding:16px 0 0;margin-top:16px;border:0;border-top:1px solid var(--ln-line);background:transparent;}
body.ln-product .card-feedback label{font-size:12px;color:var(--ln-muted);}
body.ln-product .card-feedback textarea{font-size:14px;min-height:60px;}
body.ln-product .feedback-actions{gap:8px;flex-wrap:wrap;}
body.ln-product .feedback-actions button{font-size:12px;}
body.ln-product .exercise-actions>.row-menu>summary{width:32px;height:32px;min-height:32px;border:0;color:var(--ln-muted);}
body.ln-product .exercise-actions .row-menu-body>button{font-weight:500;padding:7px 10px;}
body.ln-product .exercise-visibility{border-color:var(--ln-line);color:var(--ln-muted);background:transparent;}
body.ln-product .exercise-card.hidden-from-student{border-style:dashed;}
/* Exercise-specific components keep their existing handlers and state. */
body.ln-product .matching-columns{gap:16px;}
body.ln-product .matching-column{gap:10px;}
body.ln-product .match-button{padding:11px 12px;border:1px solid var(--ln-line);border-radius:8px;background:var(--ln-paper);color:var(--ln-ink);font:400 16px/1.5 var(--ln-font);}
body.ln-product .match-button.selected{outline:2px solid #7599d1;border-color:#7599d1;background:var(--ln-blue-soft);}
body.ln-product .match-button.paired{background:var(--ln-field);border-color:#b8c5d7;}
body.ln-product .match-button.answer-correct{background:var(--ln-green-soft);border-color:var(--ln-green-line);}
body.ln-product .sentence-row{padding:10px 12px;border:1px solid var(--ln-line);border-radius:8px;background:var(--ln-paper);color:var(--ln-ink);font-size:16px;}
body.ln-product .audio-block{padding:14px;border:1px solid var(--ln-line);border-radius:10px;background:var(--ln-field);gap:10px;max-width:100%;}
body.ln-product .audio-block :is(button,.note){font-size:12px;margin:0;}
body.ln-product .audio-block input[type=range]{min-width:0;max-width:100%;}
body.ln-product .audio-volume{font-size:12px;color:var(--ln-muted);}
body.ln-product :is(.exercise-image,.material-viewer){max-width:100%;height:auto;object-fit:contain;border-radius:8px;}
body.ln-product .drawing-toolbar{gap:6px;margin-bottom:12px;}
body.ln-product .drawing-toolbar>button{font-size:12px;padding:7px 9px;border:1px solid var(--ln-line);}
body.ln-product .memory-grid .memory-card{border-radius:12px;border-color:var(--ln-line);background:var(--ln-blue-soft);color:var(--ln-blue);box-shadow:none;}
body.ln-product .memory-grid .memory-card.flipped{background:var(--ln-paper);color:var(--ln-ink);border-color:#9fb3cf;}
body.ln-product .memory-grid .memory-card.matched{background:var(--ln-green-soft);color:var(--ln-green);border-color:var(--ln-green-line);}
body.ln-product :is(.picture-label-bank,.drag-word-bank,.letter-bank){background:var(--ln-field);border:1px solid var(--ln-line);border-radius:10px;padding:12px;gap:8px;}
body.ln-product :is(.picture-label-chip,.drag-word-token){background:var(--ln-paper);border:1px solid var(--ln-line);border-radius:8px;color:var(--ln-ink);font-weight:400;}
body.ln-product :is(.drag-word-zone,.category-drop-panel){background:var(--ln-paper);border-color:var(--ln-line);color:var(--ln-ink);}
body.ln-product .teacher-drop-hint{background:var(--ln-green-soft);border-color:var(--ln-green-line);}
body.ln-product .lesson-table{color:var(--ln-ink);font-size:16px;line-height:1.6;}
body.ln-product .lesson-table :is(td,th){border-color:var(--ln-line);padding:10px 12px;background:var(--ln-paper);}
body.ln-product .lesson-table th{background:var(--ln-field);font-weight:600;}
body.ln-product .lesson-table-wrap{overflow-x:auto;max-width:100%;border-radius:8px;}
/* Classroom: comments remain beside the corresponding exercise on the left. */
body.ln-product #classroom>.page-title{padding-bottom:20px;margin:0 0 24px;border-color:var(--ln-line);}
body.ln-product #classroom #class-title{font-size:28px;color:var(--ln-ink);}
body.ln-product #classroom #presence{color:var(--ln-muted);font-size:13px;}
body.ln-product #classroom>.page-title .toolbar>button,body.ln-product #classroom>.page-title .toolbar>a{background:var(--ln-paper);border-color:var(--ln-line);color:var(--ln-ink);font-size:13px;}
body.ln-product #classroom .class-grid{grid-template-columns:220px minmax(0,1fr);gap:24px;align-items:start;}
body.ln-product #classroom .class-grid>aside{background:var(--ln-paper);border:1px solid var(--ln-line);border-radius:14px;padding:16px;min-width:0;}
body.ln-product #classroom .sidebar-title{font-size:11px;font-weight:500;color:var(--ln-muted);letter-spacing:1px;}
body.ln-product #lesson-list .class-lesson-row{min-width:0;}
body.ln-product #classroom #lesson-list button{font-size:13px;line-height:1.5;padding:9px 10px;min-width:0;background:transparent;color:var(--ln-muted);border:0;border-radius:8px;}
body.ln-product #classroom #lesson-list button.active{background:var(--ln-blue-soft);color:var(--ln-blue);box-shadow:none;}
body.ln-product #classroom #lesson-list .lesson-completed button{background:var(--ln-green-soft);color:var(--ln-green);}
body.ln-product #classroom .lesson-heading{align-items:center;gap:16px;margin:0 0 20px;}
body.ln-product #classroom #lesson-title{font-size:25px;line-height:1.3;color:var(--ln-ink);min-width:0;overflow-wrap:anywhere;}
body.ln-product .lesson-page{min-width:0;}
body.ln-product .student-class-progress{border-color:var(--ln-line);}
body.ln-product .student-class-progress strong{color:var(--ln-muted);}
body.ln-product .exercise-comments .comment-thread{background:var(--ln-paper);border:1px solid var(--ln-line);border-left:2px solid var(--ln-yellow);border-radius:10px;padding:14px;box-shadow:none;}
body.ln-product .exercise-comments .comment-author{color:var(--ln-ink);font-size:12px;}
body.ln-product .exercise-comments .comment-post p{font-size:13px;line-height:1.6;color:var(--ln-ink);}
body.ln-product .exercise-comments .comment-quote{font-size:12px;color:var(--ln-muted);border-left-color:var(--ln-yellow);}
body.ln-product .exercise-comments :is(.comment-reply-toggle,.comment-edit-button){color:var(--ln-blue);font-size:11px;}
body.ln-product .homework-submission{border-color:var(--ln-line);}
@media(min-width:951px){body.ln-product .exercise-with-comments.has-comments>.exercise-comments{right:calc(100% + 24px);width:220px;}}
/* Modals, rich text tools, profile, administration and entrance. */
body.ln-product dialog{max-width:min(900px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid var(--ln-line);border-radius:14px;background:var(--ln-paper);color:var(--ln-ink);box-shadow:var(--ln-popover-shadow);font-family:var(--ln-font);}
body.ln-product dialog::backdrop{background:#17243b66;}
body.ln-product dialog h2{font-size:22px;margin-bottom:20px;}
body.ln-product dialog :is(label,.note){line-height:1.5;}
body.ln-product dialog form>label{display:block;margin-top:16px;margin-bottom:6px;}
body.ln-product dialog .dialog-top{align-items:center;gap:16px;}
body.ln-product .rich-toolbar{background:var(--ln-field);border-color:var(--ln-line);padding:6px;gap:4px;border-radius:8px;}
body.ln-product .rich-toolbar button{background:var(--ln-paper);border:1px solid var(--ln-line);color:var(--ln-ink);font-size:12px;min-height:28px;padding:4px 8px;}
body.ln-product .rich-toolbar .rich-color-group{background:transparent;border-color:var(--ln-line);}
body.ln-product .rich-area{background:var(--ln-paper);color:var(--ln-ink);font-weight:400;font-size:16px;line-height:1.7;border-color:var(--ln-line);border-radius:8px;}
body.ln-product .rich-area :is(b,strong){font-weight:700;}
body.ln-product .rich-palette-popup{background:var(--ln-paper);border-color:var(--ln-line);box-shadow:var(--ln-popover-shadow);}
body.ln-product .exercise-type-picker{background:var(--ln-page);}
body.ln-product .exercise-type-card{background:var(--ln-paper);border-color:var(--ln-line);border-radius:14px;box-shadow:none;}
body.ln-product .exercise-type-card strong{color:var(--ln-ink);font-weight:500;}
body.ln-product .exercise-type-description{color:var(--ln-muted);}
body.ln-product .exercise-type-example{background:var(--ln-blue-soft);color:var(--ln-blue);}
body.ln-product .profile-summary{padding:24px;gap:24px;}
body.ln-product .profile-name-pill{background:transparent;color:var(--ln-ink);font-size:24px;font-weight:600;padding:0;}
body.ln-product :is(.profile-info-pill,.profile-role-pill){background:var(--ln-field);color:var(--ln-ink);border:1px solid var(--ln-line);border-radius:8px;font-size:13px;line-height:1.5;padding:8px 12px;font-weight:400;overflow-wrap:anywhere;}
body.ln-product .profile-info-pill.profile-exams{background:#f8f1d8;color:#6d5c28;border-color:#eddfa4;}
body.ln-product .profile-panel{padding:24px;margin-top:20px;}
body.ln-product .profile-panel h2{font-size:20px;}
body.ln-product .profile-person-button{border-color:var(--ln-line);background:var(--ln-field);color:var(--ln-ink);border-radius:10px;}
body.ln-product .profile-class-list button{background:var(--ln-field);color:var(--ln-ink);border-color:var(--ln-line);}
body.ln-product .profile-edit-dialog form{display:flex;flex-direction:column;gap:16px;}
body.ln-product .profile-exit{border-color:var(--ln-line);}
body.ln-product .profile-logout{background:var(--ln-red-soft);border:1px solid var(--ln-red-line);color:var(--ln-red);}
body.ln-product .user-group{padding:20px;margin:20px 0;}
body.ln-product .user-group h3{font-size:18px;}
body.ln-product :is(.user-row,.student-row){padding:14px 0;gap:12px;background:transparent;border:0;border-bottom:1px solid var(--ln-line);border-radius:0;min-width:0;}
body.ln-product :is(.user-info,.user-title){min-width:0;overflow-wrap:anywhere;}
body.ln-product .user-row :is(strong,.profile-person-name){color:var(--ln-ink);font-size:15px;}
body.ln-product .user-row select{max-width:220px;}
body.ln-product #administration>h2{margin:32px 0 16px;}
body.ln-product .create-card{padding:20px;gap:20px;}
body.ln-product :is(.support-post,.homework-pending-row){background:var(--ln-paper);border:1px solid var(--ln-line);border-radius:14px;color:var(--ln-ink);}
body.ln-product .support-post p{color:var(--ln-ink);}
body.ln-product #landing{gap:48px;padding:32px 0;}
body.ln-product .intro h1{font-size:48px;line-height:1.12;letter-spacing:-1.5px;}
body.ln-product .intro h1 span{color:var(--ln-blue);}
body.ln-product .intro-pills span{background:var(--ln-blue-soft);color:var(--ln-blue);border-radius:8px;}
body.ln-product .lesson-preview{transform:none;}
body.ln-product .login-card{padding:28px;}
body.ln-product .login-card>p,body.ln-product .login-card .note{font-size:13px;}
body.ln-product #account-password-form{margin-top:24px;padding-top:20px;border-top:1px solid var(--ln-line);}
body.ln-product #account-password-form :is(input,button){width:100%;margin:8px 0 16px;}
body.ln-product #toast{background:var(--ln-ink);color:var(--ln-paper);border:1px solid var(--ln-line);border-radius:10px;font-size:13px;box-shadow:var(--ln-popover-shadow);}
body.ln-product>footer{color:var(--ln-muted);font:400 12px/1.5 var(--ln-font);}
body.ln-product>footer>span:last-child{display:none;}
/* Responsive geometry: never squeeze the working exercise between side panels. */
@media(max-width:1024px){body.ln-product #course-list{grid-template-columns:repeat(2,minmax(0,1fr));}body.ln-product .editor-workspace{grid-template-columns:180px minmax(0,1fr);gap:16px;}}
@media(max-width:950px){body.ln-product #classroom .class-grid{grid-template-columns:1fr;}body.ln-product #lesson-list{display:flex;gap:8px;flex-wrap:wrap;}body.ln-product #lesson-list .class-lesson-row{flex:1 1 180px;}body.ln-product .exercise-with-comments.has-comments{grid-template-columns:180px minmax(0,1fr);gap:16px;}}
@media(max-width:760px){body.ln-product .editor-workspace{grid-template-columns:1fr;}body.ln-product .editor-outline{position:static;max-height:220px;}body.ln-product .editor-outline nav{display:flex;flex-wrap:wrap;gap:8px;}body.ln-product .editor-outline-page{flex:1 1 150px;margin:0;}body.ln-product .editor-outline .outline-exercise-button{display:none;}body.ln-product .editor-lesson-settings{grid-template-columns:1fr;gap:16px;}body.ln-product .exercise-with-comments.has-comments{display:flex;flex-direction:column;}body.ln-product .exercise-with-comments>.exercise-card,body.ln-product .exercise-with-comments>.exercise-comments{width:100%;}body.ln-product .exercise-with-comments>.exercise-comments{position:static;}body.ln-product #landing{grid-template-columns:1fr;gap:24px;}body.ln-product .intro h1{font-size:36px;}}
@media(max-width:680px){body.ln-product>main{padding:20px 16px 32px;}body.ln-product>header{padding:12px 16px;gap:10px;}body.ln-product>header .brand{order:0;}body.ln-product>header #nav-profile{order:1;margin-left:auto;}body.ln-product>header #role-navigation{order:2;flex-basis:auto;flex:1;}body.ln-product>header #theme-controls{order:3;}body.ln-product #teacher-cabinet-menu{gap:4px;margin-bottom:24px;padding-bottom:16px;}body.ln-product #teacher-cabinet-menu>.cabinet-menu-button{font-size:13px;padding:9px 5px;min-height:44px;}body.ln-product h1{font-size:26px;}body.ln-product .page-title{align-items:flex-start;flex-wrap:wrap;gap:12px;}body.ln-product .page-title p{font-size:13px;}body.ln-product #course-list{grid-template-columns:1fr;}body.ln-product #library .compact-module .module-heading{padding:16px;gap:8px;flex-wrap:wrap;}body.ln-product #library .compact-lesson-group .lesson-rows{padding:0 16px 8px;}body.ln-product #library .compact-lesson-group .lesson-row-info{flex-direction:column;align-items:flex-start;gap:3px;}body.ln-product #library .compact-lesson-group .lesson-row-info>.note{margin-left:0;}body.ln-product .exercise-card{padding:20px;}body.ln-product .exercise-card .exercise-title{font-size:19px;padding-right:0;}body.ln-product .exercise-top>.exercise-actions{max-width:100%;margin-left:auto;gap:4px;}body.ln-product :is(button.primary,button.secondary,a.primary,a.secondary,.back-button){min-height:44px;}body.ln-product :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea,select){font-size:16px;}body.ln-product .rich-toolbar button{min-height:32px;}body.ln-product :is(.exercise-actions>.row-menu>summary,.exercise-visibility){min-width:40px;min-height:40px;}body.ln-product .row-menu-body button{min-height:44px;}body.ln-product .rich-content{font-size:16px;line-height:1.75;}body.ln-product .gap-sentence{font-size:16px;line-height:2.4;}body.ln-product .matching-columns{gap:8px;}body.ln-product .match-button{padding:10px;font-size:15px;min-height:44px;}body.ln-product .audio-block{padding:12px;}body.ln-product .audio-volume{flex-wrap:wrap;}body.ln-product .profile-summary{display:flex;flex-direction:column;padding:20px;gap:20px;}body.ln-product .profile-panel{padding:20px;}body.ln-product .profile-heading{gap:12px;}body.ln-product .profile-heading h1{font-size:25px;}body.ln-product :is(.user-row,.student-row){flex-wrap:wrap;}body.ln-product .user-row select{max-width:100%;}body.ln-product .user-group{padding:16px;}body.ln-product dialog{padding:20px;max-width:calc(100vw - 24px);}body.ln-product .exercise-type-grid{grid-template-columns:repeat(2,minmax(0,1fr));}body.ln-product .picture-label-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}body.ln-product .category-drop-grid{grid-template-columns:1fr;}body.ln-product .profile-class-list{grid-template-columns:1fr;}body.ln-product .homework-pending-row{align-items:flex-start;flex-wrap:wrap;padding:16px;}body.ln-product .login-card{padding:20px;}body.ln-product .lesson-section-switch{width:100%;max-width:420px;}}
@media(max-width:360px){body.ln-product .exercise-type-grid{grid-template-columns:1fr;}body.ln-product .picture-label-grid{grid-template-columns:1fr!important;}body.ln-product .rich-color-group{flex-wrap:wrap;}body.ln-product .rich-toolbar .rich-color-group{max-width:100%;}}
@media(prefers-reduced-motion:reduce){body.ln-product *{transition:none!important;scroll-behavior:auto!important;}}
body.ln-product .exercise-card>.exercise-title{padding-right:0;}
body.ln-product .editor-heading-row:empty{display:none;}
body.ln-product.ln-import>main{max-width:1240px;}
body.ln-product.ln-import>header{color:var(--ln-ink);}
body.ln-product.ln-import>header a{color:var(--ln-blue);}
body.ln-product.ln-import main>section{background:var(--ln-paper);color:var(--ln-ink);border:1px solid var(--ln-line);border-radius:14px;padding:24px;box-shadow:none;}
body.ln-product.ln-import :is(.row,.toolbar){min-width:0;}
body.ln-product.ln-import :is(input,textarea,select){background:var(--ln-paper);color:var(--ln-ink);border-color:var(--ln-line);}
body.ln-product.ln-import button{background:var(--ln-blue);color:var(--ln-paper);}
body.ln-product.ln-import button.secondary{background:var(--ln-blue-soft);color:var(--ln-blue);}
@media(max-width:680px){body.ln-product.ln-import main>section{padding:18px;}body.ln-product.ln-import .row{flex-direction:column;align-items:stretch;}body.ln-product.ln-import label{min-width:0;max-width:100%;}body.ln-product.ln-import :is(button,input,select){min-height:44px;}}

@media(max-width:680px){body.ln-product>header #role-navigation{order:3;flex:1 0 100%;width:100%;}body.ln-product>header #role-navigation>button{white-space:nowrap;overflow-wrap:normal;flex:0 0 auto;}body.ln-product>header #theme-controls{order:2;margin-left:auto;}body.ln-product>header #nav-profile{margin-left:0;}}
body.ln-product #classroom .exercise-card:not(.colored-note){background:var(--ln-paper);color:var(--ln-ink);}
html[data-theme=dark] body.ln-product #lesson-list button{background:var(--ln-paper);color:var(--ln-ink);border-color:var(--ln-line);}
html[data-theme=dark] body.ln-product #lesson-list button.active{background:var(--ln-blue-soft);color:var(--ln-blue);}
html[data-theme=dark] body.ln-product :is(#page-controls,#page-controls-bottom,#editor-pages,#editor-pages-bottom) button{background:var(--ln-field);color:var(--ln-ink);border-color:var(--ln-line);}
html[data-theme=dark] body.ln-product :is(#page-controls,#page-controls-bottom,#editor-pages,#editor-pages-bottom) button.active{background:#244f9e;color:#fff;}
html[data-theme=dark] body.ln-product :is(.exercise-title,.row-menu-body button,.back-button){color:var(--ln-ink);}

html[data-theme=dark] body.ln-product .exercise-title[style*="rgb(11, 56, 139)"]{color:var(--ln-blue)!important;}
html[data-theme=dark] body.ln-product :is(.page-actions-menu>summary,.comment-reply-toggle,.comment-edit-button,.exercise-comments button.quiet){color:var(--ln-blue);}
html[data-theme=dark] body.ln-product :is(#page-controls,#page-controls-bottom,#editor-pages,#editor-pages-bottom) button.primary{background:#244f9e;color:#fff;}
body.ln-product #user-list{max-width:none;gap:16px;}
body.ln-product #user-list .user-group{margin:0;padding:20px;}
body.ln-product #user-list .user-group h3{margin:0 0 12px;}
body.ln-product #user-list .user-row h2{font-size:17px;margin:0 0 4px;}
body.ln-product #user-list .user-row p{margin:0;font-size:12px;}

/* Compact entrance, student names and a single editor page navigator. */
body.ln-product .login-card{padding:24px;}
body.ln-product .login-card h2{margin:0 0 12px;font-size:24px;}
body.ln-product .login-card>p{margin:0 0 16px;}
body.ln-product .login-card #telegram-login-note{margin:12px 0 0;}
body.ln-product #account-password-form{margin-top:16px;padding-top:16px;}
body.ln-product #account-password-form label{margin:0 0 6px;}
body.ln-product #account-password-form input{margin:0 0 12px;}
body.ln-product #account-password-form button{margin:4px 0 0;}
body.ln-product #account-password-error:empty{display:none;}
body.ln-product .login-card>p:last-child{margin:16px 0 0;}
body.ln-product .student-row h2,body.ln-product .profile-person-name{font-weight:600;}
body.ln-product #editor-pages-bottom{display:none;}
body.ln-product .editor-outline #editor-pages{padding:0;margin:0 0 16px;border:0;background:transparent;display:block;}
body.ln-product .editor-outline .page-panel-label{display:none;}
body.ln-product .editor-outline .page-tabs{display:flex;flex-direction:column;gap:8px;}
body.ln-product .editor-outline .page-tab-group>button{width:100%;text-align:left;justify-content:flex-start;white-space:normal;}
body.ln-product .editor-outline .page-actions-menu{margin-top:12px;}
body.ln-product .editor-outline .page-actions{position:static;min-width:0;max-width:100%;box-shadow:none;padding:8px 0;}
body.ln-product .editor-outline .page-actions button{white-space:normal;text-align:left;}
body.ln-product .editor-heading-row[hidden]{display:none!important;}
body.ln-product .editor-card .student-preview-content>.exercise-instruction:first-child{margin-top:0;}
@media(max-width:760px){body.ln-product .editor-outline{max-height:none;}body.ln-product .editor-outline .page-tabs{flex-direction:row;flex-wrap:wrap;}body.ln-product .editor-outline #editor-pages{margin-bottom:0;}}
body.ln-product .editor-outline #editor-pages .page-tab-group>button.primary{background:var(--ln-blue-soft);color:var(--ln-blue);font-weight:500;border:1px solid transparent;}
body.ln-product .editor-outline #editor-pages .page-tab-group>button.secondary{background:transparent;color:var(--ln-ink);border:1px solid transparent;}
body.ln-product .editor-outline #editor-pages .page-reorder-actions{display:flex;gap:8px;justify-content:flex-end;margin:0;}
body.ln-product .editor-outline #editor-pages .page-reorder-actions button{min-height:26px;padding:2px 8px;}

body.ln-product .exercise-type-section{margin:24px 0 0;padding:0;}
body.ln-product .exercise-type-section h3{font-size:16px;font-weight:600;margin:0 0 12px;color:var(--ln-ink);}
body.ln-product .exercise-type-section .exercise-type-grid{margin:0;}

/* Distinct, quiet group surfaces and course covers from the approved library. */
body.ln-product .exercise-type-section{padding:16px;border-radius:14px;background:var(--group-bg,#edf2fc);--group-bg:#edf2fc;--group-ink:#193f8d;}
body.ln-product .exercise-type-section[data-group="1"]{--group-bg:#eaf4ef;--group-ink:#3d6655;}
body.ln-product .exercise-type-section[data-group="2"]{--group-bg:#f4eff9;--group-ink:#695481;}
body.ln-product .exercise-type-section[data-group="3"]{--group-bg:#fbf3df;--group-ink:#786329;}
body.ln-product .exercise-type-section[data-group="4"]{--group-bg:#eaf3f7;--group-ink:#3e687c;}
body.ln-product .exercise-type-section .exercise-type-example{background:var(--group-bg);color:var(--group-ink);}
html[data-theme=dark] body.ln-product .exercise-type-section{--group-bg:#29364d;--group-ink:#aac1f0;}
html[data-theme=dark] body.ln-product .exercise-type-section[data-group="1"]{--group-bg:#263d34;--group-ink:#b1d4bf;}
html[data-theme=dark] body.ln-product .exercise-type-section[data-group="2"]{--group-bg:#3a3047;--group-ink:#d1bee8;}
html[data-theme=dark] body.ln-product .exercise-type-section[data-group="3"]{--group-bg:#433d29;--group-ink:#e1ce95;}
html[data-theme=dark] body.ln-product .exercise-type-section[data-group="4"]{--group-bg:#293d46;--group-ink:#acd0e1;}
body.ln-product #course-list .compact-course-card{display:flex;flex-direction:column;align-items:stretch;gap:16px;padding:16px;--cover-bg:#e9eef9;--cover-ink:#193f8d;}
body.ln-product #course-list .compact-course-card[data-cover-tone="1"]{--cover-bg:#e6efeb;--cover-ink:#3d6155;}
body.ln-product #course-list .compact-course-card[data-cover-tone="2"]{--cover-bg:#f7f0d8;--cover-ink:#71602c;}
body.ln-product #course-list .course-thumbnail{width:100%;height:140px;flex-basis:auto;border:0;border-radius:8px;background:var(--cover-bg);color:var(--cover-ink);position:relative;overflow:hidden;}
body.ln-product #course-list .generated-course-cover{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:20px;gap:12px;}
body.ln-product .generated-course-cover:after{content:'';position:absolute;width:100px;height:140px;border:1px solid currentColor;opacity:.12;right:8px;top:35px;transform:rotate(18deg);border-radius:8px;pointer-events:none;}
body.ln-product .course-cover-scope{font-size:10px;letter-spacing:1px;text-transform:uppercase;z-index:1;}
body.ln-product .course-cover-title{font-size:24px;line-height:1.2;font-weight:600;overflow-wrap:anywhere;z-index:1;}
body.ln-product #course-list .course-thumbnail.has-cover{height:160px;background:var(--ln-field);}
body.ln-product #course-list .course-thumbnail .course-cover{width:100%;height:100%;max-height:none;object-fit:contain;margin:0;border:0;}
body.ln-product #course-list .compact-course-info{padding:0 4px;}
body.ln-product #course-list .compact-course-info h2{font-size:17px;}
body.ln-product #course-list .compact-course-actions{margin-top:auto;gap:8px;flex-wrap:wrap;}
body.ln-product #course-list .compact-course-actions>.course-meta{margin-right:auto;}
html[data-theme=dark] body.ln-product #course-list .compact-course-card{--cover-bg:#293c60;--cover-ink:#b1c8f8;}
html[data-theme=dark] body.ln-product #course-list .compact-course-card[data-cover-tone="1"]{--cover-bg:#2b4037;--cover-ink:#b4d4c4;}
html[data-theme=dark] body.ln-product #course-list .compact-course-card[data-cover-tone="2"]{--cover-bg:#433c29;--cover-ink:#e3d299;}
@media(max-width:680px){body.ln-product .exercise-type-section{padding:12px;}body.ln-product #course-list .course-thumbnail{height:130px;}}

/* Keep the outline quiet; page tools are disclosed only when needed. */
body.ln-product .editor-outline #editor-pages .page-tabs{display:flex;flex-direction:row;align-items:center;gap:6px;flex-wrap:wrap;}
body.ln-product .editor-outline #editor-pages .page-tab-group{flex:1 1 110px;}
body.ln-product .editor-outline #editor-pages .page-tab-group>button{padding:9px 10px;min-height:36px;}
body.ln-product .editor-outline #editor-pages .page-add-button{flex:0 0 30px;width:30px;min-height:30px;margin:0;padding:3px;border:1px solid var(--ln-line);background:transparent;color:var(--ln-muted);}
body.ln-product .editor-outline #editor-pages .page-actions-menu{margin-top:10px;}
body.ln-product .editor-outline #editor-pages .page-actions-menu>summary{font-size:11px;font-weight:400;color:var(--ln-muted);padding:4px 0;}
body.ln-product .editor-outline .outline-exercise-button{padding:7px 8px;}

body.ln-product .editor-outline .page-tab-group{display:flex;align-items:center;position:relative;gap:2px;}
body.ln-product .editor-outline #editor-pages .page-tab-group>button:not(.page-drag-grip){flex:1;min-width:0;}
body.ln-product .editor-outline #editor-pages .page-drag-grip{width:22px;min-width:22px;padding:2px;min-height:36px;background:transparent;color:var(--ln-muted);border:0;cursor:grab;touch-action:none;}
body.ln-product .page-drop-before:before,body.ln-product .page-drop-after:after{content:'';position:absolute;left:0;right:0;height:2px;background:var(--ln-blue);}
body.ln-product .page-drop-before:before{top:-3px;}body.ln-product .page-drop-after:after{bottom:-3px;}
body.ln-product .page-drag-preview{position:fixed;z-index:10000;pointer-events:none;opacity:.3;background:var(--ln-paper);border:1px solid var(--ln-line);border-radius:8px;display:flex;}

body.ln-product .calm-audio-player{display:block;padding:0;border:0;background:transparent;}
body.ln-product .audio-player-row{display:flex;align-items:center;gap:16px;padding:16px;background:var(--ln-field);border-radius:14px;}
body.ln-product .audio-player-row .audio-play-toggle{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:#193f8d;color:#fff;}
body.ln-product .audio-play-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round;}
body.ln-product .audio-player-row input[type=range]{flex:1;min-width:30px;width:0;padding:0;border:0;background:transparent;accent-color:#193f8d;}
body.ln-product .audio-clock{font-size:13px;color:var(--ln-muted);white-space:nowrap;font-variant-numeric:tabular-nums;}
body.ln-product .audio-player-settings{margin-top:10px;font-size:12px;color:var(--ln-muted);}
body.ln-product .audio-player-settings summary{cursor:pointer;padding:4px 0;}
body.ln-product .audio-player-settings .audio-volume{margin:12px 0;display:flex;align-items:center;gap:8px;}
body.ln-product .audio-player-settings .audio-volume input{max-width:160px;}
@media(max-width:400px){body.ln-product .audio-player-row{padding:12px;gap:10px;}body.ln-product .audio-clock{font-size:11px;}}

body.ln-product .editor-outline #editor-pages .page-tabs{display:flex;flex-direction:column;align-items:stretch;gap:8px;}
body.ln-product .editor-outline #editor-pages .page-tab-group{display:flex;flex-direction:row;flex:0 0 auto;width:100%;align-items:center;gap:6px;}
body.ln-product .editor-outline #editor-pages .page-tab-group>button:not(.page-drag-grip){flex:1 1 0;width:auto;text-align:left;justify-content:flex-start;}
body.ln-product .editor-outline #editor-pages .page-tab-group>.page-drag-grip{flex:0 0 28px;width:28px;min-width:28px;min-height:36px;padding:2px;}
body.ln-product .editor-outline #editor-pages .page-add-button{position:static;align-self:flex-end;flex:0 0 auto;width:32px;height:32px;margin:2px 0 0;transform:none;}
@media(max-width:680px){body.ln-product .editor-outline #editor-pages .page-tab-group>.page-drag-grip{flex-basis:40px;width:40px;min-height:44px;}body.ln-product .editor-outline #editor-pages .page-add-button{width:44px;height:44px;}}

body.ln-product #library .lesson-row>.lesson-drag-grip{flex:0 0 40px;width:40px;min-width:40px;height:44px;min-height:44px;padding:0;margin:0;display:grid;place-items:center;font-size:23px;color:var(--ln-muted);background:transparent;border:1px solid transparent;border-radius:8px;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;}
body.ln-product #library .lesson-drag-grip:hover,body.ln-product #library .lesson-drag-grip:focus-visible{background:var(--ln-blue-soft);color:var(--ln-blue);border-color:var(--ln-line);}
body.ln-product #library .lesson-row.dragging{user-select:none;-webkit-user-select:none;cursor:grabbing;}
body.ln-product #library .lesson-row{position:relative;}
body.ln-product #library .lesson-drop-before:before,body.ln-product #library .lesson-drop-after:after{content:'';position:absolute;left:0;right:0;height:2px;background:var(--ln-blue);pointer-events:none;}
body.ln-product #library .lesson-drop-before:before{top:0;}body.ln-product #library .lesson-drop-after:after{bottom:0;}
body.ln-product #library .lesson-module-drop{outline:2px solid var(--ln-blue);outline-offset:-2px;}

body.ln-product .youtube-block{min-width:0;width:100%;}
body.ln-product .youtube-player{display:block;width:100%;aspect-ratio:16/9;min-height:200px;border:0;border-radius:10px;background:#111;}
body.ln-product .youtube-block .toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;}
body.ln-product .youtube-block input[type=range]{flex:1 1 120px;min-width:0;width:100px;padding:0;}
body.ln-product .youtube-block>a{color:var(--ln-blue);font-size:12px;}

/* Classroom navigation: full titles, isolated menu states, pages in sidebar. */
body.ln-product #lesson-list .class-lesson-row{display:flex;align-items:flex-start;gap:4px;min-width:0;position:relative;}
body.ln-product #lesson-list .class-lesson-row>button{display:flex;flex:1 1 0;min-width:0;width:auto;align-items:flex-start;gap:8px;padding:10px 8px;text-align:left;}
body.ln-product #lesson-list .class-lesson-row>button>span:first-child{flex:0 0 26px;min-width:26px;}
body.ln-product #lesson-list .class-lesson-row>button>span:nth-child(2){flex:1;min-width:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.45;}
body.ln-product #lesson-list .class-lesson-row>.row-menu{flex:0 0 28px;margin:4px 0 0;}
body.ln-product #lesson-list .class-lesson-row>.row-menu>summary{width:28px;padding:4px 0;}
body.ln-product #lesson-list .class-lesson-row>.completion-check{flex:0 0 14px;padding:10px 0;font-size:13px;}
body.ln-product #lesson-list .row-menu-body{background:var(--ln-paper);min-width:220px;width:max-content;max-width:calc(100vw - 40px);z-index:60;}
body.ln-product #lesson-list .row-menu-body button,html[data-theme=dark] body.ln-product #lesson-list .row-menu-body button{background:var(--ln-paper);color:var(--ln-ink);border:1px solid var(--ln-line);border-radius:8px;padding:9px 12px;margin:4px 0;width:100%;text-align:left;white-space:normal;display:block;font-size:13px;}
body.ln-product #lesson-list .row-menu-body button.danger,html[data-theme=dark] body.ln-product #lesson-list .row-menu-body button.danger{background:var(--ln-red-soft);color:var(--ln-red);border-color:var(--ln-red-line);}
body.ln-product #lesson-list .row-menu-body button:hover{filter:brightness(.97);}
body.ln-product #classroom #page-controls-bottom{display:none;}
body.ln-product #classroom aside #page-controls{margin:20px 0 0;padding:16px 0 0;border:0;border-top:1px solid var(--ln-line);border-radius:0;background:transparent;display:block;}
body.ln-product #classroom aside #page-controls[hidden]{display:none;}
body.ln-product #classroom aside .page-panel-label{display:block;margin-bottom:10px;font-size:12px;font-weight:500;color:var(--ln-muted);}
body.ln-product #classroom aside .page-tabs{display:flex;flex-direction:column;align-items:stretch;gap:8px;}
body.ln-product #classroom aside .page-tab-group{display:flex;flex-direction:row;align-items:center;gap:6px;padding:0;}
body.ln-product #classroom aside .page-tab-group>button{flex:1;min-width:0;width:100%;font-size:12px;padding:8px;text-align:left;justify-content:flex-start;white-space:normal;}
body.ln-product #classroom aside .page-reorder-actions{display:none;}
body.ln-product #classroom aside .page-add-button{position:static;align-self:flex-end;flex:none;width:32px;height:32px;margin:0;}
body.ln-product #classroom aside .page-actions-menu>summary{font-size:11px;font-weight:400;color:var(--ln-muted);margin-top:10px;}
body.ln-product #classroom aside .page-actions{display:flex;flex-direction:column;gap:6px;}
body.ln-product #classroom aside .page-actions>button{font-size:12px;width:100%;margin:0;white-space:normal;}
/* Native selects must not inherit the old 28px gap height. */
body.ln-product .exercise-card .gap-sentence select.inline-gap,
body.ln-product .student-preview-content .gap-sentence select.inline-gap{height:36px;min-height:36px;max-height:none;padding:4px 24px 4px 8px;line-height:24px;font-size:16px;vertical-align:middle;text-indent:0;text-overflow:clip;opacity:1;white-space:nowrap;color:var(--ln-ink);-webkit-text-fill-color:var(--ln-ink);background-color:var(--ln-field);}
body.ln-product .gap-sentence select.inline-gap option{font-size:16px;line-height:normal;color:var(--ln-ink);background:var(--ln-paper);}
body.ln-product .exercise-card .gap-sentence input.inline-gap{height:34px;min-height:34px;line-height:24px;padding:4px 8px;}
body.ln-product .gap-sentence .teacher-dropdown-trigger{height:auto;min-height:36px;line-height:24px;padding:4px 8px;}
/* Dark classroom states and readable permanent comment highlighting. */
html[data-theme=dark] body.ln-product .comment-text-highlight{background:#dbc368!important;color:#202632!important;box-shadow:0 0 0 1px #dbc36866;}
html[data-theme=dark] body.ln-product .comment-text-highlight *{color:inherit!important;-webkit-text-fill-color:inherit!important;}
html[data-theme=dark] body.ln-product #lesson-list .class-lesson-row.lesson-completed{background:var(--ln-green-soft);border:1px solid var(--ln-green-line);border-radius:10px;}
html[data-theme=dark] body.ln-product #lesson-list .class-lesson-row.lesson-completed>button{background:transparent;color:var(--ln-ink);}
html[data-theme=dark] body.ln-product #lesson-list .class-lesson-row.lesson-completed>button.active{background:#2a4839;color:var(--ln-ink);}
html[data-theme=dark] body.ln-product #lesson-list .class-lesson-row>button>span:first-child{background:var(--ln-field);color:var(--ln-muted);border:1px solid var(--ln-line);}
html[data-theme=dark] body.ln-product #lesson-list .class-lesson-row>button.active>span:first-child{background:#244f9e;color:#fff;border-color:#4268ac;}
html[data-theme=dark] body.ln-product #lesson-list .class-lesson-row.lesson-completed>button>span:first-child{background:#2e4b3b;color:var(--ln-green);border-color:var(--ln-green-line);}
html[data-theme=dark] body.ln-product #lesson-list .completion-check{color:var(--ln-green);}
html[data-theme=dark] body.ln-product #attach-open{background:var(--ln-blue-soft);color:var(--ln-blue);border:1px solid var(--ln-line);}
html[data-theme=dark] body.ln-product .gap-sentence :is(input.inline-gap,select.inline-gap,.teacher-dropdown-trigger){color:var(--ln-ink);-webkit-text-fill-color:var(--ln-ink);opacity:1;border-color:var(--ln-line);}
html[data-theme=dark] body.ln-product .gap-sentence :is(input.inline-gap,select.inline-gap):disabled{opacity:1;color:var(--ln-ink);-webkit-text-fill-color:var(--ln-ink);}
html[data-theme=dark] body.ln-product .teacher-correct{background:var(--ln-green-soft)!important;color:var(--ln-green)!important;border-color:var(--ln-green-line)!important;-webkit-text-fill-color:var(--ln-green);}
html[data-theme=dark] body.ln-product .answer-error{background:var(--ln-red-soft)!important;color:var(--ln-ink)!important;border-color:var(--ln-red-line)!important;-webkit-text-fill-color:var(--ln-ink);}
html[data-theme=dark] body.ln-product .page-completed{background:var(--ln-green-soft)!important;color:var(--ln-green)!important;border-color:var(--ln-green-line)!important;}

/* Comments use the same surfaces for teachers and students. */
body.ln-product .exercise-comments .comment-thread{background:var(--ln-paper);color:var(--ln-ink);border:1px solid var(--ln-line);border-left:2px solid var(--ln-yellow);border-radius:10px;padding:14px;}
body.ln-product .exercise-comments .comment-thread .comment-post p{color:var(--ln-ink);}
body.ln-product .comment-thread-actions{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:4px 12px;margin-top:10px;}
body.ln-product .exercise-comments .comment-thread-actions>button{display:inline-flex;flex:0 0 auto;width:auto;min-height:28px;padding:3px 0;margin:0;border:0;background:transparent;box-shadow:none;text-align:left;float:none;font:400 11px/1.4 var(--ln-font);color:var(--ln-blue);}
body.ln-product .exercise-comments .comment-thread-actions>button.danger{color:var(--ln-red);}
body.ln-product .inline-comment-composer{background:var(--ln-paper);color:var(--ln-ink);border:1px solid var(--ln-line);border-radius:14px;padding:16px;box-shadow:var(--ln-popover-shadow);}
body.ln-product .inline-comment-composer .comment-selection{background:var(--ln-blue-soft);color:var(--ln-ink);border-left:2px solid var(--ln-yellow);margin:0 0 12px;padding:8px 10px;font-size:13px;line-height:1.5;overflow-wrap:anywhere;max-height:100px;overflow:auto;}
body.ln-product .inline-comment-composer textarea{background:var(--ln-field);color:var(--ln-ink);width:100%;margin:0;min-height:90px;}
body.ln-product .comment-composer-actions{display:flex;align-items:center;justify-content:flex-start;gap:8px;margin-top:12px;}
body.ln-product .comment-composer-actions>button{margin:0;font-size:13px;}
html[data-theme=dark] body.ln-product .exercise-comments .comment-thread{background:var(--ln-paper);color:var(--ln-ink);border-color:var(--ln-line);border-left-color:var(--ln-yellow);}
html[data-theme=dark] body.ln-product .exercise-comments .comment-quote{background:transparent;color:var(--ln-muted);}
html[data-theme=dark] body.ln-product .inline-comment-composer{background:var(--ln-paper);color:var(--ln-ink);border-color:var(--ln-line);}
html[data-theme=dark] body.ln-product .inline-comment-composer .comment-selection{background:var(--ln-blue-soft);color:var(--ln-ink);}
html[data-theme=dark] body.ln-product .inline-comment-composer .comment-selection *{color:inherit;}
