/* ZenPass Index Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --orange-500: #f06030;
  --orange-600: #d05020;
  --orange-400: #f08050;
  --orange-300: #f0a070;
  --orange-100: #f5ede0;
  --orange-50: #f8f2e8;
  --orange-700: #aa3218; /* accessible orange for text (WCAG AA 4.5:1 on light bg) */
  --orange-600-bg: #c94420; /* accessible orange for backgrounds (WCAG AA 4.5:1 with white text) */
  --dark-900: #1a1a2e;
  --dark-800: #2d2d44;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #ddd8cd;
  --gray-50: #e8e4d9;
  --white: #fcf9f5;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-en: "Inter", sans-serif;
  --font-zh: "Noto Sans TC", sans-serif;
  --max-width: 480px;
  --nav-height: 64px;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-zh);
  background: var(--gray-50);
  color: var(--dark-900);
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: calc(var(--nav-height) + 20px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.section {
  padding: 20px 16px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .more-link {
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--orange-700);
  text-decoration: none;
}
.loading-spinner {
  text-align: center;
  padding: 40px 20px;
  color: var(--dark-700);
}
/* CLS prevention: reserve space for dynamic content */
.categories-scroll {
  min-height: 100px;
}
.featured-scroll {
  min-height: 180px;
}
.class-grid {
  min-height: 180px;
}
.loading-spinner::after {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  margin: 10px auto;
  border: 3px solid var(--gray-200);
  border-top-color: var(--orange-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error-state {
  text-align: center;
  padding: 30px 20px;
  color: var(--dark-700);
}
.error-state span {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}
.error-state small {
  display: block;
  margin-top: 8px;
  color: var(--orange-700);
  cursor: pointer;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--dark-700);
}
.empty-state span {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--orange-500), #d05020);
  padding: 20px 16px 32px;
  color: var(--white);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.hero-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
}
.hero-logo span {
  font-weight: 300;
}
.hero-logo .zh {
  font-size: 16px;
  font-weight: 500;
}
.hero-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.hero-actions a {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
}
.hero-actions a:hover {
  background: rgba(255, 255, 255, 0.15);
}
.hero-actions a.primary {
  background: var(--white);
  color: var(--orange-700);
  border: none;
  font-weight: 600;
}
.hero h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.hero p {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

/* ---- Search ---- */
.search-bar {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 4px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 2;
  margin-top: -20px;
  margin-left: 16px;
  margin-right: 16px;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 0;
  font-size: 15px;
  font-family: var(--font-zh);
  background: transparent;
}
.search-bar input::placeholder {
  color: var(--gray-300);
}
.search-bar button {
  background: var(--orange-600-bg);
  border: none;
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
}

/* ---- Categories ---- */
.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar {
  display: none;
}
.category-chip {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 20px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  font-size: 14px;
  color: var(--dark-700);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.category-chip.active {
  background: var(--orange-600-bg);
  color: var(--white);
  border-color: var(--orange-600-bg);
}

/* ---- Class Card ---- */
.class-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.class-card:active {
  transform: scale(0.97);
}
.class-card-img {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, var(--orange-100), var(--orange-50));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.class-card-body {
  padding: 12px;
}
.class-card-category {
  font-size: 11px;
  color: var(--orange-700);
  font-weight: 600;
  background: var(--orange-100);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}
.class-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.class-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--dark-700);
  margin-top: 2px;
  flex-wrap: wrap;
}
.class-card-coach {
  font-size: 12px;
  color: var(--dark-700);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.class-card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--orange-700);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.badge-hot {
  background: var(--orange-600-bg);
  color: var(--white);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.class-card-spots {
  font-size: 11px;
  color: #d97706;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Featured Classes Scroll ---- */
.featured-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0;
}
.featured-scroll::-webkit-scrollbar {
  display: none;
}
.featured-scroll .class-card {
  flex: 0 0 220px;
}

/* ---- Class Grid (2 columns) ---- */
.class-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.class-grid .class-card-img {
  height: 110px;
}

/* ---- Membership CTA ---- */
.membership-cta {
  background: linear-gradient(135deg, var(--dark-900), var(--dark-800));
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--white);
  margin: 0 16px;
  text-align: center;
}
.membership-cta h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.membership-cta p {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 16px;
}
.membership-cta .price {
  font-size: 36px;
  font-weight: 800;
}
.membership-cta .price small {
  font-size: 16px;
  font-weight: 400;
  opacity: 0.7;
}
.membership-cta .btn-join {
  display: inline-block;
  background: var(--orange-600-bg);
  color: var(--white);
  text-decoration: none;
  padding: 12px 32px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 16px;
  margin-top: 16px;
  transition: background 0.2s;
}
.membership-cta .btn-join:hover {
  background: #b83820;
}

/* ---- Bottom Nav ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--gray-300);
  font-size: 10px;
  gap: 2px;
  transition: color 0.2s;
  padding: 4px 12px;
}
.nav-item.active {
  color: var(--orange-700);
}
.nav-item .nav-icon {
  font-size: 22px;
  line-height: 1;
}

/* ---- Auth Buttons in Hero ---- */
.zen-auth-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}
.zen-btn-ghost {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.zen-btn-small {
  color: var(--orange-700);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--white);
  font-weight: 600;
}
.zen-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.zen-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.zen-user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
}

/* ---- Toast ---- */
.zen-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--dark-900);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  z-index: 9999;
  transition: transform 0.3s ease;
  max-width: 90%;
  box-shadow: var(--shadow-lg);
}
.zen-toast.show {
  transform: translateX(-50%) translateY(0);
}
.zen-toast-success {
  background: #059669;
}
.zen-toast-error {
  background: #dc2626;
}
.zen-toast-info {
  background: var(--dark-800);
}

/* ---- Modal ---- */
.zen-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.3s;
}
.zen-modal-overlay.show {
  opacity: 1;
}
.zen-modal {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 20px;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.zen-modal-overlay.show .zen-modal {
  transform: translateY(0);
}
.zen-modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--gray-300);
  cursor: pointer;
  line-height: 1;
}
.zen-modal h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  clear: both;
}
.zen-auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--gray-200);
}
.zen-auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-300);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  font-family: var(--font-zh);
}
.zen-auth-tab.active {
  color: var(--orange-700);
  border-bottom-color: var(--orange-700);
}
.zen-auth-form {
  display: none;
}
.zen-auth-form.active {
  display: block;
}
.zen-input-group {
  margin-bottom: 16px;
}
.zen-input-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark-700);
}
.zen-input-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-zh);
  outline: none;
  transition: border-color 0.2s;
}
.zen-input-group input:focus {
  border-color: var(--orange-500);
}
.zen-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: var(--font-zh);
}
.zen-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.zen-btn-primary {
  background: var(--orange-600-bg);
  color: var(--white);
}
.zen-btn-primary:hover:not(:disabled) {
  background: #b83820;
}
.zen-social-login {
  margin-top: 20px;
  text-align: center;
}
.zen-social-login p {
  font-size: 13px;
  color: var(--gray-300);
  margin-bottom: 12px;
}
.zen-social-btns {
  display: flex;
  gap: 12px;
}
.zen-btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-zh);
  transition: background 0.2s;
}
.zen-btn-social:hover {
  background: var(--gray-50);
}

/* ---- User Menu ---- */
.zen-user-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 90vw;
  background: var(--white);
  border-radius: 0 0 0 var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9997;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.zen-user-menu.show {
  transform: translateX(0);
}
.zen-user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: var(--orange-50);
}
.zen-user-menu-header .zen-avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 20px;
  background: var(--orange-600-bg);
  color: var(--white);
}
.zen-user-menu-header small {
  display: block;
  font-size: 12px;
  color: var(--dark-700);
}
.zen-user-menu-items {
  padding: 8px 0;
}
.zen-user-menu-items a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--dark-900);
  font-size: 15px;
  transition: background 0.2s;
}
.zen-user-menu-items a:hover {
  background: var(--gray-50);
}
.zen-user-menu-items hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 8px 0;
}

.hidden {
  display: none !important;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
  .hero {
    padding: 16px;
    min-height: auto;
  }
  .hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .hero-logo {
    font-size: 20px;
  }
  .zen-auth-buttons {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .zen-btn-small,
  .zen-btn-ghost {
    padding: 8px 14px;
    font-size: 13px;
  }
  .search-bar {
    padding: 0 16px 12px;
  }
  .search-bar input {
    font-size: 14px;
    padding: 10px 14px;
    min-height: 44px;
  }
  .section {
    padding: 16px;
  }
  .section-title {
    font-size: 16px;
  }
  #role-entry-cards {
    flex-direction: column;
    gap: 8px;
  }
  #role-entry-cards a {
    padding: 14px;
  }
  .categories-scroll {
    gap: 8px;
    padding-bottom: 4px;
  }
  .category-chip {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .featured-scroll {
    gap: 12px;
    padding-bottom: 8px;
    width: 100%;
  }
  .featured-scroll > * {
    min-width: 240px;
    max-width: 75vw;
  }
  .class-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .membership-cta {
    padding: 24px 20px;
    text-align: center;
  }
  .membership-cta .price {
    font-size: 28px;
  }
  .membership-cta .perks {
    flex-direction: column;
    gap: 8px;
  }
  .membership-cta .perk {
    font-size: 13px;
  }
  .loading-spinner {
    padding: 30px 0;
  }
  .zen-user-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    border-radius: 0;
    max-width: 100%;
    box-shadow: none;
  }
  .zen-user-menu-items a {
    padding: 14px 20px;
    font-size: 16px;
  }
}
@media (max-width: 480px) {
  .hero {
    padding: 12px;
  }
  .hero-logo {
    font-size: 18px;
  }
  .hero-top {
    gap: 8px;
  }
  .zen-auth-buttons {
    flex-wrap: wrap;
  }
  .featured-scroll > * {
    min-width: 200px;
  }
  .class-grid {
    gap: 10px;
  }
  .category-chip {
    font-size: 12px;
    padding: 6px 12px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
body {
  animation: fadeIn 0.4s ease-out;
}
.class-card:hover,
.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}
.class-card,
.course-card {
  transition: all 0.2s ease;
}
button:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
  transition: all 0.15s ease;
}
button {
  transition: all 0.15s ease;
}

/* ---- Enhanced Loading States ---- */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton-card {
  flex: 0 0 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
}
.skeleton-card .skeleton-img {
  height: 90px;
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-card .skeleton-line {
  height: 12px;
  margin: 8px 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-card .skeleton-line.short {
  width: 60%;
}
/* Smooth transitions for data loading */
.class-card, .category-chip {
  transition: opacity 0.3s ease;
}
.class-card.loading {
  opacity: 0.3;
}
/* Empty state enhancement */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--dark-700);
}
.empty-state span:first-child {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 16px;
  margin-bottom: 8px;
}
.empty-state small {
  font-size: 13px;
  opacity: 0.6;
}

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange-600-bg);
  color: var(--white);
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--orange-700);
}

/* ---- No Results State ---- */
.no-results {
  text-align: center;
  padding: 60px 20px;
}
.no-results .big-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
}
.no-results h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--dark-900);
}
.no-results p {
  font-size: 14px;
  color: var(--dark-700);
  margin-bottom: 20px;
}
.no-results .suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.no-results .suggestions a {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--orange-100);
  color: var(--orange-700);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
}
.no-results .suggestions a:hover {
  background: var(--orange-200);
}

/* ---- Share Button ---- */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--gray-100);
  color: var(--dark-800);
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--font-zh);
}
.share-btn:hover {
  background: var(--gray-200);
}
.share-btn.copied {
  background: #d1fae5;
  color: #065f46;
}

/* ---- Related Courses ---- */
.related-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.related-scroll::-webkit-scrollbar {
  display: none;
}
.related-card {
  flex: 0 0 160px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s;
  background: var(--white);
}
.related-card:active {
  transform: scale(0.96);
}
.related-card .rc-img {
  height: 70px;
  background-size: cover;
  background-position: center;
}
.related-card .rc-body {
  padding: 8px 10px;
}
.related-card .rc-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card .rc-meta {
  font-size: 10px;
  color: var(--dark-700);
}

/* ---- Dark Mode (auto) ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #1a1a2e;
    --gray-100: #2d2d44;
    --gray-200: #3d3d5a;
    --gray-300: #4d4d6a;
    --dark-700: #b0b0c8;
    --dark-800: #d0d0e0;
    --dark-900: #e8e8f0;
    --white: #1a1a2e;
    --orange-100: #2d1a10;
    --orange-50: #1a1208;
  }
  body {
    background: #12121e;
    color: #e8e8f0;
  }
  .class-card, .membership-cta, .hero {
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  }
}
