:root{font-family:"Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif;color:#253d43;background:#f5f7f7;font-size:14px;--green:#176f62;--line:#dce5e3;--muted:#708581}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{cursor:pointer;border:1px solid var(--line);background:white;color:inherit;padding:9px 14px;border-radius:7px;line-height:1.4}button:hover{background:#edf5f2;border-color:#94b9ac}button:disabled{opacity:.45;cursor:default}a{color:var(--green);text-decoration:none}h1,h2,h3,p{margin:0}h1{font-size:28px;letter-spacing:-.8px;font-weight:650}h2{font-size:17px;font-weight:650}h3{font-size:14px}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#12564c}.danger{color:#b74948}.sidebar{position:fixed;width:226px;inset:0 auto 0 0;background:#fff;border-right:1px solid var(--line);padding:28px 20px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:11px;font-size:30px;font-weight:700;color:#163c35;letter-spacing:-1px}.mark{background:var(--green);color:white;display:grid;place-items:center;width:38px;height:38px;border-radius:11px;font-family:inherit;font-size:30px}.workspace{color:#90a39e;letter-spacing:1.6px;font-size:9px;display:block;margin:25px 8px 17px}nav{display:grid;gap:5px}nav button{background:none;border-color:transparent;text-align:left;display:flex;gap:12px;align-items:center;font-size:16px;padding:12px}nav button span{font-size:13px}nav button.active{background:#e8f3ee;color:var(--green);font-weight:650}.sidebar-end{margin-top:auto;font-size:11px;color:var(--muted);padding:16px 8px}.sidebar-end a{display:block;margin-top:18px}.local-dot{width:6px;height:6px;border-radius:50%;background:#4caa7d;display:inline-block;margin-right:5px}.shell{margin-left:226px}header{height:88px;display:flex;align-items:center;justify-content:space-between;padding:0 36px;border-bottom:1px solid var(--line);background:white;gap:12px}header strong{display:block;margin-top:6px;font-size:14px}.crumb{font-size:11px;color:var(--muted)}.toolbar,.actions,.tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap}#save-state{font-size:11px;color:var(--muted);margin-right:7px}main{padding:34px 36px;max-width:1800px;margin:auto}.eyebrow{font-size:10px;color:var(--green);letter-spacing:2px;margin-bottom:10px;font-weight:700}.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:15px;margin-bottom:25px}.subtitle{line-height:1.8;font-size:13px;color:var(--muted);margin-top:10px}.card{background:white;border:1px solid var(--line);border-radius:11px;padding:24px;margin-bottom:20px}.card-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:18px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.metric{padding:22px;background:white;border:1px solid var(--line);border-radius:10px}.metric small{color:var(--muted);font-size:11px}.metric strong{display:block;font-size:32px;font-weight:600;margin:10px 0 2px;letter-spacing:-1px}.metric span{color:var(--muted);font-size:11px}.two-col{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:20px}.three-col{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.empty{padding:48px 20px;text-align:center;color:var(--muted);line-height:1.9}.empty h2{color:#354e49;margin-bottom:10px}.empty button{margin-top:17px}.steps{display:grid;gap:18px;margin-top:22px}.step{display:flex;gap:14px;align-items:flex-start}.step b{font-size:11px;border-radius:50%;width:27px;height:27px;background:#eef5f2;display:grid;place-items:center;color:var(--green);flex-shrink:0}.step p{font-size:12px;line-height:1.8;color:var(--muted);margin-top:4px}.badge{display:inline-block;font-size:10px;border-radius:4px;padding:4px 7px;background:#edf4f1;color:var(--green)}.badge.warn{background:#fff1d6;color:#896516}.badge.error{background:#ffe9e5;color:#a74236}.notice{background:#edf6f1;border-left:3px solid #589b7b;padding:14px 18px;font-size:12px;line-height:1.8;margin-bottom:18px}.notice.warn{background:#fff8e8;border-color:#d9a444}.tabs{border-bottom:1px solid var(--line);margin-bottom:20px;padding-bottom:12px}.tabs .active{background:#e4f1eb;color:var(--green);border-color:#c4dfd2}.muted{color:var(--muted);font-size:12px;line-height:1.8}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th{text-align:left;color:var(--muted);font-weight:500;background:#f4f8f6}th,td{padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:top}td input:not([type=checkbox]):not([type=color]){min-width:80px;width:100%;border:1px solid transparent;padding:6px;background:transparent}td input:hover{border-color:var(--line)}td input[type=color]{width:32px;height:29px;padding:2px}td .actions{flex-wrap:nowrap}td button{padding:5px 8px;font-size:11px}.search{border:1px solid var(--line);border-radius:7px;padding:9px 12px;min-width:200px;background:white}input,textarea,select{color:inherit;border:1px solid #cddbd5;border-radius:6px;padding:9px;background:white;max-width:100%}textarea{resize:vertical;line-height:1.6;width:100%}input[type=checkbox]{accent-color:var(--green)}label{display:block;font-size:12px;color:#415b54}label input:not([type=checkbox]),label select,label textarea{display:block;width:100%;margin-top:7px}label.check{display:flex;align-items:center;gap:8px;line-height:1.8}label.check input{width:auto;margin:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.form-grid .full{grid-column:1/-1}.form-grid .check{padding-top:10px}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}.form-grid select[multiple]{min-height:110px}.part{background:#f6f9f7;border:1px solid var(--line);border-radius:8px;padding:18px;margin-top:14px}.part .form-grid{grid-template-columns:repeat(4,1fr)}dialog{border:1px solid var(--line);border-radius:12px;padding:28px;max-width:960px;width:calc(100vw - 50px);max-height:90vh;box-shadow:0 20px 100px #102e3030}dialog::backdrop{background:#0e292955;backdrop-filter:blur(2px)}dialog .card-title{border-bottom:1px solid var(--line);padding-bottom:16px}.dialog-error{color:#a74236;font-size:12px;line-height:1.8;margin-top:12px}.availability{font-size:11px;margin-top:15px}.availability td,.availability th{text-align:center;padding:8px}.availability input{width:16px;height:16px}.availability th:first-child{white-space:nowrap}.timetable{table-layout:fixed;min-width:720px}.timetable th{text-align:center;padding:13px 6px}.timetable th:first-child{width:68px}.timetable td{height:110px;background:white;padding:6px;border:1px solid var(--line)}.timetable td.closed{background:repeating-linear-gradient(135deg,#f0f3f2,#f0f3f2 5px,#f6f8f7 5px,#f6f8f7 10px)}.timetable td.drop-target{outline:2px dashed var(--green);outline-offset:-3px}.lesson-tile{width:100%;padding:10px;border:1px solid #c9ded3;border-radius:6px;margin-bottom:5px;text-align:left;background:#eaf5ed;line-height:1.6}.lesson-tile strong{display:block;font-size:12px}.lesson-tile small{font-size:10px;color:#60716d;display:block}.lesson-tile.selected{outline:2px solid var(--green)}.lesson-tile.hard{border:2px solid #cd5c50}.lesson-tile.soft{border-style:dashed;border-color:#d39b38}.lesson-tile.changed{box-shadow:inset 4px 0 #ca9635}.lunch-row td{height:auto;text-align:center;font-size:10px;color:#84958f;background:#f2f6f3;padding:5px;letter-spacing:2px}.schedule-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}.schedule-toolbar .actions select{min-width:120px}.remaining{display:flex;flex-wrap:wrap;gap:7px;max-height:180px;overflow:auto}.remaining .lesson-tile{width:auto;max-width:240px}.selection-detail{display:grid;grid-template-columns:minmax(260px,1fr) 2fr;gap:20px}.mini-schedule{margin-top:12px}.mini-schedule td,.mini-schedule th{padding:5px;font-size:10px}.mini-schedule td.occupied{background:#e1efe8;color:#215744}.issue-list{list-style:none;margin:0;padding:0;max-height:320px;overflow:auto}.issue-list li{padding:10px 0;border-bottom:1px solid var(--line);font-size:12px;line-height:1.7}.issue-list .badge{margin-right:6px}.progress{width:100%;height:9px;accent-color:var(--green);margin:15px 0}.candidate{padding:16px 0;border-bottom:1px solid var(--line)}.candidate .actions{margin-top:12px}.candidate p{font-size:12px;line-height:1.8;margin-top:7px}pre{white-space:pre-wrap;font-size:11px;line-height:1.8;background:#f1f6f3;padding:16px;border-radius:6px;max-height:340px;overflow:auto}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#173f35;color:white;padding:13px 22px;border-radius:8px;font-size:12px;z-index:5;max-width:80vw;box-shadow:0 6px 30px #163e3520;display:none}#toast.visible{display:block}.skip{position:fixed;top:-60px;z-index:10}.skip:focus{top:10px;background:white;padding:10px}.file-card{display:flex;justify-content:space-between;gap:15px;padding:16px 0;border-bottom:1px solid var(--line)}.file-card p{color:var(--muted);font-size:11px;margin-top:6px;line-height:1.8}.preview{width:100%;height:660px;border:1px solid var(--line);background:white}.diff-table td{overflow-wrap:anywhere}.inline-number{width:70px}details{margin:16px 0}summary{cursor:pointer;color:var(--green);font-size:12px}.tiny{font-size:10px}.hero{background:#e8f2ec;padding:28px;border-radius:10px;margin-bottom:24px;border:1px solid #cddfd4}.hero h2{font-size:20px}.hero p{color:#698077;font-size:12px;line-height:1.9;margin:10px 0 18px}.error-text{color:#aa4539}.legend{display:flex;gap:18px;font-size:10px;color:var(--muted);margin-top:14px}.legend i{display:inline-block;width:8px;height:8px;margin-right:4px;background:#67a482}.legend .hard{background:#cd5c50}.legend .soft{background:#d39b38}.legend .changed{background:#ca9635}@media(max-width:1000px){.sidebar{width:180px;padding:24px 12px}.shell{margin-left:180px}main{padding:25px 22px}header{padding:0 22px}.two-col{grid-template-columns:1fr}.metrics{gap:10px}.part .form-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.sidebar{position:static;width:auto;padding:15px}.brand{font-size:23px}.workspace,.sidebar-end{display:none}nav{display:flex;overflow:auto;margin-top:15px}nav button{flex-shrink:0;padding:9px}nav button span{font-size:11px}.shell{margin-left:0}header{height:auto;min-height:85px;padding:15px;flex-wrap:wrap}main{padding:22px 15px}.metrics{grid-template-columns:repeat(2,1fr)}.page-head{align-items:flex-start;flex-direction:column}.form-grid,.three-col,.selection-detail{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.part .form-grid{grid-template-columns:1fr}.card{padding:18px}.preview{height:450px}h1{font-size:23px}}

.scoring-gap{border:1px dashed #4c8794;border-radius:7px;padding:9px;background:#edf8fa;color:#27616a;font-size:13px}.scoring-gap small{font-size:11px}

/* Compact desktop workspace: reserve space for the timetable, not its frame. */
:root{--muted:#526863;--line:#ccd8d3;--tile-ink:#1f3532;--tile-secondary:#40554f;--control-height:34px;--control-font-size:15px;--field-gap:7px}
.sidebar{width:164px;padding:12px 6px;overflow-y:auto}
.brand{font-size:23px;gap:7px;padding:0 6px;letter-spacing:-.6px}
.mark{width:28px;height:28px;font-size:23px;border-radius:7px}
.workspace{font-size:9px;letter-spacing:.4px;margin:12px 6px 8px;color:#526863}
nav{gap:2px}nav button{padding:7px 6px;gap:7px;border-radius:4px;font-size:14px;min-height:32px}nav button span{font-size:12px;white-space:nowrap}
.sidebar-end{font-size:11px;padding:12px 6px}.sidebar-end a{margin-top:8px}
.shell{margin-left:164px}header{height:46px;padding:0 10px;gap:8px}header>div:first-child{min-width:0;display:flex;align-items:center;gap:12px}header strong{margin:0;font-size:13px;overflow-wrap:anywhere}.crumb{font-size:11px;white-space:nowrap}
button{padding:5px 9px;border-radius:4px;font-size:13px;min-height:29px}input,select,textarea{padding:5px 7px;border-radius:4px;font-size:var(--control-font-size)}.toolbar,.actions{gap:5px}.toolbar button{min-width:30px}#save-state{font-size:11px;margin-right:3px}
main{padding:18px;max-width:none}h1{font-size:22px;letter-spacing:-.3px}.page-head{margin-bottom:16px}.card{padding:16px;border-radius:6px;margin-bottom:12px}.card-title{margin-bottom:10px}.subtitle{margin-top:6px}.form-grid{gap:12px}
main.editor-page{padding:8px;margin:0}
.editor-heading{display:flex;align-items:center;gap:12px;margin-bottom:6px;min-height:29px}
.editor-heading h1{font-size:17px;line-height:1.3;letter-spacing:0;white-space:nowrap}
.editor-heading p{font-size:12px;color:var(--muted);line-height:1.4}.editor-heading>button{margin-left:auto;white-space:nowrap}
.editor-toolbar{gap:6px;margin-bottom:6px;padding:0}.editor-toolbar .actions{gap:4px}.editor-toolbar .actions select{min-width:0;font-size:var(--control-font-size);min-height:29px}.editor-toolbar #view-kind{width:94px}.editor-toolbar #view-id{min-width:84px;max-width:190px}.editor-toolbar #week{width:155px}
.grid-text-label{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--muted)}.grid-text-label select{width:57px;margin:0}
.editor-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:start}.editor-board{min-width:0;background:white;border:1px solid var(--line);border-radius:4px;overflow:hidden}
.editor-page .timetable{min-width:540px;font-size:13px}.editor-page .timetable thead th{height:32px;padding:3px 4px;line-height:1.3;font-weight:600;color:#314c43;border:1px solid var(--line);border-top:0;background:#eef3f0}
.editor-page .timetable th:first-child{width:42px}.grid-date{font-size:11px;font-weight:400;margin-left:6px;color:#526863}
.editor-page .timetable tbody th{padding:6px 3px;vertical-align:middle;text-align:center;font-weight:600;background:#f2f5f3;border:1px solid var(--line);color:#314c43}
.editor-page .timetable td{height:76px;padding:2px;vertical-align:top;background:white}
.editor-page .lesson-tile{padding:4px 6px;margin:0 0 2px;border-radius:3px;line-height:1.35;border:1px solid #aec9b8;min-height:66px;color:var(--tile-ink);white-space:nowrap;overflow-wrap:normal;word-break:normal}
.editor-page .lesson-tile:last-child{margin-bottom:0}.editor-page .lesson-tile strong{font-size:17px;line-height:1.35;font-weight:650;color:var(--tile-ink)}
.editor-page .lesson-tile small{font-size:13px;line-height:1.4;color:var(--tile-secondary)}.editor-page .lesson-tile .tile-room{font-size:12px}.tile-group{margin-left:6px;font-size:12px}
.editor-page .lesson-tile.selected{outline:2px solid #176f62;outline-offset:-2px}.editor-page .lesson-tile.hard{border:2px solid #b6382d}.editor-page .lesson-tile.soft{border:2px dashed #906611}
.editor-page .text-large .lesson-tile{min-height:82px}.editor-page .text-large .lesson-tile strong{font-size:18px}.editor-page .text-large .lesson-tile small{font-size:14px}.editor-page .text-large .timetable td{height:90px}
.editor-page .legend{margin:0;padding:5px 7px;gap:14px;flex-wrap:wrap;font-size:11px;border-top:1px solid var(--line);color:#526863}.editor-page .lunch-row td{height:auto;padding:3px}
.editor-page .scoring-gap{min-height:66px;border-radius:3px;padding:4px 6px;font-size:13px;line-height:1.4;border-color:#427b86}.editor-page .scoring-gap small{font-size:11px}
.editor-status{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px}.editor-status .card{padding:7px 9px;margin:0;border-radius:4px;min-width:0}.editor-status .card-title{margin-bottom:3px}.editor-status h2{font-size:13px}.editor-status .badge{padding:2px 5px;font-size:11px}.editor-status .muted{font-size:12px;line-height:1.4}
.editor-detail{min-width:0}.editor-detail>.card{padding:9px;margin:0;border-radius:4px}.editor-detail .card-title{align-items:flex-start;flex-direction:column;gap:6px;margin-bottom:8px}.editor-detail h2{font-size:14px;line-height:1.5}.editor-detail .actions{gap:4px}.editor-detail button{font-size:12px;padding:4px 6px}.editor-detail .selection-detail{display:block}.editor-detail .mini-schedule{margin:4px 0 10px}.editor-detail .mini-schedule th,.editor-detail .mini-schedule td{font-size:11px;padding:3px}.editor-detail .muted{font-size:12px;line-height:1.5;margin-bottom:8px}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid #176f62;outline-offset:2px}
.selection-toolbar{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-bottom:5px;font-size:12px}.selection-toolbar>span{max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:clip;margin-right:4px}.selection-toolbar button{padding:4px 7px;font-size:12px}
@media(max-width:1000px){main{padding:12px}.editor-heading p{display:none}.crumb{display:none}.editor-toolbar{justify-content:flex-start}.editor-toolbar>.actions:last-child{margin-left:auto}}
@media(max-width:700px){.sidebar{position:static;width:auto;padding:6px;overflow:visible}.brand{font-size:20px}.sidebar nav{margin-top:6px;gap:2px}.sidebar nav button{padding:5px 7px}.shell{margin-left:0}header{height:auto;min-height:42px;padding:5px 8px;flex-wrap:wrap}header>div:first-child{flex:1}.toolbar{gap:4px}#save-state{max-width:90px}main.editor-page{padding:4px}.editor-heading{gap:5px}.editor-heading h1{font-size:16px}.editor-toolbar>.actions:last-child{margin-left:0}.editor-status{grid-template-columns:1fr}.grid-date{display:block;margin-left:0}.editor-page .timetable{min-width:540px}.editor-detail .card-title{flex-direction:column}}

.editor-detail .mini-schedule th:first-child{width:30px;min-width:30px;white-space:nowrap}

/* Original → date plan → daily changes. */
nav .workflow-step{font-weight:600;gap:7px}nav .step-index{display:grid;place-items:center;width:19px;height:19px;border:1px solid #8aa69b;border-radius:3px;font-size:11px;flex-shrink:0}nav .workflow-step.active .step-index{background:var(--green);border-color:var(--green);color:white}
.calendar-weeks{display:grid;gap:8px}.calendar-week{background:white;border:1px solid var(--line);border-radius:4px;overflow:hidden}.calendar-week-head{display:flex;align-items:center;gap:8px;padding:5px 8px;background:#edf3ef;border-bottom:1px solid var(--line);font-size:13px}.calendar-week-head button{margin-left:auto}.calendar-table{font-size:12px}.calendar-table th,.calendar-table td{padding:5px 8px;vertical-align:middle}.calendar-table tbody th{white-space:nowrap;width:110px}.calendar-table .plan-summary{font-size:12px;line-height:1.5}.calendar-table td:last-child{width:198px}.calendar-table .badge{padding:3px 5px;font-size:11px}.calendar-off{background:#f5f7f6;color:#526863}.calendar-off th{background:#f5f7f6}.calendar-source-note{margin-top:8px}
.day-pattern{border:1px solid var(--line);border-radius:4px;padding:8px;margin:10px 0}.day-pattern legend{font-size:13px;font-weight:600}.day-pattern .actions{align-items:flex-end}.day-pattern .actions label{flex:1;min-width:90px}.day-pattern .actions select{margin-top:4px}.day-pattern .muted{margin-top:6px}.day-slot-table th,.day-slot-table td{padding:4px 8px}.day-slot-table td select{width:100%}.daily-context{display:flex;align-items:center;gap:8px;padding:5px 7px;margin-bottom:6px;background:#edf3ef;border:1px solid var(--line);border-radius:4px;font-size:12px;flex-wrap:wrap}.daily-context .badge{font-size:11px;padding:3px 5px}.daily-context>span:not(.badge){flex:1}.daily-context button{margin-left:auto}.editor-page .timetable th.operation-day{background:#dceee4;box-shadow:inset 0 -3px #176f62}.daily-diff{margin-top:6px!important;padding:8px!important}.daily-diff h2{font-size:13px}#operation-week{font-size:var(--control-font-size);min-height:29px;width:220px;max-width:100%}
@media(max-width:700px){.calendar-table{min-width:650px}.calendar-week-head{flex-wrap:wrap}.day-pattern .actions label{min-width:80px}.daily-context strong{font-size:12px}}
.editor-page .department-colors{padding-top:3px;padding-bottom:3px;gap:12px;color:#263d37}.department-colors span{white-space:nowrap}.department-colors i{border:1px solid #60756b;width:10px;height:10px}
.selection-toolbar+.editor-workspace .matrix-scroll{max-height:max(240px,calc(100dvh - 294px))}
.matrix-hint{font-size:11px;color:#526863}.matrix-scroll{max-height:max(240px,calc(100dvh - 260px));position:relative;overflow:auto;scrollbar-gutter:stable}
.editor-page .timetable{table-layout:auto;white-space:nowrap;overflow-wrap:normal;word-break:normal;font-size:13px}
.editor-page .resource-matrix{table-layout:fixed;width:100%;border-collapse:separate;border-spacing:0;min-width:calc(80px + var(--matrix-columns)*30px)}
.resource-matrix .resource-col{width:80px}.resource-matrix .slot-col{width:auto}.editor-page .resource-matrix th:first-child{width:auto}
.editor-page .resource-matrix thead th{position:sticky;top:0;z-index:3;height:25px;padding:2px;text-align:center;border-left:0;border-bottom:1px solid #acbdb6;background:#eef3f0}
.editor-page .resource-matrix thead tr:nth-child(2) th{top:25px;height:23px;font-size:13px}
.editor-page .resource-matrix thead tr:first-child th:first-child{left:0;z-index:5;border-right:1px solid #acbdb6}
.editor-page .resource-matrix tbody th{position:sticky;left:0;z-index:2;padding:2px;background:#f2f5f3;border-left:0;border-top:0;border-right:1px solid #acbdb6}
.editor-page .resource-matrix td{height:44px;padding:1px;border-right:1px solid #dce5e3;border-bottom:1px solid #dce5e3}
.editor-page .resource-matrix td.closed{background:repeating-linear-gradient(135deg,#f0f2f1,#f0f2f1 4px,#e5eae7 4px,#e5eae7 5px)}
.editor-page .resource-matrix .day-start{border-left:2px solid #9cacaa}.resource-matrix .resource-name{display:block;width:100%;border:0;border-radius:2px;background:transparent;padding:5px 2px;min-height:38px;font-size:13px;font-weight:650;text-align:left;color:#263d37;white-space:nowrap;overflow-wrap:normal;overflow:hidden;text-overflow:clip}
.resource-matrix .resource-name:hover{background:#dceee4;text-decoration:underline}
.editor-page .resource-matrix .lesson-tile{position:relative;min-width:0;min-height:40px;padding:2px;border-radius:2px;line-height:1.25;overflow:hidden}

.editor-page .resource-matrix .lesson-tile strong{font-size:14px;line-height:1.25;overflow:hidden;text-overflow:clip}.editor-page .resource-matrix .lesson-tile small{font-size:12px;line-height:1.25;overflow:hidden;text-overflow:clip}
.editor-page .resource-matrix .tile-room{display:none}.editor-page .resource-matrix .scoring-gap{min-height:40px;padding:3px 1px;font-size:12px;line-height:1.3;white-space:nowrap;overflow-wrap:normal;overflow:hidden;text-overflow:clip}
.editor-page .resource-matrix .continuation{display:block;padding:5px;color:#526863;font-size:12px}
.editor-page .text-large .resource-matrix{min-width:calc(88px + var(--matrix-columns)*30px)}.text-large .resource-matrix .resource-col{width:88px}.text-large .resource-matrix .resource-name{font-size:14px}
.editor-page .text-large .resource-matrix .lesson-tile{min-height:48px}.editor-page .text-large .resource-matrix .lesson-tile strong{font-size:18px}.editor-page .text-large .resource-matrix .lesson-tile small{font-size:14px}
.editor-page .text-large .resource-matrix td{height:52px}
@media(max-width:700px){.matrix-scroll{max-height:65dvh}.matrix-hint{display:none}}
.day-button-label{display:block;font-size:12px;color:#415b54;margin-bottom:5px}.day-buttons{display:flex;gap:3px;flex-wrap:wrap}
.day-buttons button{padding:4px 8px;min-width:31px;border-radius:4px;line-height:1.3;font-size:13px;color:#263d37}
.day-buttons button.selected,.slot-controls>button.selected{background:#176f62;color:white;border-color:#176f62;font-weight:650}
.day-plan-top .day-button-field:last-child{grid-column:1/-1}.day-range{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}.day-range>.day-button-field{flex:1;min-width:150px}.day-range>button{padding:5px 8px}
.slot-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.slot-controls>.day-button-field{flex:none}.slot-controls .day-button-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.slot-controls>button{padding:4px 6px;border-radius:4px;font-size:12px;min-height:28px;white-space:nowrap}.slot-controls .day-buttons{flex-wrap:nowrap}.slot-controls.slot-off .day-buttons button.selected{background:#edf2ef;color:#526863;border-color:#aabcb3}
.day-slot-table th:first-child{width:64px;white-space:nowrap;vertical-align:middle}.day-slot-table td{padding:6px 4px}.day-slot-table td select{width:100%}
@media(max-width:700px){.slot-controls{gap:5px}.slot-controls .day-buttons{gap:2px}.slot-controls .day-buttons button{padding:4px 6px;min-width:27px}.day-range{gap:8px}}
/* PDF time-slot marks: background describes placement state, names carry subject colors. */
.editor-page .timetable td{background:#b8d9ec}.editor-page .timetable td.closed{background:#d9d9d9}
.editor-page .lesson-tile .colored-name,.colored-name{-webkit-text-stroke:.25px var(--name-outline,transparent);paint-order:stroke fill;font-weight:650}
.editor-page .lesson-tile.continuous{border:3px solid var(--tile-fill)}
.editor-page .timetable .continuation{display:block;min-height:40px;padding:4px;background:white;border:3px solid var(--continuation-color);color:#263d37;font-size:12px}
.editor-page .lesson-tile.selected{outline:2px solid #b3428c;outline-offset:-2px}
.editor-page .department-colors .colored-name{font-weight:650}

/* Remaining lessons stay above the board; proposals open on demand. */
.remaining-tray{display:grid;grid-template-columns:112px minmax(0,1fr);gap:5px;min-height:54px;margin-bottom:5px;padding:3px 5px;background:#eef3ef;border:1px solid #bdcec4;border-radius:3px}
.remaining-tray-label{display:flex;flex-direction:column;justify-content:center;gap:2px;white-space:nowrap;font-size:12px}.remaining-tray-label small{font-size:10px;color:#526863}.remaining-tray-label .badge{padding:1px 5px}
.remaining-rack{display:flex;gap:3px;align-items:center;min-height:46px;overflow-x:auto;overflow-y:hidden;border:1px dashed #aabeb2;padding:2px}.remaining-rack>.muted{font-size:12px;white-space:nowrap}.remaining-tray.drop-target{background:#d0e9da;border-color:#176f62}
.editor-page .remaining-rack .lesson-tile{flex:0 0 90px;width:90px;min-height:50px;margin:0;padding:1px 2px;overflow:hidden}.editor-page .remaining-rack .lesson-tile strong{font-size:13px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:clip}.editor-page .remaining-tray.text-large .lesson-tile strong{font-size:15px}
.editor-page .matrix-scroll{max-height:max(240px,calc(100dvh - 314px))}.editor-page .selection-toolbar+.editor-workspace .matrix-scroll{max-height:max(240px,calc(100dvh - 348px))}.editor-status{grid-template-columns:1fr}
.move-dialog{font-size:13px}.move-info{display:flex;flex-wrap:wrap;gap:7px 20px;margin-bottom:8px}.move-info>span{display:flex;gap:7px;align-items:baseline}.move-info small{color:#526863;font-size:11px}.move-info strong{font-size:13px}
.move-legend{display:flex;gap:8px 14px;flex-wrap:wrap;margin:4px 0 6px;font-size:12px}.move-legend #move-progress{margin-left:auto;color:#526863}.move-grid{table-layout:fixed;width:100%;min-width:330px;border-collapse:collapse}.move-grid th,.move-grid td{padding:2px;border:1px solid #bdcec4;text-align:center}.move-grid th{background:#edf3ef;font-size:13px}.move-grid th:first-child{width:52px}.move-grid thead small{font-size:11px;font-weight:400;margin-left:5px}.move-slot{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:43px;border:1px solid transparent;border-radius:2px;padding:2px;color:#253d43}.move-mark{font-size:21px;font-weight:650;line-height:1.05}.move-slot small{font-size:11px;line-height:1.35}.move-slot.direct,.move-slot.chain{background:#c7e6a5;color:#203c20}.move-slot.swap,.move-slot.chain.same-day,.move-slot.direct.same-day{background:#17643b;color:#fff}.move-slot.current{background:#b8d9ec;color:#16507d}.move-slot.push{background:#fff1a4;color:#67530d}.move-slot.blocked{background:#e3e8e5;color:#68796e}.move-slot.search,.move-slot.unavailable{background:#eef1ef;color:#57695f}.move-slot.pending{background:#f5f7f6;color:#6c8073}.move-slot.chosen{outline:2px solid #176f62;outline-offset:-2px}.move-slot:hover{border-color:#176f62}
.move-plan{border-top:1px solid #bdcec4;margin-top:9px;padding-top:8px;min-height:74px}.move-plan h3{font-size:14px;margin-bottom:6px}.move-candidates{gap:4px;margin-bottom:6px}.move-candidates button{font-size:12px;padding:4px 7px}.move-summary{font-size:12px;margin:4px 0 6px}.move-summary strong{color:#725309}.move-steps{font-size:12px;min-width:540px}.move-steps th,.move-steps td{padding:4px 6px}.move-steps th{font-size:12px}.move-adopt{margin-top:8px}.move-adopt button{padding:6px 10px;font-size:13px}.move-adopt span{font-size:11px}.move-search-status{font-size:12px;color:#526863;margin-bottom:5px}
@media(max-width:700px){.remaining-tray{grid-template-columns:85px minmax(0,1fr)}.remaining-tray-label small{white-space:normal}.editor-page .matrix-scroll,.editor-page .selection-toolbar+.editor-workspace .matrix-scroll{max-height:60dvh}.move-info{gap:4px 10px}.move-grid thead small{display:block;margin:0}.move-grid th:first-child{width:40px}}
/* Keep the destination grid still while candidate details grow below it. */
dialog:has(.move-dialog){top:24px;bottom:auto;margin:0 auto;max-height:calc(100dvh - 48px)}
@media(max-width:700px){dialog:has(.move-dialog){top:12px;max-height:calc(100dvh - 24px);padding:14px}}

.editor-page:has(.remaining-tray.has-remaining) .matrix-scroll{max-height:max(240px,calc(100dvh - 326px))}
.editor-page:has(.remaining-tray.has-remaining.text-large) .matrix-scroll{max-height:max(240px,calc(100dvh - 332px))}
.editor-page:has(.remaining-tray.has-remaining) .selection-toolbar+.editor-workspace .matrix-scroll{max-height:max(240px,calc(100dvh - 360px))}
.editor-page:has(.remaining-tray.has-remaining.text-large) .selection-toolbar+.editor-workspace .matrix-scroll{max-height:max(240px,calc(100dvh - 366px))}
@media(max-width:700px){.editor-page:has(.remaining-tray.has-remaining) .matrix-scroll,.editor-page:has(.remaining-tray.has-remaining) .selection-toolbar+.editor-workspace .matrix-scroll{max-height:60dvh}}

.move-search-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 0;border-top:1px solid var(--line,#d9e1db);margin-top:8px}
.move-search-tools .form-grid{flex:1 1 320px;margin:0}
.move-search-tools p{margin:0;flex-basis:100%}
.drop-proposal-panel{border:1px solid #baccc4;background:#f5f9f7;padding:6px 8px;margin:4px 0 6px;font-size:12px}
.drop-proposal-panel h2{font-size:14px;margin:0}.drop-proposal-panel .actions{gap:5px}.drop-proposal-panel p{margin:4px 0}.drop-proposal-panel button{padding:4px 7px;font-size:12px}.drop-proposal-panel summary{cursor:pointer;margin-top:4px}.drop-search-options label{font-size:12px}.drop-search-options select{padding:3px 6px;width:auto}.drop-proposal-panel .diff-table{font-size:12px}.drop-proposal-panel .diff-table th,.drop-proposal-panel .diff-table td{padding:3px 5px}
.timetable td.forbidden,.forbidden-key,.availability-state{--forbidden-line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 50L100 50' fill='none' stroke='%23b2a18a' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E")}
.timetable td.forbidden{background:#f4f0e9 var(--forbidden-line) center/100% 100% no-repeat;position:relative}
/* Keep the restriction available to screen readers without a visible label. */
.forbidden-mark{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;pointer-events:none}
.forbidden-key{display:inline-flex;align-items:center;gap:3px}
.forbidden-key::before{content:'';width:12px;height:12px;background:#f4f0e9 var(--forbidden-line) center/100% 100% no-repeat}

/* Keep status buttons inside their columns, including the shared search class. */
.move-grid .move-slot{min-width:0;max-width:100%;min-height:43px;overflow:hidden;white-space:nowrap;padding:2px}.move-grid .move-slot small{max-width:100%;overflow:hidden;text-overflow:clip;white-space:nowrap}.move-grid .move-source-day{background:#b8d9ec;color:#16507d;font-weight:700;box-shadow:inset 0 -3px #16507d}.move-count-note{margin:5px 0;font-size:11px;color:#526863}.move-legend button{padding:2px 5px;font-size:11px}.move-legend [hidden]{display:none}

/* All sidebar symbols occupy the same box, including numbered workflow steps. */
.sidebar nav .nav-icon{display:grid;place-items:center;width:19px;height:19px;flex:0 0 19px;line-height:1}
.sidebar nav .nav-icon svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

.page-actions{justify-content:flex-end;margin-bottom:12px}

.calendar-exception{background:#ffeb84;color:#5c4300;font-weight:700;box-shadow:inset 0 0 0 1px #d3ab3e}

/* Movement dialog: aligned facts, search status, and a candidate/detail layout. */
dialog:has(.move-dialog){padding:18px 22px;max-width:1120px}
dialog:has(.move-dialog)>.card-title{margin-bottom:10px}
dialog:has(.move-dialog) .card-title{padding-bottom:10px;margin-bottom:10px}
dialog:has(.move-dialog) .dialog-close{border:0;background:transparent;box-shadow:none;padding:4px 7px;font-size:19px;line-height:1;color:#526863}
dialog:has(.move-dialog) .dialog-close:hover{background:#edf3ef;color:#173f35}
dialog:has(.move-dialog) .dialog-error:empty{display:none}
.move-info{display:grid;grid-template-columns:minmax(70px,.6fr) minmax(90px,.8fr) minmax(130px,1.4fr) minmax(90px,1fr) minmax(120px,1fr);gap:12px;margin:0 0 9px}
.move-info>div{display:grid;grid-template-rows:17px 22px;align-items:center;min-width:0}
.move-info dt{font-size:11px;line-height:17px;color:#526863}
.move-info dd{margin:0;font-size:14px;line-height:22px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:clip}
.move-legend{margin:3px 0 6px;gap:5px 12px}
.move-status-bar{display:flex;align-items:center;gap:10px;padding:5px 8px;margin-bottom:6px;min-height:29px;background:#f0f5f2;border:1px solid #d5e1da;border-radius:3px;font-size:12px;color:#526863}
.move-status-bar progress{flex:1;min-width:60px;height:9px;accent-color:#176f62}
.move-status-bar #move-progress{white-space:nowrap;line-height:18px}
.move-status-bar button{font-size:11px;padding:2px 6px;line-height:18px}
.move-status-bar [hidden]{display:none}
.move-grid th,.move-grid td{vertical-align:middle}
.move-grid tbody th{text-align:center;vertical-align:middle;font-weight:600}
.move-plan-layout{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;align-items:start}
.move-candidates{display:flex;flex-direction:column;gap:5px;margin:0;min-width:0}
.move-candidates button{display:flex;flex-direction:column;align-items:flex-start;width:100%;padding:7px 9px;white-space:normal;text-align:left;font-size:13px;line-height:1.45}
.move-candidates strong{font-size:14px;font-weight:650}
.move-candidates small{font-size:11px;font-weight:400}
.move-detail{min-width:0}
.move-detail .move-steps{font-size:15px;line-height:1.45;min-width:560px}
.move-detail .move-steps th{font-size:12px;font-weight:600}
.move-detail .move-steps td,.move-detail .move-steps th{padding:5px 7px;vertical-align:middle}
.move-detail .move-steps tbody th{text-align:center}
.move-detail .move-steps td{white-space:nowrap}
.move-detail .move-steps .colored-name{font-weight:600}
.move-detail .move-summary{font-size:13px;margin:4px 0 7px}
.move-detail .move-search-status{font-size:12px;line-height:1.5;margin-bottom:7px}
.move-adopt{justify-content:space-between;gap:12px;margin-top:12px;padding-top:9px;border-top:1px solid #d5e1da;flex-wrap:nowrap}
.move-adopt button{margin-left:auto;flex-shrink:0;font-size:14px;padding:7px 12px}
.move-adopt span{font-size:11px;line-height:1.4}
@media(max-width:700px){dialog:has(.move-dialog){padding:12px}.move-info{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px}.move-info>div:last-child{grid-column:1/-1}.move-plan-layout{grid-template-columns:110px minmax(0,1fr);gap:8px}.move-candidates button{padding:5px}.move-candidates strong{font-size:12px}.move-candidates small{font-size:10px}.move-status-bar{flex-wrap:wrap;gap:5px}.move-status-bar progress{flex-basis:100%}.move-detail .move-steps{font-size:14px}.move-adopt{align-items:flex-end}}
.slot-availability-info{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;margin-bottom:8px;font-size:14px}.slot-availability-info strong{font-size:16px}.timetable td[tabindex="0"]:focus-visible{outline:2px solid #176f62;outline-offset:-2px}
dialog:has(.slot-availability-info){max-width:460px;padding:18px}dialog:has(.slot-availability-info) .card-title{padding-bottom:10px;margin-bottom:12px}dialog:has(.slot-availability-info) .dialog-close{border:0;background:transparent;font-size:18px;padding:4px 7px}dialog:has(.slot-availability-info) .form-actions{margin-top:16px}
.header-location{display:flex;align-items:center;gap:10px;min-width:0}.header-location>div:last-child{min-width:0}.navigation-controls{display:flex;gap:4px;flex-shrink:0}.navigation-controls button{white-space:nowrap;padding:4px 7px;font-size:12px}
dialog:has(.resource-condition-note){padding:18px 22px;max-width:850px}dialog:has(.resource-condition-note) .form-grid{column-gap:16px;row-gap:8px}dialog:has(.resource-condition-note) .dialog-close{border:0;background:transparent;font-size:18px}dialog:has(.resource-condition-note) .form-actions{position:sticky;bottom:-18px;background:#fff;padding:10px 0;margin-top:10px}.resource-condition-note{margin-bottom:12px}
@media(max-width:700px){.header-location{gap:6px;flex-wrap:wrap}.navigation-controls button{padding:4px;font-size:11px}dialog:has(.resource-condition-note){padding:12px}}
.tile-context-menu{position:fixed;z-index:1000;display:grid;width:max-content;min-width:min(250px,calc(100vw - 8px));max-width:calc(100vw - 8px);max-height:calc(100dvh - 8px);overflow:auto;padding:4px;background:#fff;border:1px solid #b9ccc5;border-radius:6px;box-shadow:0 5px 18px #173c3029;--button-height:auto;--button-white-space:normal}
.tile-context-menu[hidden]{display:none}
.tile-context-menu button{display:flex;align-items:center;gap:8px;border:0;border-radius:3px;background:transparent;padding:8px 12px;text-align:left;font-size:14px;line-height:1.4;color:#203d42}
.tile-context-menu svg{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tile-context-menu button:hover:not(:disabled),.tile-context-menu button:focus-visible{background:#e5f1eb;outline:0}
.tile-context-menu button:disabled{color:#9aa7a2;cursor:default}
.calendar-toolbar{margin-bottom:7px}.calendar-toolbar .actions input{width:158px;margin:0;font-size:var(--control-font-size)}
.calendar-month-wrap{overflow:auto;border:1px solid #bdcec6;border-radius:4px;background:#fff}
.month-calendar{table-layout:fixed;width:100%;min-width:790px;border-collapse:collapse;font-size:13px}
.month-calendar .calendar-week-col{width:92px}
.month-calendar .calendar-weekend-col{width:86px}
.month-calendar th,.month-calendar td{border:1px solid #d6e0db;padding:0}
.month-calendar thead th{padding:6px;text-align:center;background:#edf3ef;font-weight:650}
.month-calendar .saturday .calendar-date,.month-calendar th.saturday{color:#526e93}
.month-calendar .sunday .calendar-date,.month-calendar th.sunday{color:#a45f5f}
.month-calendar .calendar-week-control{vertical-align:top;text-align:center;background:#f2f6f3;padding:10px 4px;font-weight:400}
.calendar-week-date{display:block;font-size:12px;margin-bottom:6px;white-space:nowrap}
.calendar-week-control .badge{display:block;width:max-content;margin:0 auto 8px;padding:3px 8px;font-size:15px;font-weight:700;color:#174b3d;background:#dfeee4}
.calendar-week-control button{display:block;width:100%;font-size:11px;padding:4px 3px;margin-top:5px}
.month-calendar .calendar-day{vertical-align:top;background:#fff}
.month-calendar .calendar-day.is-off{background:#f5f7f6}
.month-calendar .calendar-day.is-exception{background:#fffdf1}
.month-calendar .calendar-day.outside-range{background:#f0f2f1;color:#a3aca8;padding:7px}
.month-calendar .outside-month .calendar-date{color:#98a59e}
.calendar-day-content{display:flex;flex-direction:column;min-height:148px}
.calendar-day-edit{display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:7px;width:100%;min-height:117px;border:0;border-radius:0;background:transparent;padding:7px;text-align:left}
.calendar-day-edit:hover{background:#eaf3ed}
.is-exception .calendar-day-edit:hover{background:#fff4c7}
.calendar-date-row{display:flex;align-items:center;justify-content:space-between;width:100%;gap:3px}
.calendar-date{display:inline-flex;align-items:center;justify-content:center;min-width:25px;height:25px;font-size:17px;font-weight:650;border-radius:4px}
.is-today .calendar-date{background:#176f62;color:#fff!important}
.calendar-day-edit .badge{padding:3px 6px;font-size:16px;font-weight:700;color:#174b3d;background:#dfeee4;border:1px solid #bdd3c6;line-height:1.35;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:clip}
.calendar-day-edit .badge.calendar-exception{color:#513c00;background:#ffdf63;border-color:#c89b22;box-shadow:none}
.is-off:not(.is-exception) .calendar-day-edit .badge{color:#536257;background:#e4e9e6;border-color:#d0d8d3;font-size:13px}
.month-calendar .saturday .calendar-day-edit .badge,.month-calendar .sunday .calendar-day-edit .badge{white-space:normal}
.calendar-change{font-size:11px;color:#986b16;white-space:nowrap}
.calendar-slot-summary{display:flex;flex-wrap:wrap;gap:2px 6px;font-size:11px;line-height:1.4;color:#52685c}
.calendar-slot-summary>span{white-space:nowrap}
.calendar-day-actions{display:flex;justify-content:flex-end;padding:0 6px 6px}
.calendar-day-actions button{font-size:11px;padding:3px 6px;min-height:25px;background:transparent}
.month-calendar .saturday .calendar-day-actions,.month-calendar .sunday .calendar-day-actions{padding:0 3px 6px}
.month-calendar .saturday .calendar-day-actions button,.month-calendar .sunday .calendar-day-actions button{font-size:10px;padding:3px 2px;max-width:100%}
.calendar-footnote{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:7px;font-size:11px}
.calendar-footnote .badge{font-size:11px;padding:3px 5px}
@media(max-width:1000px){.month-calendar .calendar-week-col{width:80px}.month-calendar .calendar-weekend-col{width:72px}.calendar-day-edit{padding:5px;gap:5px}.calendar-day-edit .badge{font-size:15px}.calendar-change{font-size:10px}.calendar-day-actions{padding:0 4px 5px}.calendar-day-actions button{font-size:10px;padding:2px 5px}.calendar-toolbar{flex-wrap:wrap}}
/* Shared date/month inputs: no OS-specific native calendar controls. */
.date-control{display:inline-flex;flex-direction:column;min-width:0;width:100%;vertical-align:middle}
.date-input-row{display:flex;position:relative;width:100%;align-items:center}
.date-control .date-input-row input{appearance:none;-webkit-appearance:none;width:100%;min-width:0;margin:0;padding:6px 36px 6px 8px;border:1px solid #bdcec7;border-radius:4px;background:#fff;color:#203d42;font-size:var(--control-font-size);line-height:1.4;font-variant-numeric:tabular-nums}
.date-input-row input[aria-invalid="true"]{border-color:#b44035}
.date-control [data-date-open]{position:absolute;right:1px;top:1px;bottom:1px;width:32px;min-height:0;display:flex;align-items:center;justify-content:center;border:0;border-left:1px solid #d7e1dc;border-radius:0 3px 3px 0;padding:0;background:#f1f6f3;color:#285b4c}
.date-control [data-date-open]:hover{background:#dcece3}
.date-control [data-date-open] svg{display:block;flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.date-input-error{color:#a12f26;font-size:12px;line-height:1.4;margin-top:3px}.date-input-error[hidden]{display:none}
.actions>.date-control{width:156px;flex:0 0 156px}.calendar-toolbar .actions>.date-control{width:140px;flex-basis:140px}
.date-picker{position:fixed;z-index:1000;width:304px;max-width:calc(100vw - 16px);padding:10px;background:#fff;border:1px solid #aebfb6;border-radius:6px;box-shadow:0 6px 22px #153c3026;color:#203d42;font-size:14px;text-align:center}
.date-picker button{appearance:none;-webkit-appearance:none;border:1px solid transparent;border-radius:4px;background:#fff;color:#203d42;padding:5px;font-size:14px;line-height:1.4;min-height:33px}
.date-picker button:hover:not(:disabled){background:#e6f1eb;border-color:#a8c8b7}
.date-picker button:focus-visible{outline:2px solid #176f62;outline-offset:-2px}
.date-picker button:disabled{opacity:1;color:#b2bbb6;background:#f7f9f7;cursor:default}
.date-picker-header{display:grid;grid-template-columns:30px 1fr 30px 26px;gap:2px;align-items:center;margin-bottom:6px}
.date-picker-header>div{display:flex;justify-content:center;gap:3px}.date-picker-header>div button{font-size:16px;font-weight:700}
.date-picker-header>button{font-size:23px;padding:0}.date-picker-header .date-picker-close{font-size:21px;color:#60766b}
.date-picker-weekdays,.date-picker-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}
.date-picker-weekdays{font-size:12px;font-weight:700;padding:2px 0 5px}.date-picker-days button{font-variant-numeric:tabular-nums}
.date-picker .saturday{color:#42688f}.date-picker .sunday{color:#a44646}
.date-picker .other-month:not(.selected):not(:disabled){color:#84988c}
.date-picker .today{border-color:#176f62}
.date-picker button.selected{background:#176f62;color:#fff;font-weight:700;border-color:#176f62}
.date-picker button.selected:hover{background:#12584b;color:#fff}
.date-picker-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:5px 0}.date-picker-choices button{min-height:42px}
.date-picker-footer{display:flex;gap:5px;align-items:center;border-top:1px solid #dce5df;margin-top:7px;padding-top:6px}.date-picker-footer button{border-color:#ccd9d1;padding:3px 8px;min-height:28px;font-size:12px}.date-picker-footer span{margin-left:auto;color:#52685c;font-size:11px}
/* Use the date input's dimensions for single-line fields throughout the app. */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]),select:not([multiple]){height:var(--control-height);min-height:var(--control-height);line-height:1.4;padding-top:6px;padding-bottom:6px}
.date-control .date-input-row input{height:var(--control-height);min-height:var(--control-height)}
label{line-height:1.4}
label>input:not([type=checkbox]):not([type=radio]),label>select,label>textarea,label>.date-control{margin-top:var(--field-gap)}
.date-control .date-input-row input,.grid-text-label select{margin-top:0}
.form-grid>div:has(>label+.actions)>.actions{min-height:var(--control-height);margin-top:var(--field-gap)}
.calendar-file-card{width:100%;align-items:center;gap:16px;padding:12px 10px;border:0;border-bottom:1px solid #ccd8d3;border-radius:4px;background:#fff;text-align:left}
.calendar-file-card:hover{background:#edf5f0;border-color:#a8c2b3}
.calendar-file-card:focus-visible{outline:2px solid #176f62;outline-offset:-2px;background:#edf5f0}
.calendar-file-text{display:block;min-width:0}.calendar-file-text strong{display:block;color:#203d42;font-size:16px;font-weight:700;line-height:1.5}
.calendar-file-period{display:block;margin-top:4px;color:#334d46;font-size:16px;font-weight:500;line-height:1.6}
.calendar-file-period time{white-space:nowrap}
.calendar-file-open{flex-shrink:0;padding:6px 10px;border:1px solid #bacdc2;border-radius:4px;font-size:13px;color:#275548;background:#fff}

/* Standard action controls share the input dimensions. Board cells remain content-sized. */
body button:not(.lesson-tile):not(.resource-name):not(.move-slot):not(.calendar-day-edit):not(.calendar-file-card):not([data-date-open]){font-size:var(--control-font-size);height:var(--button-height,var(--control-height));min-height:var(--control-height);padding:var(--button-padding,5px 10px);line-height:1.4;white-space:var(--button-white-space,nowrap);flex-shrink:0}
.sidebar{width:184px}.shell{margin-left:184px}
body nav button:not(.lesson-tile){width:100%;--button-padding:6px;gap:7px}nav button>span:not(.nav-icon){font-size:var(--control-font-size)}
body .date-control .date-input-row button{font-size:var(--control-font-size);height:calc(var(--control-height) - 2px);min-height:0;padding:0}
body .date-picker-header>button{--button-padding:0}
body .move-candidates button{--button-height:auto;--button-white-space:normal}
body .tile-context-menu button{width:100%;text-align:left;height:auto;min-height:34px;white-space:normal}
.tile-context-menu button span{min-width:0;overflow-wrap:anywhere}
body .calendar-week-control button{--button-padding:6px 2px}
body .dialog-close{width:var(--control-height);--button-padding:0}
@media(max-width:700px){.sidebar{width:auto}.shell{margin-left:0}body nav button:not(.lesson-tile){width:auto}}

/* Master data: compact rows with stable field widths and visible row actions. */
main.masters-page{padding:12px}
.masters-workspace{display:flex;flex-direction:column;gap:8px}
.masters-heading,.masters-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.masters-heading .tabs{margin:0;padding:0;border:0;gap:5px}
.masters-heading .tabs button{display:flex;align-items:center;gap:7px}
.masters-heading .tabs .badge{padding:1px 5px;line-height:1.4}
.masters-search{display:flex;align-items:center;gap:8px}.masters-search .search{width:260px;min-width:0}.masters-search .muted{white-space:nowrap}
.masters-utilities{padding-bottom:8px;border-bottom:1px solid var(--line)}
.masters-table-wrap{background:#fff;border:1px solid #cddbd5;border-radius:4px;max-height:calc(100dvh - 205px);overflow:auto;isolation:isolate}
.masters-table{table-layout:fixed;min-width:var(--master-table-width);font-size:14px;border-collapse:separate;border-spacing:0}
.masters-table th,.masters-table td{padding:4px;vertical-align:middle;white-space:nowrap}
.masters-table th{height:34px;font-size:12px;font-weight:650;color:#415b54;position:sticky;top:0;z-index:3;border-bottom:1px solid #b7cbc1;background:#edf3ef}
.masters-table td{height:43px;background:#fff;border-bottom:1px solid #e0e8e3}
.masters-table tbody tr:hover td{background:#f5f9f6}.masters-table tbody tr:has(input[data-select-row]:checked) td{background:#eaf4ee}
.masters-table th:first-child,.masters-table td:first-child{position:sticky;left:0;z-index:2;text-align:center}
.masters-table th:nth-child(2),.masters-table td:nth-child(2){position:sticky;left:32px;z-index:2;border-right:1px solid #dce5e3}
.masters-table th:last-child,.masters-table td:last-child{position:sticky;right:0;z-index:2;border-left:1px solid #dce5e3}
.masters-table thead th:first-child,.masters-table thead th:nth-child(2),.masters-table thead th:last-child{z-index:4}
.masters-table td input:not([type=checkbox]):not([type=color]){min-width:0;border-color:#d7e2dc;background:transparent;padding:6px}
.masters-table td select{width:100%;min-width:0;padding:6px}
.masters-table td input[type=color]{width:34px;height:34px;padding:3px}
.masters-table td input[type=checkbox]{width:16px;height:16px;margin:0;vertical-align:middle}
.masters-table td:has(input[type=checkbox]){text-align:center}
.masters-table input:focus,.masters-table select:focus{border-color:var(--green);outline:2px solid #176f6233;outline-offset:0}
.masters-table .actions{gap:4px;flex-wrap:nowrap}
body .masters-table .master-icon{width:34px;--button-padding:7px}.master-icon svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.masters-table-wrap .empty{padding:24px;font-size:14px}
@media(max-width:700px){.masters-search{width:100%}.masters-search .search{flex:1}.masters-table-wrap{max-height:65dvh}}

/* Readable workspace type, with compact control heights retained. */
:root{font-size:15px;--label-font-size:14px;--note-font-size:13px}
label,.day-button-label{font-size:var(--label-font-size)}
h2{font-size:18px}h3{font-size:15px}
.crumb,#save-state,.sidebar-end,.tiny{font-size:var(--note-font-size)}header strong{font-size:15px}
.subtitle,.muted,.notice,.issue-list li,.step p,.metric small,.metric span,.file-card p{font-size:var(--label-font-size)}
table,.masters-table{font-size:15px}.masters-table th{font-size:var(--label-font-size)}
.badge{font-size:12px}.masters-heading .tabs .badge{font-size:13px}
.grid-text-label,.matrix-hint,.grid-date,.editor-heading p,.remaining-tray-label small,.editor-page .legend,.editor-page .department-colors{font-size:var(--note-font-size)}
.editor-heading h1{font-size:18px}.editor-toolbar #week{width:170px}.grid-text-label select{width:64px}
.editor-status h2{font-size:15px}.editor-status .muted,.editor-status .badge{font-size:var(--note-font-size)}
.editor-page .resource-matrix thead th,.editor-page .resource-matrix thead tr:nth-child(2) th{font-size:var(--label-font-size)}
.resource-matrix .resource-name{font-size:15px}.text-large .resource-matrix .resource-name{font-size:16px}
.editor-page .resource-matrix .lesson-tile strong{font-size:16px}
.editor-page .text-large .resource-matrix .lesson-tile strong{font-size:19px}
.editor-page .remaining-rack .lesson-tile strong{font-size:14px}.editor-page .remaining-tray.text-large .lesson-tile strong{font-size:16px}
.move-info small,.move-grid thead small,.move-slot small,.move-status-bar,.move-candidates small,.move-adopt span,.move-count-note{font-size:var(--note-font-size)}
#cross-week-plan table{min-width:520px}
#cross-week-plan th:nth-child(n+3),#cross-week-plan td:nth-child(n+3){white-space:nowrap}
.cross-week-controls{display:flex;align-items:flex-end;gap:8px;margin-top:12px}
.cross-week-controls label{flex:1;min-width:0}
.remaining-tray .lesson-tile.foreign-remaining{border:2px solid #7751a4}
.foreign-remaining-key{color:#623d8d}
.move-info strong,.move-legend,.move-detail .move-steps th,.move-detail .move-summary,.move-detail .move-search-status{font-size:var(--label-font-size)}
.calendar-week-date,.calendar-change,.calendar-slot-summary,.calendar-footnote,.calendar-footnote .badge{font-size:var(--note-font-size)}
.date-picker-weekdays,.date-picker-footer span,.date-input-error{font-size:var(--note-font-size)}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]),select:not([multiple]){padding-top:5px;padding-bottom:5px}

/* Compact notice controls: print and week first, filters on a single second row. */
.export-controls{padding:12px 16px}
.export-main-row{display:grid;grid-template-columns:210px minmax(360px,1fr) auto;align-items:end;gap:12px}
.export-controls label select{margin-top:5px;min-height:34px}
.export-week-controls{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;gap:6px}
.export-week-controls label{min-width:0}.export-week-controls button,.export-actions button{min-height:34px;white-space:nowrap}
.export-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.export-options-row{display:flex;align-items:center;gap:12px;margin-top:12px;flex-wrap:wrap}
.export-options-row>div>label{display:flex;align-items:center;gap:8px;white-space:nowrap}
.export-options-row>div>label select{margin-top:0}.export-teacher select{width:210px}.export-sort select{width:120px}
.export-controls .check{white-space:nowrap}.export-hint{font-size:13px;color:var(--muted);margin-left:auto}
@media(max-width:1150px){.export-main-row{grid-template-columns:190px minmax(0,1fr)}.export-actions{grid-column:1/-1}.export-hint{margin-left:0}}
@media(max-width:700px){.export-main-row{grid-template-columns:minmax(0,1fr)}.export-actions{grid-column:auto}.export-week-controls{grid-template-columns:1fr 1fr}.export-week-controls label{grid-column:1/-1;grid-row:1}.export-options-row{gap:10px}.export-teacher{width:100%}.export-teacher label select{flex:1;min-width:0}.export-controls .check{white-space:normal}.export-hint{width:100%}}


code,pre,kbd,samp{font-family:inherit}
.folder-gate .sidebar nav{pointer-events:none;opacity:.45}
.folder-gate .toolbar button{visibility:hidden}
.folder-gate #save-state{margin:0}
.folder-start{max-width:720px;margin:48px auto;padding:36px}
.folder-start .actions{margin-top:24px}
@media(max-width:700px){.folder-start{margin:16px auto;padding:24px}.folder-gate .sidebar nav{display:none}}
.scoring-settings-actions{margin-top:12px}.scoring-teachers-table th{white-space:nowrap}.scoring-grades{display:flex;flex-wrap:wrap;gap:8px 16px}.scoring-grades .check{white-space:nowrap}.scoring-teachers-table .form-actions{margin-top:12px}.calendar-day-content .calendar-scoring-edit{width:100%;padding:4px 6px;margin-top:6px;text-align:left;font-size:11px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}.timetable button.scoring-gap{width:100%;text-align:left;cursor:pointer;white-space:normal}.timetable button.scoring-gap:hover{background:#dceff2}.timetable button.scoring-gap:focus-visible{outline:2px solid #27616a;outline-offset:2px}
.scoring-grade-note{margin-top:6px;color:#7e5125;font-size:12px;line-height:1.6}
.scoring-teachers-table{min-width:660px}.scoring-teachers-table .check{white-space:nowrap}
@media(max-width:700px){.calendar-heading{flex-wrap:wrap}.calendar-heading>h1{flex-basis:100%}.calendar-heading>button{margin-left:0}}
/* Conditional deletion keeps the three AND filters side by side. */
.bulk-delete-fields{grid-template-columns:repeat(3,minmax(0,1fr));margin:18px 0 12px}
.bulk-delete-fields select[multiple]{height:210px}
.bulk-delete-date-tools{justify-content:flex-end;margin-bottom:16px}
.bulk-delete-results{max-height:300px;overflow:auto;margin-bottom:16px}
.bulk-delete-results th{position:sticky;top:0;background:var(--paper,#fff)}
@media(max-width:700px){.bulk-delete-fields{grid-template-columns:1fr}.bulk-delete-fields select[multiple]{height:140px}.bulk-delete-date-tools{justify-content:flex-start}}
body .calendar-day-content button.calendar-change{height:auto;min-height:28px;width:100%;padding:3px 7px;border:0;border-radius:0;background:transparent;font-size:var(--note-font-size);color:#765414;white-space:normal;text-align:left;text-decoration:underline;text-underline-offset:3px}
body .calendar-day-content button.calendar-change:hover{background:#fff1d6;color:#60420d}
.calendar-operation-summary{display:flex;flex-wrap:wrap;gap:6px 20px;padding:0;margin:14px 0;list-style:none;font-size:13px}
.calendar-operation-table{max-height:55vh;overflow:auto}
.calendar-operation-table table{min-width:600px;table-layout:fixed}
.calendar-operation-table th{position:sticky;top:0;background:#f4f8f6}
.calendar-operation-table td{overflow-wrap:anywhere;line-height:1.7}
.calendar-operation-table th:first-child{width:20%}
.selection-toolbar{height:52px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}
.selection-toolbar>span,.selection-toolbar>button{flex-shrink:0}
/* Keep the lesson register within the workspace; only its table scrolls. */
body:has(main.lessons-page){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body:has(main.lessons-page)>.sidebar{flex-shrink:0}
.shell:has(main.lessons-page){display:flex;flex:1;flex-direction:column;min-height:0}
.shell:has(main.lessons-page)>header{flex-shrink:0}
main.lessons-page{display:flex;flex:1;flex-direction:column;gap:10px;min-height:0;min-width:0;margin:0;padding:12px}
.lessons-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex-shrink:0}
.lessons-heading h1{font-size:20px}.lessons-heading button{margin-left:auto}
.lessons-tools{margin:0;flex-shrink:0}.lessons-note{flex-shrink:0}
.lessons-table-wrap{flex:1;min-height:0;min-width:0;overflow:auto;isolation:isolate;padding:0;margin:0;border-radius:4px}
.lessons-table{table-layout:fixed;min-width:1320px;border-collapse:separate;border-spacing:0}
.lessons-table th,.lessons-table td{padding:8px;vertical-align:top;overflow-wrap:anywhere;line-height:1.5}
.lessons-table thead th{position:sticky;top:0;z-index:2;background:#edf3ef;color:#415b54;font-weight:650;white-space:nowrap;border-bottom:1px solid #b7cbc1}
.lessons-table tbody tr:hover{background:#f5f9f6}.lessons-table .actions{gap:4px}
.lesson-id{font-size:12px;color:#526863}.lesson-kind{white-space:nowrap;font-size:12px;padding:3px 7px}
.lesson-kind.regular{background:#eaf4ee;color:#275a43}.lesson-kind.meeting{background:#f7e4e4;color:#7b3939}.lesson-kind.expansion{background:#fff1d0;color:#755109}
.unit-provenance{margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.unit-provenance h3{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.unit-provenance dl{display:grid;grid-template-columns:150px minmax(0,1fr);gap:6px 14px;margin:0;font-size:14px;line-height:1.6}
.unit-provenance dt{color:#526863}.unit-provenance dd{margin:0;overflow-wrap:anywhere}
@media(max-width:700px){main.lessons-page{padding:8px}.lessons-tools .search{width:100%;min-width:0}.lessons-note{font-size:12px}.unit-provenance dl{grid-template-columns:1fr;gap:2px}.unit-provenance dd{margin-bottom:8px}}

@media(max-width:700px){.unit-detail>.card-title{flex-direction:column;align-items:stretch}.unit-detail>.card-title .actions{justify-content:flex-start}}
/* Daily editing: navigation, week/display controls, then edits and the selected occurrence. */
.daily-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 8px;min-height:34px}
.daily-heading h1{font-size:18px;letter-spacing:0;line-height:1.4}
.daily-navigation{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
body .daily-navigation button{--button-padding:6px 8px}
.daily-menu{position:relative;margin:0}
.daily-menu summary{display:flex;align-items:center;gap:6px;list-style:none;min-height:34px;padding:6px 8px;background:#fff;border:1px solid var(--line);border-radius:4px;font-size:var(--control-font-size);color:#253d43;cursor:pointer}
.daily-menu summary::-webkit-details-marker{display:none}
.daily-menu summary:hover,.daily-menu[open] summary{background:#edf5f2;border-color:#94b9ac}
.daily-menu summary:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.daily-menu summary svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5}
.daily-menu-panel{position:absolute;top:calc(100% + 5px);right:0;z-index:40;display:grid;gap:3px;min-width:230px;max-width:calc(100vw - 24px);padding:5px;background:#fff;border:1px solid #b9ccc5;border-radius:5px;box-shadow:0 6px 18px #173c3029}
body .daily-menu-panel button{width:100%;text-align:left;border:0;--button-height:auto;--button-padding:8px 12px;--button-white-space:normal}
.daily-controls{margin-bottom:6px}
.daily-week-row{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin-bottom:6px}
.daily-week-controls,.daily-display-controls{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.control-label{font-size:12px;color:#526863;margin-right:4px;white-space:nowrap}
.daily-week-controls #operation-week{width:255px;min-width:0}
.daily-display-controls select{min-width:0;margin:0}.daily-display-controls #view-id{max-width:190px}
.daily-display-controls .grid-text-label{margin-left:6px}
.segmented-control{display:flex;align-items:center;flex-shrink:0}
body .segmented-control button{border-radius:0;--button-padding:6px 10px;position:relative}
.segmented-control button+button{margin-left:-1px}
body .segmented-control button:first-child{border-radius:4px 0 0 4px}
body .segmented-control button:last-child{border-radius:0 4px 4px 0}
body .segmented-control button.selected{background:var(--green);color:#fff;border-color:var(--green);z-index:1;font-weight:650}
.segmented-control button:focus-visible{z-index:2}
.editor-page .resource-matrix th.resource-heading{writing-mode:horizontal-tb;white-space:nowrap;vertical-align:middle}
body button.history-icon{display:grid;place-items:center;--button-padding:6px 8px;min-width:34px}
.history-icon svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.daily-selection{height:58px;gap:8px;scrollbar-width:thin;border-bottom:1px solid var(--line)}
.daily-selection .selected-summary{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1px 8px;width:160px;max-width:160px;margin-right:0}
.selected-summary>small{font-size:11px;color:#526863}.selected-summary>small:last-child{grid-column:2}
.selected-summary>strong{overflow:hidden;text-overflow:ellipsis;font-size:13px}
.selection-action-group{display:flex;align-items:center;gap:4px;flex-shrink:0;padding-left:8px;border-left:1px solid var(--line)}
.daily-selection .selection-prompt{max-width:none;margin:0;color:#526863;font-size:12px}
@media(max-width:700px){.daily-heading{align-items:flex-start}.daily-navigation{width:100%;position:relative}.daily-menu{position:static}.daily-week-row{gap:8px}.daily-week-controls{flex-wrap:nowrap;width:100%}.daily-week-controls #operation-week{flex:1;width:auto}.daily-display-controls{width:100%}.daily-menu-panel{right:0}.daily-selection .selected-summary{width:150px;max-width:150px}.daily-selection{gap:6px}}

/* Daily changes use the viewport; the board owns scrolling. */
body:has(main.daily-page){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body:has(main.daily-page)>.sidebar{flex-shrink:0}
.shell:has(main.daily-page){display:flex;flex:1;flex-direction:column;min-height:0;min-width:0}
.shell:has(main.daily-page)>header{flex-shrink:0}
main.daily-page{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0;max-width:none;width:auto;margin:0;overflow:hidden}
.daily-page>.daily-heading,.daily-page>.daily-controls,.daily-page>.remaining-tray,.daily-page>.daily-selection{flex-shrink:0}
.daily-page>.editor-workspace{display:flex;align-items:stretch;flex:1;min-height:0;margin:0}
.daily-page .editor-board{display:flex;flex:1;flex-direction:column;min-height:0}
main.daily-page.editor-page .editor-workspace .table-wrap{flex:1;min-height:0;max-height:none;overflow:auto}
.daily-page .editor-board>.legend{flex-shrink:0;flex-wrap:nowrap;white-space:nowrap;overflow-x:auto;min-height:29px}
.daily-page .individual-view .timetable{border-collapse:separate;border-spacing:0}
.daily-page .individual-view thead th{position:sticky;top:0;z-index:2;background:#eef3f0}
.daily-page .individual-view th:first-child{position:sticky;left:0;z-index:1;background:#eef3f0}
.daily-page .individual-view thead th:first-child{z-index:3}
.daily-report-summary{font-size:13px;margin-bottom:12px;color:#526863}
.daily-issues .issue-list{max-height:none}
.daily-changes-table{min-width:760px;border-collapse:separate;border-spacing:0}
.daily-changes-table th{position:sticky;top:0;background:#edf3ef;color:#415b54;font-weight:650;white-space:nowrap}
.daily-changes-table th,.daily-changes-table td{padding:8px;line-height:1.5}
.daily-changes-table td:nth-child(n+4){white-space:nowrap}
.daily-changes-table-wrap{max-height:60dvh;overflow:auto}
.daily-change-row{cursor:pointer}
.daily-change-row:hover,.daily-change-row:focus-within{background:#edf5f2}
body button.daily-change-link{color:var(--green);text-align:left;--button-height:auto;--button-padding:0;--button-white-space:normal;min-height:0;border:0;border-radius:2px;background:transparent;text-decoration:underline;text-underline-offset:3px;font-weight:600}
.daily-change-link:hover{color:#12564c}

.grid-text-label{display:flex;align-items:center;gap:6px}

/* Resource conditions: equal A/B grids, explicit restrictions, and larger options. */
dialog:has(.resource-condition-editor){max-width:1040px;padding:20px 24px}
dialog:has(.resource-condition-editor) .card-title{position:sticky;top:-20px;z-index:3;background:#fff;padding-top:12px}
.resource-condition-editor .condition-section{margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.condition-section>h3{font-size:15px;font-weight:650;margin-bottom:8px}
.condition-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.condition-preferences{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.condition-limits{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.resource-condition-editor label.check{font-size:15px;min-height:44px;gap:10px;line-height:1.5;cursor:pointer}
.resource-condition-editor label.check input{width:22px;height:22px;flex-shrink:0;margin:0}
.condition-homeroom{margin:4px 0 12px}.condition-explanation{margin-top:10px}
.availability-note{margin-bottom:10px}
.availability-weeks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.availability-weeks>section{min-width:0}.availability-weeks h3{font-size:14px;margin-bottom:6px}
.availability-toggle-table{table-layout:fixed;min-width:300px;margin:0;border-collapse:separate;border-spacing:0}
.availability-toggle-table th,.availability-toggle-table td{padding:2px;text-align:center;vertical-align:middle;border:1px solid var(--line);border-top:0;border-left:0}
.availability-toggle-table th{font-size:13px;white-space:nowrap;height:30px}.availability-toggle-table th:first-child{width:46px;border-left:1px solid var(--line)}
.availability-toggle-table thead th{border-top:1px solid var(--line)}
.availability-toggle-table td:first-child{border-left:1px solid var(--line)}
.availability-cell{display:block;position:relative;cursor:pointer;margin:0;font-size:12px}
.availability-cell input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;z-index:1}
.availability-state{display:grid;place-items:center;min-height:36px;background:#f4f0e9 var(--forbidden-line) center/100% 100% no-repeat;color:#594a36;font-weight:650}
.availability-state::after{content:'禁制'}
.availability-cell input:checked+.availability-state{background:#b8d9ec;color:#253d43;font-weight:500}
.availability-cell input:checked+.availability-state::after{content:'利用可'}
.availability-cell:hover .availability-state{outline:1px solid #94b9ac;outline-offset:-1px}
.availability-cell input:focus-visible+.availability-state{outline:2px solid var(--green);outline-offset:-2px}
dialog:has(.resource-condition-editor) .form-actions{position:sticky;bottom:-20px;z-index:2;background:#fff;padding:10px 0;margin-top:8px}
@media(max-width:700px){dialog:has(.resource-condition-editor){padding:14px;width:calc(100vw - 20px)}dialog:has(.resource-condition-editor) .card-title{top:-14px}.condition-options,.condition-preferences{grid-template-columns:repeat(2,minmax(0,1fr))}.condition-limits{grid-template-columns:1fr;gap:8px}.availability-weeks{grid-template-columns:1fr;gap:16px}.resource-condition-editor label.check{font-size:14px}.condition-preferences{grid-template-columns:1fr}dialog:has(.resource-condition-editor) .form-actions{bottom:-14px}}

.action-icon{display:block;width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body button.selection-action{display:inline-flex;align-items:center;justify-content:center;gap:4px;--button-padding:5px 7px}

.resource-matrix .lesson-tile.locked::after{content:'▪';position:absolute;right:1px;top:0;font-size:9px;color:var(--tile-ink)}
