.weekly-mobile-controls { display: none; }
.mobile-day-label, .mobile-period-label { display: none; }
.slot-location { margin-top: 4px; font-size: .78rem; color: var(--muted); }
.slot-location-line { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.campus-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; border-radius: 999px; padding: 2px 5px; font-size: .66rem; font-weight: 850; line-height: 1.15; color: #075f5a; background: #e2f5f1; }
.slot-entry[data-campus="TC"] .campus-chip { color: #185b95; background: #e8f1fb; }
.slot-entry[data-campus="PH"] .campus-chip { color: #08736c; background: #e6f6f2; }
.weekly-hidden-day { display: none !important; }

@media (max-width: 680px) {
  .topbar { height: 52px; padding: 0 9px; gap: 8px; }
  .topbar .brand { gap: 7px; }
  .topbar .brand img { width: 34px; height: 34px; border-radius: 10px; }
  .topbar .brand strong { font-size: 1rem; line-height: 1.05; }
  .topbar .brand small, .user-menu span { display: none; }
  .user-menu { gap: 6px; }
  .user-menu .btn { min-height: 34px; border-radius: 9px; padding: 5px 9px; font-size: .78rem; }
  .sidebar { top: 52px; padding: 6px 7px; }
  .nav { gap: 4px; }
  .nav button { padding: 7px 9px; border-radius: 9px; font-size: .82rem; }
  .content { padding: 10px 7px 16px; }
  .content-inner { width: 100%; }
  .page-head { margin-bottom: 10px; }
  .page-head h1 { font-size: 1.12rem; }
  .page-head p { margin-top: 3px; font-size: .8rem; line-height: 1.25; }
  .app-tools { gap: 7px; margin-bottom: 8px; }
  .app-tools .version-badge { padding: 4px 7px; font-size: .68rem; }
  .card { border-radius: 13px; }
  .card-body, .card-head { padding: 10px; }
  .next-card { margin-bottom: 10px; }
  .next-card .card-body { flex-direction: row !important; align-items: center !important; gap: 8px; padding: 10px 12px; }
  .next-card .card-body > div { min-width: 0; flex: 1 1 auto; }
  .next-card h2 { margin-bottom: 3px; font-size: .74rem; }
  .next-main { font-size: .95rem; line-height: 1.15; }
  .next-meta { margin-top: 3px; font-size: .72rem; line-height: 1.25; }
  .next-card > .card-body > .badge { flex: 0 0 auto; padding: 4px 7px; font-size: .64rem; }

  .weekly-mobile-controls { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 0 7px; }
  .weekly-mobile-group { display: inline-flex; gap: 3px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: #f7fafc; }
  .weekly-mobile-btn { min-height: 28px; border: 0; border-radius: 7px; padding: 4px 7px; color: var(--muted); background: transparent; font-size: .68rem; font-weight: 800; }
  .weekly-mobile-btn.active { color: #fff; background: var(--navy); }

  .weekly-scroll { margin-inline: 0; border-radius: 10px; }
  .weekly { width: 100%; min-width: 0 !important; table-layout: fixed; font-size: .68rem; }
  .weekly th, .weekly td { padding: 4px 3px; }
  .weekly thead th { height: 42px; vertical-align: middle; text-align: center; }
  .weekly thead th:first-child { width: 42px; min-width: 42px !important; }
  .weekly th:not(:first-child), .weekly td:not(:first-child) { min-width: 0 !important; width: auto; }
  .weekly tbody th:first-child { width: 42px; min-width: 42px !important; text-align: center; vertical-align: middle; }
  .desktop-day-label, .desktop-period-label { display: none; }
  .mobile-day-label, .mobile-period-label { display: inline; font-weight: 850; }
  .weekly thead th small { margin-top: 1px; font-size: .58rem; line-height: 1; white-space: nowrap; }
  .weekly td { height: 44px; vertical-align: middle; }
  .weekly tbody tr:nth-child(6) th,
  .weekly tbody tr:nth-child(6) td { border-top: 3px solid #b8cedd; }

  .weekly-density-compact .slot-entry { line-height: 1.08; overflow-wrap: anywhere; }
  .weekly-density-compact .slot-entry + .slot-entry { margin-top: 3px; padding-top: 3px; }
  .weekly-density-compact .slot-title,
  .weekly-density-compact .slot-sub { display: inline; font-size: .64rem; }
  .weekly-density-compact .slot-title { font-weight: 850; }
  .weekly-density-compact .slot-title::after { content: " · "; color: var(--muted); font-weight: 500; }
  .weekly-density-compact .slot-room,
  .weekly-density-compact .slot-location { margin-top: 2px; font-size: .57rem; line-height: 1.05; }
  .weekly-density-compact .slot-room.slot-location-line,
  .weekly-density-compact .slot-location-line { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
  .weekly-density-compact .campus-chip { min-width: 20px; padding: 1px 4px; font-size: .52rem; }

  .weekly-density-comfortable { min-width: 720px !important; table-layout: auto; }
  .weekly-density-comfortable thead th:first-child,
  .weekly-density-comfortable tbody th:first-child { width: 64px; min-width: 64px !important; }
  .weekly-density-comfortable th:not(:first-child),
  .weekly-density-comfortable td:not(:first-child) { min-width: 128px !important; }
  .weekly-density-comfortable td { height: 76px; padding: 7px 6px; }
  .weekly-density-comfortable .slot-title { font-size: .8rem; }
  .weekly-density-comfortable .slot-sub { font-size: .72rem; }
  .weekly-density-comfortable .slot-room,
  .weekly-density-comfortable .slot-location { font-size: .68rem; }

  .weekly-scope-today { min-width: 0 !important; }
  .weekly-scope-today thead th:first-child,
  .weekly-scope-today tbody th:first-child { width: 48px; min-width: 48px !important; }
  .weekly-scope-today th:not(:first-child),
  .weekly-scope-today td:not(:first-child) { min-width: 0 !important; width: auto; }
}
