/* ==========================================================================
   JjangJi Science – Modern Design System & Blog Stylesheet
   ========================================================================== */

:root {
  --font-sans: "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  
  /* Light Theme */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --text-inverse: #ffffff;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-subtle: #e0e7ff;
  --primary-contrast: #ffffff;
  
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.15);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --header-height: 72px;
  --max-w-content: 1200px;
  --max-w-narrow: 840px;
}

html.dark {
  /* Dark Theme */
  --bg-page: #0b0f19;
  --bg-surface: #121827;
  --bg-surface-elevated: #1a2236;
  --bg-subtle: #192133;
  --bg-hover: #222d45;
  
  --border: #1e293b;
  --border-strong: #334155;
  
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;
  --text-inverse: #0f172a;
  
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-subtle: rgba(99, 102, 241, 0.18);
  --primary-contrast: #ffffff;
  
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.15);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 20px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 24px 32px -6px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
}

p, span, a, label {
  word-break: keep-all;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

button, input {
  font: inherit;
  color: inherit;
}

/* Accessibility skip link */
.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
  transition: top 0.2s;
}
.skip:focus {
  top: 16px;
}

/* Reading Progress Bar */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #06b6d4, #10b981);
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* Layout Wrappers */
.wrap {
  width: 100%;
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap.narrow {
  max-width: var(--max-w-narrow);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  transition: background 0.3s, border-color 0.3s;
}

html.dark .site-header {
  background: rgba(11, 15, 25, 0.85);
}

.hdr {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo-sub {
  white-space: nowrap;
}
@media (max-width: 860px) {
  .logo .logo-sub {
    display: none !important;
  }
}
.logo span {
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3));
}

.logo span b {
  font-weight: 800;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.dark .logo span b {
  background: linear-gradient(135deg, #818cf8 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.main-nav a:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.main-nav a.active {
  color: var(--primary);
  background: var(--primary-subtle);
  font-weight: 700;
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.icon-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.18s ease;
}

.lang-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-subtle);
}

.menu-btn {
  display: none;
}

/* Theme Icons Toggle */
#themeBtn .i-sun { display: none; }
#themeBtn .i-moon { display: block; }
html.dark #themeBtn .i-sun { display: block; }
html.dark #themeBtn .i-moon { display: none; }

/* ==========================================================================
   Hero Section (Home)
   ========================================================================== */
.hero {
  position: relative;
  padding: 80px 0 72px;
  overflow: hidden;
  background: 
    radial-gradient(circle at 15% 25%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(6, 182, 212, 0.08) 0%, transparent 45%),
    var(--bg-page);
}

html.dark .hero {
  background: 
    radial-gradient(circle at 15% 25%, rgba(99, 102, 241, 0.16) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(6, 182, 212, 0.14) 0%, transparent 50%),
    var(--bg-page);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-bg .grid-pat {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 70%, transparent 100%);
}

.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: float 14s ease-in-out infinite alternate;
}

.hero-bg .o1 {
  width: 440px;
  height: 440px;
  background: #6366f1;
  top: -100px;
  left: 10%;
}

.hero-bg .o2 {
  width: 380px;
  height: 380px;
  background: #06b6d4;
  top: 40px;
  right: 15%;
  animation-delay: -5s;
}

.hero-bg .o3 {
  width: 320px;
  height: 320px;
  background: #ec4899;
  bottom: -60px;
  left: 45%;
  animation-delay: -9s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 20px) scale(1.08); }
}

.hero-in {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.hero-copy h1 {
  font-size: 3.4rem;
  font-weight: 850;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: var(--text-main);
}

.hero-copy h1 .grad {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.dark .hero-copy h1 .grad {
  background: linear-gradient(135deg, #818cf8 0%, #38bdf8 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 560px;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca, #3730a3);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
  transform: translateY(-2px);
}

html.dark .btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

html.dark .btn-primary:hover {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.55);
}

.btn-ghost {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--text-subtle);
  transform: translateY(-2px);
}

.btn-light {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-light:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
}

.stats {
  display: flex;
  gap: 36px;
  margin-top: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.stats dt {
  font-size: 2rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1;
}

.stats dt sup {
  color: var(--primary);
  font-size: 1.1rem;
}

.stats dd {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-subtle);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Featured Hero Card */
.hero-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 24px 38px -8px var(--accent-glow);
}

.hc-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-subtle);
}

.hc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-card:hover .hc-img img {
  transform: scale(1.04);
}

.hc-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hc-body h2 {
  font-size: 1.35rem;
  font-weight: 750;
  line-height: 1.35;
  color: var(--text-main);
}

.hc-body time {
  font-size: 0.85rem;
  color: var(--text-subtle);
}

/* ==========================================================================
   Centered Hero & Minimalist Layout
   ========================================================================== */
.hero-center {
  padding: 88px 0 68px;
  text-align: center;
}

.hero-in-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.hero-title-center {
  font-size: 3.3rem;
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: var(--text-main);
  text-align: center;
}

.hero-title-center .grad {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.dark .hero-title-center .grad {
  background: linear-gradient(135deg, #818cf8 0%, #38bdf8 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub-center {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.hero-btns.center {
  justify-content: center;
  margin-top: 10px;
}

.hero-badges-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--text-main);
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.hero-badge:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.hero-badge b {
  color: var(--primary);
  font-weight: 750;
}

/* ==========================================================================
   Teacher Showcase Section (Centered & High-Contrast)
   ========================================================================== */
.teacher-showcase {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 52px 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
  max-width: 960px;
  margin: 0 auto;
}

.teacher-avatar-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
}

.teacher-avatar-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 4px solid var(--primary);
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
  background: var(--bg-subtle);
  image-rendering: -webkit-optimize-contrast;
}

.teacher-avatar-img.lg {
  width: 160px;
  height: 160px;
}

.teacher-avatar-img.sm {
  width: 72px;
  height: 72px;
  border-width: 2px;
}

.teacher-avatar-badge {
  position: absolute;
  bottom: -3px;
  right: -5px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-surface);
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.25;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.teacher-avatar-badge.chem {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.45);
}

.teacher-avatar-badge.bio {
  background: linear-gradient(135deg, #0d9488, #10b981);
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.45);
}

.teacher-avatar-badge.phys-nicole {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.45);
}

.teacher-avatar-badge.phys-joshua {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  box-shadow: 0 3px 10px rgba(30, 64, 175, 0.45);
}

.teacher-title {
  font-size: 2.15rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-top: 8px;
  margin-bottom: 12px;
}

.teacher-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 36px;
}

/* Teacher Proof Visual Gallery (Real Photos replacing boring text boxes) */
.teacher-proof-wrap {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.proof-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  text-align: center;
}

.proof-sub {
  font-size: 0.98rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.proof-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.22s ease;
}

.proof-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.proof-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-subtle);
}

.proof-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  transition: transform 0.3s ease;
}

.proof-card:hover .proof-img img {
  transform: scale(1.05);
}

.proof-caption {
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hc-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  z-index: 2;
}

/* Image-Dominant Visual Cards (Pictures First, Minimal Text) */
.visual-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.visual-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.visual-card .card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-subtle);
}

.visual-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  transition: transform 0.35s ease;
}

.visual-card:hover .card-img img {
  transform: scale(1.05);
}

.visual-card .card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 750;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.visual-card .card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visual-card .card-body time {
  font-size: 0.82rem;
  color: var(--text-subtle);
  font-weight: 600;
}

.visual-card .card-body h3 {
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.45;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.visual-card:hover .card-body h3 {
  color: var(--primary);
}

/* Common Centered Helpers */
.text-center {
  text-align: center;
}

.sec-head.center {
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.sec-head.center p {
  margin: 0 auto;
}

.chips.center {
  justify-content: center;
}

.dest-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  list-style: none;
  max-width: 800px;
  margin: 0 auto;
}

.dest-list li {
  padding: 8px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.post-title-center {
  font-size: 2.6rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin: 12px 0 16px;
  text-align: center;
}

.lede.center {
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 20px;
  text-align: center;
}

.post-meta.center {
  justify-content: center;
}

.author-box.center {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 32px 0;
  text-align: left;
}

.share-row.center {
  justify-content: center;
}

/* ==========================================================================
   Marquee of Destinations
   ========================================================================== */
.marquee {
  width: 100%;
  overflow: hidden;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: relative;
}

.mq-track {
  display: flex;
  white-space: nowrap;
  animation: scroll 32s linear infinite;
  gap: 40px;
}

.mq-track:hover {
  animation-play-state: paused;
}

.mq-track span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.mq-track span::before {
  content: "•";
  color: var(--primary);
  font-size: 1.2rem;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Section Layouts
   ========================================================================== */
.section {
  padding: 72px 24px;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.sec-head h2 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.sec-head p {
  color: var(--text-subtle);
  font-size: 1rem;
  margin-top: 6px;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
  max-width: 680px;
}

.sec-head a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.sec-head a:hover {
  background: var(--primary-subtle);
  transform: translateX(3px);
}

/* Grids */
.grid {
  display: grid;
  gap: 28px;
}

.grid.g3 {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

/* ==========================================================================
   Post Card Component
   ========================================================================== */
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
  overflow: hidden;
  position: relative;
}

.card.tall .card-img {
  aspect-ratio: 16 / 11;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  transition: transform 0.35s ease;
}

.card:hover .card-img img {
  transform: scale(1.05);
}

.card-img .ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  opacity: 0.4;
}

.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-meta time {
  font-size: 0.82rem;
  color: var(--text-subtle);
  font-weight: 500;
}

.card-body h3 {
  font-size: 1.18rem;
  font-weight: 750;
  line-height: 1.4;
  color: var(--text-main);
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body .more {
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  transition: gap 0.15s;
}

.card:hover .card-body .more {
  gap: 10px;
}

/* Wide Featured Card on List */
.featured {
  margin-bottom: 36px;
}

.featured .card.wide .card-link {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: stretch;
}

.featured .card.wide .card-img {
  aspect-ratio: auto;
  min-height: 320px;
}

.featured .card.wide .card-body {
  padding: 36px;
}

.featured .card.wide h3 {
  font-size: 1.6rem;
  -webkit-line-clamp: 3;
}

/* ==========================================================================
   Badges & Category Colors
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1;
}

.badge.lg {
  padding: 7px 16px;
  font-size: 0.88rem;
}

/* Results (Gold / Amber) */
.b-results { background: rgba(245, 158, 11, 0.14); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.3); }
html.dark .b-results { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

/* AP (Cyan / Sky) */
.b-ap { background: rgba(14, 165, 233, 0.14); color: #0284c7; border: 1px solid rgba(14, 165, 233, 0.3); }
html.dark .b-ap { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }

/* IB (Indigo / Violet) */
.b-ib { background: rgba(99, 102, 241, 0.14); color: #4f46e5; border: 1px solid rgba(99, 102, 241, 0.3); }
html.dark .b-ib { background: rgba(99, 102, 241, 0.2); color: #818cf8; }

/* Concepts (Emerald) */
.b-concepts { background: rgba(16, 185, 129, 0.14); color: #059669; border: 1px solid rgba(16, 185, 129, 0.3); }
html.dark .b-concepts { background: rgba(16, 185, 129, 0.2); color: #34d399; }

/* Study (Blue) */
.b-study { background: rgba(59, 130, 246, 0.14); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.3); }
html.dark .b-study { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

/* Notes (Slate) */
.b-notes { background: rgba(100, 116, 139, 0.14); color: #475569; border: 1px solid rgba(100, 116, 139, 0.3); }
html.dark .b-notes { background: rgba(100, 116, 139, 0.2); color: #cbd5e1; }

/* Category Grid on Home */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  background: var(--primary-subtle);
}

.cat-card .emoji {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.cat-card b {
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--text-main);
}

.cat-card small {
  color: var(--text-subtle);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Category Filter Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.chip small {
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  color: var(--text-subtle);
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.chip.on {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.chip.on small {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ==========================================================================
   Page Hero (Listing, Search, Archive)
   ========================================================================== */
.page-hero {
  padding: 48px 0 32px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: 2.6rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  margin: 12px 0 8px;
  color: var(--text-main);
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 640px;
}

/* Breadcrumb */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-subtle);
  margin-bottom: 12px;
}

.crumbs i {
  font-style: normal;
  color: var(--border-strong);
}

.crumbs a:hover {
  color: var(--primary);
}

/* Inline Search Form */
.search-inline {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 520px;
  margin-top: 20px;
}

.search-inline svg {
  position: absolute;
  left: 16px;
  color: var(--text-subtle);
  pointer-events: none;
}

.search-inline input {
  width: 100%;
  height: 48px;
  padding: 0 18px 0 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  font-size: 0.98rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.search-inline.big input {
  height: 56px;
  font-size: 1.1rem;
  padding-left: 54px;
}

.search-inline.big svg {
  left: 20px;
  width: 24px;
  height: 24px;
}

.search-inline input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-subtle);
}

.search-count {
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-subtle);
}

/* ==========================================================================
   Article Detail Page
   ========================================================================== */
.post {
  padding-bottom: 60px;
}

.post-hero {
  padding: 56px 0 44px;
  background: linear-gradient(180deg, var(--bg-subtle) 0%, rgba(248, 250, 252, 0.4) 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.post-hero h1 {
  font-size: 2.5rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin: 18px 0 12px;
}

.post-hero .lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-subtle);
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-meta .author {
  color: var(--text-main);
  font-weight: 700;
}

.post-meta .avatar {
  width: 24px;
  height: 24px;
  display: inline-block;
}

.post-meta .avatar svg {
  width: 100%;
  height: 100%;
}

.post-meta .alt-lang {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.84rem;
}

.post-meta .alt-lang:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
}

/* Post Layout with Share Rail */
.post-layout {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 40px;
  padding-top: 48px;
  max-width: var(--max-w-narrow);
}

.share-rail {
  position: sticky;
  top: calc(var(--header-height) + 32px);
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-rail a, .share-rail button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.share-rail a:hover, .share-rail button:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  background: var(--primary-subtle);
}

/* Post Article Body Wrapper & Spacing */
.post-body-wrap {
  padding-top: 52px;
  padding-bottom: 72px;
}

/* Prose (Article Body) Typography */
.prose {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text-main);
  overflow-wrap: break-word;
}

.prose > :first-child {
  margin-top: 0 !important;
}

.prose > p:first-of-type {
  font-size: 1.16rem;
  line-height: 1.9;
}

.prose p {
  margin-bottom: 1.6em;
  color: var(--text-main);
}

.prose h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 2.2em 0 0.8em;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--text-main);
  padding-top: 16px;
}

.prose h3 {
  font-size: 1.4rem;
  font-weight: 750;
  margin: 1.8em 0 0.6em;
  line-height: 1.35;
  color: var(--text-main);
}

.prose h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.4em 0 0.5em;
}

.prose strong, .prose b {
  font-weight: 750;
  color: var(--text-main);
}

.prose em, .prose i {
  font-style: italic;
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
}

.prose a:hover {
  color: var(--primary-hover);
}

.prose ul, .prose ol {
  margin: 1.2em 0 1.6em 1.4em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.8em 0;
  font-style: italic;
  color: var(--text-muted);
}

.prose figure {
  margin: 2.4em 0;
  text-align: center;
}

.prose figure img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  display: inline-block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: transform 0.2s, box-shadow 0.2s;
  background: var(--bg-subtle);
}

.prose figure img:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.prose figcaption {
  font-size: 0.88rem;
  color: var(--text-subtle);
  text-align: center;
  margin-top: 8px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.95rem;
}

.prose th, .prose td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
}

.prose th {
  background: var(--bg-subtle);
  font-weight: 750;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3em 0;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.prose pre {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  margin: 1.6em 0;
}

.prose pre code {
  background: transparent;
  padding: 0;
  border: none;
}

/* Table of Contents (TOC) */
.toc {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 2.4em;
  box-shadow: var(--shadow-sm);
}

.toc summary {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  outline: none;
}

.toc ol {
  margin: 12px 0 0 16px;
  list-style: decimal;
}

.toc li {
  font-size: 0.94rem;
  margin-bottom: 6px;
}

.toc li.h3 {
  margin-left: 18px;
  list-style: circle;
}

.toc a {
  color: var(--text-muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Post Footer Elements */
.post-foot {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-row b {
  font-size: 0.95rem;
  color: var(--text-main);
}

.share-row a, .share-row button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.share-row a:hover, .share-row button:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.author-box {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.author-box img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-strong);
}

.author-box b {
  display: block;
  font-size: 1.1rem;
  color: var(--text-main);
}

.author-box p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 4px 0 10px;
}

.author-box a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

/* Prev / Next Post Navigation */
.prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.prevnext .pn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.prevnext .pn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  background: var(--primary-subtle);
}

.prevnext .pn.next {
  text-align: right;
  align-items: flex-end;
}

.prevnext .pn small {
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--text-subtle);
  letter-spacing: 0.05em;
}

.prevnext .pn b {
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Pagination Component
   ========================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 54px;
  flex-wrap: wrap;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s;
}

.pg:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.pg.num {
  min-width: 42px;
  padding: 0;
}

.pg.on {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pg.dots {
  border: none;
  background: transparent;
  color: var(--text-subtle);
}

/* ==========================================================================
   Archive Page (Timeline by Year)
   ========================================================================== */
.archive {
  padding-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.archive .year h2 {
  font-size: 1.8rem;
  font-weight: 850;
  color: var(--text-main);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.archive .year h2 small {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-subtle);
}

.archive .year ul {
  list-style: none;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive .year li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.archive .year li:hover {
  background: var(--bg-subtle);
}

.archive .year time {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-subtle);
  font-family: ui-monospace, monospace;
  flex-shrink: 0;
}

.archive .year li a {
  font-weight: 650;
  color: var(--text-main);
  flex: 1;
}

.archive .year li a:hover {
  color: var(--primary);
}

/* ==========================================================================
   About Page
   ========================================================================== */
.about-hero h1 {
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
  margin-bottom: 12px;
}

.about-hero {
  padding: 64px 0 48px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  align-items: center;
  gap: 48px;
}

.about-photo img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 4px solid var(--bg-surface);
}

.about-feats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-feats div b {
  display: block;
  font-size: 1.4rem;
  font-weight: 850;
  color: var(--primary);
}

.about-feats div span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-subtle);
}

.dest-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  list-style: none;
}

.dest-list li {
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dest-list li::before {
  content: "🏛️";
  font-size: 1.1rem;
}

/* About Band on Home */
.about-band {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-subtle));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  gap: 40px;
  box-shadow: var(--shadow-md);
}

.about-band img {
  border-radius: var(--radius-lg);
  border: 3px solid var(--border-strong);
  flex-shrink: 0;
}

.about-band h2 {
  font-size: 2rem;
  font-weight: 850;
  margin: 6px 0 12px;
}

.about-band p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

/* ==========================================================================
   Consultation CTA Banner
   ========================================================================== */
.cta {
  padding: 24px;
  margin: 40px 0 20px;
}

.cta-in {
  max-width: var(--max-w-content);
  margin: 0 auto;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  color: #fff;
  box-shadow: 0 16px 36px -10px rgba(79, 70, 229, 0.45);
  box-sizing: border-box;
}

.cta-in h2 {
  font-size: 1.95rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
  line-height: 1.3;
}

.cta-in p {
  font-size: 1.05rem;
  opacity: 0.94;
  max-width: 580px;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
  line-height: 1.6;
}

/* ==========================================================================
   Simplified Minimal Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 44px 0 36px;
  margin-top: 60px;
}

.foot-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.foot-brand-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.foot-brand-simple .logo {
  justify-content: center;
}

.foot-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
}

.foot-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.foot-links a:hover {
  color: var(--primary);
}

.foot-links .sep {
  color: var(--border-strong);
  user-select: none;
}

.foot-copy {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

/* Floating Back To Top Button */
.to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 850;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-3px);
}

/* Image Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  animation: zoomIn 0.22s ease-out;
}

@keyframes zoomIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 404 Page */
.nf {
  padding: 120px 0;
  text-align: center;
}

.nf-code {
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.nf h1 {
  font-size: 2.2rem;
  font-weight: 850;
  margin-bottom: 12px;
}

.nf p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
  .hero-in {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-copy h1 {
    font-size: 2.7rem;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .about-photo {
    max-width: 280px;
    margin: 0 auto;
  }
  
  .about-feats {
    grid-template-columns: 1fr;
  }
  
  .featured .card.wide .card-link {
    grid-template-columns: 1fr;
  }
  
  .post-layout {
    grid-template-columns: 1fr;
  }
  
  .share-rail {
    display: none; /* Mobile uses footer share-row */
  }
  
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .about-band {
    flex-direction: column;
    text-align: center;
    padding: 32px;
  }
}

@media (max-width: 720px) {
  .menu-btn {
    display: inline-flex;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
  }
  
  .main-nav.open {
    display: flex;
  }
  
  .hero-copy h1 {
    font-size: 2.2rem;
  }
  
  .stats {
    flex-direction: column;
    gap: 16px;
  }
  
  .cta-in {
    flex-direction: column;
    text-align: center;
    padding: 32px 20px;
    gap: 20px;
  }
  
  .cta-in h2 {
    font-size: 1.35rem;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: break-word;
    text-wrap: balance;
  }
  
  .cta-in p {
    font-size: 0.92rem;
    line-height: 1.55;
    word-break: keep-all;
    overflow-wrap: break-word;
    text-wrap: balance;
  }

  .to-top {
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
  }
  
  .prevnext {
    grid-template-columns: 1fr;
  }
  
  .prevnext .pn.next {
    text-align: left;
    align-items: flex-start;
  }
  
  .foot-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   Single Unified Faculty Card (1 Single Box, 3 Circles in 1 Row, Zero Clutter)
   ========================================================================== */
.faculty-unified-card {
  display: block;
  max-width: 780px;
  margin: 0 auto 44px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 34px 24px 28px;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
}

.faculty-unified-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
}

.faculty-unified-head {
  margin-bottom: 22px;
}

.faculty-unified-head .kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.faculty-unified-head h3 {
  font-size: 1.55rem;
  font-weight: 850;
  color: var(--text-main);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.faculty-unified-head p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Strictly 1 Horizontal Row with 3 Circles - NEVER wrap, NEVER stack */
.faculty-unified-row {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 28px !important;
  margin: 20px auto 24px !important;
  flex-wrap: nowrap !important;
}

.faculty-unified-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.faculty-unified-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3.5px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--bg-subtle);
}

.faculty-unified-card:hover .faculty-unified-avatar {
  transform: scale(1.05);
}

.faculty-unified-avatar.chem {
  border-color: #4f46e5;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.faculty-unified-avatar.bio {
  border-color: #0d9488;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}

.faculty-unified-avatar.phys {
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.faculty-unified-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.faculty-unified-tag {
  position: absolute;
  bottom: -3px;
  right: -3px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  color: #ffffff;
  border: 2px solid var(--bg-surface);
}

.faculty-unified-tag.chem {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.faculty-unified-tag.bio {
  background: linear-gradient(135deg, #0d9488, #06b6d4);
}

.faculty-unified-tag.phys {
  background: linear-gradient(135deg, #2563eb, #0284c7);
}

.faculty-unified-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.faculty-unified-btn-wrap {
  margin-top: 8px;
}

/* Mobile responsive: keep 3 circles side by side in one row without wrapping */
@media (max-width: 520px) {
  .faculty-unified-card {
    padding: 24px 14px 22px;
    margin-bottom: 36px;
  }
  .faculty-unified-head h3 {
    font-size: 1.35rem;
  }
  .faculty-unified-row {
    gap: 14px !important;
    margin: 16px auto 20px !important;
  }
  .faculty-unified-avatar {
    width: 76px;
    height: 76px;
    border-width: 3px;
  }
  .faculty-unified-tag {
    font-size: 0.62rem;
    padding: 1px 6px;
    bottom: -2px;
    right: -2px;
  }
  .faculty-unified-name {
    font-size: 0.82rem;
  }
}

@media (max-width: 360px) {
  .faculty-unified-row {
    gap: 10px !important;
  }
  .faculty-unified-avatar {
    width: 66px;
    height: 66px;
  }
  .faculty-unified-name {
    font-size: 0.76rem;
  }
}

/* ==========================================================================
   Faculty & Instructors Section (Chemistry, Biology, Physics)
   ========================================================================== */
/* Beautiful 2x2 Grid: Row 1 (Chem & Bio), Row 2 (Nicole & Joshua Physics) */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 1160px;
  margin: 36px auto 56px;
}

@media (max-width: 860px) {
  .faculty-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.faculty-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 30px 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.faculty-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
}

.faculty-card.grace:hover {
  border-color: #0d9488;
}

.faculty-card.nicole:hover {
  border-color: #2563eb;
}

.faculty-card.joshua:hover {
  border-color: #2563eb;
}

.faculty-card.joshua .faculty-avatar-img {
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.faculty-card.joshua .faculty-kicker {
  color: #2563eb;
}

.faculty-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.faculty-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
}

.faculty-avatar-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
  background: var(--bg-subtle);
}

.faculty-card.grace .faculty-avatar-img {
  border-color: #0d9488;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}

.faculty-card.nicole .faculty-avatar-img {
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.faculty-header-info {
  flex: 1;
}

.faculty-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.faculty-card.grace .faculty-kicker {
  color: #0d9488;
}

.faculty-card.nicole .faculty-kicker {
  color: #2563eb;
}

.faculty-name {
  font-size: 1.45rem;
  font-weight: 850;
  color: var(--text-main);
  margin: 0 0 6px;
  line-height: 1.25;
}

.faculty-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.faculty-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.faculty-badge.highlight {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  border-color: rgba(79, 70, 229, 0.25);
}

.faculty-badge.highlight-teal {
  background: rgba(13, 148, 136, 0.1);
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.25);
}

.faculty-badge.highlight-blue {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.25);
}

.faculty-info-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.faculty-info-box p {
  margin: 0 0 5px;
  color: var(--text-main);
  line-height: 1.42;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.faculty-info-box p:last-child {
  margin-bottom: 0;
}

.faculty-info-box .label {
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 0.80rem;
}

.faculty-desc {
  font-size: 0.90rem;
  color: var(--text-muted);
  line-height: 1.58;
  margin-bottom: 18px;
  flex: 1;
}

.faculty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.faculty-actions .btn {
  font-size: 0.88rem;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-teal {
  background: #0d9488;
  color: #ffffff !important;
  border: 1px solid #0f766e;
}

.btn-teal:hover {
  background: #0f766e;
  color: #ffffff !important;
}

.btn-blue {
  background: #2563eb;
  color: #ffffff !important;
  border: 1px solid #1d4ed8;
}

.btn-blue:hover {
  background: #1d4ed8;
  color: #ffffff !important;
}

.profile-card-preview {
  margin: 40px auto;
  max-width: 1000px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.profile-card-preview h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text-main);
}

.profile-card-preview p {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.profile-card-img-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  margin-bottom: 18px;
  background: #0b1120;
}

.profile-card-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.profile-card-img-wrap:hover img {
  transform: scale(1.015);
}

.team-banner {
  margin-top: 32px;
  padding: 24px 28px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  text-align: left;
}

.faculty-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: auto !important;
  width: 100% !important;
}

.faculty-actions .btn {
  flex: 0 0 auto !important;
  font-size: 0.82rem !important;
  padding: 8px 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  border-radius: var(--radius-md) !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
}

.about-hero .hero-btns {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  margin-top: 18px !important;
}
.about-hero .hero-btns .btn {
  white-space: nowrap !important;
}


/* ==========================================================================
   Physics Lecture Video Samples Grid
   ========================================================================== */
.video-samples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
  max-width: 1040px;
  margin: 0 auto;
}

.video-sample-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.video-sample-card:hover {
  transform: translateY(-4px);
  border-color: #2563eb;
  box-shadow: var(--shadow-xl);
}

.video-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.video-player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-duration-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.video-sample-body {
  padding: 20px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-sample-cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-sample-cat.blue {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.video-sample-cat.purple {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.video-sample-body h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text-main);
  line-height: 1.35;
}

.video-sample-body p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .video-samples-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ==========================================================================
   Physics Lecture Video Modal (Popup Player)
   ========================================================================== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.video-modal[hidden] {
  display: none !important;
  opacity: 0;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 29, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.video-modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1;
  animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
  from {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-canvas);
}

.video-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.video-modal-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #2563eb;
  text-transform: uppercase;
}

.video-modal-title-group h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
}

.video-modal-close {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.15s ease;
}

.video-modal-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: rotate(90deg);
}

.video-modal-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.video-tab-btn {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-canvas);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.video-tab-btn:hover {
  color: var(--text-main);
  border-color: #2563eb;
}

.video-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.video-modal-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-modal-player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.video-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-canvas);
  border-top: 1px solid var(--border);
  gap: 12px;
}

.video-modal-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

.video-modal-ext {
  font-size: 0.78rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
}

.video-modal-ext:hover {
  background: rgba(37, 99, 235, 0.1);
  text-decoration: underline;
}

@media (max-width: 640px) {

  /* Mobile 2x2 Symmetric Category Chips - Zero Orphans */
  .chips.center {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    max-width: 380px !important;
    margin: 20px auto 28px !important;
    padding: 0 12px !important;
  }
  .chips.center .chip {
    width: 100% !important;
    justify-content: center !important;
    padding: 9px 8px !important;
    font-size: 0.84rem !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
  .logo {
    gap: 6px;
    font-size: 1.15rem;
  }
  .logo .logo-sub {
    display: none;
  }
  .hero-btns {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .hero-btns .btn {
    flex: 1;
    padding: 10px 10px;
    font-size: 0.88rem;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }
  .hero-badges-center {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 6px;
    margin-top: 12px;
    width: 100%;
    justify-content: space-between;
  }
  .hero-badge {
    flex: 1 1 0;
    min-width: 0;
    font-size: 0.74rem;
    padding: 6px 3px;
    gap: 3px;
    white-space: nowrap;
    justify-content: center;
    text-align: center;
  }
  .post-hero {
    padding: 38px 0 24px;
  }
  .post-body-wrap {
    padding-top: 32px;
    padding-bottom: 48px;
  }
  .video-modal-content {
    max-width: 100%;
    border-radius: var(--radius-md);
  }
  .video-modal-header {
    padding: 10px 14px;
  }
  .video-modal-tabs {
    padding: 8px 12px;
  }
  .video-modal-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
  }
}

/* --- KakaoTalk Action Buttons & Copy Toast --- */
.kakao-btn {
  cursor: pointer;
  border-radius: 8px !important;
  font-size: 0.88rem !important;
  padding: 8px 16px !important;
  font-weight: 650 !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.btn-light.kakao-btn {
  background: #FEE500;
  color: #191919;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.btn-light.kakao-btn:hover {
  background: #fada0a;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.btn-primary.kakao-btn {
  background: #FEE500;
  color: #191919;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(254, 229, 0, 0.3);
}
.btn-primary.kakao-btn:hover {
  background: #fada0a;
  color: #191919;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(254, 229, 0, 0.45);
}
.kakao-btn.btn-copied {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.kakao-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  white-space: pre-line;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
  max-width: 90vw;
}
.kakao-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}


/* --- Lecture Hub Page Styles --- */
.lecture-hero {
  padding: 56px 0 32px;
  background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}
.lecture-pill-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.lecture-pill {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.lecture-pill.primary {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.25);
}

/* Featured Theatre Player */
.lecture-theatre-card {
  max-width: 1080px;
  margin: 0 auto 56px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.lecture-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.lecture-video-wrap iframe,
.lecture-video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.lecture-video-info {
  padding: 36px 40px;
}
.lvi-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.lvi-tag {
  font-size: 0.78rem;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: 6px;
}
.lvi-tag.primary {
  background: #4f46e5;
  color: #fff;
}
.lvi-tag.duration {
  background: var(--bg-hover);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}
.lvi-tag.badge-free {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.3);
}
.lecture-video-info h2 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text-main);
}
.lvi-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Takeaways Grid */
.lecture-takeaways {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 28px;
}
.lecture-takeaways h4 {
  font-size: 1.05rem;
  font-weight: 750;
  margin-bottom: 18px;
  color: var(--text-main);
}
.takeaways-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.takeaway-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.tk-num {
  font-size: 1.05rem;
  font-weight: 850;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.1);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}
.tk-content b {
  display: block;
  font-size: 0.94rem;
  color: var(--text-main);
  margin-bottom: 4px;
}
.tk-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Curriculum Units Grid */
.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.unit-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.unit-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}
.unit-card.active-unit {
  border-color: #4f46e5;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.05) 0%, var(--bg-surface) 100%);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}
.unit-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.unit-badge {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-hover);
  color: var(--text-main);
}
.unit-badge.active {
  background: rgba(79, 70, 229, 0.15);
  color: #4f46e5;
}
.unit-status {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-subtle);
}
.unit-card.active-unit .unit-status {
  color: #059669;
}
.unit-card h3 {
  font-size: 1.05rem;
  font-weight: 750;
  margin-bottom: 8px;
  line-height: 1.35;
}
.unit-topics {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.unit-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.unit-action-btn {
  font-size: 0.82rem;
  font-weight: 750;
  color: #4f46e5;
  text-decoration: none;
}
.unit-action-btn:hover {
  text-decoration: underline;
}

/* Faculty Lecture Links */
.faculty-lecture-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}
.f-lec-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.f-lec-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}
.f-lec-avatar-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 14px;
}
.f-lec-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.f-lec-tag {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: #1e40af;
  color: #fff;
  border: 2px solid var(--bg-surface);
}
.f-lec-info h4 {
  font-size: 1rem;
  font-weight: 750;
  margin-bottom: 6px;
}
.f-lec-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 8px;
}

@media (max-width: 960px) {
  .curriculum-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .faculty-lecture-links {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .curriculum-grid {
    grid-template-columns: 1fr;
  }
  .takeaways-grid {
    grid-template-columns: 1fr;
  }
  .faculty-lecture-links {
    grid-template-columns: 1fr;
  }
  .lecture-video-info {
    padding: 24px 18px;
  }
}


/* ===================================================================
   Visual Chemical Concept Roadmap & Video Bar Styles
   =================================================================== */
.lecture-video-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  flex-wrap: wrap;
}

.lvb-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lvi-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 750;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.lvi-pill.primary {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.lvi-pill.accent {
  background: rgba(8, 145, 178, 0.1);
  color: #0891b2;
  border: 1px solid rgba(8, 145, 178, 0.2);
}

.lvi-pill.success {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.lvb-yt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 750;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lvb-yt-btn:hover {
  background: #dc2626;
  color: #ffffff;
}

@media (max-width: 640px) {
  .lecture-video-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    gap: 12px;
  }
  .lvb-left {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .lvi-pill {
    padding: 4px 9px;
    font-size: 0.76rem;
  }
  .lvb-right .lvb-yt-btn {
    width: 100%;
    text-align: center;
    padding: 8px 12px;
  }
}

/* Chem Visual Concept Roadmap Grid */
.chem-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.chem-visual-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--card-accent, #4f46e5);
  border-radius: var(--radius-md);
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.chem-visual-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--card-accent, #4f46e5);
}

.chem-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.chem-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chem-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chem-unit-tag {
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-subtle);
  background: var(--bg-hover);
  padding: 3px 8px;
  border-radius: 6px;
}

.chem-formula-badge {
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--card-accent, #4f46e5);
  background: rgba(79, 70, 229, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
}

.chem-card-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0 0 14px 0;
  letter-spacing: -0.015em;
}

.chem-point-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chem-point {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
  position: relative;
  padding-left: 16px;
}

.chem-point::before {
  content: "•";
  position: absolute;
  left: 3px;
  color: var(--card-accent, #4f46e5);
  font-weight: bold;
}

.chem-card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chem-status-pill {
  font-size: 0.74rem;
  font-weight: 750;
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chem-jump-link {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.chem-jump-link:hover {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .chem-roadmap-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .chem-roadmap-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .chem-visual-card {
    padding: 18px 16px;
  }
}


/* ===================================================================
   Unified Subpage Hero & Modern Card Polish (All Pages)
   =================================================================== */
.page-hero,
.about-hero,
.lecture-hero {
  position: relative;
  padding: 44px 0 36px !important;
  background:
    radial-gradient(ellipse 80% 70% at 50% -15%, rgba(79, 70, 229, 0.10), transparent 70%),
    linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-surface) 100%) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  overflow: hidden;
}

.page-kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.18);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.06);
}

html.dark .page-kicker-pill {
  color: #818cf8;
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(129, 140, 248, 0.25);
}

.page-hero h1,
.about-hero h1,
.lecture-hero h1 {
  font-size: 2.15rem !important;
  font-weight: 850 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.2 !important;
  margin: 0 0 8px 0 !important;
  color: var(--text-main);
  word-break: keep-all;
}

.page-hero .hero-sub-center,
.about-hero .hero-sub-center,
.lecture-hero .hero-sub-center {
  font-size: 0.98rem !important;
  color: var(--text-muted) !important;
  margin: 0 auto !important;
  max-width: 600px;
  line-height: 1.5;
  word-break: keep-all;
  text-wrap: balance;
}

/* Polished Lecture Video Card */
.lecture-theatre-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 34px -10px rgba(15, 23, 42, 0.08);
  margin-bottom: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lecture-theatre-card:hover {
  box-shadow: 0 20px 42px -12px rgba(79, 70, 229, 0.13);
}

.lecture-card-top {
  padding: 18px 22px 16px;
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-surface) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.lecture-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 10px;
}

.lecture-card-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.lecture-card-title {
  font-size: 1.22rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .page-hero,
  .about-hero,
  .lecture-hero {
    padding: 28px 0 22px !important;
  }
  .page-kicker-pill {
    font-size: 0.68rem;
    padding: 4px 11px;
    margin-bottom: 10px;
  }
  .page-hero h1,
  .about-hero h1,
  .lecture-hero h1 {
    font-size: 1.62rem !important;
  }
  .page-hero .hero-sub-center,
  .about-hero .hero-sub-center,
  .lecture-hero .hero-sub-center {
    font-size: 0.87rem !important;
  }
  .lecture-card-top {
    padding: 14px 14px 12px;
  }
  .lecture-card-pills .lvi-pill {
    padding: 4px 9px;
    font-size: 0.74rem;
  }
  .lecture-card-meta-row .lvb-yt-btn {
    padding: 4px 9px;
    font-size: 0.74rem;
    width: auto !important;
  }
  .lecture-card-title {
    font-size: 1.05rem;
  }
}


/* ===================================================================
   Unified Subpage Hero & Modern Card Polish (All Pages)
   =================================================================== */
.page-hero,
.about-hero,
.lecture-hero {
  position: relative;
  padding: 44px 0 36px !important;
  background:
    radial-gradient(ellipse 80% 70% at 50% -15%, rgba(79, 70, 229, 0.10), transparent 70%),
    linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-surface) 100%) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  overflow: hidden;
}

.page-kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.18);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.06);
}

html.dark .page-kicker-pill {
  color: #818cf8;
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(129, 140, 248, 0.25);
}

.page-hero h1,
.about-hero h1,
.lecture-hero h1 {
  font-size: 2.15rem !important;
  font-weight: 850 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.2 !important;
  margin: 0 0 8px 0 !important;
  color: var(--text-main);
  word-break: keep-all;
}

.page-hero .hero-sub-center,
.about-hero .hero-sub-center,
.lecture-hero .hero-sub-center {
  font-size: 0.98rem !important;
  color: var(--text-muted) !important;
  margin: 0 auto !important;
  max-width: 600px;
  line-height: 1.5;
  word-break: keep-all;
  text-wrap: balance;
}

/* Polished Lecture Video Card */
.lecture-theatre-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 34px -10px rgba(15, 23, 42, 0.08);
  margin-bottom: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lecture-theatre-card:hover {
  box-shadow: 0 20px 42px -12px rgba(79, 70, 229, 0.13);
}

.lecture-card-top {
  padding: 18px 22px 16px;
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-surface) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.lecture-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 10px;
}

.lecture-card-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.lecture-card-title {
  font-size: 1.22rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .page-hero,
  .about-hero,
  .lecture-hero {
    padding: 28px 0 22px !important;
  }
  .page-kicker-pill {
    font-size: 0.68rem;
    padding: 4px 11px;
    margin-bottom: 10px;
  }
  .page-hero h1,
  .about-hero h1,
  .lecture-hero h1 {
    font-size: 1.62rem !important;
  }
  .page-hero .hero-sub-center,
  .about-hero .hero-sub-center,
  .lecture-hero .hero-sub-center {
    font-size: 0.87rem !important;
  }
  .lecture-card-top {
    padding: 14px 14px 12px;
  }
  .lecture-card-pills .lvi-pill {
    padding: 4px 9px;
    font-size: 0.74rem;
  }
  .lecture-card-meta-row .lvb-yt-btn {
    padding: 4px 9px;
    font-size: 0.74rem;
    width: auto !important;
  }
  .lecture-card-title {
    font-size: 1.05rem;
  }
}


/* Compact Top Gap After Subpage Hero & Crisp Mobile Faculty Cards */
.page-hero + .section,
.about-hero + .section,
.lecture-hero + .section {
  padding-top: 36px !important;
}

@media (max-width: 640px) {
  .page-hero + .section,
  .about-hero + .section,
  .lecture-hero + .section {
    padding-top: 22px !important;
  }
  .faculty-card {
    padding: 18px 16px !important;
  }
  .faculty-top {
    gap: 12px !important;
    align-items: center !important;
  }
  .faculty-card {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .faculty-avatar-wrap,
  .faculty-avatar-wrap .faculty-avatar-img {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
  }
  .faculty-kicker {
    font-size: 0.66rem !important;
    white-space: nowrap !important;
    margin-bottom: 2px !important;
  }
  .faculty-name {
    font-size: 1.08rem !important;
    white-space: nowrap !important;
    margin-bottom: 6px !important;
  }
  .faculty-badges {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }
  .faculty-badge {
    font-size: 0.66rem !important;
    padding: 2px 6px !important;
    white-space: nowrap !important;
  }
}


/* Fix 4 Teacher Circles Overflow Inside .faculty-unified-card & Enlarge on Desktop */
.faculty-unified-card {
  box-sizing: border-box !important;
  max-width: 1080px !important;
  width: 100% !important;
  overflow: hidden !important;
  padding: 44px 48px 40px !important;
}

.faculty-unified-head p {
  word-break: keep-all !important;
  text-wrap: balance !important;
}

@media (min-width: 681px) {
  .faculty-unified-head .kicker {
    font-size: 0.85rem !important;
    margin-bottom: 6px !important;
  }
  .faculty-unified-head h3 {
    font-size: 1.95rem !important;
    margin-bottom: 10px !important;
  }
  .faculty-unified-head p {
    font-size: 1.05rem !important;
  }
  .faculty-unified-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 32px !important;
    max-width: 900px !important;
    width: 100% !important;
    margin: 34px auto 36px !important;
  }
  .faculty-unified-item {
    gap: 14px !important;
    width: 100% !important;
  }
  .faculty-unified-avatar {
    width: clamp(116px, 13vw, 152px) !important;
    height: clamp(116px, 13vw, 152px) !important;
    border-width: 4.5px !important;
    margin: 0 auto !important;
  }
  .faculty-unified-tag {
    font-size: 0.82rem !important;
    padding: 4px 12px !important;
    bottom: 2px !important;
    right: 2px !important;
    border-width: 2.5px !important;
  }
  .faculty-unified-name {
    font-size: 1.15rem !important;
    font-weight: 850 !important;
  }
  .faculty-unified-btn-wrap .btn {
    padding: 15px 34px !important;
    font-size: 1.05rem !important;
  }
}

@media (max-width: 680px) {
  .faculty-unified-card {
    padding: 24px 12px 22px !important;
    margin-bottom: 16px !important;
  }
  .faculty-unified-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 18px auto 20px !important;
  }
  .faculty-unified-item {
    min-width: 0 !important;
    width: 100% !important;
  }
  .faculty-unified-avatar {
    width: clamp(56px, 16vw, 74px) !important;
    height: clamp(56px, 16vw, 74px) !important;
    border-width: 2.5px !important;
    margin: 0 auto !important;
  }
  .faculty-unified-tag {
    font-size: 0.58rem !important;
    padding: 1px 5px !important;
    bottom: -2px !important;
    right: -2px !important;
  }
  .faculty-unified-name {
    font-size: clamp(0.70rem, 3.2vw, 0.82rem) !important;
    letter-spacing: -0.03em !important;
    white-space: nowrap !important;
  }
}

/* Home 3-Column Compact Left-Aligned Lecture Grid */
.home-lecture-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  justify-items: stretch;
  width: 100%;
}

.compact-lecture-card {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-radius: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

.compact-lecture-card .lecture-card-top {
  padding: 13px 14px 11px !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

.compact-lecture-card .lecture-card-meta-row {
  margin-bottom: 8px !important;
  gap: 6px !important;
}

.compact-lecture-card .lecture-card-pills .lvi-pill {
  font-size: 0.72rem !important;
  padding: 3px 8px !important;
}

.compact-lecture-card .lecture-card-meta-row .lvb-yt-btn {
  font-size: 0.72rem !important;
  padding: 3px 8px !important;
  width: auto !important;
}

.compact-lecture-card .lecture-card-title {
  font-size: clamp(0.82rem, 1.02vw, 0.94rem) !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.025em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.compact-lecture-card .lecture-video-wrap {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  border-radius: 0 0 16px 16px !important;
  flex-shrink: 0 !important;
}

@media (max-width: 980px) {
  .home-lecture-grid3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-lecture-grid3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ==========================================================================
   60-Second Concept Shorts Showcase (3-Column Grid Matching AP Subjects)
   ========================================================================== */
.hero-card {
  position: relative !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-card .hc-img {
  position: relative !important;
}

.hero-card .more {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-weight: 750;
  color: var(--primary);
  font-size: 0.9rem;
}

.hero-card .more svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hero-stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
  max-width: 560px;
}

.hero-stat-box {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 10px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

html.dark .hero-stat-box {
  background: rgba(30, 41, 59, 0.82);
}

.hero-stat-num {
  display: block;
  font-size: 0.96rem;
  font-weight: 850;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.hero-stat-lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
}

.hero-subject-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.hero-subj-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--text-main);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.hero-subj-pill:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--primary);
}

.faculty-unified-role {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--text-muted);
  margin-top: 2px;
}

.playlist-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 6px;
}

.playlist-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-sm);
}

.playlist-pill-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.shorts-showcase-wrap {
  margin-top: 28px;
  width: 100%;
}

.shorts-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 4px;
  flex-wrap: wrap;
}

.shorts-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 1.02rem;
  font-weight: 850;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.shorts-section-badge .shorts-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.shorts-filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.shorts-filter-btn {
  appearance: none;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 750;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.shorts-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.shorts-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.home-shorts-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  width: 100%;
}

.short-v-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.short-v-card[hidden] {
  display: none !important;
}

.short-v-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.28);
  box-shadow: 0 18px 36px -12px rgba(79, 70, 229, 0.14);
}

.short-v-head {
  padding: 13px 14px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.short-v-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.short-v-meta .lecture-card-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.short-v-meta .lvi-pill {
  font-size: 0.71rem !important;
  padding: 3px 8px !important;
}

.short-v-meta .lvb-yt-btn {
  font-size: 0.71rem !important;
  padding: 3px 8px !important;
  width: auto !important;
  flex-shrink: 0;
}

.lvi-pill.shorts-badge {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.24);
  font-weight: 800;
  border-radius: 999px;
}

html.dark .lvi-pill.shorts-badge {
  background: rgba(248, 113, 113, 0.16);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.short-v-title {
  font-size: clamp(0.84rem, 1.02vw, 0.95rem);
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.short-v-desc {
  font-size: 0.79rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}

.short-v-stage {
  background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 100%);
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}

.short-v-player {
  width: 196px;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.short-v-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.ib-lecture-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 16px;
  width: 100%;
}

/* Ensure [hidden] always hides flex/grid cards cleanly */
.short-v-card[hidden],
.ib-lecture-grid2[hidden],
.card[hidden],
[hidden] {
  display: none !important;
}

/* Compact Pill "Show More / Collapse" Toggle Button (Never full-width!) */
.more-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}

.more-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto !important;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #4f46e5;
  background: var(--bg-surface);
  border: 1.5px solid rgba(79, 70, 229, 0.28);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.08);
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: -0.01em;
}

html.dark .more-toggle-btn {
  color: #a5b4fc;
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(129, 140, 248, 0.35);
}

.more-toggle-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
  transform: translateY(-1px);
}

.more-toggle-btn .more-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  transition: all 0.18s ease;
}

html.dark .more-toggle-btn .more-count-pill {
  background: rgba(129, 140, 248, 0.18);
  color: #c7d2fe;
}

.more-toggle-btn:hover .more-count-pill {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* ==========================================================================
   Minimalist Frameless Cinema & Shorts Reel Showcase (Visual-First, Low-Text)
   ========================================================================== */
.visual-showcase-shell {
  position: relative;
  padding: 28px 26px 26px;
  border-radius: 28px;
  background: radial-gradient(circle at 15% 10%, rgba(79, 70, 229, 0.06) 0%, transparent 45%),
              radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.06) 0%, transparent 45%),
              var(--bg-surface);
  border: 1px solid rgba(79, 70, 229, 0.12);
  box-shadow: 0 20px 50px -20px rgba(15, 23, 42, 0.07);
}

html.dark .visual-showcase-shell {
  background: radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
              radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.1) 0%, transparent 45%),
              rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 163, 184, 0.16);
}

.cinema-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cinema-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.cinema-card:hover {
  transform: translateY(-4px);
}

.cinema-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #090d16;
  box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cinema-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.cinema-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.cinema-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cinema-dot.chem { background: #4f46e5; box-shadow: 0 0 8px rgba(79, 70, 229, 0.5); }
.cinema-dot.phys { background: #0ea5e9; box-shadow: 0 0 8px rgba(14, 165, 233, 0.5); }
.cinema-dot.bio  { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }

.cinema-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Frameless 5-Column Vertical Shorts Reel Row */
.shorts-reel-grid5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.shorts-reel-grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.reel-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.reel-card:hover {
  transform: translateY(-4px);
}

.reel-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: #090d16;
  box-shadow: 0 12px 26px -8px rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(79, 70, 229, 0.14);
}

.reel-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Instant Local Cover Photo Facade (Zero-Delay Click-to-Play) */
.yt-facade {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  overflow: hidden;
  background: #0f172a;
}

.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), filter 0.28s ease;
}

.yt-facade:hover img {
  transform: scale(1.03);
  filter: brightness(0.94);
}

.yt-play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 40px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
  pointer-events: none;
}

.reel-frame .yt-play-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.yt-facade:hover .yt-play-badge {
  transform: translate(-50%, -50%) scale(1.1);
  background: #ff0033;
  border-color: #ffffff;
}

.yt-play-badge svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
  margin-left: 2px;
}

.reel-label {
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}

/* Minimalist Homepage Blog Cards: Image + Short Title Only (Hide Long Paragraph) */
#featured-gallery .card .card-body p {
  display: none !important;
}

#featured-gallery .card .card-body {
  padding: 14px 16px 15px !important;
}

#featured-gallery .card .card-body h3 {
  margin-bottom: 0 !important;
  font-size: 0.96rem !important;
  line-height: 1.38 !important;
}

@media (max-width: 1024px) {
  .shorts-reel-grid5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .shorts-reel-grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .cinema-grid3 {
    grid-template-columns: 1fr;
  }
  .shorts-reel-grid5,
  .shorts-reel-grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .visual-showcase-shell {
    padding: 18px 14px;
    border-radius: 20px;
  }
}

@media (max-width: 980px) {
  .home-shorts-grid3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-shorts-grid3,
  .ib-lecture-grid2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .shorts-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* English Translated Chat Card & Multi-Image Grid inside Blog Posts */
.prose .english-chat-card {
  text-align: left;
  background: #edf3f7;
  border: 1px solid #dce6ed;
  border-radius: 20px;
  max-width: 720px;
  margin: 22px auto;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(18, 35, 63, 0.08);
}

html.dark .prose .english-chat-card {
  background: #131c2e;
  border-color: #26354d;
}

.prose .english-chat-heading {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  display: flex;
}

.prose .english-chat-mark {
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  border-radius: 12px;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 13px;
  font-weight: 800;
  display: grid;
  flex-shrink: 0;
}

.prose .english-chat-heading strong {
  color: var(--text-main);
  font-size: 0.95rem;
  display: block;
  line-height: 1.2;
}

.prose .english-chat-heading small {
  color: var(--text-muted);
  margin-top: 2px;
  font-size: 0.78rem;
  display: block;
}

.prose .english-chat-messages {
  padding: 18px 20px;
}

.prose .english-chat-row {
  justify-content: flex-start;
  margin: 0 0 12px;
  display: flex;
}

.prose .english-chat-row:last-child {
  margin-bottom: 0;
}

.prose .english-chat-teacher {
  justify-content: flex-end;
}

.prose .english-chat-bubble {
  color: #182b3e;
  background: #ffffff;
  border-radius: 4px 16px 16px 16px;
  max-width: 86%;
  padding: 12px 16px;
  box-shadow: 0 2px 6px rgba(18, 35, 63, 0.06);
}

html.dark .prose .english-chat-bubble {
  background: #1e293b;
  color: #f1f5f9;
}

.prose .english-chat-teacher .english-chat-bubble {
  background: #ffeb8c;
  color: #182b3e;
  border-radius: 16px 4px 16px 16px;
}

.prose .english-chat-speaker {
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.3;
  display: block;
  text-transform: uppercase;
}

.prose .english-chat-teacher .english-chat-speaker {
  color: #5c4d00;
}

.prose .english-chat-bubble p {
  white-space: pre-line;
  overflow-wrap: anywhere;
  margin: 0 !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  color: inherit !important;
}

.prose .english-chat-divider {
  text-align: center;
  color: var(--text-muted);
  padding: 10px 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
}

.prose .english-chat-note {
  color: var(--text-muted) !important;
  padding: 0 20px 14px !important;
  margin: 0 !important;
  font-size: 0.8rem !important;
  line-height: 1.5 !important;
}

.prose .english-chat-original {
  color: var(--text-muted);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 12px 20px;
  font-size: 0.82rem;
}

.prose .english-chat-original summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
}

.prose .english-chat-original img {
  margin-top: 14px;
  border-radius: 10px;
}

.prose .blog-image-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
  margin: 18px 0;
}

.prose .blog-image-group img {
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  border-radius: 12px;
}

@media (max-width: 600px) {
  .prose .english-chat-card {
    border-radius: 14px;
  }
  .prose .english-chat-heading {
    padding: 13px 15px;
  }
  .prose .english-chat-messages {
    padding: 14px 12px;
  }
  .prose .english-chat-bubble {
    max-width: 92%;
    padding: 10px 13px;
  }
  .prose .blog-image-group {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   DESIGN POLISH v3 — Site-wide Consistency Layer (tokens · headings · cards · CTA)
   ========================================================================== */
:root {
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --border-subtle: #e6eaf2;
  --bg-card: #ffffff;
  --bg-canvas: #f8fafc;
  --brand-grad: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
html.dark {
  --border-subtle: #1f2a3d;
  --bg-card: #121827;
  --bg-canvas: #0b0f19;
}

html { scroll-behavior: smooth; }
::selection { background: rgba(79, 70, 229, 0.18); color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

/* ---- 1. Unified section headings: small gradient kicker + bold title ---- */
.sec-head.center .kicker,
.faculty-unified-head .kicker {
  display: inline-block;
  font-size: 0.74rem !important;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 8px !important;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sec-head.center h2,
.faculty-unified-head h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.95rem) !important;
  font-weight: 850 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.25 !important;
  color: var(--text-main);
}
.sec-head.center { margin-bottom: 26px !important; }

/* Page hero pill (no emoji, clean) */
.page-kicker-pill {
  letter-spacing: 0.16em !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 6px 14px !important;
}

/* ---- 2. One shared "panel" look for faculty card & video showcase ---- */
#about-teacher .faculty-unified-card,
.visual-showcase-shell {
  max-width: none !important;
  width: 100% !important;
  border-radius: var(--radius-2xl) !important;
  border: 1px solid rgba(79, 70, 229, 0.12) !important;
  background: radial-gradient(circle at 12% 8%, rgba(79, 70, 229, 0.06) 0%, transparent 42%),
              radial-gradient(circle at 88% 92%, rgba(6, 182, 212, 0.06) 0%, transparent 42%),
              var(--bg-surface) !important;
  box-shadow: 0 24px 60px -28px rgba(15, 23, 42, 0.14) !important;
}
html.dark #about-teacher .faculty-unified-card,
html.dark .visual-showcase-shell {
  border-color: rgba(148, 163, 184, 0.16) !important;
  background: radial-gradient(circle at 12% 8%, rgba(99, 102, 241, 0.12) 0%, transparent 42%),
              radial-gradient(circle at 88% 92%, rgba(6, 182, 212, 0.1) 0%, transparent 42%),
              rgba(15, 23, 42, 0.75) !important;
}
#about-teacher .faculty-unified-card { margin-bottom: 0 !important; }
#about-teacher .faculty-unified-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.35) !important;
}

/* ---- 3. Visual cards: softer radius, lift + image zoom, glass badge ---- */
.card.visual-card {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-subtle) !important;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s ease;
}
.card.visual-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -22px rgba(15, 23, 42, 0.28);
  border-color: rgba(79, 70, 229, 0.28) !important;
}
.card.visual-card .card-img { overflow: hidden; }
.card.visual-card .card-img img { transition: transform 0.5s var(--ease-out); }
.card.visual-card:hover .card-img img { transform: scale(1.04); }
.card.visual-card .card-body time {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.01em;
}
.card.visual-card .card-body h3 { letter-spacing: -0.025em; }

/* Category chip on photos: readable dark glass instead of washed-out amber */
.card-badge {
  background: rgba(15, 23, 42, 0.62) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) !important;
  font-weight: 750 !important;
  letter-spacing: 0.01em;
}

/* ---- 4. Video & Shorts frames: consistent radius + quiet play badge ---- */
.cinema-frame, .reel-frame { border-radius: var(--radius-lg) !important; overflow: hidden; }
.yt-facade::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 23, 42, 0.18) 100%);
  pointer-events: none;
}
.yt-play-badge { z-index: 1; }

/* ---- 5. Consultation CTA: balanced, centered, single focal button ---- */
.cta-in {
  position: relative;
  overflow: hidden;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 22px !important;
  padding: 52px 40px !important;
  border-radius: var(--radius-2xl) !important;
  background: var(--brand-grad) !important;
}
.cta-in::before, .cta-in::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.10);
}
.cta-in::before { width: 280px; height: 280px; top: -120px; left: -80px; }
.cta-in::after  { width: 220px; height: 220px; bottom: -110px; right: -60px; }
.cta-in > * { position: relative; z-index: 1; }
.cta-in h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem) !important; margin-bottom: 8px !important; }
.cta-in p { margin: 0 auto !important; max-width: 520px !important; opacity: 0.92; }
.cta-in .kakao-btn {
  padding: 12px 26px !important;
  font-size: 0.95rem !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease;
}
.cta-in .kakao-btn:hover { transform: translateY(-2px); }

/* ---- 6. Universities (About): light pill cloud instead of heavy boxes ---- */
.dest-list {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px !important;
  max-width: 920px;
  margin: 0 auto;
  padding: 0;
}
.dest-list li {
  padding: 10px 18px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border-subtle) !important;
  background: var(--bg-surface) !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: var(--text-main);
  box-shadow: 0 2px 8px -4px rgba(15, 23, 42, 0.1);
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.dest-list li:hover { border-color: rgba(79, 70, 229, 0.4) !important; transform: translateY(-2px); }
.dest-list li::before {
  content: "" !important;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand-grad);
  flex-shrink: 0;
}
.marquee .dest-list, .mq-track .dest-list { max-width: none; }

/* ---- 7. Faculty detail cards (About): unified radius + soft hover ---- */
.faculty-card {
  border-radius: var(--radius-xl) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: 0 14px 36px -24px rgba(15, 23, 42, 0.22) !important;
}

/* ---- 8. Buttons: one pill shape language ---- */
.btn { border-radius: 999px !important; transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease, background 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.more-toggle-btn { transition: transform 0.2s var(--ease-out), background 0.2s ease, border-color 0.2s ease; }
.more-toggle-btn:hover { transform: translateY(-1px); }

/* ---- 9. Rhythm: consistent vertical spacing between sections ---- */
main > .section + .section { margin-top: 8px; }
#home-lectures { padding-top: 56px !important; }
#featured-gallery { padding-top: 40px !important; }

@media (max-width: 720px) {
  .cta-in { padding: 40px 22px !important; }
  .dest-list li { font-size: 0.84rem !important; padding: 8px 14px !important; }
  #home-lectures { padding-top: 36px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---- 10. Polish v3 fine-tuning ---- */
.faculty-card .btn,
.faculty-grid .btn { border-radius: 999px !important; padding-left: 16px !important; padding-right: 16px !important; }
.section:has(.faculty-grid) { padding-bottom: 8px !important; }
.section:has(.dest-list) { padding-top: 48px !important; }
#about-teacher .faculty-unified-card { padding: 40px 40px 36px !important; }
#about-teacher .faculty-unified-row { margin-bottom: 0 !important; }
.cta { margin-top: 24px !important; }

@media (max-width: 560px) {
  #about-teacher .faculty-unified-card { padding: 30px 18px 26px !important; }
  #about-teacher .faculty-unified-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px 12px !important;
    justify-items: center;
  }
  #about-teacher .faculty-unified-name { font-size: 0.86rem !important; white-space: nowrap; }
}

/* ==========================================================================
   RESPONSIVE SYSTEM v4 — one look on Phone (<600) · Tablet (600–1023) · Laptop (≥1024)
   + Blog list / post beautification
   ========================================================================== */

/* ---------- Shared card grid: 3 → 2 → compact list ---------- */
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 24px !important; }
.card.visual-card .card-body { padding: 18px 20px 20px !important; gap: 8px !important; }
.card.visual-card .card-body h3 { font-size: 1.04rem !important; line-height: 1.45 !important; }

@media (max-width: 1023px) {
  .grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px !important; }
}

/* ---------- Blog list: hero, chips, featured latest card, pagination ---------- */
.page-hero {
  background: radial-gradient(ellipse at 20% 0%, rgba(79, 70, 229, 0.09) 0%, transparent 55%),
              radial-gradient(ellipse at 85% 30%, rgba(6, 182, 212, 0.08) 0%, transparent 55%),
              var(--bg-page) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}
.page-hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.3rem) !important; letter-spacing: -0.035em !important; }
.page-hero .hero-sub-center { color: var(--text-subtle) !important; font-size: 0.98rem !important; }

.chips.center .chip {
  border-radius: 999px !important;
  border: 1px solid var(--border-subtle) !important;
  background: var(--bg-surface) !important;
  font-weight: 700 !important;
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease, box-shadow 0.2s ease;
}
.chips.center .chip:hover { transform: translateY(-1px); border-color: rgba(79, 70, 229, 0.35) !important; }
.chips.center .chip.on {
  background: var(--brand-grad) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 20px -10px rgba(79, 70, 229, 0.6);
}

/* Featured (latest) post on page 1 of blog / category lists */
.page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child {
  grid-column: 1 / -1;
}
@media (min-width: 600px) {
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-link {
    flex-direction: row;
    align-items: stretch;
  }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-img {
    width: 58%;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
  }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-body {
    justify-content: center;
    padding: 32px 36px !important;
    gap: 12px !important;
  }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-body h3 {
    font-size: clamp(1.25rem, 2.2vw, 1.65rem) !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: 3;
  }
}
.page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-body::before {
  content: "LATEST";
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pagination { gap: 6px !important; margin-top: 44px !important; }
.pg {
  border-radius: 999px !important;
  border: 1px solid var(--border-subtle) !important;
  min-width: 40px !important;
  height: 40px !important;
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}
.pg:hover { transform: translateY(-1px); border-color: rgba(79, 70, 229, 0.35) !important; }
.pg.on { background: var(--brand-grad) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 8px 18px -10px rgba(79, 70, 229, 0.7); }
.pg.dots { border: 0 !important; }

/* ---------- Blog post page ---------- */
.post-hero {
  background: radial-gradient(ellipse at 20% 0%, rgba(79, 70, 229, 0.09) 0%, transparent 55%),
              radial-gradient(ellipse at 85% 40%, rgba(6, 182, 212, 0.08) 0%, transparent 55%),
              var(--bg-page) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}
.post-hero h1, .post-title-center {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem) !important;
  letter-spacing: -0.035em !important;
  line-height: 1.28 !important;
  text-wrap: balance;
  word-break: keep-all;
}
.post-meta.center { border-top: 0 !important; gap: 10px 16px !important; }
.post-meta .alt-lang { border-color: var(--border-subtle) !important; }

.prose { font-size: 1.08rem !important; line-height: 1.88 !important; }
.prose > p:first-of-type { font-size: 1.12rem !important; }
.prose h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem) !important;
  padding-left: 14px !important;
  border-left: 4px solid transparent;
  border-image: var(--brand-grad) 1;
}
.prose figure img {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.35) !important;
}
.prose figure img:hover { transform: none !important; }
.prose figcaption { font-size: 0.8rem !important; margin-top: 10px !important; color: var(--text-subtle); }
.prose blockquote {
  font-style: normal !important;
  border-left: 0 !important;
  border-radius: var(--radius-md) !important;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(6, 182, 212, 0.06)) !important;
  padding: 16px 20px !important;
  position: relative;
}
.prose a { text-decoration-thickness: 1.5px; text-decoration-color: rgba(79, 70, 229, 0.4); }
.prose a:hover { text-decoration-color: currentColor; }

.toc {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-subtle) !important;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.04), rgba(6, 182, 212, 0.04)), var(--bg-surface) !important;
}

.post-foot { border-top: 1px solid var(--border-subtle) !important; }
.share-row a, .share-row button {
  border-radius: 999px !important;
  border-color: var(--border-subtle) !important;
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease, color 0.2s ease;
}
.share-row a:hover, .share-row button:hover { transform: translateY(-1px); }
.author-box {
  border-radius: var(--radius-xl) !important;
  border: 1px solid transparent !important;
  background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
              var(--brand-grad) border-box !important;
  box-shadow: 0 16px 36px -26px rgba(79, 70, 229, 0.5);
}
.author-box img { border: 2px solid #fff !important; box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.35); }
.prevnext .pn {
  border-radius: var(--radius-lg) !important;
  border-color: var(--border-subtle) !important;
  transition: transform 0.25s var(--ease-out), border-color 0.2s ease, box-shadow 0.25s ease;
}
.prevnext .pn:hover {
  background: var(--bg-surface) !important;
  border-color: rgba(79, 70, 229, 0.35) !important;
  box-shadow: 0 16px 32px -22px rgba(15, 23, 42, 0.35);
}

/* ---------- Home hero: keep the visual tidy on tablet ---------- */
@media (max-width: 1023px) {
  .hero-visual { max-width: 560px; width: 100%; margin-left: auto; margin-right: auto; }
}

/* ---------- Tablet: 3 lectures + all 5 shorts in one row ---------- */
@media (min-width: 600px) and (max-width: 1023px) {
  .cinema-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 12px !important; }
  .shorts-reel-grid5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 10px !important; }
  .shorts-reel-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 10px !important; }
  .cinema-title { font-size: 0.78rem !important; }
  .reel-label { font-size: 0.72rem !important; }
  .reel-frame .yt-play-badge { width: 38px; height: 38px; }
  .visual-showcase-shell { padding: 20px 18px !important; }
}

/* ---------- Phone ---------- */
@media (max-width: 599px) {
  /* Swipe strips for the top lectures & shorts (no long vertical stacks) */
  .cinema-grid3,
  .shorts-reel-grid5 {
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding: 2px 14px 6px;
    scroll-padding: 0 14px;
    scrollbar-width: none;
  }
  .cinema-grid3::-webkit-scrollbar,
  .shorts-reel-grid5::-webkit-scrollbar { display: none; }
  .cinema-grid3 > .cinema-card { flex: 0 0 84%; scroll-snap-align: start; }
  .shorts-reel-grid5 > .reel-card { flex: 0 0 43%; scroll-snap-align: start; }
  .shorts-reel-grid5 { margin-top: 16px !important; }
  .visual-showcase-shell { padding: 18px 14px 20px !important; border-radius: var(--radius-xl) !important; }

  /* Compact list cards (thumbnail + title) — far less scrolling */
  .grid.g3 { grid-template-columns: 1fr !important; gap: 12px !important; }
  .grid.g3 > .card.visual-card .card-link { flex-direction: row; align-items: center; }
  .grid.g3 > .card.visual-card .card-img {
    width: 108px;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0;
    border-radius: 12px;
    margin: 10px 0 10px 10px;
  }
  .grid.g3 > .card.visual-card .card-badge { display: none !important; }
  .grid.g3 > .card.visual-card .card-body { padding: 12px 14px !important; gap: 4px !important; }
  .grid.g3 > .card.visual-card .card-body h3 { font-size: 0.95rem !important; -webkit-line-clamp: 3; }
  .grid.g3 > .card.visual-card .card-body time { font-size: 0.74rem; }
  .card.visual-card:hover { transform: none; }

  /* Blog page 1: the featured latest post stays a big hero card */
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-link { flex-direction: column; align-items: stretch; }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-img { width: auto; aspect-ratio: 16 / 10 !important; margin: 0; border-radius: 0; }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-badge { display: inline-flex !important; }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-body { padding: 16px 18px 18px !important; }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-body h3 { font-size: 1.1rem !important; }

  /* Post reading comfort */
  .prose { font-size: 1.01rem !important; line-height: 1.82 !important; }
  .prose > p:first-of-type { font-size: 1.04rem !important; }
  .prose figure { margin: 1.8em 0 !important; }
  .author-box { padding: 18px !important; gap: 14px !important; }
  .prevnext { grid-template-columns: 1fr !important; gap: 10px !important; }
  .prevnext .pn.next { text-align: left; align-items: flex-start; }

  .pg { min-width: 36px !important; height: 36px !important; font-size: 0.88rem !important; }
  .sec-head.center h2 { font-size: 1.4rem !important; }
}

/* ---------- Blog page 1: balanced grids (no orphan cards) ---------- */
@media (min-width: 1024px) {
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-link {
    flex-direction: column;
  }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-img {
    width: 100%;
    aspect-ratio: auto;
    flex: 1 1 auto;
    min-height: 300px;
  }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:first-child .card-body {
    flex: 0 0 auto;
    padding: 24px 28px 26px !important;
  }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:last-child:nth-child(even) {
    grid-column: 1 / -1;
  }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:last-child:nth-child(even) .card-link { flex-direction: row; }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:last-child:nth-child(even) .card-img { width: 50%; flex-shrink: 0; }
  .page-hero:has(.chips) + .section:is(:has(.pagination > .pg.on:first-child), :not(:has(.pagination))) .grid.g3 > .card:last-child:nth-child(even) .card-body { justify-content: center; }
}

/* Related posts (3 cards) stay in one row on tablet — no orphan */
@media (min-width: 600px) and (max-width: 1023px) {
  .post ~ .section .grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px !important; }
  .post ~ .section .grid.g3 .card-body { padding: 14px 14px 16px !important; }
  .post ~ .section .grid.g3 .card-body h3 { font-size: 0.92rem !important; }
}

/* Keep the showcase panel inside the viewport when it holds swipe strips */
.visual-showcase-shell { min-width: 0; max-width: 100% !important; box-sizing: border-box; }
#mainPlayer, #home-lectures { min-width: 0; }
#mainPlayer > *, #home-lectures > * { min-width: 0; }
@media (max-width: 599px) { .visual-showcase-shell { overflow: hidden; } }

/* Hide redundant page-hero subtitles ("화학 · 생물 · 물리 10년+ 과목별 전담 강사진", "제자들의 실제 합격 기록과 과목별 공부법" etc.) */
.page-hero .hero-sub-center, .page-hero .page-sub { display: none !important; }

/* === STAFF SCHEDULE & SESSION TRACKER (/staff/) === */
.staff-folders {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 600px) {
  .staff-folders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.folder-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 16px;
  font-size: 0.96rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.18s ease;
}
.folder-tab svg {
  opacity: 0.7;
}
.folder-tab:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  color: var(--text-main);
}
.folder-tab.bio.active {
  background: #059669;
  border-color: #059669;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(5, 150, 105, 0.45);
}
.folder-tab.chem.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(79, 70, 229, 0.45);
}
.folder-tab.phys.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(2, 132, 199, 0.45);
}
.folder-tab.math.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(124, 58, 237, 0.45);
}
.folder-tab.active svg {
  opacity: 1;
}

.min-cal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 760px) {
  .min-cal-grid {
    grid-template-columns: 1fr;
  }
}
.min-day-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 4px solid #059669;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.min-day-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.min-day-title {
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  color: var(--text-main);
}
.subj-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}
.subj-tag.bio {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.dark .subj-tag.bio {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}
.min-time {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.min-st-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.st-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 650;
  background: var(--bg-subtle);
  color: var(--text-main);
}
.st-pill b {
  font-size: 0.8rem;
  font-weight: 850;
}
.st-pill.due {
  background: rgba(225, 29, 72, 0.12);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.25);
}
.st-pill.soon {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
.dark .st-pill.due { color: #fda4af; }
.dark .st-pill.soon { color: #fcd34d; }

/* Minimal 4/8 Sessions Ending Box */
.min-end-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.min-end-hdr {
  padding: 14px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-main);
}
.min-end-list {
  display: flex;
  flex-direction: column;
}
.min-end-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.min-end-row:last-child {
  border-bottom: none;
}
.min-end-row .st-name {
  font-weight: 800;
  color: var(--text-main);
}
.min-end-row .st-slot {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .min-end-row {
    grid-template-columns: auto 1fr;
    gap: 8px 10px;
  }
}
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.status-chip.due {
  background: rgba(225, 29, 72, 0.12);
  color: #be123c;
}
.status-chip.soon {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}
.dark .status-chip.due { color: #fda4af; }
.dark .status-chip.soon { color: #fcd34d; }

.empty-folder-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 64px 20px;
  background: var(--bg-surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: 18px;
  color: var(--text-subtle);
  font-size: 0.95rem;
}


/* === BIO PASSCODE LOCK GATE === */
.staff-lock-card {
  max-width: 360px;
  margin: 28px auto;
  padding: 32px 28px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.lock-icon-wrap {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lock-title {
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.lock-form {
  display: flex;
  gap: 8px;
}
.lock-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.lock-input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  background: var(--bg-surface);
}
.lock-btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  background: #059669;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
}
.lock-btn:hover {
  background: #047857;
  transform: translateY(-1px);
}
.lock-err {
  margin: 10px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e11d48;
}

/* === STRUCTURED CURRICULUM TABS & VIDEO BADGES === */
.curr-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 20px;
  padding: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}
@media (max-width: 680px) {
  .curr-tabs {
    border-radius: 18px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.curr-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
@media (max-width: 680px) {
  .curr-tab {
    border-radius: 12px;
    padding: 9px 10px;
    font-size: 0.8rem;
  }
}
.curr-tab:hover {
  color: var(--text-main);
}
.curr-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}
.dark .curr-tab.active {
  background: #1e293b;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.curr-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.curr-group-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #4f46e5;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.22);
}
.dark .curr-group-badge {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(129, 140, 248, 0.3);
}
.curr-group-badge.chem {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.25);
}
.curr-group-badge.phys {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.25);
}
.curr-group-badge.bio {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.25);
}
.dark .curr-group-badge.chem { color: #a5b4fc; }
.dark .curr-group-badge.phys { color: #7dd3fc; }
.dark .curr-group-badge.bio { color: #6ee7b7; }

.vid-subj-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.vid-subj-pill.chem { background: rgba(79, 70, 229, 0.88); }
.vid-subj-pill.phys { background: rgba(2, 132, 199, 0.88); }
.vid-subj-pill.bio { background: rgba(5, 150, 105, 0.88); }
.vid-subj-pill.story { background: rgba(225, 29, 72, 0.9); }

.cinema-grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1023px) {
  .cinema-grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  .cinema-grid4 {
    grid-template-columns: 1fr;
  }
}

.reel-frame .vid-subj-pill {
  top: auto;
  bottom: 10px;
  left: 10px;
}

.shorts-reel-grid5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1023px) {
  .shorts-reel-grid5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .story-tab-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 599px) {
  .shorts-reel-grid5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.showcase-more-bar {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}
.showcase-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-surface, #ffffff);
  color: var(--text-main, #0f172a);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
}
.showcase-more-btn:hover {
  border-color: var(--primary, #4f46e5);
  color: var(--primary, #4f46e5);
  transform: translateY(-1px);
}
.showcase-more-btn.open svg {
  transform: rotate(180deg);
}

/* Tablet & Mobile Horizontal Slide Carousel for Lectures & Shorts (Zero Endless Vertical Scroll) */
@media (max-width: 1024px) {
  .shorts-reel-grid4,
  .shorts-reel-grid5 {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px !important;
    padding-bottom: 10px;
    scrollbar-width: thin;
  }
  .shorts-reel-grid4 > .reel-card,
  .shorts-reel-grid5 > .reel-card {
    flex: 0 0 210px !important;
    max-width: 210px !important;
    scroll-snap-align: start;
  }
  .cinema-grid3 {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px !important;
    padding-bottom: 10px;
    scrollbar-width: thin;
  }
  .cinema-grid3 > .cinema-card {
    flex: 0 0 320px !important;
    max-width: 320px !important;
    scroll-snap-align: start;
  }
}
@media (max-width: 600px) {
  .shorts-reel-grid4 > .reel-card,
  .shorts-reel-grid5 > .reel-card {
    flex: 0 0 172px !important;
    max-width: 172px !important;
  }
  .cinema-grid3 > .cinema-card {
    flex: 0 0 276px !important;
    max-width: 276px !important;
  }
}

/* Force 5 Category Tabs onto 1 Single Line on All Devices (Including Mobile) */
.curr-tabs {
  flex-wrap: nowrap !important;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.curr-tabs::-webkit-scrollbar {
  display: none;
}
.curr-tab {
  white-space: nowrap !important;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .curr-tabs {
    padding: 4px !important;
    gap: 4px !important;
  }
  .curr-tab {
    padding: 7px 11px !important;
    font-size: 0.78rem !important;
  }
}
@media (max-width: 480px) {
  .curr-tabs {
    padding: 3px !important;
    gap: 2px !important;
    display: flex !important;
    justify-content: space-between;
    width: 100%;
  }
  .curr-tab {
    padding: 6px 7px !important;
    font-size: 0.71rem !important;
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}

/* Study Book PDF Download Button inside Lecture Cards */
.cinema-book-bar {
  margin-top: 8px;
}
.cinema-book-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none !important;
  transition: all 0.18s ease;
  border: 1px solid rgba(79, 70, 229, 0.22);
  background: rgba(79, 70, 229, 0.07);
  color: #4f46e5;
}
.cinema-book-btn.phys {
  border-color: rgba(2, 132, 199, 0.24);
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
}
.cinema-book-btn.bio {
  border-color: rgba(5, 150, 105, 0.24);
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
}
.cinema-book-btn:hover {
  transform: translateY(-1px);
  background: #4f46e5;
  color: #ffffff !important;
}
.cinema-book-btn.phys:hover {
  background: #0284c7;
  color: #ffffff !important;
}
.cinema-book-btn.bio:hover {
  background: #059669;
  color: #ffffff !important;
}
.dark .cinema-book-btn { color: #a5b4fc; background: rgba(79, 70, 229, 0.16); }
.dark .cinema-book-btn.phys { color: #7dd3fc; background: rgba(2, 132, 199, 0.16); }
.dark .cinema-book-btn.bio { color: #6ee7b7; background: rgba(5, 150, 105, 0.16); }

/* Nicole PIMSO Olympiad Awards Modal Gallery & Clean Top-Hero Aurora Design */

/* 1. Top Hero & Page-Hero Soft Aurora Glow ONLY (Clean page body below, NO floating shapes) */
.hero-bg .orb {
  display: block !important;
  opacity: 0.35 !important;
  filter: blur(90px) !important;
}
.page-hero,
.post-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(99, 102, 241, 0.14) 0%, transparent 48%),
    radial-gradient(circle at 82% 25%, rgba(6, 182, 212, 0.14) 0%, transparent 48%),
    radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
    var(--bg-page) !important;
}
html.dark .page-hero,
html.dark .post-hero {
  background:
    radial-gradient(circle at 18% 20%, rgba(99, 102, 241, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 82% 25%, rgba(6, 182, 212, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.12) 0%, transparent 52%),
    var(--bg-page) !important;
}

/* 2. Desktop Grid vs Mobile: Initial Row = Touch Slide, Expanded '+ 더보기' Drawer = Vertical Grid */
@media (min-width: 769px) and (max-width: 1024px) {
  .shorts-reel-grid4 {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
  }
  .shorts-reel-grid4 > .reel-card {
    flex: none !important;
    max-width: none !important;
  }
  .shorts-reel-grid5 {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
  }
  .shorts-reel-grid5 > .reel-card {
    flex: none !important;
    max-width: none !important;
  }
  .cinema-grid3 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
  }
  .cinema-grid3 > .cinema-card {
    flex: none !important;
    max-width: none !important;
  }
}
@media (max-width: 768px) {
  /* 처음에 보여줄 때 (Initial visible rows on mobile): Smooth Horizontal Touch Slide */
  .shorts-reel-grid4,
  .shorts-reel-grid5,
  .story-pure-shorts {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 12px !important;
    padding-bottom: 6px !important;
    scrollbar-width: none !important;
  }
  .shorts-reel-grid4 > .reel-card,
  .shorts-reel-grid5 > .reel-card,
  .story-pure-shorts > .reel-card {
    flex: 0 0 68vw !important;
    max-width: 230px !important;
    scroll-snap-align: start !important;
  }
  .cinema-grid3 {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 14px !important;
    padding-bottom: 6px !important;
    scrollbar-width: none !important;
  }
  .cinema-grid3 > .cinema-card {
    flex: 0 0 84vw !important;
    max-width: 340px !important;
    scroll-snap-align: start !important;
  }

  /* '+ 더보기' 클릭했을 때 (Expanded drawer on mobile): 주루룩 펼쳐지는 세로 그리드 */
  .showcase-more-drawer .shorts-reel-grid4,
  .showcase-more-drawer .shorts-reel-grid5 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow-x: visible !important;
    gap: 12px !important;
    padding-bottom: 0 !important;
  }
  .showcase-more-drawer .shorts-reel-grid4 > .reel-card,
  .showcase-more-drawer .shorts-reel-grid5 > .reel-card {
    flex: none !important;
    max-width: none !important;
  }
  .showcase-more-drawer .cinema-grid3 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    overflow-x: visible !important;
    gap: 14px !important;
    padding-bottom: 0 !important;
  }
  .showcase-more-drawer .cinema-grid3 > .cinema-card {
    flex: none !important;
    max-width: none !important;
  }
}
.shorts-reel-grid4,
.shorts-reel-grid5,
.story-pure-shorts,
.cinema-grid3 {
  scrollbar-width: none !important;
}
.shorts-reel-grid4::-webkit-scrollbar,
.shorts-reel-grid5::-webkit-scrollbar,
.story-pure-shorts::-webkit-scrollbar,
.cinema-grid3::-webkit-scrollbar {
  display: none !important;
}

/* 5. Clean Editorial Group Headings inside Showcase */
.curr-group-head {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin-bottom: 16px !important;
}
.curr-group-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.3), rgba(6, 182, 212, 0.2), transparent);
}
.curr-group-badge,
.curr-group-badge.chem,
.curr-group-badge.phys,
.curr-group-badge.bio {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 1.02rem !important;
  font-weight: 850 !important;
  letter-spacing: -0.025em !important;
  color: var(--text-main, #0f172a) !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.curr-group-badge::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 99px;
  background: linear-gradient(180deg, #4f46e5 0%, #06b6d4 100%);
  flex-shrink: 0;
}
.dark .curr-group-badge,
.dark .curr-group-badge.chem,
.dark .curr-group-badge.phys,
.dark .curr-group-badge.bio {
  color: #f8fafc !important;
}

/* 6. Clean More / View All Button with Subtle Gradient Hover */
.showcase-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: #4f46e5;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: 0 6px 18px -6px rgba(79, 70, 229, 0.22);
  transition: all 0.2s ease;
}
.dark .showcase-more-btn {
  background: rgba(30, 41, 59, 0.9);
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.35);
}
.showcase-more-btn:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border-color: transparent;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(79, 70, 229, 0.45);
}
.showcase-more-btn.open svg {
  transform: rotate(180deg);
}

/* YouTube Playlist Overlay Badge on Thumbnail */
.yt-pl-pill {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* 6b. Numbered Pagination Pills (1, 2, 3...) & Unobtrusive Bottom-Right Play Badge */
.cinema-frame .yt-play-badge,
.reel-frame .yt-play-badge {
  left: auto !important;
  top: auto !important;
  right: 12px !important;
  bottom: 12px !important;
  transform: none !important;
  width: 44px !important;
  height: 32px !important;
  border-radius: 9px !important;
}
.cinema-frame .yt-facade:hover .yt-play-badge,
.reel-frame .yt-facade:hover .yt-play-badge {
  transform: scale(1.08) !important;
}
.showcase-page-pane[hidden] {
  display: none !important;
}
.showcase-page-pane.active {
  display: block;
  animation: showcaseFadeIn 0.22s ease;
}
@keyframes showcaseFadeIn {
  from { opacity: 0.4; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.showcase-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.showcase-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.dark .showcase-page-btn {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}
.showcase-page-btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  transform: translateY(-1px);
}
.dark .showcase-page-btn:hover {
  border-color: #818cf8;
  color: #a5b4fc;
}
.showcase-page-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px -4px rgba(79, 70, 229, 0.45);
}

/* Hero Intro Video Card (Top of Homepage replacing Blog Card) */
.hero-video-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-surface, #ffffff);
  border: 1px solid rgba(99, 102, 241, 0.28);
  box-shadow:
    0 24px 48px -14px rgba(79, 70, 229, 0.25),
    0 0 32px rgba(6, 182, 212, 0.12);
}
.dark .hero-video-card {
  background: #0f172a;
  border-color: rgba(129, 140, 248, 0.28);
}
.hero-video-card .cinema-frame {
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
.hero-video-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface, #ffffff);
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}
.dark .hero-video-bar {
  background: #0f172a;
  border-top-color: rgba(148, 163, 184, 0.16);
}
.hero-video-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  flex-shrink: 0;
}
.dark .hero-video-tag {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
}
.hero-video-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .hero-video-title {
  color: #f8fafc;
}
.hero-video-time {
  font-size: 0.76rem;
  font-weight: 800;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.dark .hero-video-time {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.2);
}

/* Tab 2: Pure Video Layout (Big 10-Year Video on LEFT + 2 Story Shorts on RIGHT on Page 1; Page 2 turns completely) */
.story-pure-video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}
.story-pure-shorts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.story-page-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 235px)) !important;
  gap: 18px !important;
  justify-content: start !important;
}

/* Unified Lecture Card + Study Book Footer */
.cinema-card.has-book {
  gap: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: var(--bg-surface, #ffffff) !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  box-shadow: 0 12px 28px -12px rgba(15, 23, 42, 0.16) !important;
}
.dark .cinema-card.has-book {
  background: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
}
.cinema-card.has-book .cinema-frame {
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
.cinema-book-bar {
  margin-top: 0 !important;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: var(--bg-surface, #ffffff);
}
.dark .cinema-book-bar {
  background: #0f172a;
  border-top-color: rgba(148, 163, 184, 0.16);
}
.cinema-book-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 10px 14px !important;
  border-radius: 0 !important;
  border: none !important;
  background: transparent !important;
  color: var(--text-main, #0f172a) !important;
  text-decoration: none !important;
  transition: background 0.18s ease !important;
}
.dark .cinema-book-btn {
  color: #f8fafc !important;
}
.book-btn-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.book-pdf-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
  flex-shrink: 0;
}
.dark .book-pdf-tag {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}
.book-btn-title {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--text-main, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .book-btn-title {
  color: #e2e8f0;
}
.book-btn-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  transition: all 0.18s ease;
  flex-shrink: 0;
}
.dark .book-btn-right {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.18);
}
.cinema-book-btn:hover {
  background: rgba(79, 70, 229, 0.04) !important;
  transform: none !important;
}
.cinema-book-btn:not(.cinema-frq-row):hover .book-btn-right {
  background: #4f46e5;
  color: #ffffff;
}
.cinema-frq-row {
  cursor: default !important;
}
.cinema-frq-row:hover {
  background: transparent !important;
}
.book-label-static {
  cursor: default !important;
  pointer-events: none !important;
  user-select: none;
}
.frq-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.frq-dl-pill {
  text-decoration: none !important;
  padding: 5px 10px !important;
  font-size: 0.74rem !important;
  border: 1px solid rgba(79, 70, 229, 0.28) !important;
  background: rgba(79, 70, 229, 0.09) !important;
  color: #4f46e5 !important;
  cursor: pointer;
  transition: all 0.16s ease !important;
}
.dark .frq-dl-pill {
  background: rgba(99, 102, 241, 0.2) !important;
  border-color: rgba(129, 140, 248, 0.35) !important;
  color: #a5b4fc !important;
}
.frq-dl-pill:hover {
  background: #4f46e5 !important;
  border-color: #4f46e5 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}
.frq-dl-pill.sg {
  color: #0f766e !important;
  background: rgba(13, 148, 136, 0.1) !important;
  border-color: rgba(13, 148, 136, 0.3) !important;
}
.dark .frq-dl-pill.sg {
  color: #5eead4 !important;
  background: rgba(20, 184, 166, 0.2) !important;
  border-color: rgba(45, 212, 191, 0.35) !important;
}
.frq-dl-pill.sg:hover {
  background: #0d9488 !important;
  border-color: #0d9488 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
}

/* Subtle Social Pills (YouTube & Facebook) */
.hero-social-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.social-subtle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none !important;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.78);
  color: #334155;
  backdrop-filter: blur(6px);
  transition: all 0.18s ease;
}
.dark .social-subtle-pill {
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(148, 163, 184, 0.24);
  color: #cbd5e1;
}
.social-subtle-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.45);
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.dark .social-subtle-pill:hover {
  color: #ffffff;
  border-color: rgba(129, 140, 248, 0.5);
}
.social-subtle-pill .yt-ic {
  color: #ef4444;
  flex-shrink: 0;
}
.social-subtle-pill .fb-ic {
  color: #1877f2;
  flex-shrink: 0;
}
.foot-social-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nicole-awards-body {
  padding: 22px 24px 24px;
  max-height: 78vh;
  overflow-y: auto;
  background: var(--bg-soft, #f8fafc);
  user-select: none;
}
.dark .nicole-awards-body {
  background: #0f172a;
}
.nicole-awards-banner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(250, 204, 21, 0.32);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
}
.nicole-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  padding: 4px 8px;
}
.nicole-stat-item:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.nicole-stat-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #facc15;
  text-transform: uppercase;
}
.nicole-stat-val {
  font-size: 1.02rem;
  font-weight: 850;
  color: #ffffff;
}
.nicole-stat-sub {
  font-size: 0.76rem;
  color: #cbd5e1;
}
.nicole-awards-grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.nicole-award-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  pointer-events: none;
  user-select: none;
}
.nicole-award-card.coach-card {
  border: 2px solid #0284c7;
}
.nicole-award-card.gold-card {
  border: 2px solid rgba(217, 119, 6, 0.45);
}
.nicole-award-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  cursor: default;
}
.nicole-award-cap {
  padding: 10px 10px 11px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  border-top: 1px solid var(--border, #e2e8f0);
}
.nicole-award-cap span {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 850;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.1);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 5px;
  letter-spacing: 0.03em;
}
.nicole-award-cap.gold span {
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
}
.dark .nicole-award-cap.gold span {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.22);
}
@media (max-width: 960px) {
  .story-pure-video-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .nicole-awards-banner {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .nicole-stat-item:not(:last-child) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
  }
  .nicole-awards-grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Subject-Themed Staff Lock Gates & Schedule Cards (CHEM / PHYSICS / MATH) */
.min-day-card .min-slot + .min-slot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.min-day-card.chem {
  border-top-color: #4f46e5;
}
.min-day-card.phys {
  border-top-color: #0284c7;
}
.subj-tag.chem {
  background: rgba(79, 70, 229, 0.14);
  color: #4f46e5;
  border: 1px solid rgba(79, 70, 229, 0.3);
}
.dark .subj-tag.chem {
  background: rgba(99, 102, 241, 0.24);
  color: #a5b4fc;
}
.subj-tag.phys {
  background: rgba(2, 132, 199, 0.14);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
}
.dark .subj-tag.phys {
  background: rgba(14, 165, 233, 0.24);
  color: #7dd3fc;
}
.lock-icon-wrap.chem {
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
}
.lock-input.chem:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}
.lock-btn.chem {
  background: #4f46e5;
}
.lock-btn.chem:hover {
  background: #4338ca;
}
.lock-icon-wrap.phys {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
}
.lock-input.phys:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}
.lock-btn.phys {
  background: #0284c7;
}
.lock-btn.phys:hover {
  background: #0369a1;
}
.lock-icon-wrap.math {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}
.lock-input.math:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
.lock-btn.math {
  background: #7c3aed;
}
.lock-btn.math:hover {
  background: #6d28d9;
}

/* === CHEM 121235 MASTER ADMIN CONSOLE (Manages BIO & PHYSICS) === */
.staff-admin-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.admin-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(6, 182, 212, 0.06) 100%);
  border: 1.5px solid rgba(79, 70, 229, 0.25);
  flex-wrap: wrap;
}
.admin-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.14);
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.dark .admin-kicker {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.25);
}
.admin-title {
  font-size: 1.2rem;
  font-weight: 850;
  color: var(--text-main);
  margin: 0 0 4px;
}
.admin-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}
.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-cfg-btn,
.admin-reset-btn {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.16s ease;
}
.admin-cfg-btn:hover,
.admin-reset-btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
}
.admin-cfg-panel {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1.5px solid rgba(79, 70, 229, 0.35);
  box-shadow: var(--shadow-sm);
}
.admin-cfg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 820px) {
  .admin-cfg-grid {
    grid-template-columns: 1fr;
  }
}
.admin-cfg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-cfg-field label {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-main);
}
.admin-cfg-field small {
  font-size: 0.76rem;
  color: var(--text-subtle);
}
.admin-cfg-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-cfg-row input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.85rem;
}
.admin-ext-link,
.admin-save-cfg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 800;
  background: #4f46e5;
  color: #fff !important;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

/* Gemini AI Natural Language Box */
.admin-ai-card {
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--bg-surface);
  border: 1.5px solid rgba(79, 70, 229, 0.32);
  box-shadow: var(--shadow-sm);
}
.admin-ai-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ai-model-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 850;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #fff;
}
.admin-ai-hint {
  font-size: 0.82rem;
  color: var(--text-subtle);
}
.admin-ai-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-main);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}
.admin-ai-textarea:focus {
  border-color: #4f46e5;
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}
.admin-ai-card.drag-over {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.06);
}
.admin-attach-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.admin-file-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px dashed rgba(79, 70, 229, 0.45);
  background: rgba(79, 70, 229, 0.06);
  color: #4f46e5;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dark .admin-file-label {
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.45);
}
.admin-file-label:hover {
  background: rgba(79, 70, 229, 0.14);
}
.admin-file-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.attached-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  font-size: 0.76rem;
  font-weight: 750;
  color: var(--text-main);
}
.attached-file-chip button {
  border: none;
  background: transparent;
  color: #e11d48;
  font-weight: 900;
  cursor: pointer;
  padding: 0 2px;
}
.admin-ai-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.admin-quick-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.quick-prompt-chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.quick-prompt-chip:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
}
.admin-ai-submit {
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 18px -6px rgba(79, 70, 229, 0.45);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.admin-ai-submit:hover {
  transform: translateY(-1px);
}
.admin-ai-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}
.admin-ai-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 750;
}
.admin-ai-status.loading {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
}
.admin-ai-status.ok {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}
.admin-ai-status.err {
  background: rgba(225, 29, 72, 0.12);
  color: #be123c;
}
.dark .admin-ai-status.ok { color: #6ee7b7; }
.dark .admin-ai-status.err { color: #fda4af; }

/* Interactive BIO & PHYSICS Tables */
.admin-tables-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 920px) {
  .admin-tables-grid {
    grid-template-columns: 1fr;
  }
}
.admin-subj-box {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.admin-subj-box.bio {
  border-top: 4px solid #059669;
}
.admin-subj-box.phys {
  border-top: 4px solid #0284c7;
}
.admin-subj-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.admin-subj-hdr > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-add-btn {
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 800;
  border: none;
  color: #fff;
  cursor: pointer;
}
.admin-add-btn.bio { background: #059669; }
.admin-add-btn.phys { background: #0284c7; }
.admin-slots-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-slot-card {
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.admin-slot-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.admin-inp {
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
}
.admin-inp.day { width: 68px; text-align: center; font-weight: 850; }
.admin-inp.time { flex: 1; min-width: 0; }
.admin-inp.name { flex: 1; min-width: 0; }
.admin-slot-addst {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px dashed var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.admin-st-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-st-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-cnt-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  padding: 2px 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.cnt-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 900;
  cursor: pointer;
}
.cnt-btn.plus {
  background: rgba(79, 70, 229, 0.14);
  color: #4f46e5;
}
.cnt-badge {
  min-width: 34px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 850;
}
.cnt-badge.due { color: #e11d48; }
.cnt-badge.soon { color: #d97706; }
.cnt-reset-btn {
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.cnt-del-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid rgba(225, 29, 72, 0.25);
  background: rgba(225, 29, 72, 0.08);
  color: #e11d48;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}
.admin-end-subhdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-strong);
  margin-bottom: 8px;
  font-size: 0.82rem;
}
.admin-add-mini-btn {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}
.admin-end-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-end-edit-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.6fr auto auto;
  gap: 6px;
  align-items: center;
}
@media (max-width: 640px) {
  .admin-end-edit-row {
    grid-template-columns: 1fr 1fr;
  }
}
.admin-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.admin-save-indicator {
  font-size: 0.85rem;
  font-weight: 800;
  color: #059669;
}
.dark .admin-save-indicator {
  color: #6ee7b7;
}
.admin-bottom-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-preview-btn,
.admin-cloud-push-btn {
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
}
.admin-preview-btn.bio {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}
.admin-preview-btn.phys {
  background: rgba(2, 132, 199, 0.14);
  color: #0284c7;
}
.admin-cloud-push-btn {
  background: #4f46e5;
  color: #fff;
}
.post-short-embed {
  width: 100%;
  max-width: 340px;
  margin: 26px auto 28px;
  text-align: center;
}
.post-short-embed .reel-card {
  width: 100% !important;
  max-width: 340px !important;
  flex: none !important;
  margin: 0 auto !important;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}
.post-short-embed .reel-frame {
  width: 100% !important;
  aspect-ratio: 9 / 16 !important;
}
.post-short-embed .reel-frame iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block !important;
}
.post-short-embed .yt-facade img {
  cursor: pointer !important;
  border-radius: 0 !important;
  margin: 0 !important;
}
.post-short-cap {
  margin-top: 10px !important;
  font-size: 0.88rem !important;
  color: var(--text-subtle) !important;
  text-align: center;
}
