/* Keep the local planner's layout, removing only editing controls. */
#saveButton,#undoButton,#redoButton,#generateAllButton,#generationReportButton,
#settingsButton,#optimizeButton,#aiButton,#legacyFillButton,#legacyViewFillButton,
#refreshValidation,#legacyScopeHint,.source-actions,
#planTypeTabs,#nsSwapDaysButton,#generateWeekendButton,.metric.good,
.commandbar label:has(#autoRepairToggle),.commandbar label:has(#softConflictsToggle),
.board-view-toolbar>small,.left-panel .panel-footer,dialog {display:none!important}
.left-panel,.metric:has(#unplacedMetric),.teacher-agenda-item.parked,
#deferredScopeControl,.commandbar label:has(#legacyToggle) {display:none!important}
.right-panel {display:none!important}
.board-heading .metrics {display:none!important}
body:not(.readonly-ns) #weekendBar {display:none!important}
.readonly-ns label:has(#weekParitySelect),.readonly-ns #exportErasmusXlsxButton {display:none!important}
.workspace {grid-template-columns:minmax(620px,1fr)}
.course-card,.parking-card,[data-block-id] {cursor:pointer!important}
.sync-state{max-width:none}
.readonly-info{font-size:12px;line-height:1.5;color:#475569}
.readonly-detail p{line-height:1.5;margin:8px 0}
.readonly-detail h2{font-size:18px}
.readonly-detail .teacher-agenda-item{width:100%}
.readonly-badge{display:inline-block;background:#e8eef7;border-radius:5px;padding:4px 8px;font-size:12px}
@media(max-width:980px){.workspace{grid-template-columns:minmax(620px,1fr)}.topbar,.commandbar{flex-wrap:wrap}.workspace{overflow-x:auto}}
/* A draft warning belongs outside filters and remains visible in every NS view. */
.public-draft-notice { background:#fff0d6; color:#861c0b; border:3px solid #c7471d; padding:15px 22px; font-size:20px; font-weight:800; text-align:center; line-height:1.4; }
.public-draft-notice[hidden] { display:none !important; }
.current-teaching-week {position:relative;padding:5px 16px;background:#e4f1ff;color:#153d67;border-bottom:1px solid #7aabd7;text-align:left;line-height:1.35;}
.current-week-toolbar {display:flex;align-items:center;justify-content:space-between;gap:6px 14px;flex-wrap:wrap;}
.current-week-heading {display:flex;align-items:baseline;gap:6px 10px;flex-wrap:wrap;}
.current-week-heading strong {font-size:16px;font-weight:800;}
.current-week-heading span {font-size:12px;white-space:nowrap;}
.current-teaching-week p {margin:0;}
.current-teaching-week small {font-size:12px;display:block;}
.teaching-week-actions {display:flex;justify-content:center;flex-wrap:wrap;gap:6px;}
.teaching-week-actions .button {min-height:32px;padding:5px 10px;white-space:normal;}
.teaching-week-actions .button[aria-pressed="true"] {background:#153d67;color:#fff;border-color:#153d67;}
#teachingWeekFilterStatus {padding:3px 8px;border-radius:5px;font-size:12px;width:fit-content;max-width:100%;margin-top:4px;}
#teachingWeekFilterStatus.is-filtered {background:#fff1bf;color:#572900;border:1px solid #b45309;font-weight:700;}
.teaching-week-settings {position:relative;flex:none;font-size:12px;}
.teaching-week-settings summary {cursor:pointer;min-height:32px;padding:6px 8px;border:1px solid #b7cde1;border-radius:5px;white-space:nowrap;}
.teaching-week-settings summary:focus-visible {outline:2px solid #153d67;outline-offset:2px;}
.teaching-week-settings-panel {position:absolute;right:0;top:calc(100% + 6px);z-index:50;width:340px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 100px);overflow:auto;display:flex;flex-direction:column;gap:12px;padding:14px;background:#fff;border:1px solid #7aabd7;border-radius:8px;box-shadow:0 6px 20px #153d6740;}
.automatic-teaching-week {display:flex;align-items:center;gap:8px;font-size:14px;cursor:pointer;min-height:32px;}
.automatic-teaching-week input {width:18px!important;min-width:18px!important;min-height:18px!important;height:18px;accent-color:#153d67;}
.current-teaching-week [hidden],.current-teaching-week[hidden],.legacy-actions[hidden] {display:none!important;}
.teaching-week-settings:not([open]) .teaching-week-settings-panel {display:none;}
@media(max-width:900px){.current-teaching-week {padding:6px 12px;}.current-week-toolbar {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;}.current-week-heading {gap:2px 8px;}.current-week-heading strong {font-size:15px;}.current-week-heading span {font-size:11px;}.teaching-week-actions {grid-column:1/-1;grid-row:2;width:100%;}.teaching-week-actions .button {flex:1;min-width:0;min-height:44px;font-size:12px;padding:4px 6px;}.teaching-week-settings {grid-column:2;grid-row:1;}.teaching-week-settings summary {min-height:44px;padding:12px 6px;}.automatic-teaching-week {min-height:44px;}.teaching-week-settings-panel {top:calc(100% + 52px);}}
@media print{.teaching-week-actions,.teaching-week-settings {display:none!important;}}
/* One vertical scrollbar: filters leave the viewport as the page is scrolled.
   Fitting boards use native sticky headers; wide boards keep local horizontal
   scrolling and a synchronized header/rail (page-scroll.js). */
body {display:block;height:auto;min-height:100vh;min-height:100dvh;overflow:auto;}
body .workspace {height:auto!important;min-width:0;overflow:visible;}
body .board-scroll {flex:none;overflow:visible;overscroll-behavior:initial;scrollbar-gutter:auto;}
body .board-scroll.public-horizontal-board {overflow-x:auto;overflow-y:hidden;scrollbar-width:auto;}
.public-horizontal-board::-webkit-scrollbar,#publicHorizontalRail::-webkit-scrollbar {height:16px;}
.public-horizontal-board::-webkit-scrollbar-thumb,#publicHorizontalRail::-webkit-scrollbar-thumb {background:#77949c;border:3px solid #edf2f3;border-radius:8px;}
.public-horizontal-board::-webkit-scrollbar-track,#publicHorizontalRail::-webkit-scrollbar-track {background:#edf2f3;}
#publicStickyDays {position:fixed;top:0;overflow:hidden;z-index:15;pointer-events:none;background:#f8fafa;box-shadow:0 3px 8px #14354118;}
#publicStickyDays .board-header {position:relative;top:auto;}
#publicHorizontalRail {position:fixed;bottom:0;overflow-x:scroll;overflow-y:hidden;height:16px;z-index:15;background:#edf2f3;scrollbar-width:auto;}
#publicHorizontalRail>div {height:1px;}
#publicStickyDays[hidden],#publicHorizontalRail[hidden] {display:none!important;}
@media print{#publicStickyDays,#publicHorizontalRail{display:none!important;}}
/* Focus mode is optional; page scrolling works without pressing this button. */
#publicPlanFocusSelection {display:none;font-size:12px;font-weight:700;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.public-plan-focus-toggle {min-height:30px;padding:4px 8px;font-size:12px;white-space:nowrap;flex-shrink:0;text-transform:none;letter-spacing:normal;}
@media screen and (min-width:901px){
  body.public-plan-focus > .topbar,body.public-plan-focus > .commandbar,
  body.public-plan-focus > .legacy-actions,body.public-plan-focus > #publicFilterDefaults,
  body.public-plan-focus .summary-strip {display:none!important;}
  body.public-plan-focus #publicPlanFocusSelection {display:inline-block;}
}
@media print{.public-plan-focus-toggle,#publicPlanFocusSelection {display:none!important;}}
/* Public readability only: no changes to geometry, schedules or the editor. */
.schedule-board .schedule-card h3 {font-size:calc(11px * var(--board-scale,1));}
.schedule-board .schedule-card p {font-size:calc(9px * var(--board-scale,1));}
.schedule-card:focus-visible {outline:3px solid #075985;outline-offset:2px;}
.public-magnifier-control {display:inline-flex;align-items:center;gap:6px;font-size:14px;cursor:pointer;}
#publicLessonDetails {position:fixed;z-index:10000;right:16px;top:16px;width:440px;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow:auto;box-sizing:border-box;padding:20px;background:#fff;color:#172b36;border:2px solid #12677d;border-radius:12px;box-shadow:0 8px 36px #172b3655;font-size:18px;line-height:1.5;overflow-wrap:anywhere;user-select:text;}
#publicLessonDetails[hidden] {display:none!important;}
#publicLessonDetails.on-left {left:16px;right:auto;}
#publicLessonDetails h2 {font-size:22px;line-height:1.35;margin:12px 0;}
#publicLessonDetails p {margin:10px 0;}
#publicLessonDetails .timetable-notice-detail {font-size:18px;}
.public-lesson-close {display:block;margin-left:auto;min-height:44px;padding:8px 14px;font-size:16px;cursor:pointer;}
@media(max-width:600px){#publicLessonDetails,#publicLessonDetails.on-left{top:auto;bottom:8px;left:8px;right:8px;width:auto;max-width:none;max-height:75vh;}}
@media print{#publicLessonDetails,.public-magnifier-control{display:none!important;}}
/* The phone uses a day agenda, not a scaled-down multi-column time grid. */
.public-filter-defaults {display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;padding:8px 16px;border-bottom:1px solid #d1e2df;background:#f4f8f7;}
.public-filter-default-buttons {display:flex;flex-wrap:wrap;gap:8px;}
.public-filter-defaults p {margin:0;font-size:13px;color:#274c57;}
.public-filter-defaults small {color:#52666d;font-size:12px;}
.public-named-filters {position:relative;min-width:0;max-width:100%;}
.public-named-filters summary {cursor:pointer;padding:7px 9px;border:1px solid #b8cfca;border-radius:7px;font-size:13px;color:#274c57;}
.public-named-filters[open] {flex:1 1 100%;}
.public-named-filters[open] summary {display:list-item;width:max-content;}
.public-named-filter-fields {display:flex;align-items:end;flex-wrap:wrap;gap:8px;padding:8px 0;}
.public-named-filter-fields label {display:flex;flex:1 1 220px;flex-direction:column;gap:4px;font-size:12px;min-width:0;}
.public-named-filter-fields input,.public-named-filter-fields select {width:100%;max-width:100%;min-width:0;padding:8px;border:1px solid #b8cfca;border-radius:6px;font:inherit;font-size:14px;background:white;}
#publicFilterLink:not([hidden]) {display:flex;flex:1 1 100%;gap:8px;align-items:center;font-size:13px;}
#publicFilterLink input {flex:1;min-width:0;padding:8px;}
@media(max-width:900px){.public-filter-defaults {padding:8px 12px;}.public-filter-default-buttons {width:100%;}.public-filter-default-buttons .button {min-height:44px;flex:1;font-size:13px;}.public-filter-defaults small {width:100%;}}
@media(max-width:900px){.public-named-filters summary {min-height:44px;display:flex;align-items:center;}.public-named-filter-fields .button {min-height:44px;}.public-named-filter-fields label {flex-basis:100%;}}
@media print{.public-filter-defaults {display:none!important;}}
.public-mobile-nav[hidden] {display:none!important;}
.public-operational-notice[hidden] {display:none!important;}
.public-operational-notice {flex:none;max-height:180px;overflow:auto;padding:10px 16px;border:2px solid #b45309;background:#fff1bf;color:#572900;line-height:1.4;}
.public-operational-notice h2 {font-size:19px;margin:0 0 5px;}
.public-operational-notice p {font-size:14px;font-weight:600;margin:4px 0;}
.public-operational-notice ul {font-size:14px;padding-left:22px;margin:5px 0;}
@media(max-width:900px){body.public-mobile .public-operational-notice {max-height:none;padding:12px;}.public-operational-notice h2 {font-size:18px;}}
.public-mobile-nav {padding:10px 12px;background:#edf5f4;border-block:1px solid #d1e2df;}
.mobile-day-controls {display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:end;}
.mobile-day-controls .field {min-width:0;width:100%;}
.mobile-day-controls .field {display:flex;flex-direction:column;align-items:stretch;gap:4px;}
.mobile-day-controls button,.mobile-day-controls select {min-height:44px;}
.public-mobile-nav p {font-size:12px;line-height:1.4;margin:6px 0 0;color:#405962;}
.public-mobile-nav .mobile-auto-day-notice {padding:6px 8px;background:#e4f1ff;color:#153d67;border-left:3px solid #3776ae;}
.mobile-auto-day-notice[hidden] {display:none!important;}
.mobile-agenda-board {background:#f3f6f5;}
.mobile-day-agenda {padding:12px;}
.mobile-day-heading {font-size:18px;line-height:1.4;margin:0 0 12px;}
.mobile-lesson {position:relative;margin:0 0 12px;padding:14px;background:#e7f4f1;border:1px solid #b6d9d3;border-left:5px solid #168b7f;border-radius:10px;overflow-wrap:anywhere;}
.mobile-lesson.lecture {background:#eaf2fb;border-color:#b8cfe8;border-left-color:#3776ae;}
.mobile-lesson.lab {background:#fff0e4;border-color:#edc39c;border-left-color:#d57c2f;}
.mobile-lesson[data-block-id] {cursor:pointer;}
.mobile-lesson:focus-visible {outline:3px solid #12677d;outline-offset:2px;}
.mobile-lesson-time {font-size:16px;font-weight:800;color:#163a4b;}
.mobile-lesson h3 {font-size:16px;line-height:1.4;margin:6px 0;}
.mobile-lesson p {font-size:14px;line-height:1.45;margin:4px 0;}
.mobile-teacher,.mobile-location {font-weight:600;}
.mobile-lesson .timetable-notice {font-size:14px;line-height:1.4;}
.mobile-reservation {background:#edf0f2;border-color:#c3cbd0;border-left-color:#7b8d96;}
.mobile-reservation.own-reservation {background:#eaf3f4;border-left-color:#287184;}
.mobile-empty {padding:25px 12px;text-align:center;line-height:1.5;color:#52666d;}
.mobile-opening-info {font-size:12px;margin-top:8px;}
.mobile-opening-info[hidden] {display:none!important;}
@media(max-width:900px){
  body.public-mobile,body.public-mobile.readonly-ns {height:auto;min-height:100dvh;overflow:auto;display:block;}
  body.public-mobile .workspace {display:block;grid-template-columns:minmax(0,1fr);height:auto!important;min-width:0;overflow:visible;padding:0;}
  body.public-mobile .topbar {height:auto;min-height:60px;padding:12px;align-items:flex-start;gap:10px;}
  body.public-mobile .brand-mark,body.public-mobile .brand .eyebrow,body.public-mobile #syncState {display:none;}
  body.public-mobile .brand {width:100%;}
  body.public-mobile .topbar h1 {font-size:20px;}
  body.public-mobile .top-actions {display:flex;flex-wrap:wrap;width:100%;gap:6px;}
  body.public-mobile .top-actions .button {min-height:40px;padding:7px 10px;font-size:12px;white-space:normal;}
  body.public-mobile #plannerLanguageControl {width:100%;}
  body.public-mobile .commandbar {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);height:auto;padding:10px 12px;gap:8px;}
  body.public-mobile .commandbar .field,body.public-mobile .commandbar .entity-field {width:auto;min-width:0;max-width:none;}
  body.public-mobile .commandbar .field {display:flex;flex-direction:column;align-items:stretch;gap:4px;}
  body.public-mobile select,body.public-mobile input[type=search] {width:100%;min-width:0;min-height:44px;font-size:16px;}
  body.public-mobile .commandbar .search-field,body.public-mobile #roomCampusField {grid-column:1/-1;min-width:0;width:100%;}
  body.public-mobile .legacy-actions {height:auto;min-height:0;padding:8px 12px;}
  body.public-mobile .legacy-actions .field {width:100%;min-width:0;}
  body.public-mobile .legacy-actions .field {display:flex;flex-direction:column;align-items:stretch;gap:4px;}
  body.public-mobile.readonly-ns .legacy-actions {display:none;}
  body.public-mobile #weekendBar {padding:8px 12px;min-height:0;gap:8px;}
  body.public-mobile #weekendBar .field {min-width:0;flex:1;}
  body.public-mobile #weekendBar .switch,body.public-mobile #nsFitThreeButton,body.public-mobile #weekendHelp {display:none!important;}
  body.public-mobile #previousWeekendButton,body.public-mobile #nextWeekendButton {min-width:44px;min-height:44px;padding:6px;}
  body.public-mobile .board-view-toolbar,body.public-mobile .legend-row,body.public-mobile .board-heading {display:none;}
  body.public-mobile .summary-strip {padding:10px 12px;min-height:0;}
  body.public-mobile .summary-title h2 {font-size:16px;line-height:1.4;white-space:normal;}
  body.public-mobile .summary-strip .metric {display:none;}
  body.public-mobile .schedule-shell {width:100%;min-width:0;}
  body.public-mobile .board-scroll {overflow:visible;flex:none;touch-action:pan-y pinch-zoom;overscroll-behavior-x:none;scrollbar-gutter:auto;}
  body.public-mobile .schedule-board {min-width:0!important;width:100%!important;}
  body.public-mobile #openingSchedule {display:none;}
  body.public-mobile.mobile-opening-open #openingSchedule {display:block;}
  body.public-mobile #openingSchedule.has-room-change {display:block;max-height:none;}
  body.public-mobile .public-draft-notice {font-size:16px;padding:10px;}
}
@media print{.public-mobile-nav{display:none!important;}}
/* Compact control; the annotated calendar floats without moving the timetable. */
.date-calendar-toggle {min-height:32px;padding:5px 10px;white-space:nowrap;}
#dateCalendarPanel[hidden],#dateCalendarBackdrop[hidden],#publicDatePreview[hidden] {display:none!important;}
#dateCalendarBackdrop {position:fixed;inset:0;background:#102c3f55;z-index:10990;}
#dateCalendarPanel {--calendar-top:clamp(12px,6dvh,54px);position:fixed;top:var(--calendar-top);left:50%;transform:translateX(-50%);width:430px;max-width:calc(100vw - 24px);max-height:calc(100dvh - var(--calendar-top) - 12px);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;z-index:11000;background:#fff;color:#172b36;padding:16px;border:2px solid #3776ae;border-radius:12px;box-shadow:0 8px 36px #172b3655;}
.date-calendar-controls {flex:none;background:#fff;}
.date-calendar-content {min-height:0;overflow:auto;scrollbar-gutter:stable;}
.date-calendar-title,.date-calendar-month-nav {display:flex;align-items:center;justify-content:space-between;gap:10px;}
.date-calendar-title h2 {font-size:18px;margin:0;}
.date-calendar-title .button {font-size:22px;min-width:40px;}
.date-calendar-month-nav {margin:12px 0 8px;}
.date-calendar-month-nav .button {min-height:40px;min-width:40px;}
#dateCalendarGrid {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;}
.date-calendar-weekday {font-size:12px;text-align:center;font-weight:700;padding:5px;}
.date-calendar-day {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1px solid #bdcddd;border-radius:6px;min-height:55px;padding:4px 1px;background:#f7fbff;color:#173d64;cursor:pointer;}
.date-calendar-day strong {font-size:16px;}
.date-calendar-day small {font-size:10px;line-height:1.15;overflow-wrap:anywhere;}
.date-calendar-day.is-closed {background:#fff0dd;border-color:#b85d0b;color:#6b3508;}
.date-calendar-day.is-partial {background:#fff9d8;border-color:#ad8706;color:#674900;}
.date-calendar-day.is-replacement {background:#e6f4ee;border-color:#358367;color:#1b513c;}
.date-calendar-day:disabled {opacity:.45;cursor:default;}
.date-calendar-day.is-outside {background:#f3f3f3;color:#616970;border-color:#ddd;}
.date-calendar-day[aria-pressed=true] {outline:3px solid #153d67;outline-offset:-3px;}
.date-calendar-day:focus-visible {outline:3px solid #12677d;outline-offset:1px;}
#dateCalendarPanel p {font-size:12px;line-height:1.45;margin:10px 0 0;}
#dateCalendarLegend {font-weight:600;}
#dateCalendarSource {display:block;font-size:11px;line-height:1.4;margin-top:8px;color:#52666d;}
#publicDatePreview {display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;padding:6px 12px;background:#e4f1ff;border-block:1px solid #7aabd7;font-size:12px;line-height:1.4;}
#publicDatePreview strong {font-size:14px;margin-right:10px;}
#publicDatePreview .button {font-size:12px;min-height:30px;padding:4px 8px;flex-shrink:0;}
#publicDatePreview.is-closed {background:#fff1d9;border-color:#b85d0b;color:#6b3508;}
.day-column.calendar-closed {background:repeating-linear-gradient(135deg,#fff6e7,#fff6e7 8px,#fcf0dc 8px,#fcf0dc 9px);}
.day-head.calendar-selected {background:#d7eaff;box-shadow:inset 0 -3px #3776ae;}
.day-column.calendar-selected {outline:2px solid #7aabd7;outline-offset:-2px;}
@media(max-width:900px){
  #dateCalendarPanel {padding:12px;}
  .current-week-toolbar:has(#openDateCalendar) {grid-template-columns:minmax(0,1fr) auto auto;}
  .current-week-toolbar #openDateCalendar {grid-column:2;grid-row:1;min-height:44px;max-width:95px;padding:4px 6px;font-size:12px;white-space:normal;}
  .current-week-toolbar:has(#openDateCalendar) .teaching-week-settings {grid-column:3;}
  #publicDatePreview {align-items:flex-start;flex-wrap:wrap;}
  #publicDatePreview strong,#datePreviewDescription {display:block;}
  .date-calendar-toggle {min-height:40px;}
}
@media print{#dateCalendarPanel,#dateCalendarBackdrop,.date-calendar-toggle,#clearDatePreview{display:none!important;}}
