#schedule{max-width:1180px}
.schedule-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}
.schedule-head h2{font-family:Georgia,'Songti SC',serif;font-size:2rem;margin:3px 0 8px}
.schedule-head p:last-child{color:var(--muted,#758096);margin:0}
.schedule-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:0 0 14px}
.schedule-month-nav,.schedule-view-switch{display:flex;align-items:center;gap:8px}
.schedule-month-nav h3{min-width:145px;margin:0;text-align:center;font-size:1.12rem;color:var(--ink,#172033)}
.schedule-month-nav button,.schedule-view-switch button{min-height:38px;border:1px solid var(--line,#e7e9ef);border-radius:9px;background:var(--white,#fff);color:var(--ink,#172033);padding:7px 12px;font-weight:650;cursor:pointer}
.schedule-month-nav button[data-calendar-prev],.schedule-month-nav button[data-calendar-next]{width:38px;padding:0;font-size:1.45rem;line-height:1}
.schedule-month-nav button:hover,.schedule-view-switch button:hover{border-color:var(--violet,#6f62d9);color:var(--violet,#6f62d9)}
.schedule-view-switch{gap:0;padding:3px;border-radius:10px;background:var(--line,#e7e9ef)}
.schedule-view-switch button{border:0;background:transparent;min-width:76px}
.schedule-view-switch button[aria-pressed="true"]{background:var(--white,#fff);color:var(--violet,#6f62d9);box-shadow:0 1px 5px #1720331c}
.schedule-toolbar button:focus-visible,.schedule-day:focus-visible{outline:3px solid var(--violet,#6f62d9);outline-offset:2px}
.schedule-calendar-scroll{overflow-x:auto;border:1px solid var(--line,#e7e9ef);border-radius:14px;background:var(--white,#fff);box-shadow:0 5px 22px rgba(20,30,55,.04);scrollbar-gutter:stable}
.schedule-calendar-scroll[hidden],.schedule-agenda-title[hidden],.schedule-month-nav[hidden]{display:none}
.schedule-calendar-grid{min-width:735px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.schedule-weekday{padding:11px 8px;text-align:center;font-size:.74rem;font-weight:800;color:var(--muted,#758096);border-bottom:1px solid var(--line,#e7e9ef)}
.schedule-day{position:relative;min-height:112px;display:flex;flex-direction:column;align-items:stretch;gap:10px;text-align:left;border:0;border-right:1px solid var(--line,#e7e9ef);border-bottom:1px solid var(--line,#e7e9ef);border-radius:0;background:var(--white,#fff);color:var(--ink,#172033);padding:9px;cursor:pointer;min-width:0}
.schedule-day:nth-child(7n){border-right:0}.schedule-day:hover{background:var(--violet-soft,#eeecff)}
.schedule-day.outside{background:var(--paper,#f7f8fb);color:var(--muted,#758096)}
.schedule-day.selected{box-shadow:inset 0 0 0 2px var(--violet,#6f62d9);z-index:1}
.schedule-day-number{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;font-size:.83rem;font-weight:750;font-variant-numeric:tabular-nums}
.schedule-day.today .schedule-day-number{background:var(--violet,#6f62d9);color:#fff}
.schedule-day-events{display:grid;gap:4px;min-width:0}
.schedule-event{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-left:3px solid var(--violet,#6f62d9);border-radius:4px;background:var(--violet-soft,#eeecff);padding:4px 5px;color:#5146a9;font-size:.68rem;font-weight:650;line-height:1.3}
.schedule-event time{font-variant-numeric:tabular-nums}.schedule-more{font-size:.68rem;color:var(--muted,#758096);padding-left:5px}
.schedule-agenda-title{margin:22px 0 12px;font-size:1rem;color:var(--ink,#172033)}
.schedule-list{display:grid;gap:12px}
.schedule-loading{min-height:180px;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted,#758096);font-size:.95rem}.schedule-spinner{width:24px;height:24px;border:3px solid var(--line,#e7e9ef);border-top-color:var(--brand,#6f62d9);border-radius:50%;animation:schedule-spin .8s linear infinite}@keyframes schedule-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.schedule-spinner{animation:none;border-top-color:var(--brand,#6f62d9)}}
.schedule-card,.schedule-empty{background:var(--surface,#fff);border:1px solid var(--line,#e7e9ef);border-radius:14px;padding:20px 22px;box-shadow:0 5px 22px rgba(20,30,55,.04)}
.schedule-card{display:grid;grid-template-columns:minmax(180px,230px) minmax(200px,1fr) auto;align-items:center;gap:22px}
.schedule-time{border-left:3px solid var(--brand,#6f62d9);padding-left:14px;display:grid;gap:5px;font-variant-numeric:tabular-nums}
.schedule-time span{font-weight:700}.schedule-time small,.schedule-detail p,.schedule-empty p{color:var(--muted,#758096)}
.schedule-detail h3{margin:0 0 6px;font-size:1.08rem;overflow-wrap:anywhere}.schedule-detail p{margin:0;font-size:.9rem}
.schedule-side{display:grid;gap:10px;justify-items:end}.schedule-join{color:var(--brand,#6f62d9);font-weight:700;text-decoration:none}.schedule-join:hover{text-decoration:underline}
.schedule-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.schedule-actions button{cursor:pointer}
.schedule-notice{min-height:1.5em;color:var(--muted,#758096);margin:0 0 8px}.schedule-notice.is-error,.schedule-warning{color:#b44775!important}
.schedule-empty{text-align:center;padding:54px 20px}.schedule-empty strong{font-size:1.12rem}
#scheduleDialog{width:min(560px,calc(100% - 28px));max-height:calc(100dvh - 32px);overflow:auto}#scheduleDialog form{display:grid;gap:14px}#scheduleDialog label{display:grid;gap:7px}#scheduleDialog input,#scheduleDialog select{min-width:0;width:100%}.schedule-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#scheduleDialog .schedule-invite{display:flex;align-items:center;gap:9px;margin-top:-8px;color:var(--muted,#758096);font-size:.88rem;cursor:pointer}#scheduleDialog .schedule-invite[hidden]{display:none}#scheduleDialog .schedule-invite input{width:auto;min-width:16px;height:16px;margin:0;accent-color:var(--brand,#6f62d9);cursor:pointer}
#scheduleDialog .form-error{min-height:1.2em;margin:0}#scheduleCancelDialog{width:min(460px,calc(100% - 28px))}
@media(max-width:760px){.schedule-head{align-items:flex-start;flex-direction:column}.schedule-card{grid-template-columns:1fr;gap:14px}.schedule-side{justify-items:start}.schedule-actions{justify-content:flex-start}.schedule-fields{grid-template-columns:1fr}}
@media(max-width:760px){.schedule-toolbar{align-items:flex-start}.schedule-month-nav h3{min-width:120px}.schedule-calendar-grid{min-width:700px}.schedule-day{min-height:96px}}
:root[data-theme="dark"] .schedule-head p:last-child,:root[data-theme="dark"] .schedule-time small,:root[data-theme="dark"] .schedule-detail p,:root[data-theme="dark"] .schedule-empty p,:root[data-theme="dark"] .schedule-notice,:root[data-theme="dark"] .schedule-weekday,:root[data-theme="dark"] .schedule-more{color:#b8c3d6}
:root[data-theme="dark"] .schedule-card,:root[data-theme="dark"] .schedule-empty,:root[data-theme="dark"] .schedule-calendar-scroll,:root[data-theme="dark"] .schedule-day,:root[data-theme="dark"] .schedule-month-nav button,:root[data-theme="dark"] .schedule-view-switch button[aria-pressed="true"]{background:#192334;border-color:#3a465a;color:#f2f5fb}
:root[data-theme="dark"] .schedule-detail h3,:root[data-theme="dark"] .schedule-time span,:root[data-theme="dark"] .schedule-empty strong,:root[data-theme="dark"] .schedule-agenda-title,:root[data-theme="dark"] .schedule-month-nav h3{color:#f2f5fb}
:root[data-theme="dark"] .schedule-view-switch{background:#111827}:root[data-theme="dark"] .schedule-view-switch button{color:#bdc7d8}
:root[data-theme="dark"] .schedule-day{border-color:#3a465a}:root[data-theme="dark"] .schedule-day.outside{background:#141d2b;color:#9daabd}
:root[data-theme="dark"] .schedule-day:hover{background:#283552}:root[data-theme="dark"] .schedule-event{background:#393367;color:#f3f0ff;border-left-color:#a79dff}
:root[data-theme="dark"] .schedule-join{color:#b8b1ff}:root[data-theme="dark"] .schedule-warning,:root[data-theme="dark"] .schedule-notice.is-error{color:#ff9abc!important}

#scheduleDialog .schedule-weekdays{margin:0;padding:12px;border:1px solid var(--line,#e7e9ef);border-radius:9px;min-width:0}
#scheduleDialog .schedule-weekdays[hidden]{display:none}
.schedule-weekdays>div{display:flex;flex-wrap:nowrap;justify-content:space-between;gap:8px;overflow-x:auto}
#scheduleDialog .schedule-weekdays label{display:flex;align-items:center;gap:5px;min-height:32px;cursor:pointer;white-space:nowrap;flex-shrink:0}
#scheduleDialog .schedule-weekdays input{width:16px;height:16px;margin:0;accent-color:var(--brand,#6f62d9)}
.schedule-weekdays small{display:block;margin-top:8px;color:var(--muted,#758096)}

#scheduleDialog [data-repeat-option][hidden]{display:none}

/* Weekday time rows use the existing native controls and schedule dialog tokens. */
#scheduleDialog .schedule-weekday-list{display:grid;gap:6px;overflow:visible}
#scheduleDialog .schedule-weekday-row{display:grid;grid-template-columns:70px minmax(0,1fr);align-items:center;gap:8px}
#scheduleDialog .weekday-times{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#scheduleDialog .weekday-times[hidden]{display:none}
#scheduleDialog .schedule-weekdays .weekday-times label,#scheduleDialog .schedule-weekdays .weekday-first-date{display:grid;gap:3px;min-width:0;white-space:normal}
#scheduleDialog .schedule-weekdays input[type=time],#scheduleDialog .schedule-weekdays input[type=date]{width:100%;height:auto;min-height:32px;padding:5px 7px;box-sizing:border-box}
#scheduleDialog #scheduleWeekdayZone{margin:6px 0;color:var(--muted,#758096);font-size:12px}
#scheduleDialog .weekday-choice input{width:16px;height:16px}
#scheduleDialog input[aria-invalid=true]{border-color:var(--danger,#b44775)}
@media(max-width:480px){#scheduleDialog .schedule-weekday-row{grid-template-columns:55px minmax(0,1fr);gap:5px}#scheduleDialog .weekday-times{gap:5px}}

/* Customized recurrence uses the weekday time controls. */
#meetingTimeLayout[hidden] { display: none !important; }
