.install-sheet[hidden]{display:none!important}
.install-sheet{position:fixed;z-index:90;bottom:18px;left:50%;transform:translateX(-50%);width:min(420px,calc(100vw - 24px));display:grid;grid-template-columns:42px minmax(0,1fr) auto 20px;align-items:center;gap:11px;padding:13px;background:#241b30;color:#f6eefc;border:1px solid #6a517e;border-radius:15px;box-shadow:0 18px 55px rgba(0,0,0,.38);animation:install-in .28s cubic-bezier(.2,.7,.2,1)}
.install-sheet img{width:42px;height:42px;border-radius:10px}.install-copy{min-width:0}.install-copy strong{font-size:12px;line-height:1.2;display:block}.install-copy p{font-size:10px;line-height:1.35;margin:4px 0 0;color:#bfb1cd}.install-action{border:0;background:#b494df;color:#1e1329;border-radius:8px;padding:8px 10px;font-weight:700;font-size:10px;white-space:nowrap}.install-action:hover{background:#d4baf3}.install-close{align-self:start;border:0;background:transparent;color:#b8a8c5;font-size:20px;line-height:1;padding:0}.install-close:hover{color:white}@keyframes install-in{from{opacity:0;transform:translate(-50%,16px)}to{opacity:1;transform:translate(-50%,0)}}
@media(max-width:800px){
  body{background:#0e0c14;font-size:12px}
  .sidebar{height:46px;padding:7px 12px;border-bottom:1px solid #2a2231;box-shadow:none}
  .brand{height:31px;gap:7px}.brand-mark{width:29px;height:29px;border-radius:8px}.brand-mark svg{width:17px;height:17px}.brand strong{font-size:13px}.brand small{display:none}
  .topbar{display:none}.content{padding:12px 10px calc(79px + env(safe-area-inset-bottom))}
  .page-heading{margin:0 0 10px;align-items:center;gap:6px}.page-heading .eyebrow{display:none}.page-heading h1{font-size:20px;line-height:1.1;margin:0}.page-heading .top-source-button{display:none}
  .notice{padding:7px 9px;margin:0 0 8px;font-size:10px}.notice a{display:none}.notice-icon{display:none}
  .toolbar{padding:3px;border-radius:9px;gap:4px;background:#1b1723}.entity-tabs{width:100%;min-height:33px;scrollbar-width:none}.entity-tabs::-webkit-scrollbar{display:none}.entity-tab{font-size:10px;padding:7px 9px;min-height:32px}.toolbar .view-control{align-self:flex-end}
  .view-button{padding:6px 10px;font-size:10px}
  .selection-row{margin:9px 0 10px;gap:7px}.entity-trigger{height:39px;padding:5px 8px;border-radius:8px}.selector-icon{width:26px;height:26px}.selector-text strong{font-size:11px}.selector-text small{display:none}.chevron{width:14px;height:14px}
  #page-schedule:not(.week-view) .today-button{display:none}
  .week-switcher{height:39px;border-radius:8px}.week-range-button{height:37px;font-size:11px}.today-button{height:39px;padding:0 10px}.week-popover{left:50%;top:calc(100% + 5px);transform:translateX(-50%);width:min(360px,calc(100vw - 20px));max-height:60vh}.week-list{max-height:calc(60vh - 47px)}
  .now-bar{min-height:35px;padding:7px 9px;margin:-2px 0 8px;border-radius:8px}.now-bar strong{font-size:10px}.now-bar>span:last-child{font-size:9px;margin-left:0}.now-bar span[data-live-countdown]{margin-left:0;width:auto}
  .schedule-card{border-radius:10px}.schedule-card .card-header{padding:10px 12px;min-height:45px;gap:5px}.schedule-card .card-header h2{font-size:15px;margin:0}.schedule-card .card-kicker{display:none}.live-tag{font-size:7px;padding:4px 5px}.schedule-card .card-footer{padding:8px 12px;font-size:9px}
  .mobile-day-head{padding:9px 11px;min-height:32px}.mobile-day-head strong{font-size:11px}.mobile-day-head span{font-size:9px}.mobile-day-items{gap:5px;padding:7px}.mobile-lesson{min-height:51px;grid-template-columns:68px minmax(0,1fr);gap:2px 9px;padding:7px 9px;border-radius:6px}.mobile-lesson>span{font-size:9px}.mobile-lesson strong{font-size:11px;line-height:1.15;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.mobile-lesson small{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-empty{padding:13px 9px;font-size:10px}
  .side-nav{min-height:59px;border-top:1px solid #45354f;padding-top:4px;padding-bottom:calc(4px + env(safe-area-inset-bottom));box-shadow:0 -9px 25px rgba(0,0,0,.25)}.nav-item{min-height:47px;gap:3px;font-size:9px;padding:5px 2px}.nav-icon svg{width:18px;height:18px}.nav-item.active{background:#3a2b4a}
  .changes-bar{padding:10px 11px;gap:8px;margin-bottom:8px}.changes-bar h2{font-size:15px;text-align:center}.changes-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:4px}.changes-controls .changes-calendar-wrap{width:145px;min-width:0}.changes-controls .changes-date-trigger{width:100%}.changes-controls .date-control{height:32px}.changes-controls .icon-button{width:30px;height:32px}.changes-controls .view-control{flex:0 0 100%;width:100%;justify-content:space-around}.change-mode{flex:1}.changes-filter{margin-bottom:8px}.changes-search{height:34px}.change-card{padding:10px 11px}.change-card h3{font-size:13px}.change-entry{gap:8px;font-size:10px;line-height:1.45}.period-pill{min-width:32px;padding:3px}.times-head{padding:12px}.times-head h2{font-size:17px}.day-tabs{padding:0 10px 10px}.day-tab{padding:8px 9px}.time-row{height:46px}.times-note{display:none}
  .install-sheet{bottom:calc(68px + env(safe-area-inset-bottom));width:calc(100vw - 20px);grid-template-columns:38px minmax(0,1fr) auto 16px;gap:8px;padding:10px}.install-sheet img{width:38px;height:38px}.install-copy strong{font-size:11px}.install-copy p{font-size:9px}.install-action{padding:7px 8px;font-size:9px}
}
@media(max-width:350px){.entity-tab{padding:7px}.week-range-button{font-size:10px}.mobile-lesson{grid-template-columns:62px minmax(0,1fr)}.install-sheet{grid-template-columns:35px minmax(0,1fr) 16px}.install-action{grid-column:2/3;justify-self:start}.install-close{grid-column:3;grid-row:1}}
.schedule-grid .day-track{grid-template-rows:repeat(var(--lane-count),var(--lane-height,94px));min-height:94px}
.schedule-grid .compact-lanes .lesson-block{padding:2px 4px;gap:1px}
.schedule-grid .compact-lanes .lesson-block strong{font-size:10px;line-height:1.03;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.schedule-grid .compact-lanes .block-teacher{font-size:8px;min-height:0}
.schedule-grid .compact-lanes .block-foot,.schedule-grid .compact-lanes .block-foot b{font-size:8px}
@media(max-width:800px){
  .schedule-grid.mobile-day-view{overflow-x:hidden;overflow-y:visible;touch-action:pan-y;user-select:auto}
  .schedule-grid.mobile-day-view .grid-inner{display:none!important}
  .schedule-grid.mobile-day-view .mobile-schedule{display:block}
  #page-schedule:not(.week-view) .week-calendar-wrap{display:contents}
  #page-schedule:not(.week-view) .week-calendar-wrap>.changes-date-trigger{display:none}
  .mobile-date-picker{padding:9px 10px 10px;background:var(--surface);border-bottom:1px solid var(--line)}
  .mobile-date-month{display:flex;align-items:center;justify-content:space-between;margin:0 2px 7px}
  .mobile-date-month strong{color:var(--text);font-size:13px;font-weight:700;text-transform:capitalize}
  .mobile-date-calendar-trigger{width:30px;height:30px;display:grid;place-items:center;padding:0;border:0;border-radius:7px;background:var(--accent-bg);color:var(--accent)}
  .mobile-date-calendar-trigger svg{width:17px;height:17px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .mobile-date-strip{display:flex;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;scroll-snap-type:x proximity;touch-action:pan-x pan-y;padding:0 calc((100% - 48px)/2);-webkit-mask-image:linear-gradient(to right,transparent,#000 12%,#000 88%,transparent);mask-image:linear-gradient(to right,transparent,#000 12%,#000 88%,transparent)}
  .mobile-date-strip::-webkit-scrollbar{display:none}
  .mobile-date-option{flex:0 0 48px;min-width:48px;min-height:47px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px 2px;border:1px solid transparent;border-radius:8px;background:var(--surface-alt);color:var(--muted);scroll-snap-align:center;transition:background-color .22s ease,color .22s ease,transform .22s ease,border-color .22s ease,opacity .22s ease}
  .mobile-date-option span{font-size:9px;line-height:1;text-transform:capitalize}
  .mobile-date-option strong{font-size:14px;line-height:1.1;color:var(--text)}
  .mobile-date-option.active{background:var(--accent);border-color:var(--accent);color:#fff;transform:translateY(-1px)}
  .mobile-date-option.active strong{color:#fff}
  .mobile-date-option:active{transform:scale(.96)}
  .mobile-date-picker.is-entering{animation:mobile-date-picker-enter .38s cubic-bezier(.2,.75,.25,1)}
  .mobile-schedule .mobile-day.date-slide-in{animation:mobile-day-slide-in .32s cubic-bezier(.2,.75,.25,1)}
  .mobile-schedule .mobile-day.date-slide-next{--day-slide-from:10px}
  .mobile-schedule .mobile-day.date-slide-previous{--day-slide-from:-10px}
  .mobile-schedule .mobile-day{border-top:0}
  .mobile-schedule .mobile-day-items{gap:7px;padding:8px}
  .mobile-schedule .mobile-lesson{width:100%;min-width:0;grid-template-columns:74px minmax(0,1fr);gap:4px 9px;padding:9px 10px;text-align:left}
  .mobile-schedule .mobile-lesson>span{grid-row:1/3;white-space:nowrap;line-height:1.35}
  .mobile-schedule .mobile-lesson>span small{font-size:8px;font-weight:500;color:#657180}
  .mobile-schedule .mobile-lesson strong{display:block;min-width:0;line-height:1.25;overflow-wrap:anywhere}
  .mobile-schedule .mobile-lesson-content{display:contents}
  .mobile-schedule .mobile-lesson-content>small{grid-column:2;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.3}
  .mobile-schedule .mobile-lesson.no-teacher .mobile-lesson-content{grid-column:2;grid-row:1/3;align-self:stretch;display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:0}
}
@keyframes mobile-day-slide-in{from{opacity:.55;transform:translateX(var(--day-slide-from,12px))}to{opacity:1;transform:translateX(0)}}
@media(max-width:800px){
  html[data-theme=dark] .mobile-date-picker{background:var(--surface);border-color:var(--line)}
  html[data-theme=dark] .mobile-date-option{background:var(--surface-alt);border-color:var(--line);color:var(--muted)}
  html[data-theme=dark] .mobile-date-option strong{color:var(--text)}
  html[data-theme=dark] .mobile-date-option.active{background:var(--accent);border-color:var(--accent);color:#111923}
  html[data-theme=dark] .mobile-date-option.active strong{color:#111923}
  html[data-theme=dark] .mobile-date-calendar-trigger{background:var(--accent-bg);color:var(--accent)}
  html[data-theme=dark] .mobile-schedule .mobile-day{background:var(--surface)}
  html[data-theme=dark] .mobile-schedule .mobile-lesson{color:var(--text);border-color:var(--line-strong)}
  html[data-theme=dark] .mobile-schedule .mobile-lesson.tone-0{background:#383248}
  html[data-theme=dark] .mobile-schedule .mobile-lesson.tone-1{background:#293e51}
  html[data-theme=dark] .mobile-schedule .mobile-lesson.tone-2{background:#4b4030}
  html[data-theme=dark] .mobile-schedule .mobile-lesson.tone-3{background:#334735}
  html[data-theme=dark] .mobile-schedule .mobile-lesson.tone-4{background:#4b3439}
  html[data-theme=dark] .mobile-schedule .mobile-lesson.tone-5{background:#2b4846}
  html[data-theme=dark] .mobile-schedule .mobile-lesson.tone-6{background:#46364a}
  html[data-theme=dark] .mobile-schedule .mobile-lesson.tone-7{background:#4b3b30}
  html[data-theme=dark] .mobile-schedule .mobile-lesson.tone-lunch{background:#30353d}
  html[data-theme=dark] .mobile-schedule .mobile-lesson>span,
  html[data-theme=dark] .mobile-schedule .mobile-lesson>span small,
  html[data-theme=dark] .mobile-schedule .mobile-lesson-content>small,
  html[data-theme=dark] .mobile-schedule .mobile-empty{color:var(--muted)}
}
@media(max-width:800px){
  .week-calendar-backdrop[hidden]{display:none!important}
  .week-calendar-backdrop{position:fixed;inset:0;z-index:110;background:rgba(15,18,24,.56);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);animation:calendar-backdrop-in .2s ease both}
  #week-calendar,#changes-calendar{position:fixed;z-index:111;inset:auto 0 0;width:100%;height:min(68dvh,680px);min-height:440px;max-height:calc(100dvh - 16px);overflow-y:auto;padding:10px 24px calc(18px + env(safe-area-inset-bottom));border:1px solid var(--line);border-bottom:0;border-radius:26px 26px 0 0;background:var(--surface);color:var(--text);box-shadow:0 -12px 40px rgba(0,0,0,.2);transform:translateY(100%);transition:transform .28s cubic-bezier(.2,.75,.25,1);overscroll-behavior:contain}
  #week-calendar.is-open,#changes-calendar.is-open{transform:translateY(0)}
  .calendar-sheet-head{position:sticky;top:-10px;z-index:1;margin:-10px -24px 12px;padding:13px 22px 8px;background:var(--surface)}
  .calendar-sheet-handle{display:block;width:40px;height:5px;margin:0 auto 15px;border-radius:999px;background:var(--line-strong)}
  .calendar-sheet-head h2{margin:0;color:var(--text);font-size:22px;line-height:1.2;font-weight:750}
  #week-calendar .calendar-head,#changes-calendar .calendar-head{grid-template-columns:42px 1fr 42px;gap:6px;margin:0 0 16px}
  #week-calendar .calendar-head strong,#changes-calendar .calendar-head strong{font-size:16px;color:var(--text)}
  #week-calendar .calendar-head button,#changes-calendar .calendar-head button{width:42px;height:42px;border:0;border-radius:50%;background:transparent;color:var(--accent);font-size:28px}
  #week-calendar .calendar-weekdays,#changes-calendar .calendar-weekdays{margin-bottom:8px}
  #week-calendar .calendar-weekdays span,#changes-calendar .calendar-weekdays span{padding:9px 0;color:var(--muted);font-size:12px}
  #week-calendar .calendar-days,#changes-calendar .calendar-days{gap:5px}
  #week-calendar .calendar-day,#changes-calendar .calendar-day{width:min(48px,100%);justify-self:center;aspect-ratio:1;border-radius:50%;font-size:14px}
  #week-calendar .calendar-footer,#changes-calendar .calendar-footer{margin-top:14px;padding-top:12px}
  #week-calendar .calendar-footer button,#changes-calendar .calendar-footer button{font-size:14px;padding:8px 4px}
  body.week-calendar-open,body.calendar-sheet-open{overflow:hidden}
}
.calendar-head,.calendar-weekdays,.calendar-days,.calendar-footer{position:relative}
.month-slide-next .calendar-head,.month-slide-next .calendar-weekdays,.month-slide-next .calendar-days,.month-slide-next .calendar-footer{animation:calendar-month-in-next .28s cubic-bezier(.2,.75,.25,1) both}
.month-slide-previous .calendar-head,.month-slide-previous .calendar-weekdays,.month-slide-previous .calendar-days,.month-slide-previous .calendar-footer{animation:calendar-month-in-previous .28s cubic-bezier(.2,.75,.25,1) both}
@keyframes calendar-month-in-next{from{opacity:0;transform:translateX(26px) scale(.985)}to{opacity:1;transform:translateX(0) scale(1)}}
@keyframes calendar-month-in-previous{from{opacity:0;transform:translateX(-26px) scale(.985)}to{opacity:1;transform:translateX(0) scale(1)}}
@keyframes calendar-backdrop-in{from{opacity:0}to{opacity:1}}
@media(max-height:700px) and (max-width:800px){#week-calendar,#changes-calendar{height:74dvh;min-height:390px;padding-top:8px}.calendar-sheet-head h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){.week-calendar-backdrop,#week-calendar,.month-slide-next .calendar-head,.month-slide-next .calendar-weekdays,.month-slide-next .calendar-days,.month-slide-next .calendar-footer,.month-slide-previous .calendar-head,.month-slide-previous .calendar-weekdays,.month-slide-previous .calendar-days,.month-slide-previous .calendar-footer{animation:none;transition:none}}
@keyframes mobile-date-picker-enter{from{opacity:.3;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.mobile-date-option,.mobile-date-picker.is-entering,.mobile-schedule .mobile-day.date-slide-in{animation:none;transition:none}}
.schedule-grid .day-row.no-lessons{background:#ececef}
.schedule-grid .day-row.no-lessons .day-label{background:#e2e2e6}
.schedule-grid .day-row.no-lessons .day-track{background:#ececef}
.mobile-date-option.unavailable:not(.active){background:#e9e9ec;color:#85858d}
.mobile-date-option.unavailable:not(.active) strong{color:#85858d}
.mobile-date-option:disabled{cursor:not-allowed}
.mobile-date-option:disabled:active{transform:none}
.mobile-schedule .mobile-day.no-lessons{background:#ececef}
.mobile-schedule .mobile-day.no-lessons .mobile-empty{color:#777780}
.calendar-day.unavailable:not(.selected){background:#ececef;color:#85858d}
.calendar-day:disabled{cursor:not-allowed}
.calendar-day.unavailable.outside:not(.selected){opacity:.42}
.week-switcher>button:disabled{opacity:.42;cursor:not-allowed}
html[data-theme=dark] .schedule-grid .day-row.no-lessons,
html[data-theme=dark] .schedule-grid .day-row.no-lessons .day-track,
html[data-theme=dark] .mobile-schedule .mobile-day.no-lessons{background:#2c3037}
html[data-theme=dark] .schedule-grid .day-row.no-lessons .day-label{background:#343941}
html[data-theme=dark] .mobile-schedule .mobile-day.no-lessons .mobile-empty{color:#b4bac4}
html[data-theme=dark] .mobile-date-option.unavailable:not(.active){background:#30343b;color:#8f96a1}
html[data-theme=dark] .mobile-date-option.unavailable:not(.active) strong{color:#8f96a1}
html[data-theme=dark] .calendar-day.unavailable:not(.selected){background:#30343b;color:#8f96a1}
html[data-theme=dark] .week-switcher>button:disabled{opacity:.38}
@media(max-width:800px){
  .schedule-card{overflow:hidden}
  .schedule-grid{display:block;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;user-select:none;padding:0;scrollbar-width:thin;scrollbar-color:#a49bae #e9e6ed}
  .schedule-grid .grid-inner{display:block;overflow:visible;border:0;border-radius:0}
  .schedule-grid .period-head{display:grid;overflow:visible}
  .schedule-grid .period-head>div:first-child{position:sticky;left:0;z-index:25;background:#ebe9f0;box-shadow:3px 0 7px rgba(39,30,46,.12)}
  .schedule-grid .day-row,.schedule-grid .day-row:last-child{display:grid;min-height:94px;overflow:visible;border-radius:0}
  .schedule-grid .day-label{position:sticky;left:0;z-index:20;background:#f4f2f6;box-shadow:3px 0 7px rgba(39,30,46,.12)}
  .schedule-grid .current-day .day-label{background:#ece3f6}
  .schedule-grid .day-label strong{font-size:16px}
  .schedule-grid .day-track{display:grid}
  .mobile-schedule{display:none}
}
@media(prefers-reduced-motion:reduce){.install-sheet{animation:none}}
html,body,body *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-user-drag:none}
input,textarea,[contenteditable=true]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default;-webkit-user-drag:auto}
