:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #20232b;
  background: #f5f6f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #20232b;
  --muted: #858b99;
  --line: #e9ebef;
  --purple: #7657dc;
  --purple-soft: #f1edff;
  --mint: #e6f4f0;
  --mint-ink: #328c70;
  --amber: #fff2dd;
  --amber-ink: #bd7d1b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 340px;
  min-height: 100vh;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 680px;
  padding: 27px 17px 18px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 32px 5px;
  color: var(--ink);
  text-decoration: none;
  font: 800 20px "Manrope", sans-serif;
  letter-spacing: -.8px;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--purple);
  font: 800 22px "Manrope", sans-serif;
  letter-spacing: -2px;
  padding: 0 3px 4px 0;
}

.create-button, .primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--purple);
  box-shadow: 0 3px 7px #7657dc2a;
  font-weight: 700;
  transition: background .15s, transform .15s;
}

.create-button { justify-content: flex-start; margin: 0 4px 31px; }
.create-button:hover, .primary-button:hover { background: #6545cf; transform: translateY(-1px); }
.create-plus { font-size: 21px; font-weight: 400; line-height: 1; }

.sidebar-section { margin: 0 0 26px; }
.sidebar-heading, .detail-overline {
  margin: 0;
  color: #989daa;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.05px;
}

.sidebar-heading { padding: 0 9px 10px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 39px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #686e7c;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
}
.nav-link.active { color: #6849d1; background: #f3f0ff; }
.nav-link:hover { background: #f7f6fb; }
.nav-icon { display: grid; width: 16px; place-items: center; font-size: 17px; }
.nav-chevron { margin-left: auto; font-size: 18px; color: #9b9fad; }

.mini-calendar { padding: 0 5px; margin: 0 0 26px; }
.mini-calendar-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 12px; }
.mini-calendar-heading strong { font: 700 12px "Manrope", sans-serif; }
.mini-calendar-actions { display: flex; gap: 1px; }
.icon-button {
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #777e8d;
  background: transparent;
  font-size: 20px;
  line-height: 1;
}
.icon-button:hover { color: var(--ink); background: #f2f3f6; }
.mini-nav { width: 24px; height: 24px; font-size: 18px; }
.mini-weekdays, .mini-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.mini-weekdays { margin-bottom: 5px; color: #a2a7b2; font-size: 9px; font-weight: 700; }
.mini-days { row-gap: 3px; }
.mini-day {
  display: grid;
  width: 26px;
  height: 26px;
  place-self: center;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #707684;
  background: transparent;
  font-size: 10px;
}
.mini-day:hover { background: #f2f3f6; }
.mini-day.other-month { color: #c2c6ce; }
.mini-day.selected { color: white; background: var(--purple); font-weight: 700; }
.mini-day.today:not(.selected) { color: var(--purple); outline: 1px solid #d5ccff; font-weight: 700; }

.calendars-section { margin-top: 0; }
.calendar-filter { display: flex; align-items: center; gap: 9px; min-height: 31px; padding: 0 8px; color: #686e7c; font-size: 11px; }
.calendar-filter input { width: 13px; height: 13px; margin: 0; accent-color: var(--purple); }
.filter-dot { width: 8px; height: 8px; border-radius: 50%; }
.individual-dot { background: #8265e8; }
.group-dot { background: #45ac91; }
.blocked-dot { background: #efb85f; }

.sidebar-bottom { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 15px 3px 0; border-top: 1px solid var(--line); }
.academy-avatar, .profile-button { display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; font-weight: 700; }
.academy-avatar { width: 34px; height: 34px; color: #6951ba; background: #eeeaff; font: 700 13px "Manrope", sans-serif; }
.academy-copy { display: grid; gap: 3px; min-width: 0; }
.academy-copy strong { overflow: hidden; color: #383c46; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.academy-copy span { color: #9a9eaa; font-size: 9px; }
.more-button { margin-left: auto; }

.main-area { min-width: 0; }
.topbar {
  display: flex;
  height: 66px;
  justify-content: space-between;
  align-items: center;
  padding: 0 35px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.topbar-left, .topbar-right, .breadcrumbs { display: flex; align-items: center; }
.topbar-left { gap: 17px; }
.breadcrumbs { gap: 10px; color: #959aa6; font-size: 11px; }
.breadcrumbs strong { color: #414550; font-weight: 600; }
.crumb-divider { color: #c9cbd2; }
.topbar-right { gap: 19px; }
.role-switch select {
  min-height: 31px;
  padding: 0 29px 0 11px;
  border: 1px solid #e8e9ed;
  border-radius: 7px;
  color: #545a68;
  background: #fff;
  font-size: 10px;
  font-weight: 600;
}
.language-button { border: 0; color: #696f7c; background: transparent; font-size: 10px; font-weight: 700; }
.language-button span { margin-left: 3px; color: #a5a9b3; }
.profile-button { width: 31px; height: 31px; border: 0; color: #5b4a9e; background: #ede8ff; font-size: 9px; }
.menu-button { display: none; }

.page-content { max-width: 1660px; margin: auto; padding: 31px 35px 36px; }
.calendar-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 20px; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: #9a9eaa; font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ab38f; box-shadow: 0 0 0 3px #e2f5ee; }
h1, h2, p { margin-top: 0; }
h1 { margin: 8px 0 4px; font: 700 26px "Manrope", sans-serif; letter-spacing: -.8px; }
.page-subtitle { margin: 0; color: #898e9a; font-size: 11px; }
.heading-actions { display: flex; align-items: center; gap: 7px; }
.secondary-button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid #e6e8ed;
  border-radius: 7px;
  color: #5d6370;
  background: white;
  font-size: 10px;
  font-weight: 600;
}
.secondary-button:hover { background: #f8f8fa; border-color: #d7d9e0; }
.date-navigation { display: flex; align-items: center; }
.date-navigation .icon-button { width: 25px; height: 28px; font-size: 21px; }
.period-title { min-width: 126px; margin: 0 10px 0 2px; font: 700 13px "Manrope", sans-serif; white-space: nowrap; }
.view-switch { display: flex; padding: 3px; border: 1px solid #e7e8ed; border-radius: 8px; background: #fff; }
.view-switch button { min-height: 25px; padding: 0 10px; border: 0; border-radius: 5px; color: #858a97; background: transparent; font-size: 9px; font-weight: 600; }
.view-switch button.selected { color: #6146c3; background: #f0edfc; }
.mobile-create { display: none; min-height: 32px; padding: 0 10px; font-size: 10px; }

.notice-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  margin-bottom: 16px;
  padding: 9px 15px;
  border: 1px solid #f4e3bf;
  border-radius: 9px;
  background: #fffaf0;
}
.notice-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: var(--amber-ink); background: #ffefd2; font-size: 15px; }
.notice-banner div { display: grid; gap: 3px; }
.notice-banner strong { color: #665536; font-size: 10px; }
.notice-banner div span { color: #a3906c; font-size: 9px; }
.notice-progress { margin-left: auto; color: #947a4c; font-size: 9px; font-weight: 600; }
.notice-progress i { padding: 0 3px; color: #c5b28e; font-style: normal; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 16px; align-items: start; }
.calendar-card, .detail-card { border: 1px solid #e9ebef; border-radius: 10px; background: #fff; box-shadow: 0 2px 6px #26304b05; }
.calendar-card { min-width: 0; overflow: hidden; }
.calendar-grid { min-width: 0; }
.week-view { display: grid; grid-template-columns: 52px repeat(7, minmax(66px, 1fr)); }
.week-header { position: sticky; top: 0; z-index: 1; display: flex; height: 56px; flex-direction: column; justify-content: center; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); background: #fff; }
.week-header.time-spacer { align-items: flex-end; padding-right: 8px; }
.week-header .weekday { color: #9297a3; font-size: 8px; font-weight: 700; letter-spacing: .4px; }
.week-header .day-number { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: #454a56; font: 700 11px "Manrope", sans-serif; }
.week-header.selected-day .day-number { color: #fff; background: var(--purple); }
.week-header.today-header .day-number:not(.selected) { color: var(--purple); }
.time-column { display: grid; grid-template-rows: repeat(12, 57px); }
.time-label { position: relative; top: -6px; padding-right: 8px; color: #9da2ad; text-align: right; font-size: 8px; }
.day-column { position: relative; min-height: 684px; border-left: 1px solid #f0f1f3; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 56px, #eef0f3 56px, #eef0f3 57px); }
.day-column.selected-date { background-color: #fcfbff; }
.day-column.today-column { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 56px, #e8e5f2 56px, #e8e5f2 57px); }
.calendar-event {
  position: absolute;
  left: 3px;
  right: 3px;
  z-index: 1;
  overflow: hidden;
  min-height: 31px;
  padding: 5px 5px 4px 7px;
  border: 0;
  border-left: 2px solid #7657dc;
  border-radius: 5px;
  color: #5946a0;
  background: #f0edff;
  text-align: left;
  cursor: pointer;
  transition: filter .12s, transform .12s;
}
.calendar-event:hover { z-index: 2; filter: saturate(1.18); transform: scale(1.015); }
.calendar-event.group-event { border-left-color: #42a98c; color: #317e69; background: #e8f5f1; }
.calendar-event.blocked-event { border-left-color: #d9a14a; color: #987033; background: #fff3df; }
.calendar-event.assigned-event { border-left-color: #4e97c4; color: #3a7397; background: #eaf5fb; }
.calendar-event.choice-selected { outline: 2px solid #7657dc; outline-offset: -2px; }
.calendar-event .event-time { display: block; margin-bottom: 2px; font-size: 7px; font-weight: 600; white-space: nowrap; }
.calendar-event .event-title { display: block; overflow: hidden; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event .event-meta { display: block; overflow: hidden; margin-top: 2px; color: currentColor; opacity: .8; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.compact-event { padding-top: 4px; }
.calendar-event.compact-event .event-time { display: none; }
.calendar-event.compact-event .event-title { font-size: 7px; }
.current-time-line { position: absolute; z-index: 2; left: -3px; right: 0; height: 1px; background: #eb6867; }
.current-time-line::before { position: absolute; top: -3px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: #eb6867; content: ""; }

.month-view { display: grid; grid-template-columns: repeat(7, minmax(70px, 1fr)); }
.month-weekday { display: grid; height: 36px; place-items: center; border-bottom: 1px solid var(--line); color: #969ba6; font-size: 8px; font-weight: 700; letter-spacing: .4px; }
.month-cell { min-height: 105px; padding: 6px 5px; border-right: 1px solid #f0f1f3; border-bottom: 1px solid #f0f1f3; }
.month-cell:nth-child(7n) { border-right: 0; }
.month-cell.other-month { background: #fcfcfd; }
.month-cell.selected-date { background: #fcfbff; }
.month-date { display: grid; width: 22px; height: 22px; place-items: center; margin-bottom: 3px; border-radius: 50%; color: #6c7280; font-size: 9px; }
.month-cell.other-month .month-date { color: #b7bbc3; }
.month-date.today-date { color: var(--purple); font-weight: 700; }
.month-date.selected { color: white; background: var(--purple); }
.month-events { display: grid; gap: 3px; }
.month-event { overflow: hidden; min-height: 17px; padding: 3px 4px; border: 0; border-radius: 3px; color: #5946a0; background: #f0edff; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; font-weight: 600; }
.month-event.group-event { color: #317e69; background: #e8f5f1; }
.month-event.blocked-event { color: #987033; background: #fff3df; }
.month-event.assigned-event { color: #3a7397; background: #eaf5fb; }
.month-event.choice-selected { outline: 2px solid #7657dc; outline-offset: -2px; }
.more-events { padding: 2px 4px; color: #848997; font-size: 7px; }

.day-view { display: grid; grid-template-columns: 59px minmax(0, 1fr); }
.day-view .time-column { grid-template-rows: repeat(12, 65px); }
.day-view .day-column { min-height: 780px; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 64px, #eef0f3 64px, #eef0f3 65px); }
.day-view .calendar-event { left: 12px; right: 12px; padding: 8px 10px; }
.day-view .calendar-event .event-time { font-size: 9px; }
.day-view .calendar-event .event-title { font-size: 10px; }
.day-view .calendar-event .event-meta { font-size: 8px; }

.detail-rail { display: grid; gap: 13px; }
.detail-card { padding: 15px 14px; }
.detail-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.detail-overline { margin-bottom: 7px; font-size: 8px; }
.detail-card h2 { margin: 0; font: 700 12px "Manrope", sans-serif; letter-spacing: -.1px; }
.selected-day-card .detail-card-heading { margin-bottom: 14px; }
.day-event-list { display: grid; gap: 9px; }
.day-event { display: grid; grid-template-columns: 37px minmax(0, 1fr); gap: 9px; align-items: start; }
.day-event-time { padding-top: 2px; color: #999eaa; font-size: 8px; font-weight: 600; }
.day-event-body { padding: 7px 8px; border-left: 2px solid #7657dc; border-radius: 0 5px 5px 0; background: #f5f2ff; }
.day-event-body.group-event { border-left-color: #42a98c; background: #edf8f4; }
.day-event-body.blocked-event { border-left-color: #d9a14a; background: #fff7e9; }
.day-event-body.assigned-event { border-left-color: #4e97c4; background: #eef7fb; }
.day-event-body strong { display: block; margin-bottom: 3px; color: #4a4659; font-size: 9px; }
.day-event-body span { color: #858997; font-size: 8px; }
.empty-day { padding: 16px 3px; color: #a0a4af; text-align: center; font-size: 9px; }
.season-icon { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 7px; color: #7a60ce; background: #f1edff; }
.season-progress { margin: 17px 0 13px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: #858a97; font-size: 8px; }
.progress-label strong { color: #6652bd; font-size: 9px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 5px; background: #f0eef6; }
.progress-track span { display: block; width: 67%; height: 100%; border-radius: 5px; background: #8065dd; }
.season-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid #f0f1f3; color: #777d8a; font-size: 9px; }
.season-stat-row > span { display: flex; align-items: center; gap: 7px; }
.season-stat-row strong { color: #484d59; font-size: 9px; }
.stat-dot { width: 7px; height: 7px; border-radius: 50%; }
.open-dot { background: #8265e8; }
.text-button { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 8px; padding: 9px 0 0; border: 0; border-top: 1px solid #f0f1f3; color: #7058ca; background: transparent; text-align: left; font-size: 9px; font-weight: 700; }
.text-button span { font-size: 14px; }
.family-help-card { background: #fbfaff; }
.help-icon { display: grid; width: 28px; height: 28px; place-items: center; margin-bottom: 12px; border-radius: 8px; color: #7058ca; background: #eee9ff; }
.family-help-card h2 { margin-bottom: 8px; }
.family-help-card p { margin: 0; color: #838896; font-size: 9px; line-height: 1.6; }
.family-help-card .text-button { margin-top: 13px; }

.choice-rail { display: block; }
.choice-panel { padding: 18px 15px; border: 1px solid #e8e4f6; border-radius: 10px; background: #fff; box-shadow: 0 2px 6px #26304b05; }
.choice-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 7px; }
.choice-panel-heading h2 { font-size: 13px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 12px; color: #48836e; background: #eaf6f0; font-size: 8px; font-weight: 700; }
.privacy-pill span { font-size: 7px; }
.choice-intro { margin: 11px 0 14px; color: #858a97; font-size: 9px; line-height: 1.55; }
.choice-field { display: grid; gap: 6px; margin-bottom: 16px; color: #737987; font-size: 8px; font-weight: 700; }
.choice-field select { min-height: 34px; padding: 0 8px; border: 1px solid #e8e9ee; border-radius: 6px; color: #4a4f5c; background: #fff; font-size: 9px; }
.choice-group { margin: 0 0 12px; }
.choice-group-title { margin: 0 0 5px; color: #989daa; font-size: 8px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.choice-position { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 47px; padding: 5px 6px; border: 1px solid transparent; border-radius: 7px; color: #505562; background: #fff; text-align: left; }
.choice-position:hover { background: #faf9fd; }
.choice-position.active { border-color: #dbd3fa; background: #f7f4ff; }
.position-number { display: grid; flex: 0 0 21px; width: 21px; height: 21px; place-items: center; border-radius: 50%; color: #7158cb; background: #f0edff; font-size: 9px; font-weight: 700; }
.position-copy { display: grid; flex: 1; min-width: 0; gap: 3px; }
.position-copy strong { font-size: 8px; }
.position-copy small { overflow: hidden; color: #9297a3; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; }
.position-state { color: #795fd3; font-size: 10px; font-weight: 700; }
.choice-submit { width: 100%; min-height: 36px; margin-top: 4px; font-size: 9px; }
.choice-submit span { margin-left: auto; font-size: 13px; }
.choice-deadline { margin: 10px 0 0; color: #9a9eaa; text-align: center; font-size: 8px; }
.choice-deadline strong { color: #6d7280; }

.slot-dialog { width: min(440px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 20px 70px #1f243b35; }
.slot-dialog::backdrop { background: #1c20314f; backdrop-filter: blur(2px); }
.slot-dialog form { padding: 22px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 21px; }
.dialog-heading h2 { margin: 0; font: 700 19px "Manrope", sans-serif; }
.form-field { display: grid; gap: 7px; margin-bottom: 14px; color: #525764; font-size: 10px; font-weight: 600; }
.form-field small { margin-left: 4px; color: #a0a4ae; font-size: 9px; font-weight: 400; }
.form-field input, .form-field select { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #e5e7ec; border-radius: 7px; color: #4c515e; background: #fff; font-size: 11px; }
.form-field input:focus, .form-field select:focus, .role-switch select:focus { outline: 2px solid #d8d0fa; border-color: #8b74e0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 15px; border-top: 1px solid var(--line); }
.dialog-actions .primary-button, .dialog-actions .secondary-button { min-height: 36px; font-size: 10px; }
.danger-button { margin-right: auto; padding: 0 7px; border: 0; color: #b24848; background: transparent; font-size: 10px; font-weight: 600; }
.danger-button:hover { color: #8f2f2f; }
.danger-button[hidden] { display: none; }
.toast { position: fixed; right: 22px; bottom: 20px; z-index: 5; max-width: calc(100vw - 40px); padding: 12px 17px; border-radius: 8px; color: #fff; background: #303443; box-shadow: 0 6px 20px #1d20342c; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; font-size: 11px; }
.toast.visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.family-only { display: none; }

body.family-mode .teacher-only, body.family-mode #create-slot-button, body.family-mode .mobile-create { display: none !important; }
body.family-mode .family-only { display: block; }
body.family-mode #window-notice .notice-progress { display: none; }
body.family-mode .page-subtitle { max-width: 440px; }
body.family-mode .calendar-event:not(.choice-selected) { cursor: pointer; }
body.family-mode .calendar-event.assigned-event { display: none; }

@media (min-width: 1500px) {
  .page-content { padding-right: 48px; padding-left: 48px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 255px; gap: 20px; }
  .week-view { grid-template-columns: 60px repeat(7, minmax(75px, 1fr)); }
}

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 215px minmax(0, 1fr); }
  .sidebar { padding-right: 13px; padding-left: 13px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
  .page-content { padding-right: 24px; padding-left: 24px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 205px; gap: 11px; }
  .week-view { grid-template-columns: 44px repeat(7, minmax(56px, 1fr)); }
  .week-column .event-meta { display: none; }
  .heading-actions { gap: 4px; }
  .period-title { min-width: 110px; margin-right: 4px; font-size: 12px; }
  .view-switch button { padding: 0 7px; }
}

@media (max-width: 940px) {
  .app-shell { grid-template-columns: 68px minmax(0, 1fr); }
  .sidebar { align-items: center; padding-right: 9px; padding-left: 9px; }
  .brand { margin: 0 0 30px; }
  .brand > span:last-child, .create-button span:last-child, .sidebar-heading, .nav-link span:not(.nav-icon), .mini-calendar, .calendars-section, .academy-copy, .more-button { display: none; }
  .create-button { width: 42px; height: 42px; justify-content: center; margin: 0 0 26px; padding: 0; border-radius: 50%; }
  .create-plus { font-size: 23px; }
  .sidebar-section { width: 100%; }
  .nav-link { justify-content: center; padding: 0; }
  .nav-icon { font-size: 18px; }
  .sidebar-bottom { width: 100%; justify-content: center; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-rail .selected-day-card { grid-row: span 2; }
  .week-view { grid-template-columns: 48px repeat(7, minmax(68px, 1fr)); overflow-x: auto; }
  .calendar-card { overflow-x: auto; }
  .calendar-grid { min-width: 600px; }
  .month-view { min-width: 600px; }
}

@media (max-width: 650px) {
  body { min-width: 340px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: 56px; padding: 0 15px; }
  .menu-button { display: inline-grid; width: 26px; }
  .topbar-left { gap: 9px; }
  .breadcrumbs { font-size: 10px; }
  .topbar-right { gap: 10px; }
  .language-button { display: none; }
  .role-switch select { min-height: 29px; max-width: 112px; padding-left: 8px; font-size: 9px; }
  .profile-button { width: 28px; height: 28px; }
  .page-content { padding: 22px 13px 28px; }
  .calendar-heading { display: block; margin-bottom: 14px; }
  h1 { font-size: 23px; }
  .page-subtitle { font-size: 10px; line-height: 1.45; }
  .heading-actions { display: flex; flex-wrap: wrap; margin-top: 16px; }
  .period-title { flex: 1; min-width: 98px; margin-left: 0; font-size: 11px; }
  .heading-actions > .secondary-button { min-height: 30px; }
  .view-switch { order: 2; width: 100%; margin-top: 7px; }
  .view-switch button { flex: 1; min-height: 30px; }
  .mobile-create { display: inline-flex; }
  .notice-banner { gap: 8px; min-height: 52px; margin-bottom: 11px; padding: 8px; }
  .notice-icon { flex: 0 0 26px; width: 26px; height: 26px; }
  .notice-banner strong { font-size: 9px; }
  .notice-banner div span { max-width: 220px; font-size: 8px; line-height: 1.35; }
  .notice-progress { display: none; }
  .workspace-grid { gap: 10px; }
  .week-view { grid-template-columns: 37px repeat(7, minmax(46px, 1fr)); }
  .calendar-grid { min-width: 405px; }
  .month-view { min-width: 405px; }
  .week-header { height: 48px; }
  .week-header .weekday { font-size: 7px; }
  .week-header .day-number { width: 22px; height: 22px; font-size: 9px; }
  .time-column { grid-template-rows: repeat(12, 57px); }
  .day-column { min-height: 684px; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 56px, #eef0f3 56px, #eef0f3 57px); }
  .calendar-event { left: 2px; right: 2px; padding: 4px 3px 3px 4px; }
  .calendar-event .event-time { font-size: 6px; }
  .calendar-event .event-title { font-size: 7px; }
  .calendar-event .event-meta { display: none; }
  .month-cell { min-height: 75px; padding: 4px 3px; }
  .month-date { width: 19px; height: 19px; font-size: 8px; }
  .month-event { min-height: 15px; padding: 2px; font-size: 6px; }
  .detail-rail { grid-template-columns: minmax(0, 1fr); }
  .detail-rail .selected-day-card { grid-row: auto; }
  .detail-card { padding: 13px; }
  .day-event-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .day-event { grid-template-columns: 31px minmax(0, 1fr); gap: 5px; }
  .day-event-time { font-size: 7px; }
  .day-event-body { padding: 6px; }
}
