:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6fa;
  color: #191d31;
  font-synthesis: none;
  --brand-accent: #e9513c;
  --brand-tint: #fcece9;
  --brand-ink: #843123;
  --line: #e3e7f0;
  --muted: #5b647d;
  --grid-height: 572px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible {
  outline: 2px solid #6352d1; outline-offset: 3px;
}
h1, h2, p { margin: 0; }

.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner, .workspace { width: min(100%, 1552px); margin: 0 auto; padding-inline: 42px; }
.topbar-inner { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.studio-logo { width: 52px; height: 52px; border-radius: 9px; display: block; }
.topbar h1 { font-size: clamp(1.4rem, 3.4vw, 2.1rem); font-weight: 750; letter-spacing: -.038em; line-height: 1.12; text-align: center; }

.workspace { display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; gap: 16px; padding-block: 16px 32px; }
.button, .icon-button, .text-button { min-height: 38px; border-radius: 8px; background: white; border: 1px solid var(--line); font-weight: 650; }
.button { padding: 8px 13px; white-space: nowrap; font-size: .875rem; }
.button:hover, .icon-button:hover { background: #f3f1fd; }
.month-day:focus-visible { outline-color: var(--brand-accent); }
.calendar-controls { display: grid; gap: 12px; }
.surface { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 2px 5px #22284706; }
.month-card { padding: 9px 12px 11px; }
.month-heading, .rooms-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-inline: 3px; }
.month-heading { min-height: 32px; font-weight: 720; font-size: .95rem; margin-bottom: 3px; }
.month-heading span::first-letter { text-transform: uppercase; }
.month-nav, .period-nav { display: flex; align-items: center; }
.icon-button { display: inline-grid; place-items: center; width: 34px; min-height: 34px; background: #fff; }
.month-nav .icon-button { border: 0; width: 27px; min-height: 30px; }
.chevron { width: 7px; height: 7px; display: block; border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; transform: rotate(45deg); }
.chevron.prev { transform: rotate(225deg); }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; gap: 2px 1px; }
.weekday { color: #656e83; font-size: .76rem; font-weight: 650; padding-block: 4px; text-transform: capitalize; }
.month-day { border: 0; border-radius: 7px; background: transparent; min-height: 24px; font-size: .85rem; font-weight: 560; padding: 0; }
.month-day.adjacent { color: #8790a3; }
.month-day:hover, .month-day.week-range { background: var(--brand-tint); }
.month-day.today-mark { box-shadow: inset 0 0 0 1px var(--brand-accent); }
.month-day.selected { color: #fff; background: var(--brand-accent); }
.rooms-card { display: flex; flex-direction: column; justify-content: center; padding: 14px 17px; }
.rooms-heading h2 { font-size: .94rem; font-weight: 730; }
.text-button { color: #4c3ca8; font-size: .8rem; border: 0; background: transparent; min-height: 32px; padding-inline: 4px; }
.text-button:hover { text-decoration: underline; }
#room-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; margin-top: 7px; }
.room-filter { display: grid; grid-template-columns: 8px minmax(0, 1fr); align-content: center; align-items: center; gap: 5px 7px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--room-head); border-radius: 8px; padding: 8px; min-height: 48px; }
.room-filter:hover { border-color: var(--room-color); }
.room-filter[aria-pressed="false"] { background: #fff; }
.room-filter[aria-pressed="false"] .room-dot { background: #a2abbc; }
.room-filter .room-name { font-size: .875rem; font-weight: 650; }
.room-filter .room-info { grid-column: 2; font-size: .76rem; color: var(--muted); }
.room-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--room-color); }
.room-guide { display: flex; align-items: center; gap: 8px; margin: 8px 3px 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: .79rem; }
.room-guide i { width: 10px; height: 10px; border: 1px solid #b9c1d4; border-radius: 3px; }
.room-red { --room-color: #c75367; --room-ink: #762639; --room-bg: #fce6eb; --room-head: #fbf0f3; }
.room-yellow { --room-color: #b38513; --room-ink: #654a05; --room-bg: #fff1c9; --room-head: #fcf6e3; }
.room-blue { --room-color: #507dd4; --room-ink: #284d94; --room-bg: #e3ecff; --room-head: #eff4ff; }
.room-green { --room-color: #279660; --room-ink: #1d6846; --room-bg: #dcf3e6; --room-head: #edf8f2; }

.schedule { overflow: hidden; }
.schedule-bar { min-height: 70px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 17px; }
.period-heading { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 10px; font-size: clamp(1.25rem, 2.5vw, 1.6rem); font-weight: 750; letter-spacing: -.03em; line-height: 1.2; }
#period-weekday { color: var(--muted); font-size: .875rem; font-weight: 500; letter-spacing: normal; }
.period { display: flex; align-items: center; gap: 7px; }
.period-nav .icon-button { border-radius: 0; }
.period-nav .icon-button:first-child { border-radius: 8px 0 0 8px; }
.period-nav .icon-button:last-child { border-radius: 0 8px 8px 0; border-left: none; }
.today { min-height: 34px; padding-block: 5px; }
.view-switch { display: flex; align-items: stretch; background: #edf0f6; border-radius: 9px; padding: 3px; }
.view-switch button { border: 1px solid transparent; min-height: 31px; border-radius: 7px; background: transparent; padding-inline: 10px; font-size: .85rem; font-weight: 650; color: var(--muted); }
.view-switch button[aria-pressed="true"] { color: #26233d; background: #fff; border-color: #e0e3ed; box-shadow: 0 1px 2px #201d4420; }
.status { margin: 0 17px 14px; color: #71394a; font-size: .875rem; }
.calendar-scroll { overflow-x: auto; scrollbar-color: #bcc3d2 #f5f6f9; }
.calendar { --time-width: 62px; }
.calendar-headers, .calendar-body { display: grid; grid-template-columns: var(--time-width) repeat(var(--columns, 4), minmax(0, 1fr)); }
.calendar.week { min-width: max(100%, var(--week-min)); }
.calendar-headers { min-height: 43px; border-block: 1px solid var(--line); background: #fafbfe; }
.time-heading, .day-heading, .lane-heading { padding-inline: 8px; display: flex; justify-content: center; align-items: center; gap: 7px; font-size: .875rem; font-weight: 720; }
.time-heading { color: var(--muted); font-size: .73rem; }
.day-heading, .lane-heading { border-left: 1px solid var(--line); min-width: 0; }
.lane-heading { background: var(--room-head); color: var(--room-ink); padding-block: 10px; }
.day-heading { font-size: .86rem; min-height: 36px; text-transform: capitalize; }
.day-heading.selected { color: var(--brand-ink); background: var(--brand-tint); }
.day-heading button { background: transparent; border: 0; font-size: inherit; font-weight: inherit; padding: 5px; }
.week .lane-heading { font-size: .73rem; gap: 4px; padding: 5px 2px; min-height: 29px; }
.week .lane-heading .room-dot { width: 6px; height: 6px; }
.corner { grid-row: span 2; }
.time-gutter { position: relative; min-height: var(--grid-height); background: #fafbfe; }
.time-label { position: absolute; right: 9px; color: #515b73; font-size: .76rem; font-variant-numeric: tabular-nums; transform: translateY(-50%); z-index: 2; }
.time-label:first-child { transform: translateY(4px); }
.calendar-body { position: relative; padding-bottom: 11px; }
.timeline { position: relative; height: var(--grid-height); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, #e5e9f1 0 1px, transparent 1px 22px, #edf0f6 22px 23px, transparent 23px 44px); }
.calendar-headers > :first-child, .time-gutter { position: sticky; left: 0; z-index: 4; background: #fafbfe; }
.event { position: absolute; z-index: 2; inset-inline: 5px; top: calc(var(--at) * 1px + 2px); height: calc(var(--size) * 1px - 3px); display: flex; flex-direction: column; justify-content: center; gap: 3px; overflow: hidden; text-align: left; border: 0; border-left: 3px solid var(--room-color); border-radius: 6px; padding: 2px 7px; color: var(--room-ink); background: var(--room-bg); font-size: .82rem; font-weight: 720; }
.event span, .event small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event small { font-size: .73rem; font-weight: 550; }
.event.short { flex-direction: row; justify-content: flex-start; align-items: center; gap: 6px; font-size: .76rem; padding-block: 0; }
.event.short small { flex: 0 0 auto; }
.week .event { inset-inline: 2px; font-size: .71rem; border-left-width: 2px; padding: 1px 3px; }
.week .event small { display: none; }
.now-line { pointer-events: none; position: absolute; top: calc(var(--at) * 1px); height: 1px; background: #806cee; z-index: 3; }
.now-line::before { content: ""; display: block; width: 7px; height: 7px; transform: translate(-3px,-3px); border-radius: 50%; background: #644ecf; }
.now-line.full { left: var(--time-width); right: 0; }
.now-line.partial { left: 0; right: 0; }

@media (max-width: 1000px) {
  .topbar-inner, .workspace { padding-inline: 23px; }
  .workspace { grid-template-columns: 224px minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 760px) {
  .topbar-inner, .workspace { padding-inline: 14px; }
  .topbar-inner { min-height: 60px; gap: 8px; }
  .topbar h1 { font-size: clamp(1.15rem, 5.6vw, 1.6rem); }
  .studio-logo { width: 44px; height: 44px; border-radius: 7px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 10px; }
  .calendar-controls { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px; }
  .month-card, .rooms-card { padding: 9px 7px 11px; }
  .month-heading, .rooms-heading { gap: 4px; padding-inline: 0; }
  .month-heading { font-size: .8rem; line-height: 1.15; }
  .month-nav { flex-shrink: 0; }
  .month-nav .icon-button { width: 22px; }
  .month-day { min-height: 26px; }
  .rooms-heading h2 { font-size: .85rem; }
  .rooms-heading .text-button { padding-inline: 0; font-size: .72rem; white-space: nowrap; }
  #room-filters { flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 3px; }
  .room-filter { display: flex; gap: 5px; min-height: 32px; padding: 4px 6px; }
  .room-filter .room-name { font-size: .78rem; }
  .room-filter .room-dot { width: 6px; height: 6px; flex: 0 0 6px; }
  .room-filter .room-info, .room-guide { display: none; }
  .schedule-bar { grid-template-columns: minmax(0, 1fr) auto; padding: 10px; gap: 8px; }
  .period-heading { grid-column: 1 / -1; }
  .period { gap: 5px; }
  .period .icon-button { width: 27px; }
  .today { font-size: .73rem; padding-inline: 6px; }
  .view-switch button { font-size: .75rem; padding-inline: 6px; }
  .calendar { --time-width: 39px; }
  .calendar.day { min-width: 300px; }
  .time-label { right: 4px; font-size: .68rem; }
  .time-heading { font-size: .66rem; }
  .lane-heading { font-size: .72rem; gap: 3px; padding-inline: 2px; }
  .lane-heading .room-dot { width: 6px; height: 6px; }
  .event { inset-inline: 2px; padding-inline: 3px; border-left-width: 2px; font-size: .73rem; }
  .event span { white-space: normal; overflow-wrap: anywhere; line-height: 1.07; }
  .event small { font-size: .62rem; letter-spacing: -.02em; }
  .event.short span { white-space: nowrap; }
  .event.short { font-size: .71rem; }
  .event.short small { display: none; }
}
@media (max-width: 520px) {
  #room-filters { grid-template-columns: 1fr; }
}
