.se-library,.se-actions,.se-copyday{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.se-library label{font-size:13px;font-weight:650;width:100%}
.se-library select{flex:1;min-width:130px;max-width:100%}
.se-library button,.se-actions button,.se-copyday button,.se-days button,#se-break-set,#se-break-reset{min-height:40px;padding:9px 12px;border:1px solid var(--border2);border-radius:10px;background:var(--surface2);color:var(--text);font-family:inherit;font-weight:600;font-size:13px;cursor:pointer}
.se-library select,.se-copyday select,#se-lessons{min-height:40px;padding:8px;border:1px solid var(--border2);border-radius:8px;background:var(--surface);color:var(--text);font-family:inherit;min-width:0}
#se-lessons{width:88px}
.se-actions button[aria-pressed=true],#se-download{background:var(--primary);color:white;border-color:var(--primary)}
.se-actions button:disabled{opacity:.45;cursor:default}
#se-status,.se-input-hint,#se-shared{font-size:12px;line-height:1.5;color:var(--text2);margin:0}
#se-shared{padding:12px;background:var(--surface2);border-radius:10px}
.se-days{display:none}
.se-copyday{margin-bottom:14px;font-size:12px}
.se-copyday select{max-width:150px;flex:1}
.se-table-wrap{overflow:auto}
.se-table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:100%;font-size:12px}
.se-table th{padding:9px 3px;background:var(--surface2);font-weight:600;overflow-wrap:anywhere}
.se-table th:first-child{width:43px}
.se-table small{display:block;font-size:10px;line-height:1.5;font-weight:400}
.se-table td{position:relative;border:1px solid var(--border);padding:0;vertical-align:top}
.se-table input{width:100%;min-width:0;min-height:56px;border:0;border-radius:0;background:var(--surface);color:var(--text);font-family:inherit;font-size:13px;padding:10px 8px 17px}
.se-table input:focus{outline:2px solid var(--primary);outline-offset:-2px;position:relative;z-index:1}
.se-drag{position:absolute;bottom:0;right:2px;border:0;background:transparent;color:var(--text3);cursor:grab;font-size:15px;line-height:16px}
.se-filling .preview-toolbar{border-top:1px solid var(--border);padding-top:10px}
.sc-preview-area{position:static;max-height:none;overflow:visible}
.preview-scroller{max-height:75vh;min-height:0}
.sc-preview-area:has(#se-editor[hidden]) .se-input-hint{display:none}
.se-readonly{opacity:.6}
.se-theme-preview{width:46px;height:55px;border:1px solid;border-radius:4px;padding:4px;display:flex;flex-direction:column;gap:3px}
.se-theme-preview i{height:6px;display:block;border-radius:1px}
.se-theme-preview span{height:9px;border:1px solid;display:block}
.theme-swatch.active .se-theme-preview{outline:2px solid var(--primary);outline-offset:3px}
.theme-swatch .swatch-name{font-size:10px}
.theme-swatches{gap:12px}
[hidden]{display:none!important}
@media(max-width:860px){
 .se-days{display:flex;gap:4px;margin-bottom:12px;justify-content:space-between}
 .se-days button{flex:1;padding:8px 3px;min-height:44px}
 .se-days button[aria-pressed=true]{background:var(--primary);color:#fff}
 .se-table input{font-size:16px;min-height:50px;padding:12px}
 .se-table th:first-child{width:65px}
 .se-drag{display:none}
 .se-actions{position:sticky;top:var(--header-h);z-index:5;background:var(--surface);padding:8px 0}
 .se-actions button{flex:1;font-size:12px;padding:8px 6px}
 .se-copyday{gap:5px}
 .se-copyday button{width:100%}
 .page-hero{padding:12px 0 20px}
 main{padding-left:12px;padding-right:12px}
}
@media print{
 .se-library,.se-actions,#se-status,#se-shared,#se-editor,.se-input-hint{display:none!important}
 #preview-scroller[hidden]{display:flex!important}
 .sc-preview-area,.preview-scroller{max-height:none!important;overflow:visible!important}
}

/* Основное действие — сам лист. Управление черновиками и экспорт не занимают
   несколько отдельных рядов кнопок, пока пользователь их не открыл. */
.sc-preview-area{gap:12px;padding:20px}
.se-actions{flex-wrap:nowrap;gap:10px;padding:0;position:relative;top:auto;z-index:8}
.se-segments{display:flex;gap:3px;padding:4px;border:1px solid var(--border);border-radius:12px;background:var(--surface2);margin-right:auto}
.se-actions .se-segments button{border:0;background:transparent;color:var(--text2);min-height:36px;padding:8px 14px;white-space:nowrap;font-weight:600}
.se-actions .se-segments button[aria-pressed=true]{background:var(--surface);color:var(--primary);box-shadow:0 1px 5px rgba(0,0,0,.09)}
#se-undo{flex:none;width:38px;min-height:38px;padding:0;font-size:23px;border-color:transparent;background:transparent;color:var(--text2)}
#se-undo:disabled{visibility:hidden;width:0;padding:0;margin-left:-10px}
.se-download-menu{position:relative;flex:none}
.se-download-menu summary{display:flex;align-items:center;gap:10px;min-height:42px;padding:10px 16px;background:var(--primary);color:#fff;border-radius:11px;font-size:14px;font-weight:650;cursor:pointer;list-style:none}
.se-download-menu summary::after,.se-library-menu>summary::after{content:'';width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-top:-3px}
summary::-webkit-details-marker{display:none}
.se-download-options{position:absolute;right:0;top:calc(100% + 8px);min-width:190px;border:1px solid var(--border);border-radius:12px;padding:6px;background:var(--surface);box-shadow:var(--shadow);z-index:12}
.se-actions .se-download-options button{display:block;width:100%;text-align:left;background:transparent;border:0;border-radius:7px;min-height:42px;color:var(--text)}
.se-actions .se-download-options button:hover{background:var(--surface2);color:var(--primary)}
.se-meta{display:flex;align-items:flex-start;gap:12px;justify-content:space-between}
#se-current-name{font-size:15px;font-weight:700;overflow-wrap:anywhere;padding-top:4px}
.se-library-menu{position:relative;max-width:100%}
.se-library-menu>summary{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--text2);padding:6px 0;cursor:pointer;white-space:nowrap;list-style:none}
.se-library-menu[open]{flex:1}
.se-library-menu[open]>summary{justify-content:flex-end}
.se-library{padding:12px;background:var(--surface2);border:1px solid var(--border);border-radius:10px;margin-top:6px}
.se-library label{display:none}
.se-library select{width:100%;flex-basis:100%}
.se-library select,.se-copyday select,.field select{appearance:none;padding-right:28px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23718096' stroke-width='1.6'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center}
.se-copy-fold>summary{list-style:none;cursor:pointer;font-size:12px;color:var(--text2);padding:8px 0;margin-bottom:6px}
.se-copy-fold>summary::before{content:'+';margin-right:6px;color:var(--primary)}
.se-copy-fold[open]>summary::before{content:'−'}
.se-old-export{display:none}
.preview-toolbar{padding-top:6px;border-top:1px solid var(--border)}
#se-status{font-size:11px;color:var(--text3)}
.se-suggestions{position:fixed;z-index:10010;overflow-y:auto;overscroll-behavior:contain;background:var(--surface,#fff);color:var(--text,#1a202c);border:1px solid var(--border2,rgba(0,0,0,.14));border-radius:12px;box-shadow:0 10px 32px rgba(20,30,55,.18);padding:5px;scrollbar-width:thin}
.se-suggestion{padding:10px 12px;min-height:40px;line-height:1.35;border-radius:8px;font-family:'Segoe UI',system-ui,sans-serif;font-size:14px;cursor:pointer;overflow-wrap:anywhere}
.se-suggestion:hover,.se-suggestion[aria-selected=true]{background:var(--surface2,#f4f6fc);color:var(--primary,#4f46e5)}
.se-suggestions-inline{position:relative;left:auto;top:auto;bottom:auto;margin-top:-6px;box-shadow:none;border-color:var(--border);flex-shrink:0}
.cell-modal{max-height:calc(100dvh - 32px);overflow-y:auto}
#cell-input::-webkit-calendar-picker-indicator{display:none!important}
@media(max-width:860px){
 .sc-preview-area{padding:12px;gap:10px}
 .se-actions{gap:6px}
 .se-actions .se-segments{padding:3px;gap:0}
 .se-actions .se-segments button{padding:8px 9px;font-size:12px;min-height:36px;flex:none}
 .se-download-menu summary{padding:10px 12px;font-size:12px;min-height:42px;gap:8px}
 #se-undo{width:28px;min-height:32px;font-size:20px}
 #se-current-name{font-size:14px}
 .se-meta{gap:8px}
 .se-library-menu>summary{font-size:11px}
 .se-copyday{padding-top:4px}
}
@media(max-width:370px){.se-actions .se-segments button{padding:8px 6px;font-size:11px}.se-download-menu summary{padding:10px;font-size:11px}}
@media print{.se-meta,.se-suggestions{display:none!important}}

.se-subject-field{position:relative;width:100%}
.se-subject-field #cell-input{padding-right:44px;width:100%}
.se-subject-arrow{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:34px;height:34px;display:flex;align-items:center;justify-content:center;background:transparent;color:var(--text2);border:0;border-radius:8px;cursor:pointer}
.se-subject-arrow:hover,.se-subject-arrow[aria-expanded=true]{background:var(--surface2);color:var(--primary)}
.se-subject-arrow[aria-expanded=true] svg{transform:rotate(180deg)}
.se-quick-subjects{display:flex;gap:6px;flex-wrap:wrap;margin-top:5px}
.se-subject-chip{border:1px solid var(--border);background:var(--surface2);color:var(--text2);padding:7px 10px;min-height:32px;border-radius:20px;font:inherit;font-size:12px;line-height:1.35;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.se-subject-chip:hover{color:var(--primary);border-color:var(--primary)}
.se-table input{padding-right:34px}
.se-table .se-subject-arrow{width:26px;height:28px;right:2px;top:21px}
.se-output-stack{grid-column:2;min-width:0;display:flex;flex-direction:column;gap:16px}
.se-export-panel{grid-column:2;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:20px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.se-export-panel h2{font-size:16px;margin:0 0 5px;font-weight:700}
.se-export-panel p{font-size:12px;line-height:1.5;color:var(--text3);margin:0}
.se-export-formats{display:flex;gap:8px;flex-wrap:wrap}
.se-export-formats button{border:1px solid var(--border2);background:var(--surface2);color:var(--text);border-radius:10px;min-height:44px;padding:11px 20px;font:inherit;font-weight:650;font-size:14px;cursor:pointer}
.se-export-formats button:first-child{background:var(--primary);border-color:var(--primary);color:#fff}
.se-export-formats button:hover{filter:brightness(.96)}
@media(max-width:860px){.se-output-stack{grid-column:1;order:1}.se-export-panel{grid-column:1;order:1;padding:16px}.se-export-formats{width:100%}.se-export-formats button{flex:1;padding:11px 12px}.se-export-panel>div:first-child{width:100%}}
@media print{.se-export-panel,.se-quick-subjects,.se-subject-arrow{display:none!important}}

.se-export-formats button{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.se-export-formats button svg{flex-shrink:0}
