/* ============================================
   ClassShow Modern Design System
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

:root {
  --bg: #f3f8f6;
  --bg-2: #e9f3ff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-hover: #f7fbff;
  --text: #111827;
  --text-muted: #526173;
  --text-light: #8a98aa;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --cyan: #06b6d4;
  --mint: #10b981;
  --lime: #a3e635;
  --accent: #ff6b35;
  --accent-light: #ffedd5;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.2);
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.16);
  --radius: 10px;
  --radius-sm: 8px;
  --radius-full: 999px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    linear-gradient(120deg, rgba(37, 99, 235, 0.10), transparent 34%),
    linear-gradient(260deg, rgba(16, 185, 129, 0.12), transparent 42%),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.055) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(6, 182, 212, 0.045) 0 1px, transparent 1px 72px),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background:
    linear-gradient(135deg, transparent 0 47%, rgba(255, 107, 53, 0.08) 47% 49%, transparent 49% 100%),
    linear-gradient(315deg, transparent 0 52%, rgba(6, 182, 212, 0.07) 52% 54%, transparent 54% 100%);
}
a { color: var(--primary); text-decoration: none; }
img, video { max-width: 100%; display: block; }

/* Layout */
.container { max-width: 1240px; margin: 0 auto; padding: 0 22px; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }

/* Top Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}
.topbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--primary);
}
.topbar-logo::before {
  content: '';
  width: 13px;
  height: 26px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--cyan));
  transform: skewX(-14deg);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.25);
}
.topbar-logo span { color: var(--text); }
.topbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.archive-alert-button {
  position: relative;
  border-color: rgba(239, 68, 68, 0.18);
  color: #991b1b;
  background: rgba(254, 242, 242, 0.92);
}
.archive-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}
.portal-alert-button {
  position: relative;
}
.portal-alert-button.portal-alert-active {
  border-color: rgba(239, 68, 68, 0.18);
  color: #991b1b;
  background: rgba(254, 242, 242, 0.92);
}
.archive-alert-badge[hidden] {
  display: none !important;
}
.backup-status-tooltip-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.backup-status-tooltip-anchor[tabindex] {
  outline: none;
}
.backup-status-tooltip-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: none;
  width: min(320px, 78vw);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
  color: #e2e8f0;
  z-index: 140;
}
.backup-status-tooltip-panel::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 18px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.96);
  transform: rotate(45deg);
}
.backup-status-tooltip-anchor:hover .backup-status-tooltip-panel,
.backup-status-tooltip-anchor:focus-within .backup-status-tooltip-panel {
  display: block;
}
.backup-status-tooltip-title {
  display: block;
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.backup-status-tooltip-line {
  display: block;
  margin-top: 6px;
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Cards */
.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 30%, rgba(255, 107, 53, 0.06));
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: var(--shadow-lg);
}
.card:hover::after { opacity: 1; }
.card-body { position: relative; z-index: 1; padding: 20px; }
.card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--bg-2); }
.card-title { font-weight: 800; font-size: 1.1rem; margin-bottom: 4px; letter-spacing: -0.02em; }
.card-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.card-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; color: var(--text-light); font-size: 0.85rem; }
.card-meta span { display: flex; align-items: center; gap: 4px; }
.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.14);
}
.card-badge.new { background: rgba(255, 107, 53, 0.12); color: #c2410c; border-color: rgba(255, 107, 53, 0.22); }
.card-badge.pinned { background: rgba(16, 185, 129, 0.12); color: #047857; border-color: rgba(16, 185, 129, 0.22); }

/* Grid & Masonry */
.grid { display: grid; gap: 20px; padding: 20px 0; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.masonry { column-count: 3; column-gap: 20px; padding: 20px 0; }
.masonry .card { display: inline-block; width: 100%; margin-bottom: 20px; break-inside: avoid; cursor: pointer; }
@media (max-width: 1024px) { .masonry { column-count: 2; } }
@media (max-width: 640px) { .masonry { column-count: 1; } }

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.18) 25%, rgba(255, 255, 255, 0.72) 50%, rgba(148, 163, 184, 0.18) 75%);
  background-size: 220% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(37, 99, 235, 0.3); }
.btn-secondary { color: var(--text); background: rgba(255, 255, 255, 0.74); border-color: rgba(15, 23, 42, 0.1); }
.btn-secondary:hover { background: #fff; border-color: rgba(37, 99, 235, 0.22); transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg, #10b981, #22c55e); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; }
.btn-sm { min-height: 32px; padding: 6px 13px; font-size: 0.84rem; }
.btn-lg { min-height: 50px; padding: 14px 26px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 800; margin-bottom: 7px; font-size: 0.92rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid rgba(15, 23, 42, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.86);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.58);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* Auth / Landing */
.launch-page { overflow-x: hidden; }
.launch-stack {
  width: min(1180px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.launch-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 440px;
  gap: 28px;
  align-items: stretch;
}
.launch-intro {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  padding: 42px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.96), rgba(11, 48, 62, 0.93)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 52px);
  color: #f8fafc;
  box-shadow: var(--shadow-lg);
}
.launch-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 40%, rgba(255, 107, 53, 0.14) 40% 44%, transparent 44% 100%),
    linear-gradient(300deg, transparent 0 56%, rgba(163, 230, 53, 0.10) 56% 59%, transparent 59% 100%);
  pointer-events: none;
}
.launch-intro > * { position: relative; z-index: 1; }
.brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: #a7f3d0;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.launch-intro h1 {
  margin-top: 28px;
  max-width: 640px;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}
.launch-intro h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, #67e8f9, #a3e635, #ffb86b);
  -webkit-background-clip: text;
  background-clip: text;
}
.launch-intro p {
  max-width: 620px;
  margin-top: 24px;
  color: #cbd5e1;
  font-size: 1.08rem;
}
.launch-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}
.launch-signal {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.launch-signal strong { display: block; color: #fff; font-size: 1.22rem; line-height: 1.15; }
.launch-signal span { display: block; margin-top: 4px; color: #94a3b8; font-size: 0.82rem; }
.launch-wall {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 42px;
  transform: rotate(-2deg);
}
.launch-tile {
  min-height: 118px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #dbeafe;
  font-weight: 800;
}
.launch-tile:nth-child(2) { margin-top: 26px; background: linear-gradient(135deg, rgba(255, 107, 53, 0.34), rgba(245, 158, 11, 0.16)); }
.launch-tile:nth-child(3) { margin-top: -12px; background: linear-gradient(135deg, rgba(16, 185, 129, 0.34), rgba(163, 230, 53, 0.14)); }
.auth-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 36px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}
.auth-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--lime), var(--accent));
}
.auth-box h1 { font-size: 1.9rem; font-weight: 900; margin-bottom: 4px; letter-spacing: -0.04em; }
.auth-box h1 span { color: var(--primary); }
.auth-box p.subtitle { color: var(--text-muted); margin-bottom: 26px; }
.auth-divider { text-align: center; color: var(--text-muted); margin: 20px 0; font-size: 0.85rem; }
.login-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.login-tab {
  flex: 1;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  transition: all var(--transition);
}
.login-tab.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--cyan)); box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2); }
.guest-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 16px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.18);
  color: #047857;
  font-size: 0.85rem;
}
.divider-line { display:flex; align-items:center; gap:10px; margin:18px 0; color:var(--text-muted); font-size:0.85rem; }
.divider-line::before, .divider-line::after { content:''; flex:1; height:1px; background:var(--border); }

/* Course portal */
.course-portal {
  width: min(1120px, 100%);
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 0%, rgba(163, 230, 53, 0.18), transparent 28%),
    radial-gradient(circle at 96% 12%, rgba(255, 107, 53, 0.13), transparent 24%),
    rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}
.course-portal-head,
.course-control-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 18px;
}
.course-kicker { color: #047857; background: rgba(16, 185, 129, 0.1); }
.course-portal h2 {
  margin-top: 10px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}
.course-portal p {
  max-width: 740px;
  margin-top: 8px;
  color: var(--text-muted);
}
.course-ops-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}
.course-ops-alert[hidden] {
  display: none !important;
}
.course-ops-alert.warning {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(255, 251, 235, 0.92);
}
.course-ops-alert.critical {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(254, 242, 242, 0.94);
}
.course-ops-alert-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.course-ops-alert-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
}
.course-ops-alert-copy span {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.course-ops-alert-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--warning);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.14);
}
.course-ops-alert.critical .course-ops-alert-dot {
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.14);
}
.course-grid,
.course-activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.course-card,
.course-activity-card,
.course-empty,
.course-identity-note {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}
.course-card::before,
.course-activity-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.72;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 54%, rgba(37, 99, 235, 0.08) 54% 57%, transparent 57% 100%),
    radial-gradient(circle at 10% 0%, rgba(6, 182, 212, 0.14), transparent 30%);
}
.course-card > *,
.course-activity-card > * { position: relative; z-index: 1; }
.course-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.course-status,
.course-code {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.course-status {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.2);
}
.course-status.alt {
  color: #c2410c;
  background: rgba(255, 107, 53, 0.12);
  border-color: rgba(255, 107, 53, 0.2);
}
.course-code {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.18);
}
.course-card h3,
.course-activity-card h3 {
  font-size: 1.35rem;
  line-height: 1.12;
  letter-spacing: -0.045em;
}
.course-card p,
.course-activity-card p,
.course-empty p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.course-stats,
.course-media-row,
.course-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.course-stats span,
.course-media-row span,
.course-preview span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.course-stats strong { color: var(--text); font-size: 1.04rem; }
.course-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.course-loading {
  grid-column: 1 / -1;
  padding: 22px;
  border-radius: 18px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(15, 23, 42, 0.16);
}
.course-loading.error { color: #b91c1c; background: rgba(254, 226, 226, 0.72); }
.course-editor-shell { margin-bottom: 18px; }
.course-editor-form {
  display: grid;
  gap: 18px;
}
.course-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.course-editor-wide { grid-column: 1 / -1; }
.course-flag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.course-flag {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}
.course-flag input {
  margin-top: 3px;
  accent-color: var(--primary);
}
.course-flag strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}
.course-flag small {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.course-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.course-editor-meta {
  color: var(--text-muted);
  font-size: 0.86rem;
}
.course-panel-note {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.course-panel-note span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.07);
  color: var(--text-light);
  font-size: 0.82rem;
  font-weight: 700;
}
.archive-storage-shell {
  margin-bottom: 18px;
}
.archive-gauge-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: stretch;
}
.archive-gauge-card,
.archive-gauge-panel {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
.archive-gauge-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 800;
}
.archive-gauge-status {
  font-size: 0.84rem;
  color: #047857;
}
.archive-speedometer {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1.7 / 1;
  margin: 0 auto;
}
.archive-speedometer-ring {
  --gauge-color: #10b981;
  position: absolute;
  inset: 0;
  border-radius: 220px 220px 0 0;
  overflow: hidden;
  background:
    conic-gradient(from 240deg, var(--gauge-color) 0deg, rgba(15, 23, 42, 0.12) 0deg 240deg, transparent 240deg 360deg);
  -webkit-mask: radial-gradient(circle at 50% 100%, transparent 0 56%, #000 57% 100%);
          mask: radial-gradient(circle at 50% 100%, transparent 0 56%, #000 57% 100%);
}
.archive-speedometer-needle {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 42%;
  transform-origin: center bottom;
  transform: translateX(-50%) rotate(-120deg);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.92));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.46);
}
.archive-speedometer-hub {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 20px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #0f172a;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.94);
}
.archive-speedometer-tick {
  position: absolute;
  bottom: 8px;
  font-size: 0.76rem;
  color: var(--text-light);
  font-weight: 700;
}
.archive-speedometer-tick.tick-left { left: 18px; }
.archive-speedometer-tick.tick-mid { left: 50%; transform: translateX(-50%); }
.archive-speedometer-tick.tick-right { right: 18px; }
.archive-speedometer-value {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.archive-speedometer-value strong {
  font-size: clamp(1.75rem, 4vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}
.archive-speedometer-value span {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
}
.archive-gauge-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}
.archive-gauge-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.18);
  color: #047857;
  font-size: 0.88rem;
  line-height: 1.55;
}
.archive-gauge-note.warning-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
  color: #b45309;
}
.archive-gauge-note.warning-critical {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}
.storage-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-light);
  font-size: 0.82rem;
  font-weight: 700;
}
.archive-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.archive-ops-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
.archive-ops-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.archive-ops-head strong {
  font-size: 1rem;
  font-weight: 900;
}
.archive-ops-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.archive-trend-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.archive-trend-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.archive-trend-btn:hover {
  color: var(--text);
  transform: translateY(-1px);
}
.archive-trend-btn.is-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(6, 182, 212, 0.12));
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16);
}
.archive-trend-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.92));
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.archive-trend-grid {
  fill: none;
  stroke: rgba(148, 163, 184, 0.32);
  stroke-width: 1;
  stroke-dasharray: 6 6;
}
.archive-trend-fill {
  fill: rgba(34, 197, 94, 0.14);
}
.archive-trend-line {
  fill: none;
  stroke: #10b981;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.archive-suggestion-list {
  display: grid;
  gap: 12px;
}
.archive-suggestion-card {
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.92);
}
.archive-suggestion-card strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 900;
}
.archive-suggestion-card p {
  margin: 8px 0 0;
  color: var(--text-light);
  font-size: 0.86rem;
  line-height: 1.6;
}
.archive-suggestion-card.level-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.22);
}
.archive-suggestion-card.level-critical {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.22);
}
.archive-empty-state {
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.38);
  color: var(--text-light);
  font-size: 0.88rem;
  background: rgba(248, 250, 252, 0.84);
}
.course-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.course-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 800;
}
.course-card-muted {
  opacity: 0.78;
  background: linear-gradient(180deg, rgba(248,250,252,0.98), rgba(241,245,249,0.92));
}
.course-card-footnote {
  margin-top: 12px;
  color: var(--text-light);
  font-size: 0.8rem;
}
.course-drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.course-drag-handle::before {
  content: '⋮⋮';
  letter-spacing: -1px;
  font-size: 0.96rem;
}
.course-card-dragging {
  opacity: 0.45;
  transform: scale(0.985);
}
.course-card-drag-target {
  outline: 2px dashed rgba(37, 99, 235, 0.46);
  outline-offset: 4px;
}

/* Course page */
.course-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 10%, rgba(6, 182, 212, 0.13), transparent 28%),
    radial-gradient(circle at 86% 4%, rgba(163, 230, 53, 0.14), transparent 28%),
    linear-gradient(120deg, rgba(37, 99, 235, 0.08), transparent 36%),
    var(--bg);
}
.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 20px;
  margin: 28px 0 18px;
  padding: 32px;
  border-radius: 26px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 12% 0%, rgba(163, 230, 53, 0.26), transparent 28%),
    radial-gradient(circle at 96% 20%, rgba(255, 107, 53, 0.18), transparent 30%),
    linear-gradient(135deg, #071827, #0b3342 54%, #131f32);
  box-shadow: var(--shadow-lg);
}
.course-hero h1 {
  margin-top: 14px;
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}
.course-hero p {
  max-width: 760px;
  margin-top: 14px;
  color: rgba(226, 232, 240, 0.84);
}
.course-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.course-scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-self: stretch;
}
.course-scoreboard div {
  min-height: 118px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.course-scoreboard strong {
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: -0.06em;
}
.course-scoreboard span {
  margin-top: 6px;
  color: rgba(226, 232, 240, 0.72);
  font-weight: 800;
}
.course-control-strip {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow);
}
.course-control-strip span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.course-entry-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(7, 24, 39, 0.94), rgba(13, 47, 60, 0.9)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 48px);
  color: #f8fafc;
  box-shadow: var(--shadow);
}
.course-entry-panel span {
  display: block;
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.74);
  font-size: 0.88rem;
}
.course-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.course-entry-actions input {
  min-width: 230px;
  padding: 10px 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.course-entry-actions input::placeholder { color: rgba(226, 232, 240, 0.55); }
.course-entry-actions input:focus {
  outline: none;
  border-color: rgba(163, 230, 53, 0.58);
  box-shadow: 0 0 0 4px rgba(163, 230, 53, 0.12);
}
.course-search {
  display: flex;
  gap: 8px;
  align-items: center;
}
.course-search input {
  min-width: min(360px, 48vw);
  padding: 10px 12px;
  border: 1.5px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  font: inherit;
}
.course-identity-note {
  margin-bottom: 18px;
  color: var(--text-muted);
}
.course-identity-note strong { color: var(--text); }
.course-empty { grid-column: 1 / -1; text-align: center; }
.pulse-focus {
  animation: pulseFocus 1.4s ease;
}
@keyframes pulseFocus {
  0%, 100% { box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06); }
  45% { box-shadow: 0 0 0 8px rgba(163, 230, 53, 0.22), 0 24px 70px rgba(37, 99, 235, 0.18); }
}

/* Gallery hero */
.gallery-hero {
  position: relative;
  overflow: hidden;
  margin: 24px 0 18px;
  padding: 30px;
  border-radius: 18px;
  color: #f8fafc;
  background:
    linear-gradient(135deg, rgba(8, 24, 44, 0.96), rgba(8, 64, 74, 0.92)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 56px);
  box-shadow: var(--shadow-lg);
}
.gallery-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(255, 107, 53, 0.16) 42% 46%, transparent 46% 100%),
    linear-gradient(315deg, transparent 0 63%, rgba(163, 230, 53, 0.13) 63% 66%, transparent 66% 100%);
}
.gallery-hero > * { position: relative; z-index: 1; }
.gallery-kicker { color: #a7f3d0; font-size: 0.8rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; }
.gallery-hero h1 { margin-top: 8px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -0.06em; }
.gallery-hero p { max-width: 760px; margin-top: 12px; color: #cbd5e1; }
.gallery-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Stars */
.stars { display: inline-flex; gap: 4px; }
.star { font-size: 1.8rem; cursor: pointer; color: rgba(148, 163, 184, 0.45); transition: color var(--transition), transform 0.15s; user-select: none; line-height: 1; }
.star.active, .star.hover { color: var(--warning); }
.star:hover { transform: scale(1.14); }

/* Stats */
.stats-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.stat-card {
  flex: 1;
  min-width: 150px;
  padding: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat-card:nth-child(2n) { border-top: 3px solid rgba(6, 182, 212, 0.62); }
.stat-card:nth-child(2n + 1) { border-top: 3px solid rgba(255, 107, 53, 0.62); }
.stat-value { font-size: 2.1rem; font-weight: 900; color: var(--primary); letter-spacing: -0.05em; }
.stat-label { font-size: 0.86rem; color: var(--text-muted); margin-top: 4px; }

/* Learning Arena */
.learning-arena { margin: 18px 0 24px; }
.learning-arena-shell {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 24px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 12% 8%, rgba(163, 230, 53, 0.32), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(255, 107, 53, 0.22), transparent 30%),
    linear-gradient(135deg, #071827, #0f3a46 52%, #101b2c);
  box-shadow: var(--shadow-lg);
}
.learning-arena-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.15) 0 1px, transparent 1px 44px),
    linear-gradient(120deg, transparent 0 46%, rgba(6, 182, 212, 0.24) 46% 48%, transparent 48% 100%);
}
.learning-arena-shell > * { position: relative; z-index: 1; }
.learning-arena-warning {
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.3), transparent 30%),
    linear-gradient(135deg, #2b1707, #111827);
}
.learning-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a7f3d0;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.learning-arena-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.learning-arena-head h2,
.learning-arena-copy h2 {
  margin-top: 8px;
  font-size: clamp(1.55rem, 3.4vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.055em;
}
.learning-arena-head p,
.learning-arena-copy p {
  max-width: 760px;
  margin-top: 8px;
  color: rgba(226, 232, 240, 0.84);
}
.learning-refresh {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.78rem;
  font-weight: 800;
}
.learning-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.learning-metric {
  min-height: 128px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
}
.learning-metric.hot { background: linear-gradient(135deg, rgba(37,99,235,0.42), rgba(6,182,212,0.20)); }
.learning-metric.group { background: linear-gradient(135deg, rgba(255,107,53,0.30), rgba(163,230,53,0.14)); }
.learning-metric span,
.learning-metric small {
  display: block;
  color: rgba(226, 232, 240, 0.82);
  font-weight: 800;
}
.learning-metric strong {
  display: block;
  margin: 8px 0 4px;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.06em;
}
.learning-boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.learning-board {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}
.learning-board-title {
  margin-bottom: 10px;
  color: #e0f2fe;
  font-size: 0.92rem;
  font-weight: 900;
}
.learning-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1.2fr) minmax(0, 0.9fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 14px;
  color: rgba(248,250,252,0.9);
}
.learning-row:nth-child(odd) { background: rgba(255,255,255,0.06); }
.learning-row.is-me {
  background: linear-gradient(135deg, rgba(163,230,53,0.22), rgba(6,182,212,0.16));
  box-shadow: inset 0 0 0 1px rgba(163,230,53,0.25);
}
.learning-rank {
  font-weight: 900;
  color: #a7f3d0;
}
.learning-name {
  overflow: hidden;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.learning-sub {
  overflow: hidden;
  color: rgba(203,213,225,0.75);
  font-size: 0.78rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.learning-row strong {
  color: #fff;
  font-weight: 900;
}
.learning-empty {
  padding: 18px;
  border-radius: 16px;
  color: rgba(226,232,240,0.78);
  background: rgba(255,255,255,0.06);
  text-align: center;
}

/* Table */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid rgba(15, 23, 42, 0.08); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
th { background: rgba(37, 99, 235, 0.06); font-weight: 900; color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; position: sticky; top: 0; }
tr:hover td { background: rgba(37, 99, 235, 0.035); }
td img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }

/* Ranking */
.rank-badge { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 0.85rem; background: var(--bg-2); color: var(--text-muted); }
.rank-badge.gold { background: linear-gradient(135deg, #fbbf24, #f97316); color: #fff; }
.rank-badge.silver { background: linear-gradient(135deg, #cbd5e1, #64748b); color: #fff; }
.rank-badge.bronze { background: linear-gradient(135deg, #fb923c, #b45309); color: #fff; }

/* Upload */
.upload-area {
  position: relative;
  padding: 42px;
  text-align: center;
  cursor: pointer;
  border: 2px dashed rgba(37, 99, 235, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  transition: all var(--transition);
}
.upload-area:hover, .upload-area.dragover { border-color: var(--cyan); background: rgba(219, 234, 254, 0.7); }
.upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-preview { max-height: 320px; border-radius: var(--radius-sm); margin: 16px auto; }
.upload-icon { font-size: 3rem; margin-bottom: 8px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(3, 7, 18, 0.82); backdrop-filter: blur(10px); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity 0.3s; }
.modal.active { display: flex; opacity: 1; }
.modal-content { background: var(--surface-solid); border-radius: var(--radius); padding: 32px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; transform: translateY(20px); transition: transform 0.3s; }
.modal.active .modal-content { transform: translateY(0); }
.modal-close { position: absolute; right: 20px; top: 20px; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); border: none; background: rgba(255,255,255,0.86); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.modal-close:hover { background: #fff; color: var(--text); }
.lightbox-img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }

/* Comments */
.comments-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); text-align: left; }
.comment-item { display: flex; gap: 12px; margin-bottom: 16px; padding: 12px; background: rgba(37, 99, 235, 0.05); border-radius: var(--radius-sm); position: relative; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 0.9rem; flex-shrink: 0; }
.comment-content { flex: 1; font-size: 0.95rem; line-height: 1.5; }
.comment-time { font-size: 0.75rem; color: var(--text-light); margin-top: 4px; }
.comment-input-wrap { display: flex; gap: 8px; margin-top: 16px; }
.comment-input-wrap input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-full); font-family: inherit; font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
.comment-input-wrap input:focus { border-color: var(--primary); }
.comment-input-wrap button { border-radius: var(--radius-full); padding: 10px 20px; }

/* Display QR */
.display-qr { position: fixed; bottom: 30px; right: 30px; background: rgba(255,255,255,0.94); padding: 16px; border-radius: 18px; box-shadow: 0 18px 44px rgba(0,0,0,0.32); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,0.55); }
.display-qr img { width: 140px; height: 140px; }
.display-qr span { color: #0f172a; font-weight: 900; font-size: 0.9rem; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; background: #0f172a; color: #fff; padding: 12px 22px; border-radius: var(--radius-sm); font-weight: 800; z-index: 300; animation: slideUp 0.3s ease; box-shadow: var(--shadow-lg); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Rubric / Tabs / Empty */
.rubric { background: rgba(219, 234, 254, 0.78); border: 1px solid rgba(37, 99, 235, 0.12); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.rubric h3 { font-size: 1rem; margin-bottom: 12px; color: var(--primary-hover); }
.rubric li { font-size: 0.9rem; margin-bottom: 6px; color: var(--text); padding-left: 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab { padding: 10px 20px; cursor: pointer; font-weight: 900; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all var(--transition); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab:hover { color: var(--text); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 4rem; margin-bottom: 12px; }

/* Display mode */
.display-mode {
  color: #f8fafc;
  min-height: 100vh;
  --surface: rgba(13, 25, 46, 0.78);
  --surface-solid: #0b1220;
  --text: #f8fafc;
  --text-muted: #9fb0c7;
  --border: rgba(148, 163, 184, 0.18);
  --bg: #101827;
  background:
    linear-gradient(120deg, rgba(37, 99, 235, 0.2), transparent 32%),
    linear-gradient(260deg, rgba(255, 107, 53, 0.16), transparent 46%),
    repeating-linear-gradient(90deg, rgba(103, 232, 249, 0.06) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(163, 230, 53, 0.04) 0 1px, transparent 1px 76px),
    #07111f;
}
.display-mode::before { opacity: 0.32; }
.display-header {
  text-align: center;
  padding: 34px 26px 30px;
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.98), rgba(8, 64, 74, 0.9)),
    linear-gradient(120deg, transparent 0 44%, rgba(255, 107, 53, 0.16) 44% 47%, transparent 47% 100%) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.display-header h1 { font-size: clamp(2rem, 4vw, 3.7rem); font-weight: 900; color: #fff; letter-spacing: -0.06em; }
.display-header p { color: #b6c7dd; font-size: 1.08rem; }
.display-stats { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; padding: 24px; }
.display-stat {
  min-width: 150px;
  padding: 16px 22px;
  text-align: center;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(103, 232, 249, 0.14);
}
.display-stat-value { font-size: 2.8rem; font-weight: 900; color: #67e8f9; letter-spacing: -0.06em; }
.display-stat-label { font-size: 0.9rem; color: #9fb0c7; }
.display-carousel { display: flex; gap: 22px; padding: 22px 0; overflow-x: auto; scroll-snap-type: x mandatory; }
.display-card {
  min-width: 328px;
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid rgba(103, 232, 249, 0.18) !important;
  border-radius: 18px !important;
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
  cursor: pointer;
}
.display-card img, .display-card video { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.display-card-body { padding: 16px; }
.display-card-title { font-weight: 900; font-size: 1.12rem; }
.display-countdown { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 107, 53, 0.18); color: #fed7aa; padding: 4px 12px; border-radius: var(--radius-full); font-weight: 900; font-size: 0.85rem; }
.display-ranking { padding: 24px 0; }
.display-rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-bottom: 10px;
  background: rgba(15, 23, 42, 0.58) !important;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px !important;
  transition: all 0.3s;
}
.display-rank-item:nth-child(1) { background: linear-gradient(90deg, rgba(251,191,36,0.16), rgba(15,23,42,0.55)) !important; border-left: 4px solid #fbbf24; }
.display-rank-item:nth-child(2) { background: linear-gradient(90deg, rgba(148,163,184,0.16), rgba(15,23,42,0.55)) !important; border-left: 4px solid #94a3b8; }
.display-rank-item:nth-child(3) { background: linear-gradient(90deg, rgba(249,115,22,0.16), rgba(15,23,42,0.55)) !important; border-left: 4px solid #f97316; }
.display-rank-img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.display-rank-info { flex: 1; }
.display-rank-title { font-weight: 900; }
.display-rank-score { font-size: 1.4rem; font-weight: 900; color: #67e8f9 !important; }
.top3-hero { border: 1px solid rgba(103, 232, 249, 0.18) !important; box-shadow: 0 26px 80px rgba(0,0,0,0.45) !important; }
.top3-overlay { background: linear-gradient(to top, rgba(3,7,18,0.92) 0%, rgba(3,7,18,0.25) 58%, transparent 100%) !important; }
.top3-score { background: linear-gradient(135deg, #ff6b35, #f59e0b) !important; }
.feedback-panel, .spotlight-info { border-color: rgba(103, 232, 249, 0.18) !important; background: rgba(7, 17, 31, 0.78) !important; }
.feedback-panel-title { color: #e0f2fe !important; }
.feedback-sort-btn.active, .spotlight-link-btn { background: linear-gradient(135deg, var(--primary), var(--cyan)) !important; }
.feedback-like-btn.active { background: rgba(6, 182, 212, 0.18) !important; color: #a5f3fc !important; }
.spotlight-badge { background: rgba(6, 182, 212, 0.16) !important; color: #67e8f9 !important; }
.spotlight-stat-val { color: #67e8f9 !important; }

/* Sections / status */
.section { padding: 24px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title { font-size: 1.32rem; font-weight: 900; letter-spacing: -0.02em; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.on { background: var(--success); }
.status-dot.off { background: var(--danger); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.9rem; margin: 16px 0; }
.back-link:hover { color: var(--primary); }

/* Dashboard */
.dashboard-hero {
  position: relative;
  overflow: hidden;
  margin: 24px 0 18px;
  padding: 28px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(9, 20, 37, 0.96), rgba(18, 78, 99, 0.92)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 60px);
  color: #f8fafc;
  box-shadow: var(--shadow-lg);
}
.dashboard-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(103, 232, 249, 0.24), transparent 25%),
    radial-gradient(circle at 84% 18%, rgba(255, 107, 53, 0.24), transparent 22%),
    linear-gradient(120deg, transparent 0 48%, rgba(163, 230, 53, 0.12) 48% 52%, transparent 52% 100%);
  pointer-events: none;
}
.dashboard-hero > * { position: relative; z-index: 1; }
.dashboard-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  color: #a7f3d0;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dashboard-title {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}
.dashboard-title strong {
  color: transparent;
  background: linear-gradient(90deg, #67e8f9, #a3e635, #ffb86b);
  -webkit-background-clip: text;
  background-clip: text;
}
.dashboard-subtitle {
  max-width: 780px;
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 1rem;
}
.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0 28px;
}
.dashboard-panel {
  grid-column: span 12;
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.dashboard-panel-body {
  padding: 22px;
}
.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard-panel-title {
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.dashboard-panel-note {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}
.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.dashboard-metric {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(240,249,255,0.78));
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.dashboard-metric::after {
  content: '';
  position: absolute;
  inset: auto -10% 0 auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14), transparent 65%);
  pointer-events: none;
}
.dashboard-metric:nth-child(2n)::after { background: radial-gradient(circle, rgba(6, 182, 212, 0.14), transparent 65%); }
.dashboard-metric:nth-child(3n)::after { background: radial-gradient(circle, rgba(255, 107, 53, 0.14), transparent 65%); }
.dashboard-metric-value {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--text);
}
.dashboard-metric-label {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.86rem;
}
.dashboard-metric-meta {
  margin-top: 8px;
  color: var(--text-light);
  font-size: 0.8rem;
}
.dashboard-two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}
.dashboard-three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.mini-stat {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.1);
}
.mini-stat strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
}
.mini-stat span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.storage-progress {
  height: 12px;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  margin: 10px 0 14px;
}
.storage-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--lime));
}
.dashboard-list {
  display: grid;
  gap: 10px;
}
.dashboard-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.dashboard-list-main { min-width: 0; }
.dashboard-list-title {
  font-weight: 800;
  font-size: 0.94rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-list-sub {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.dashboard-list-side {
  text-align: right;
  flex-shrink: 0;
}
.dashboard-list-side strong {
  display: block;
  font-size: 1rem;
  font-weight: 900;
}
.dashboard-list-side span {
  display: block;
  margin-top: 4px;
  color: var(--text-light);
  font-size: 0.78rem;
}
.dashboard-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dashboard-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.dashboard-pill.on {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.18);
  color: #047857;
}
.dashboard-pill.off {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

/* Exhibit cards */
.exhibit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}
.exhibit-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,251,255,0.92));
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}
.exhibit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.18);
}
.exhibit-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.85;
}
.exhibit-card[data-template="aurora"]::before {
  background:
    radial-gradient(circle at 14% 16%, rgba(103, 232, 249, 0.2), transparent 22%),
    linear-gradient(140deg, transparent 0 56%, rgba(37, 99, 235, 0.08) 56% 60%, transparent 60% 100%);
}
.exhibit-card[data-template="gallery"]::before {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.32) 0 1px, transparent 1px 22px),
    linear-gradient(150deg, rgba(255, 107, 53, 0.06), transparent 46%);
}
.exhibit-card[data-template="signal"]::before {
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 107, 53, 0.18), transparent 22%),
    repeating-linear-gradient(0deg, rgba(6, 182, 212, 0.08) 0 1px, transparent 1px 18px);
}
.exhibit-card[data-template="studio"]::before {
  background:
    linear-gradient(130deg, rgba(16, 185, 129, 0.08), transparent 45%),
    linear-gradient(310deg, rgba(37, 99, 235, 0.08), transparent 45%);
}
.exhibit-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ecfeff);
}
.exhibit-media img,
.exhibit-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.exhibit-card:hover .exhibit-media img,
.exhibit-card:hover .exhibit-media video {
  transform: scale(1.04);
}
.exhibit-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 54px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(7,17,31,0.72));
  color: #fff;
}
.exhibit-template-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.exhibit-body {
  position: relative;
  z-index: 1;
  padding: 16px 18px 18px;
}
.exhibit-kicker {
  color: var(--text-light);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.exhibit-title {
  margin-top: 8px;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.exhibit-subtitle {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}
.exhibit-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.exhibit-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.exhibit-stat {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.exhibit-stat strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 900;
}
.exhibit-stat span {
  display: block;
  margin-top: 4px;
  color: var(--text-light);
  font-size: 0.76rem;
}
.exhibit-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--text-light);
  font-size: 0.78rem;
}
.exhibit-foot strong {
  color: var(--text);
  font-weight: 800;
}

/* Responsive */
@media (max-width: 900px) {
  .launch-shell { grid-template-columns: 1fr; }
  .launch-intro { min-height: auto; }
  .launch-signals { grid-template-columns: 1fr; }
  .launch-wall { display: none; }
  .course-portal-head,
  .course-control-strip,
  .course-entry-panel,
  .course-hero {
    grid-template-columns: 1fr;
  }
  .course-portal-head,
  .course-control-strip,
  .course-entry-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .course-ops-alert {
    align-items: stretch;
    flex-direction: column;
  }
  .course-ops-alert-copy {
    align-items: flex-start;
  }
  .course-scoreboard { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dashboard-two-col,
  .dashboard-three-col {
    grid-template-columns: 1fr;
  }
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .stats-row { gap: 8px; }
  .stat-card { min-width: 120px; padding: 14px; }
  .stat-value { font-size: 1.55rem; }
  .auth-box { padding: 26px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .course-portal,
  .course-hero {
    padding: 22px;
    border-radius: 20px;
  }
  .course-search {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .course-entry-actions {
    width: 100%;
    justify-content: stretch;
  }
  .course-entry-actions input,
  .course-entry-actions .btn {
    flex: 1 1 100%;
    min-width: 0;
  }
  .course-search input {
    width: 100%;
    min-width: 0;
  }
  .course-scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { padding: 10px 16px; align-items: flex-start; }
  .topbar-right { gap: 6px; }
  .display-header h1 { font-size: 1.9rem; }
  .display-stats { gap: 12px; padding: 16px; }
  .display-stat { min-width: 132px; }
  .display-stat-value { font-size: 2rem; }
  .display-card { min-width: 280px; }
  .gallery-hero { padding: 24px; }
  .dashboard-hero { padding: 22px; border-radius: 18px; }
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .dashboard-panel-body { padding: 18px; }
  .dashboard-list-item { align-items: flex-start; flex-direction: column; }
  .dashboard-list-side { text-align: left; }
  .exhibit-grid { grid-template-columns: 1fr; }
  .learning-arena-head,
  .learning-boards {
    grid-template-columns: 1fr;
  }
  .learning-arena-head {
    display: block;
  }
  .learning-refresh {
    display: inline-flex;
    margin-top: 10px;
  }
  .learning-metrics {
    grid-template-columns: 1fr;
  }
  .learning-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }
  .learning-row .learning-sub {
    display: none;
  }
}
@media (max-width: 520px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .btn-lg { padding: 12px 20px; font-size: 1rem; }
  .page-center { padding: 14px; align-items: flex-start; }
  .launch-intro { padding: 26px; border-radius: 14px; }
  .auth-box { border-radius: 14px; }
  .course-grid,
  .course-activity-grid,
  .course-scoreboard {
    grid-template-columns: 1fr;
  }
  .course-card-actions .btn {
    flex: 1 1 100%;
  }
  .display-qr { position: static; margin: 14px auto; width: fit-content; }
  .topbar {
    padding: 10px 14px;
    gap: 10px;
  }
  .topbar-logo {
    font-size: 1.05rem;
  }
  .topbar-right {
    width: 100%;
    justify-content: flex-start;
  }
  .dashboard-metrics,
  .mini-stat-grid,
  .exhibit-stats {
    grid-template-columns: 1fr;
  }
  .archive-gauge-layout {
    display: grid;
    grid-template-columns: 1fr;
  }
  .archive-ops-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-hero { margin-top: 16px; }
  .gallery-actions,
  .dashboard-actions {
    width: 100%;
  }
  .gallery-actions .btn,
  .dashboard-actions .btn {
    flex: 1 1 100%;
  }
}

.archive-object-rank {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.archive-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.archive-group-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.archive-object-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.archive-object-row strong {
  display: block;
  font-size: 0.88rem;
}
.archive-object-row small {
  display: block;
  margin-top: 4px;
  color: var(--text-light);
  font-size: 0.78rem;
  line-height: 1.45;
  word-break: break-all;
}
.archive-object-size {
  font-weight: 900;
  white-space: nowrap;
}
.archive-object-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.archive-object-action {
  min-width: 108px;
}
.archive-object-action-note {
  margin: 0;
  color: var(--text-light);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: right;
  max-width: 180px;
}
.backup-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.backup-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.backup-detail-row strong {
  display: block;
  font-size: 0.86rem;
}
.backup-detail-row small {
  display: block;
  margin-top: 4px;
  color: var(--text-light);
  font-size: 0.76rem;
  line-height: 1.45;
  word-break: break-all;
}
.archive-command-block {
  margin: 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  font-size: 0.84rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.recovery-checklist {
  display: grid;
  gap: 12px;
}
.recovery-checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.recovery-checklist-item input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
}
.recovery-checklist-item strong {
  display: block;
  font-size: 0.92rem;
}
.recovery-checklist-item small {
  display: block;
  margin-top: 5px;
  color: var(--text-light);
  font-size: 0.78rem;
  line-height: 1.5;
}
