:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #65717f;
  --line: #d9dee4;
  --surface: #ffffff;
  --surface-soft: #f6f4ef;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --amber: #b45309;
  --amber-soft: #fff7ed;
  --green: #15803d;
  --green-soft: #ecfdf3;
  --red: #b42318;
  --red-soft: #fff1f0;
  --blue: #1d4ed8;
  --blue-soft: #eff6ff;
  --shadow: 0 16px 36px rgba(31, 41, 51, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="monster"] {
  --ink: #172033;
  --muted: #596577;
  --line: #d9c879;
  --surface: #fffef7;
  --surface-soft: #fff7d8;
  --teal: #2f6fd6;
  --teal-dark: #1f4f9a;
  --amber: #c45b13;
  --amber-soft: #fff0dc;
  --green: #177d47;
  --green-soft: #e8f8df;
  --shadow: 0 16px 36px rgba(99, 77, 15, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface-soft);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
}

body[data-theme="monster"] {
  background:
    linear-gradient(135deg, rgba(255, 231, 112, 0.34), transparent 34%),
    linear-gradient(315deg, rgba(78, 142, 236, 0.18), transparent 32%),
    var(--surface-soft);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

body[data-theme="monster"] .topbar {
  border-bottom: 3px solid #f4c52f;
  background: linear-gradient(90deg, rgba(255, 254, 247, 0.98), rgba(255, 246, 205, 0.98));
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.brand-mark {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
}

body[data-theme="monster"] .brand-mark {
  border: 2px solid #172033;
  background: linear-gradient(135deg, #ef4444 0 42%, #facc15 43% 62%, #f8fafc 63% 100%);
  color: #172033;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.1;
}

h2 {
  font-size: 16px;
  line-height: 1.2;
}

h3 {
  margin: 18px 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0;
}

.brand p,
.panel-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.top-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.theme-picker {
  display: grid;
  min-width: 158px;
  gap: 4px;
}

.theme-picker span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.theme-picker select {
  min-height: 38px;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.48;
}

.shell {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

.week-filter {
  gap: 4px;
}

.week-control {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 6px;
}

.week-step {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 19px;
  font-weight: 800;
}

.week-step:disabled {
  cursor: default;
  opacity: 0.35;
}

.week-range {
  display: block;
  min-height: 16px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.day-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.day-button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  padding: 8px 10px;
}

.day-button strong,
.day-button span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-button strong {
  font-size: 14px;
}

.day-button span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.day-button.active {
  border-color: var(--teal);
  background: #e7f4f1;
  box-shadow: inset 0 0 0 1px var(--teal);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric,
.room-panel,
.schedule-panel,
.detail-panel,
.search-schedule-section,
.heatmap-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 78px;
  padding: 14px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.search-schedule-section {
  margin-bottom: 14px;
}

.search-schedule-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.weekly-room-stack {
  display: grid;
  gap: 12px;
}

.weekly-room-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.weekly-room-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
}

.weekly-room-head div {
  min-width: 0;
}

.weekly-room-head strong,
.weekly-room-head span {
  display: block;
}

.weekly-room-head strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-room-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.weekly-room-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.weekly-day-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  min-height: 148px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.weekly-day-card:last-child {
  border-right: 0;
}

.weekly-day-card:hover,
.class-meeting-card:hover {
  background: #f8fafc;
}

.weekly-day-head,
.weekly-mini-event,
.weekly-day-events {
  display: grid;
  min-width: 0;
}

.weekly-day-head {
  gap: 2px;
}

.weekly-day-head strong {
  font-size: 13px;
}

.weekly-day-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.weekly-day-events {
  gap: 6px;
}

.weekly-mini-event {
  gap: 2px;
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
  padding: 6px 7px;
}

.weekly-mini-event b,
.weekly-mini-event span,
.weekly-mini-event em,
.weekly-free,
.weekly-closed {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-mini-event b {
  color: var(--amber);
  font-size: 11px;
}

.weekly-mini-event span {
  font-size: 12px;
  font-weight: 800;
}

.weekly-mini-event em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.weekly-free,
.weekly-closed {
  border-radius: var(--radius);
  padding: 8px;
  font-size: 12px;
  font-weight: 800;
}

.weekly-free {
  background: var(--green-soft);
  color: var(--green);
}

.weekly-closed {
  background: #eef0f2;
  color: var(--muted);
}

.class-meeting-list {
  display: grid;
  gap: 8px;
}

.class-meeting-card {
  display: grid;
  grid-template-columns: 72px minmax(260px, 1.5fr) minmax(160px, 0.7fr) minmax(180px, 0.8fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.meeting-date,
.meeting-course,
.meeting-time {
  display: grid;
  min-width: 0;
}

.meeting-date {
  gap: 2px;
}

.meeting-date strong,
.meeting-time strong {
  font-size: 13px;
}

.meeting-date em,
.meeting-course em,
.meeting-time em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-course {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.meeting-course strong,
.meeting-instructor {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-course strong {
  font-size: 13px;
}

.meeting-time {
  gap: 2px;
}

.meeting-instructor {
  font-size: 12px;
  font-weight: 800;
}

.search-schedule-note {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
}

.pokedex-section {
  overflow: hidden;
  border: 1px solid #d6b842;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 221, 0.9)),
    var(--surface);
  box-shadow: var(--shadow);
}

.pokedex-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid #d6b842;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(47, 111, 214, 0.12), transparent 34%);
}

.pokedex-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pokedex-head h2 {
  font-size: 22px;
}

.pokedex-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.pokedex-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pokedex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  padding: 14px;
}

.pokemon-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid #d8c15a;
  border-radius: var(--radius);
  background: #fffdf4;
  padding: 12px;
  box-shadow: 0 12px 24px rgba(31, 41, 51, 0.08);
}

.pokemon-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pokemon-number {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.pokemon-types {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.pokemon-type {
  min-height: 22px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  font-size: 11px;
  font-weight: 900;
  line-height: 22px;
  padding: 0 8px;
}

.type-grass { background: #bbf7d0; color: #14532d; }
.type-poison { background: #f3e8ff; color: #6b21a8; }
.type-fire { background: #fee2e2; color: #991b1b; }
.type-water { background: #dbeafe; color: #1e40af; }
.type-bug { background: #ecfccb; color: #3f6212; }
.type-normal { background: #f3f4f6; color: #374151; }
.type-electric { background: #fef3c7; color: #92400e; }
.type-ground { background: #fde68a; color: #78350f; }
.type-fairy { background: #fce7f3; color: #9d174d; }
.type-fighting { background: #ffedd5; color: #9a3412; }
.type-psychic { background: #fbcfe8; color: #9d174d; }
.type-rock { background: #e7e5e4; color: #57534e; }
.type-ghost { background: #ede9fe; color: #5b21b6; }
.type-ice { background: #ccfbf1; color: #0f766e; }
.type-dragon { background: #dbeafe; color: #1d4ed8; }

.pokemon-art {
  display: grid;
  min-height: 152px;
  place-items: center;
  border: 1px solid rgba(216, 193, 90, 0.55);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 45%, rgba(250, 204, 21, 0.3), transparent 42%),
    #ffffff;
}

.pokemon-art img {
  width: min(150px, 72%);
  aspect-ratio: 1;
  object-fit: contain;
}

.pokemon-name {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  text-transform: none;
}

.pokemon-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.pokemon-facts div {
  min-width: 0;
  border: 1px solid #eadf9f;
  border-radius: var(--radius);
  background: #ffffff;
  padding: 7px;
}

.pokemon-facts dt {
  font-size: 10px;
}

.pokemon-facts dd {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-stats {
  display: grid;
  gap: 7px;
}

.pokemon-stat {
  position: relative;
  display: grid;
  grid-template-columns: 36px 34px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 18px;
  overflow: hidden;
}

.pokemon-stat span,
.pokemon-stat strong {
  position: relative;
  z-index: 1;
  font-size: 11px;
}

.pokemon-stat span {
  color: var(--muted);
  font-weight: 900;
}

.pokemon-stat strong {
  color: var(--ink);
}

.pokemon-stat i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6fd6, #22c55e);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(500px, 1fr) minmax(380px, 440px);
  gap: 14px;
  align-items: start;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.room-list {
  display: grid;
  gap: 8px;
  max-height: 720px;
  overflow: auto;
  padding: 12px;
}

.room-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  overflow: hidden;
}

.room-card.active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.room-card-main {
  display: grid;
  width: 100%;
  min-height: 74px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.room-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.room-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.room-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.room-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-top: 1px solid var(--line);
  background: #f9fafb;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.room-check.disabled {
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-available {
  background: var(--green-soft);
  color: var(--green);
}

.status-busy {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-closed {
  background: #f0f2f4;
  color: var(--muted);
}

.status-gap {
  background: var(--green-soft);
  color: var(--green);
}

.schedule-panel {
  min-width: 0;
}

.timeline-scroll {
  overflow: visible;
  padding: 14px;
}

.timeline {
  position: relative;
  width: 100%;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.time-axis {
  position: absolute;
  inset: 0 auto 0 0;
  width: 76px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #f9fafb;
}

.timeline-body {
  position: absolute;
  inset: 0 0 0 76px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      to bottom,
      #f2f4f6 0,
      #f2f4f6 1px,
      transparent 1px,
      transparent 45px
    );
}

.tick {
  position: absolute;
  right: 10px;
  width: 58px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.tick.start {
  transform: translateY(0);
}

.tick.end {
  transform: translateY(-100%);
}

.free-block {
  position: absolute;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  border: 1px solid #a7dfba;
  border-radius: var(--radius);
  background: rgba(236, 253, 243, 0.72);
  color: var(--green);
  padding: 5px 8px;
}

.free-copy {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
  gap: 6px;
}

.free-copy strong,
.free-copy span {
  display: inline-block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
}

.free-copy strong {
  font-size: 11px;
}

.free-copy span {
  color: #166534;
  font-size: 11px;
}

.free-check {
  flex: 0 0 auto;
  min-height: 21px;
  border: 1px solid #9fd9b3;
  border-radius: 999px;
  background: #ffffff;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 19px;
  padding: 0 8px;
  text-decoration: none;
  white-space: nowrap;
}

.event-block {
  position: absolute;
  min-width: 0;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid #f6c987;
  border-radius: var(--radius);
  background: var(--amber-soft);
  padding: 8px;
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(31, 41, 51, 0.08);
  z-index: 2;
}

.event-block strong,
.event-block span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-block strong {
  font-size: 12px;
}

.event-block span {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

.event-block .event-instructor-line {
  color: var(--ink);
  font-weight: 700;
}

.empty-state {
  margin: 0 14px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 16px;
}

.empty-state.inline {
  grid-column: 1 / -1;
  margin: 0;
}

.empty-state.standalone {
  margin: 40px auto;
  max-width: 760px;
  background: #ffffff;
}

.empty-state code {
  color: var(--ink);
  font-weight: 700;
}

.detail-panel {
  min-width: 0;
  padding-bottom: 14px;
}

.detail-actions {
  padding: 12px 14px 4px;
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 8px 14px 0;
  border-top: 1px solid var(--line);
}

.detail-list > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  min-width: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.event-list {
  display: grid;
  gap: 8px;
  padding: 0 14px;
}

.event-item {
  border: 1px solid #f6c987;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  background: var(--amber-soft);
  padding: 9px 10px;
}

.event-item-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.event-item strong,
.event-item span {
  display: block;
}

.event-item strong {
  font-size: 13px;
}

.event-title {
  margin-top: 7px;
}

.event-instructor {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.event-meta span {
  display: inline;
}

.course-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.course-chip {
  display: inline-grid;
  grid-template-columns: minmax(50px, auto) 42px;
  align-items: stretch;
  min-height: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  vertical-align: middle;
}

.course-chip b,
.course-chip em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  font-style: normal;
  white-space: nowrap;
}

.course-chip b {
  min-width: 50px;
}

.course-chip em {
  min-width: 42px;
  border-left: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.course-chip.muted {
  display: inline-flex;
  padding: 0 8px;
  background: #f5f6f7;
  color: var(--muted);
}

.instructor-list {
  display: grid;
  gap: 8px;
}

.instructor-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 8px;
}

.instructor-name,
.instructor-period {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instructor-name {
  color: var(--ink);
  font-weight: 800;
}

.instructor-period {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.heatmap-section {
  margin-top: 14px;
}

.heatmap-wrap {
  overflow: auto;
  max-height: 640px;
}

.heatmap {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
}

.heatmap th,
.heatmap td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

.heatmap th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f9fafb;
  font-size: 12px;
}

.heatmap th:first-child,
.heatmap td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 150px;
  max-width: 180px;
  background: #ffffff;
  font-weight: 800;
}

.heatmap th:first-child {
  z-index: 3;
  background: #f9fafb;
}

.heat-cell {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: var(--radius);
  padding: 8px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}

.heat-cell.available {
  background: var(--green-soft);
}

.heat-cell.gap {
  background: var(--green-soft);
}

.heat-cell.busy {
  background: var(--amber-soft);
}

.heat-cell.closed {
  background: #eef0f2;
  color: var(--muted);
}

.heat-cell strong,
.heat-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heat-cell strong {
  font-size: 12px;
}

.heat-cell span {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1180px) {
  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .class-meeting-card {
    grid-template-columns: 72px minmax(220px, 1fr) minmax(160px, 0.7fr);
  }

  .meeting-instructor {
    grid-column: 2 / -1;
  }

  .workspace {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  }

  .detail-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar,
  .brand,
  .top-actions,
  .pokedex-head {
    align-items: stretch;
  }

  .topbar,
  .pokedex-head {
    position: static;
    flex-direction: column;
  }

  .brand {
    width: 100%;
  }

  .top-actions,
  .pokedex-actions,
  .detail-actions {
    width: 100%;
  }

  .button,
  .icon-button {
    flex: 1 1 auto;
  }

  .shell {
    padding: 12px;
  }

  .filters,
  .day-strip,
  .metric-grid,
  .weekly-room-grid,
  .workspace {
    grid-template-columns: 1fr;
  }

  .weekly-day-card {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .weekly-day-card:last-child {
    border-bottom: 0;
  }

  .class-meeting-card,
  .meeting-course {
    grid-template-columns: 1fr;
  }

  .meeting-instructor {
    grid-column: auto;
  }

  .pokedex-grid {
    grid-template-columns: 1fr;
  }

  .metric strong {
    font-size: 24px;
  }

  .room-list {
    max-height: 420px;
  }
}
