.timetable-sidebar-button{width:100%;font-size:14px;padding:10px 12px;margin-top:3px}.course-tools{display:block}.tt-import{display:flex;flex-wrap:wrap;align-items:end;gap:16px}.tt-import>div{flex:1;min-width:220px}.tt-import small{flex-basis:100%;line-height:1.8;color:#6e8398}.tt-toolbar{display:flex;gap:20px;align-items:end;flex-wrap:wrap}.tt-toolbar>div{min-width:150px}.tt-toolbar>div:first-child{min-width:240px}.tt-toolbar p{flex:1;color:#718399;font-size:14px;line-height:1.7}.tt-calendar-scroll{overflow-x:auto;padding:8px 0;margin-top:16px}.tt-calendar{display:grid;grid-template-columns:56px repeat(7,minmax(130px,1fr));min-width:966px;isolation:isolate;border:1px solid #dce7ef;border-radius:12px;background:#fff}.tt-day-head{display:grid;place-items:center;background:#eef5fb;border-right:1px solid #dce7ef;border-bottom:1px solid #dce7ef;font-size:14px;color:#375e7f}.tt-period{display:grid;place-items:center;border-right:1px solid #dce7ef;border-bottom:1px solid #edf2f6;font-size:13px;color:#8494a5}.tt-cell{border-right:1px solid #edf2f6;border-bottom:1px solid #edf2f6}.tt-course{position:relative;margin:5px;padding:12px 9px;background:#edf6fd;border:1px solid #c5dbed;border-left:3px solid #1e6598;border-radius:8px;display:flex;flex-direction:column;gap:8px;min-width:0;transition:box-shadow .15s}.tt-course strong{font-size:14px;line-height:1.6;overflow-wrap:anywhere}.tt-course span{font-size:12px;color:#456a88;line-height:1.5}.tt-course small{font-size:11px;color:#7890a3;line-height:1.6}.tt-course:focus,.tt-course:hover{outline:2px solid #70a6cf;box-shadow:0 5px 20px #14578922;z-index:5}.tt-course-actions{display:none;position:absolute;top:calc(100% - 2px);left:-2px;right:-2px;background:#fff;padding:8px;box-shadow:0 7px 22px #163f6333;border:1px solid #cadde9;border-radius:9px;gap:5px}.tt-course:hover .tt-course-actions,.tt-course:focus-within .tt-course-actions{display:grid}.tt-course-actions button{font-size:12px;padding:8px 4px;border:0;text-align:left;color:#185d93;background:#f0f6fb}.tt-calendar:has(.tt-course:hover){overflow:visible}.tt-event-line{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:16px 0;border-bottom:1px solid #edf2f6}.tt-event-line small,.tt-review-header small,.tt-review-row small,.tt-event-line+small,.tt-event-line div>b{display:block;line-height:1.8}.tt-event-line .actions{flex-wrap:wrap}.tt-review-row h3{margin:0 0 14px}.tt-edit-grid{display:grid;grid-template-columns:2fr 2fr 1fr 2fr;gap:14px 20px}.tt-review-row .field{margin:0}.tt-review-row input,.tt-review-row select{width:100%}.tt-review-header .actions{margin-top:20px}.tt-review-header .actions small{color:#75869a}.map-schedule-class{max-width:360px;margin:18px 0}.map-schedule-class select{width:100%}.rehearsal-bar{grid-template-columns:minmax(140px,.8fr) minmax(240px,1.4fr) minmax(220px,1.2fr) auto}.rehearsal-bar select{width:100%}.tt-review-row input[id^=tt-class-]:placeholder-shown{border-color:#dba644}
@media(max-width:1100px){.rehearsal-bar{grid-template-columns:1fr 1fr}.tt-edit-grid{grid-template-columns:1fr 1fr}.tt-toolbar p{flex-basis:100%}.tt-event-line{align-items:start;flex-direction:column}}
@media(max-width:650px){.tt-edit-grid{grid-template-columns:1fr}.tt-review-header .row{display:block}.rehearsal-bar{grid-template-columns:1fr}}

.school-sidebar .course-tools .timetable-sidebar-button{display:flex;align-items:center;gap:12px;font-size:14px;min-height:43px;padding:11px 10px;color:#506478;text-align:left}
.timetable-sidebar-button .nav-icon{display:flex;align-items:center;justify-content:center;flex:0 0 22px;width:22px;height:22px;color:#7598b6}
.timetable-sidebar-button .nav-icon svg{width:22px;height:22px;display:block}
.timetable-sidebar-button .nav-title{display:block;font-size:inherit;line-height:1.4}
.model-config p{line-height:1.8}.model-config .row>div{min-width:260px}.model-config input{width:100%}

.model-config .row{align-items:end}

.school-sidebar .nav .timetable-sidebar-button{border:0;border-left:3px solid transparent;padding:11px 14px;margin:0;width:100%}
.school-sidebar .nav .timetable-sidebar-button.active{border-left-color:#edbf31}
.tt-pdf-table.tt-calendar{display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;min-width:1050px;border-radius:8px;isolation:auto}
.tt-pdf-table th,.tt-pdf-table td{border-right:1px solid #dce7ef;border-bottom:1px solid #dce7ef}
.tt-pdf-table tr:last-child>th,.tt-pdf-table tr:last-child>td{border-bottom:0}.tt-pdf-table tr>th:last-child,.tt-pdf-table tr>td:last-child{border-right:0}
.tt-pdf-table thead th{height:44px;background:#eef5fb;color:#375e7f;font-weight:600;font-size:14px}
.tt-pdf-table .tt-band-head{width:46px}.tt-pdf-table .tt-period-head{width:35px}
.tt-pdf-table .tt-band{vertical-align:middle;background:#f6f9fc;font-weight:500;font-size:13px;color:#607991}
.tt-pdf-table .tt-period-range{background:#fbfdff;color:#7b8d9c;font-weight:400;font-size:12px;vertical-align:top;padding:18px 0}
.tt-period-range span{display:block;padding:12px 0}.tt-pdf-table td{padding:5px 4px;vertical-align:top;height:180px}
.tt-pdf-table .tt-course{margin:4px 0 9px;padding:12px 9px;cursor:pointer;gap:5px;border-left-width:2px;background:#f7fbfe}
.tt-pdf-table .tt-course:last-child{margin-bottom:4px}.tt-pdf-table .tt-course strong{font-size:13px;line-height:1.55}.tt-pdf-table .tt-course span{line-height:1.5}.tt-pdf-table .tt-course small{line-height:1.55;overflow-wrap:anywhere}
.tt-pdf-table .tt-course:focus-visible{outline:2px solid #70a6cf}.tt-pdf-table .tt-needs-review{border-color:#e4bb68;background:#fffaf0}
.tt-pdf-table .tt-card-edit{font-size:11px;color:#366f9b}.tt-pdf-table .tt-needs-review .tt-card-edit{color:#986215}
.tt-sheet-heading{display:flex;justify-content:space-between;align-items:center;gap:18px}.tt-sheet-heading h2{margin:0;font-size:20px}.tt-sheet-heading span{font-size:13px;color:#7a8ea1}
dialog:has(.tt-entry-form){width:760px;max-width:calc(100vw - 32px)}dialog .tt-entry-form.tt-edit-grid{grid-template-columns:1fr 1fr;gap:18px;margin:20px 0}
.tt-import-history>summary{font-weight:600;color:#385b76;cursor:pointer}.tt-import-history small{display:block;line-height:1.7}.tt-import-history:not([open]){padding:18px 24px}
@media(max-width:650px){dialog .tt-entry-form.tt-edit-grid{grid-template-columns:1fr}.tt-sheet-heading{align-items:start;flex-direction:column;gap:8px}}

/* Every course cell shares the same period tracks as the numbered axis. */
.tt-period-grid.tt-calendar{display:grid;width:100%;border-radius:8px;isolation:isolate;background:#fff}
.tt-period-grid .tt-axis-head,.tt-period-grid .tt-day-head{display:flex;align-items:center;justify-content:center;background:#eef5fb;color:#375e7f;font-size:13px;font-weight:600;border-right:1px solid #dce7ef;border-bottom:1px solid #dce7ef;min-width:0}
.tt-period-grid .tt-day-head:last-of-type{border-right:0}
.tt-period-label,.tt-band-label{display:flex;justify-content:center;align-items:center;font-size:13px;color:#607991;background:#f6f9fc;border-right:1px solid #dce7ef;border-bottom:1px solid #dce7ef;min-height:0}
.tt-period-label{background:#fbfdff;color:#7b8d9c}
.tt-day-column{display:grid;min-height:0;min-width:0;border-right:1px solid #dce7ef;background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--tt-row-height) - 1px),#dce7ef calc(var(--tt-row-height) - 1px),#dce7ef var(--tt-row-height))}
.tt-day-column:last-child{border-right:0}
.tt-slot{display:flex;flex-direction:column;min-width:0;min-height:0;margin:4px;border:1px solid #bad3e7;border-left:3px solid #1e6598;border-radius:7px;background:#f7fbfe}
.tt-period-grid .tt-course{flex:1 1 0;min-height:0;min-width:0;margin:0;padding:12px 9px;border:0;border-bottom:1px dashed #cadde9;border-radius:0;background:transparent;cursor:pointer;display:flex}
.tt-period-grid .tt-course:last-child{border-bottom:0}.tt-period-grid .tt-course:first-child{border-radius:5px 5px 0 0}
.tt-course-body{display:flex;flex-direction:column;gap:6px;min-height:0;overflow:auto;flex:1}
.tt-period-grid .tt-course strong{font-size:13px;line-height:1.6}.tt-period-grid .tt-course span{font-size:12px;line-height:1.5}.tt-period-grid .tt-course small{font-size:11px;line-height:1.6;overflow-wrap:anywhere}
.tt-period-grid .tt-needs-review{background:#fffaf0}.tt-period-grid .tt-card-edit{color:#366f9b;font-size:11px}
.tt-period-grid .tt-course:hover,.tt-period-grid .tt-course:focus-within{z-index:6}
.tt-history-list{margin-top:18px;border-top:1px solid #e2ebf2}
.tt-history-item{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:19px 0;min-width:0}
.tt-history-item+.tt-history-item{border-top:1px solid #e2ebf2}.tt-history-item:last-child{padding-bottom:0}
.tt-history-info{min-width:0;flex:1}.tt-history-info>b{display:block;font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.tt-history-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:8px;color:#718399;font-size:12px;line-height:1.7}
.tt-history-status{background:#eef5fa;border-radius:4px;padding:2px 8px;color:#396a90}
.tt-history-item>button{flex-shrink:0;white-space:nowrap}
@media(max-width:650px){.tt-history-item{align-items:flex-start;flex-direction:column;gap:12px}.tt-history-item>button{align-self:flex-end}}

.tt-import input[type=file],.tt-import>button{height:44px;min-height:44px;box-sizing:border-box;margin:0}
.tt-import input[type=file]{width:100%;padding:6px 10px;display:block}
.tt-import input[type=file]::file-selector-button{height:30px;margin:0 12px 0 0;padding:4px 12px;border:1px solid #cadce9;border-radius:5px;background:#f0f6fb;color:#315d7f}
.tt-toolbar p{margin:0;min-height:40px;display:flex;align-items:center}
.tt-period-grid .tt-course{padding:8px 7px}.tt-period-grid .tt-course-body{gap:3px}
.tt-period-grid .tt-course strong{font-size:12px;line-height:1.45}.tt-period-grid .tt-course span{line-height:1.4}.tt-period-grid .tt-course small{line-height:1.4}

/* Clear scope selection, centered map status, and matching rehearsal controls. */
.chat-controls label{display:block;margin-bottom:8px;color:#587087;font-size:14px}
.rehearsal-scope-card .map-adoption{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;gap:12px;padding:18px;background:#f3f7fb;border-radius:12px;text-align:center}
.rehearsal-scope-card .map-adoption .pill{font-size:16px;padding:8px 20px}
.rehearsal-scope-card .map-adoption small{font-size:16px;line-height:1.6;color:#587087}
.rehearsal-scope-card>.actions{grid-column:1/-1;justify-content:flex-end}
.chat-controls{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:18px 24px;background:#f7f9fc}
.chat-controls select{width:100%;min-height:44px;margin:0}
.chat-header>.pill{margin-left:auto;white-space:nowrap;font-size:14px}
.tt-toolbar>.tt-current-week{min-width:130px}
.tt-current-week button{height:40px;min-width:110px;padding:0 18px}
.course-choice-empty{padding:54px 24px}
@media(max-width:650px){.rehearsal-bar.rehearsal-scope-card,.chat-controls{grid-template-columns:1fr}.rehearsal-scope-card>div{grid-column:1/-1}}

.rehearsal-scope-card .map-adoption small{max-width:none}.chat-controls select{font-size:14px}

.tt-history-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}
.tt-history-actions button{white-space:nowrap}
@media(max-width:650px){.tt-history-actions{align-self:flex-end;flex-wrap:wrap}}

/* Course identity determines the same pastel color in every week and class. */
.tt-period-grid .tt-slot{background:var(--tt-course-bg,#e8f2fc);border-color:var(--tt-course-border,#b5cfea);border-left-color:var(--tt-course-accent,#4e83b7)}
.tt-period-grid .tt-course{background:var(--tt-course-bg,#e8f2fc);border-bottom-color:var(--tt-course-border,#b5cfea)}
.tt-period-grid .tt-course:hover,.tt-period-grid .tt-course:focus-visible{outline-color:var(--tt-course-accent,#4e83b7)}
.tt-period-grid .tt-course strong{color:#2e4254}
.tt-period-grid .tt-needs-review{box-shadow:inset 0 0 0 2px #d3a640}

.tt-toolbar{display:grid;grid-template-columns:220px 150px max-content;gap:16px 18px;align-items:end;justify-content:start}
.tt-toolbar>div,.tt-toolbar>div:first-child,.tt-toolbar>.tt-current-week{min-width:0}
.tt-toolbar>div>label{display:block;font-size:12px;line-height:20px;margin:0 0 8px;color:#587087;white-space:nowrap}
.tt-toolbar select,.tt-toolbar button{height:40px;min-height:40px;margin:0;box-sizing:border-box}
.tt-toolbar select{width:100%}
.tt-week-buttons{display:flex;align-items:center;gap:8px}
.tt-current-week button{min-width:68px;padding:0 14px;white-space:nowrap}
.tt-toolbar p{grid-column:1/-1;min-height:0;line-height:1.6;font-size:13px;color:#718399}
@media(max-width:950px){.tt-toolbar{grid-template-columns:minmax(0,220px) minmax(0,150px)}.tt-current-week{grid-column:1/-1}.tt-week-buttons button{flex:1}}
@media(max-width:650px){.tt-toolbar{grid-template-columns:minmax(0,220px) minmax(0,150px)}.tt-toolbar>div:first-child{min-width:0}.tt-week-buttons button{flex:1}}
@media(max-width:430px){.tt-toolbar{grid-template-columns:minmax(0,220px)}.tt-week-buttons button{flex:1}}

/* The import form expands inline above the saved timetable. */
.tt-import-panel>summary,.tt-import-history>summary{display:flex;align-items:center;gap:14px;cursor:pointer;list-style:none;min-height:32px}
.tt-import-panel>summary::-webkit-details-marker,.tt-import-history>summary::-webkit-details-marker{display:none}
.tt-import-panel>summary h2,.tt-import-history>summary h2{margin:0}
.tt-import-panel>summary .pill{margin-left:auto}
.tt-import-panel>summary:focus-visible,.tt-import-history>summary:focus-visible{outline:2px solid #1489c5;outline-offset:6px;border-radius:4px}
.tt-import-chevron{flex-shrink:0;color:#7594ad;transition:transform .15s}
.tt-import-panel[open] .tt-import-chevron,.tt-import-history[open] .tt-import-chevron{transform:rotate(180deg)}
.tt-import-history>summary .tt-import-chevron{margin-left:auto}
.tt-import-panel>.tt-import{margin-top:22px}
