.schedule-widget{margin:0 0 32px;border:1px solid var(--site-line);border-radius:20px;background:var(--card);color:var(--text);overflow:hidden}
.schedule-summary{list-style:none;display:grid;grid-template-columns:290px minmax(0,1fr) auto;align-items:start;gap:30px;padding:18px 26px 14px;cursor:pointer;user-select:none}
.schedule-summary::-webkit-details-marker{display:none}
.schedule-heading{display:flex;align-items:center;gap:13px;font-size:21px;font-weight:700;line-height:1.3}
.schedule-heading>svg{width:42px;height:42px;padding:9px;border-radius:12px;background:var(--site-soft);color:var(--site-accent);flex-shrink:0}
.schedule-subtitle{display:block;font-size:12px;font-weight:400;color:var(--site-muted);margin-top:4px}
.schedule-collapse{display:flex;align-items:center;align-self:center;gap:8px;color:var(--site-muted);font-size:12px}
.schedule-collapse svg{width:16px;height:16px;transition:transform .48s cubic-bezier(.4,0,.2,1)}
.schedule-widget[open] .schedule-collapse svg{transform:rotate(180deg)}
.schedule-widget[open] .schedule-closed-label,.schedule-widget:not([open]) .schedule-open-label{display:none}
.schedule-body{display:grid;grid-template-columns:290px minmax(0,1fr);gap:22px 30px;padding:0 26px 20px}
.schedule-calendar{align-self:start;background:var(--site-soft);border:1px solid var(--site-line);border-radius:15px;padding:14px}
.schedule-week-nav{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:12px}
.schedule-week-nav p{font-size:13px;text-align:center;font-weight:600;margin:0}
.schedule-widget button{font-family:inherit;color:var(--text);cursor:pointer}
.schedule-week-nav button{background:transparent;border:0;border-radius:8px;width:34px;height:36px;display:grid;place-items:center;flex-shrink:0}
.schedule-week-nav svg{width:19px;height:19px}
.schedule-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.schedule-days button{border:1px solid transparent;border-radius:10px;padding:7px 0 9px;display:flex;align-items:center;flex-direction:column;gap:6px;background:transparent;font-size:15px;font-weight:700;min-width:0}
.schedule-days button span{font-size:10px;font-weight:400;color:var(--site-muted)}
.schedule-days button.is-today{border-color:var(--site-accent)}
.schedule-days button[aria-pressed="true"]{background:#435d9f;color:#fff;border-color:#435d9f}
.schedule-days button[aria-pressed="true"] span{color:#e4ebff}
body.dark .schedule-days button[aria-pressed="true"]{background:#afc5ff;color:#13203a;border-color:#afc5ff}
body.dark .schedule-days button[aria-pressed="true"] span{color:#293d61}
.schedule-widget button:hover:not(:disabled){box-shadow:inset 0 0 0 1px var(--site-accent)}
.schedule-widget button:disabled{opacity:.35;cursor:default}
.schedule-widget :focus-visible{outline:2px solid var(--site-accent);outline-offset:3px}
.schedule-today{display:block;width:100%;padding:9px 12px;margin-top:14px;background:var(--card);border:1px solid var(--site-line);border-radius:9px;font-size:12px;font-weight:600}
.schedule-source{display:flex;align-items:center;justify-content:center;gap:6px;color:var(--site-muted);font-size:12px;margin-top:13px;text-decoration:none}
.schedule-source svg{width:14px;height:14px}
.schedule-content{min-width:0;align-self:start}
.schedule-selected-date{font-size:16px;font-weight:700;line-height:1.4;align-self:center;padding-top:0;color:var(--text)}
.schedule-status{font-size:14px;color:var(--site-muted);margin:12px 0;line-height:1.6}
.schedule-status:empty{display:none}
.schedule-lessons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.schedule-lesson{min-width:0;padding:18px;border:1px solid var(--site-line);border-left:3px solid var(--site-accent);background:var(--site-soft);border-radius:12px}
.schedule-time{font-size:17px;font-weight:700;color:var(--site-accent);margin:0 0 10px}
.schedule-lesson h4{font-size:16px;line-height:1.45;font-weight:700;color:var(--text);overflow-wrap:anywhere;margin:0 0 12px}
.schedule-kind{display:inline-block;font-size:11px;line-height:1.4;border:1px solid var(--site-line);border-radius:6px;color:var(--site-accent);padding:4px 7px;margin:0 0 12px;background:var(--card)}
.schedule-detail{font-size:12px;line-height:1.6;color:var(--site-muted);overflow-wrap:anywhere;margin:4px 0 0}
.schedule-retry{padding:9px 15px;border:1px solid var(--site-line);border-radius:9px;background:var(--site-soft);margin:4px 0 12px}
.schedule-widget [hidden]{display:none!important}
@media(max-width:1050px){.schedule-summary{grid-template-columns:270px minmax(0,1fr) auto;gap:20px}.schedule-body{grid-template-columns:270px minmax(0,1fr);gap:20px}.schedule-lessons{grid-template-columns:1fr}}
@media(max-width:650px){.schedule-summary{grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:16px 18px}.schedule-heading{font-size:19px}.schedule-selected-date{grid-column:1/-1;grid-row:2;font-size:14px;padding-top:0}.schedule-collapse{grid-column:2;grid-row:1;font-size:11px}.schedule-body{grid-template-columns:1fr;padding:0 18px 16px;gap:16px}.schedule-calendar{padding:12px}.schedule-days button{padding:8px 0 10px;font-size:16px}.schedule-today{padding:10px}.schedule-source{margin-top:12px}.schedule-lesson{padding:16px}.schedule-subtitle{font-size:11px}}
@media(prefers-reduced-motion:reduce){.schedule-collapse svg{transition:none}}

.schedule-lesson:only-child{grid-column:1/-1}
@supports(grid-template-rows:subgrid){
  .schedule-lesson{display:grid;grid-template-rows:subgrid;grid-row:span 6;row-gap:8px}
  .schedule-lesson>.schedule-time{grid-row:1;margin:0}
  .schedule-lesson>h4{grid-row:2;margin:0}
  .schedule-lesson>.schedule-kind{grid-row:3;justify-self:start;align-self:start;margin:0}
  .schedule-lesson>.schedule-teacher{grid-row:4;margin:0}
  .schedule-lesson>.schedule-room{grid-row:5;margin:0}
  .schedule-lesson>.schedule-room-link{grid-row:6;justify-self:start;align-self:end;margin:8px 0 0}
}
.schedule-room-link{display:inline-flex;align-items:center;gap:8px;margin-top:16px;padding:10px 14px;border:1px solid var(--site-accent);border-radius:9px;background:var(--card);color:var(--site-accent);font-size:12px;font-weight:700;text-decoration:none}.schedule-room-link:hover{background:var(--site-soft)}.schedule-room-link svg{width:16px;height:16px;flex-shrink:0}.schedule-attribution{grid-column:1/-1;font-size:11px;color:var(--site-muted);margin:-12px 0 0}.schedule-attribution a{color:inherit;text-underline-offset:3px}

.schedule-widget[data-expanded="false"] .schedule-collapse svg{transform:rotate(0deg)}

/* Keep the calendar compact and vertically centered beside the lessons. */
@media(min-width:651px){
  .schedule-calendar{align-self:center}
  .schedule-content{align-self:stretch;display:flex;flex-direction:column;justify-content:center}
  .schedule-retry{align-self:flex-start}
}
