/* ============================================================
   UrbanArtzStudio - Brand Theme (from logo)
   Pink: #FC849C | Purple: #782484 | Gold: #C9A227
   Tagline: Passion Begins Here
   ============================================================ */

:root {
  --primary: #782484;
  --primary-dark: #5A1A66;
  --primary-light: #A855C7;
  --yellow: #E8C547;
  --gold: #C9A227;
  --gold-light: #E8C547;
  --teal: #9B4DCA;
  --coral: #F06C90;
  --purple: #9B4DCA;
  --pink: #FC849C;
  --pink-soft: #FCA8C0;
  --pink-deep: #E85A8A;
  --sky: #E8B4D4;
  --orange: #E8A060;
  --bg: #FFF5F8;
  --bg-soft: #FDF0F5;
  --card: #FFFFFF;
  --text: #2D1B33;
  --text-muted: #6B5A70;
  --border: #F0D4E0;
  --shadow: 0 10px 40px rgba(120, 36, 132, 0.14);
  --shadow-sm: 0 4px 16px rgba(120, 36, 132, 0.10);
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --radius-pill: 999px;
  --font: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Fredoka', 'Nunito', sans-serif;
  --gradient-brand: linear-gradient(135deg, #782484 0%, #9B4DCA 45%, #FC849C 100%);
  --gradient-gold: linear-gradient(135deg, #C9A227, #E8C547);
  --gradient-pink: linear-gradient(135deg, #FC849C, #E85A8A);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sticky footer: main content pushes footer to bottom */
body > main {
  flex: 1 0 auto;
}

.ks-footer {
  flex-shrink: 0;
}

h1, h2, h3, h4, h5, .display-font {
  font-family: var(--font-display);
  font-weight: 600;
}

a { color: var(--primary); text-decoration: none; transition: .2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* ---------- Navbar ---------- */
.ks-navbar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1040;
  border-bottom: 2px solid rgba(79,70,229,0.08);
}

.ks-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.02em;
  text-decoration: none !important;
}

.ks-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 0.1rem;
}

.ks-brand .brand-name {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.25rem;
  font-weight: 700;
}

.ks-brand .brand-tagline {
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
  background: none;
}

.hero-tagline-line {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 600;
  color: var(--primary);
  margin: -0.35rem 0 1rem;
  letter-spacing: 0.04em;
}

.hero-tagline-line::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  margin-top: 0.45rem;
  border-radius: 99px;
  background: var(--gradient-gold);
}

.ks-brand .logo-icon,
.ks-brand .brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 4px 14px rgba(120, 36, 132, 0.25);
  border: 2px solid rgba(201, 162, 39, 0.35);
  -webkit-text-fill-color: initial;
  flex-shrink: 0;
}

.ks-brand .logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 1.2rem;
  -webkit-text-fill-color: #fff;
}

.ks-nav-link {
  font-weight: 700;
  color: var(--text) !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-pill);
  transition: .25s;
}

.ks-nav-link:hover, .ks-nav-link.active {
  background: var(--bg-soft);
  color: var(--primary) !important;
}

/* ---------- Buttons ---------- */
.btn-ks {
  background: var(--gradient-brand);
  color: #fff !important;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.75rem;
  font-weight: 800;
  font-family: var(--font);
  box-shadow: 0 8px 24px rgba(120, 36, 132, 0.35);
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}

.btn-ks:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(120, 36, 132, 0.45);
  color: #fff !important;
}

.btn-ks-yellow {
  background: var(--gradient-gold);
  color: #3D2A08 !important;
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4);
}

.btn-ks-teal {
  background: linear-gradient(135deg, var(--purple), var(--primary));
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(155, 77, 202, 0.35);
}

.btn-ks-coral {
  background: var(--gradient-pink);
  color: #fff !important;
}

.btn-ks-free {
  background: var(--gradient-brand);
  color: #fff !important;
  border: 2px solid var(--gold);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.5rem;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 8px 28px rgba(120, 36, 132, 0.4);
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.btn-ks-free::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

.btn-ks-free:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 36px rgba(120, 36, 132, 0.55), 0 0 0 3px rgba(201, 162, 39, 0.2);
  border-color: var(--gold-light);
  color: #fff !important;
}

.btn-ks-free:active {
  transform: translateY(0) scale(0.98);
}

.btn-ks-free .btn-ks-free-arrow {
  transition: transform 0.25s ease;
  display: inline-block;
}

.btn-ks-free:hover .btn-ks-free-arrow {
  transform: translateX(3px);
}



.btn-ks-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary) !important;
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.5rem;
  font-weight: 800;
}

.btn-ks-outline:hover {
  background: var(--primary);
  color: #fff !important;
}

/* ---------- Cards ---------- */
.glass-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(79,70,229,0.18);
}

.ks-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow .2s ease;
}

/* Lift only for decorative/marketing cards — NOT tables or admin panels */
.ks-card:hover {
  box-shadow: var(--shadow);
}

/* Tables / list cards must stay still (hover lift caused shaking) */
.ks-card.table-responsive,
.ks-card.table-responsive:hover,
.ks-card:has(> table),
.ks-card:has(> table):hover,
.ks-card:has(> .table),
.ks-card:has(> .table):hover {
  transform: none !important;
  box-shadow: var(--shadow-sm);
  transition: none;
}

/* Admin & all dashboards: no card jump on mouse move */
.admin-theme .ks-card,
.admin-theme .ks-card:hover,
.dash-main .ks-card,
.dash-main .ks-card:hover,
.dash-content .ks-card,
.dash-content .ks-card:hover {
  transform: none !important;
  box-shadow: var(--shadow-sm);
  transition: none;
}

.course-card .course-thumb {
  height: 160px;
  background: linear-gradient(135deg, #9B4DCA, #782484 50%, #FC849C);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.course-thumb-img {
  padding: 0 !important;
  background: #FDF0F5 !important;
}

.course-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #fff;
}

.course-thumb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.course-hot-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,.95);
  color: #C43D68;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

/* Category icons v2 */
.cat-card-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
  color: var(--text);
  padding: 0.5rem 0.25rem;
  transition: transform .25s;
}

.cat-card-v2:hover {
  transform: translateY(-6px);
  color: var(--text);
}

.cat-icon-v2 {
  --cat: #782484;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--cat), color-mix(in srgb, var(--cat) 70%, #000));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  position: relative;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--cat) 35%, transparent);
}

.cat-icon-ring {
  position: absolute;
  inset: -4px;
  border-radius: 26px;
  border: 2px solid color-mix(in srgb, var(--cat) 35%, transparent);
  opacity: 0.7;
}

.cat-card-v2:hover .cat-icon-v2 {
  transform: scale(1.06);
}

.cat-label-v2 {
  font-weight: 800;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.2;
}

.cat-mini-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.category-course-block {
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border);
}

.category-course-block:last-child {
  border-bottom: none;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  background: #fff;
  border: 2px solid var(--border);
  color: var(--text);
  text-decoration: none !important;
  transition: .2s;
}

.cat-chip:hover,
.cat-chip.active {
  border-color: var(--cat, var(--primary));
  background: color-mix(in srgb, var(--cat, var(--primary)) 12%, #fff);
  color: var(--cat, var(--primary));
}

/* ============================================
   Modern Explore by Category — Photo Cards
   ============================================ */
.cat-explore-card {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: var(--text);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(120, 36, 132, 0.07);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  height: 100%;
}

.cat-explore-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(120, 36, 132, 0.18);
  color: var(--text);
}

.cat-explore-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
  flex-shrink: 0;
}

/* When no description, media fills the full card */
.cat-explore-card-full .cat-explore-media {
  aspect-ratio: auto;
  flex: 1;
  min-height: 140px;
}

.cat-explore-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-explore-card:hover .cat-explore-img {
  transform: scale(1.12);
}

.cat-explore-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cat-explore-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
  position: relative;
}

.cat-explore-fallback i {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-explore-card:hover .cat-explore-fallback i {
  transform: scale(1.2) rotate(-8deg);
}

.cat-explore-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 0.75rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 1;
}

.cat-explore-desc {
  padding: 0.5rem 0.75rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
  min-height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 575.98px) {
  .cat-explore-media {
    aspect-ratio: 4 / 3;
  }
  .cat-explore-fallback {
    font-size: 2.2rem;
  }
  .cat-explore-name {
    font-size: 0.78rem;
    padding: 0.4rem 0.55rem;
  }
  .cat-explore-desc {
    font-size: 0.68rem;
    padding: 0.35rem 0.55rem 0.5rem;
    min-height: 2.2em;
  }
}

.category-chip-row {
  gap: 0.5rem;
}

@media (max-width: 575.98px) {
  .cat-icon-v2 {
    width: 58px;
    height: 58px;
    font-size: 1.25rem;
    border-radius: 18px;
  }
  .course-card .course-thumb {
    height: 140px;
  }
}

.course-card .course-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='0.08'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10S0 14.5 0 20s4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none; /* allow clicks to reach the course detail link */
}
.course-card .course-thumb > a {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
}
.course-card .course-thumb-badge,
.course-card .course-hot-tag,
.course-card .course-free-tag {
  z-index: 3;
  pointer-events: none;
}

.badge-ks {
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  font-weight: 800;
  font-size: 0.75rem;
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #FFF5F8 0%, #FDF0F8 35%, #F8F0FC 70%, #FFF8F0 100%);
  overflow: hidden;
  padding: 4rem 0 6rem;
}

.hero-section .hero-content { position: relative; z-index: 5; }

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-title .highlight {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2rem;
  font-weight: 600;
}

/* Floating animations */
.sky-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: #fff;
  border-radius: 100px;
  opacity: 0.85;
  animation: floatCloud linear infinite;
  box-shadow: 0 4px 20px rgba(255,255,255,0.5);
}

.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.cloud-1 { width: 120px; height: 40px; top: 12%; left: -150px; animation-duration: 45s; }
.cloud-1::before { width: 50px; height: 50px; top: -25px; left: 20px; }
.cloud-1::after { width: 40px; height: 40px; top: -18px; left: 55px; }

.cloud-2 { width: 180px; height: 50px; top: 28%; left: -200px; animation-duration: 60s; animation-delay: -15s; }
.cloud-2::before { width: 70px; height: 70px; top: -35px; left: 30px; }
.cloud-2::after { width: 55px; height: 55px; top: -25px; left: 80px; }

.cloud-3 { width: 100px; height: 35px; top: 55%; left: -120px; animation-duration: 50s; animation-delay: -25s; }
.cloud-3::before { width: 45px; height: 45px; top: -22px; left: 15px; }
.cloud-3::after { width: 35px; height: 35px; top: -15px; left: 50px; }

@keyframes floatCloud {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 300px)); }
}

.bird {
  position: absolute;
  font-size: 1.5rem;
  animation: flyBird 20s linear infinite;
  opacity: 0.7;
}

.bird-1 { top: 18%; left: -50px; animation-duration: 18s; }
.bird-2 { top: 35%; left: -50px; animation-duration: 25s; animation-delay: -8s; font-size: 1.2rem; }

@keyframes flyBird {
  0% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(25vw) translateY(-20px); }
  50% { transform: translateX(50vw) translateY(10px); }
  75% { transform: translateX(75vw) translateY(-15px); }
  100% { transform: translateX(110vw) translateY(0); }
}

.rainbow-arc {
  position: absolute;
  top: 5%;
  right: 5%;
  width: 280px;
  height: 140px;
  border-radius: 280px 280px 0 0;
  background: conic-gradient(from 180deg at 50% 100%,
    #FC849C, #C9A227, #9B4DCA, #782484, #E85A8A, #E8C547);
  opacity: 0.25;
  mask: radial-gradient(ellipse at bottom, transparent 55%, black 56%);
  -webkit-mask: radial-gradient(ellipse at bottom, transparent 55%, black 56%);
  animation: rainbowPulse 4s ease-in-out infinite;
}

@keyframes rainbowPulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.05); }
}

.balloon {
  position: absolute;
  font-size: 2rem;
  animation: floatBalloon 6s ease-in-out infinite;
}

.balloon-1 { bottom: 15%; left: 8%; animation-delay: 0s; }
.balloon-2 { bottom: 25%; right: 12%; animation-delay: 1.5s; font-size: 1.6rem; }
.balloon-3 { top: 40%; right: 25%; animation-delay: 3s; font-size: 1.3rem; }

@keyframes floatBalloon {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.star-sparkle {
  position: absolute;
  color: var(--yellow);
  animation: twinkle 2s ease-in-out infinite;
  font-size: 1rem;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.hero-mascot {
  position: relative;
  z-index: 5;
  animation: bounceSoft 3s ease-in-out infinite;
}

@keyframes bounceSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.mascot-circle {
  width: min(400px, 90vw);
  height: min(400px, 90vw);
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #FDF0F5);
  box-shadow: var(--shadow), inset 0 0 60px rgba(120, 36, 132, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  margin: 0 auto;
  border: 6px solid #fff;
  position: relative;
  overflow: hidden;
}

.mascot-circle .hero-logo {
  width: 78%;
  height: 78%;
  object-fit: contain;
  font-size: 0;
}

.mascot-circle .orbit {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
  animation: orbitSpin 12s linear infinite;
}

@keyframes orbitSpin {
  from { transform: rotate(0deg) translateX(180px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(180px) rotate(-360deg); }
}

/* ---------- Sections ---------- */
.section-pad { padding: 3rem 0; }

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2.5rem;
}

.section-badge {
  display: inline-block;
  background: var(--bg-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Stats */
.stat-box {
  text-align: center;
  padding: 1.5rem;
}

.stat-box .stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-box .stat-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Category pills */
.cat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: .3s;
  text-align: center;
  color: var(--text);
  border: 2px solid transparent;
}

.cat-pill:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  color: var(--text);
}

.cat-pill .cat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
}

/* Pricing */
.price-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border);
  transition: .3s;
  height: 100%;
  position: relative;
}

.price-card.popular {
  border-color: var(--gold);
  border-width: 2.5px;
  box-shadow: 0 12px 40px rgba(201, 162, 39, 0.25);
}

.price-card.popular .popular-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-gold);
  color: #3D2A08;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.3rem 1rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.35);
}

.price-amount {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--primary);
}

/* Testimonials */
/* Why UrbanArtzStudio cards — managed from Admin > About */
.why-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 4px 16px rgba(120, 36, 132, 0.07);
  height: 100%;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(120, 36, 132, 0.12);
  border-color: var(--primary-light);
}

.why-card-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(120, 36, 132, 0.2);
}

.why-card-text {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
  padding-top: 0.4rem;
}

@media (max-width: 575.98px) {
  .why-card {
    padding: 1.1rem 1rem;
    gap: 0.8rem;
  }
  .why-card-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1rem;
  }
  .why-card-text {
    font-size: 0.85rem;
  }
}

.testimonial-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
  border-left: 4px solid var(--yellow);
}

/* FAQ */
.faq-item {
  background: #fff;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-item .faq-q {
  padding: 1.1rem 1.25rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: .2s;
}

.faq-item .faq-q:hover { background: var(--bg-soft); }

.faq-item .faq-a {
  padding: 0 1.25rem 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Footer */
.ks-footer {
  background: linear-gradient(160deg, #3D1548, #782484 50%, #5A1A66);
  color: #F8E8F0;
  padding: 4rem 0 2rem;
  margin-top: 3rem;
}

.ks-footer a { color: #F0C8DC; }
.ks-footer a:hover { color: var(--gold-light); }
.ks-footer h5 { color: #fff; font-family: var(--font-display); }
.ks-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #E0B8D0;
}
.ks-footer .footer-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ---------- Auth ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #FFF5F8, #FDF0F8, #F8F0FC);
  padding: 2rem 0;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid rgba(79,70,229,0.1);
}

.auth-card .form-control {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  font-weight: 600;
}

.auth-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,70,229,0.12);
}

/* ---------- Dashboard shared ---------- */
.dash-wrapper { display: flex; min-height: 100vh; }

.dash-sidebar {
  width: 268px;
  background: linear-gradient(180deg, #3D1548 0%, #782484 55%, #5A1A66 100%);
  color: #F8E8F0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  transition: transform .3s, width .25s ease;
}

.dash-sidebar .side-brand img {
  width: 36px;
  height: 36px;
  min-width: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
}

.dash-sidebar .side-brand {
  flex-shrink: 0;
  padding: 1rem 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: inherit;
  position: relative;
  z-index: 2;
  min-height: 64px;
}

.side-brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.side-brand-role {
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.95;
  font-family: var(--font-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action icons group — prevents brand buttons overlapping */
.side-brand-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
  margin-left: auto;
}

.side-brand-actions .sidebar-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  padding: 0.25rem;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
}

.dash-sidebar .nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
  padding: 0.35rem 0 1rem;
  gap: 0;
}

.dash-sidebar .nav-link {
  color: #C7D2FE;
  padding: 0.55rem 0.85rem;
  margin: 0.1rem 0.55rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: background .15s, color .15s;
  position: relative;
  z-index: 1;
  width: auto;
  max-width: calc(100% - 1.1rem);
  min-height: 2.4rem;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  flex: 0 0 auto;
}

.dash-sidebar .nav-link:hover,
.dash-sidebar .nav-link.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.dash-sidebar .nav-link i {
  width: 20px;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  line-height: 1;
}

.dash-sidebar .nav-link .nav-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-main {
  margin-left: 268px;
  flex: 1;
  min-width: 0;
  transition: margin-left .25s ease;
}

.dash-topbar {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  padding: 1rem 1.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.dash-content {
  padding: 1.25rem;
  transition: opacity 0.2s ease;
}

/* Compact metric cards — icon no longer dominates space */
.metric-card {
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.metric-card .metric-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 0;
  flex-shrink: 0;
}

.metric-card .metric-body {
  min-width: 0;
  flex: 1;
}

.metric-card .metric-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

.metric-card .metric-label {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1.2;
  margin: 0;
}

/* Admin dashboard — small stat chips */
.admin-stats-row {
  --bs-gutter-x: 0.45rem;
  --bs-gutter-y: 0.45rem;
}
.admin-stats-row .metric-card {
  padding: 0.4rem 0.55rem;
  border-radius: 0.55rem;
  gap: 0.45rem;
  box-shadow: none;
  border: 1px solid var(--border);
  min-height: 0;
}
.admin-stats-row .metric-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  font-size: 0.65rem;
  border-radius: 6px;
  background: transparent !important;
  color: inherit;
  border: none;
}
.admin-stats-row .metric-icon i {
  font-size: 0.95rem;
  line-height: 1;
}
.admin-stats-row .metric-value {
  font-size: 0.95rem;
  font-weight: 800;
}
.admin-stats-row .metric-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.75;
}
.admin-stats-row a:hover .metric-card {
  border-color: var(--primary);
  background: rgba(120, 36, 132, 0.04);
}
.admin-dash-charts .ks-card {
  padding: 0.75rem !important;
}
.admin-dash-charts canvas {
  max-height: 120px !important;
}
.admin-dash-title {
  font-size: 1.1rem !important;
  margin-bottom: 0.75rem !important;
}

/* Student colorful theme extras — soft sky blue + mint */
.student-theme .dash-sidebar {
  background: linear-gradient(180deg, #3A72E8 0%, #4C8DFF 48%, #3ECFBE 100%);
}

.student-theme .dash-content {
  background: transparent;
  min-height: calc(100vh - 70px);
}

.coin-badge {
  background: var(--gradient-gold);
  color: #3D2A08;
  font-weight: 800;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

.streak-badge {
  background: var(--gradient-pink);
  color: #fff;
  font-weight: 800;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.progress-ring-wrap { position: relative; display: inline-block; }

.hello-banner {
  background: var(--gradient-brand);
  border-radius: var(--radius);
  padding: 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.75rem;
  box-shadow: 0 12px 36px rgba(120, 36, 132, 0.28);
}

.hello-banner::before {
  content: '🌟';
  position: absolute;
  font-size: 8rem;
  right: 1rem;
  top: -1rem;
  opacity: 0.15;
}

/* Parent professional */
.parent-theme .dash-sidebar {
  background: linear-gradient(180deg, #2D1B33 0%, #5A1A66 100%);
}

/* Teacher */
.teacher-theme .dash-sidebar {
  background: linear-gradient(180deg, #5A1A66 0%, #782484 60%, #9B4DCA 100%);
}

/* Admin premium */
.admin-theme .dash-sidebar {
  background: linear-gradient(180deg, #1A0A20 0%, #3D1548 50%, #782484 100%);
}

/* ============================================
   Tables — Modern, compact & sortable
   ============================================ */
.table-ks {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.table-ks thead tr {
  background: linear-gradient(135deg, #FDF0F5 0%, #F8F0FC 100%);
}

.table-ks thead th {
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem;
  vertical-align: middle;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  user-select: none;
  transition: color 0.2s ease;
}

.table-ks td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
  border-color: var(--border);
  font-size: 0.88rem;
}

.table-ks tbody tr {
  transition: background 0.15s ease;
}

.table-ks tbody tr:nth-child(even) {
  background: rgba(248, 240, 252, 0.3);
}

.table-ks tbody tr:hover {
  background: rgba(120, 36, 132, 0.04);
}

.table-ks tbody tr:last-child td {
  border-bottom: none;
}

/* Sortable columns */
.table-ks th.sortable {
  cursor: pointer;
  padding-right: 1.6rem;
  position: relative;
}

.table-ks th.sortable::after {
  content: '\2195';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  opacity: 0.3;
  transition: opacity 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.table-ks th.sortable:hover::after {
  opacity: 0.7;
}

.table-ks th.sortable.sort-asc::after {
  content: '\2191';
  opacity: 1;
  color: var(--primary);
}

.table-ks th.sortable.sort-desc::after {
  content: '\2193';
  opacity: 1;
  color: var(--primary);
}

.table-ks th.sortable:hover {
  color: var(--primary);
}

/* Export button — matches btn-ks btn-sm size */
.btn-ks-export {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 2px solid #10B981;
  color: #10B981 !important;
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
  white-space: nowrap;
  min-height: 36px;
}

.btn-ks-export:hover {
  background: #10B981;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.btn-ks-export:active {
  transform: translateY(0);
}

.btn-ks-export i {
  font-size: 0.85rem;
  line-height: 1;
}

/* Export button for legacy pages (no page-head-actions) */
.ks-export-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

/* ============================================
   Pagination — client-side for admin tables
   ============================================ */
.ks-table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.7rem 0.9rem;
  background: #fff;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.ks-table-footer .ks-pagination-info {
  flex: 1 1 auto;
  min-width: 140px;
}

.ks-table-footer select.ks-rows-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.25rem 1.8rem 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
  min-height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 12px;
}

.ks-table-footer select.ks-rows-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(120, 36, 132, 0.08);
}

.ks-pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.ks-pagination-nav .ks-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  user-select: none;
}

.ks-pagination-nav .ks-page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(120, 36, 132, 0.04);
}

.ks-pagination-nav .ks-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(120, 36, 132, 0.25);
}

.ks-pagination-nav .ks-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.ks-pagination-nav .ks-page-btn.ks-page-arrow {
  font-size: 0.65rem;
}

.ks-pagination-nav .ks-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 28px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* Compact action buttons inside tables */
.table-ks .admin-actions {
  gap: 0.25rem;
}

.table-ks .admin-actions .btn-admin-edit,
.table-ks .admin-actions .btn-admin-delete {
  min-width: 60px;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
}

.table-ks .admin-actions .btn-admin-edit i,
.table-ks .admin-actions .btn-admin-delete i {
  font-size: 0.65rem;
}

/* Smaller thumbnails inside tables */
.table-ks .thumb-sm {
  width: 56px;
  height: 36px;
  border-radius: 6px;
}

/* Smaller toggle switches inside tables */
.table-ks .role-toggle {
  width: 36px;
  height: 20px;
}

.table-ks .role-toggle .slider::before {
  height: 15px;
  width: 15px;
  left: 3px;
  bottom: 2.5px;
}

.table-ks .role-toggle input:checked + .slider::before {
  transform: translateX(16px);
}

.table-ks .role-status-label {
  font-size: 0.68rem;
  min-width: 42px;
}

.table-ks code {
  font-size: 0.78rem;
}

.table-ks .badge-ks {
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
}
.dash-content .table-ks td:last-child,
.table.table-ks th:last-child,
.table.table-ks td:last-child {
  text-align: right !important;
  white-space: nowrap;
}
.dash-content .admin-actions,
.admin-actions {
  display: inline-flex !important;
  justify-content: flex-end;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  margin-left: auto;
}
.dash-content .page-head,
.page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
}
.page-head-title {
  min-width: 0;
  flex: 1 1 auto;
}
.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}
.page-head-actions .btn {
  margin: 0 !important;
}
/* Primary save/update — bottom right on all admin forms */
.form-actions-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 0.25rem;
  width: 100%;
}
.form-actions-bottom .btn {
  min-width: 140px;
}
.ks-card.form-ks .form-actions-bottom,
.form-ks.ks-card .form-actions-bottom {
  margin-top: 1rem;
  margin-bottom: 0;
}
.dash-content .page-head > a.btn,
.dash-content .page-head > .btn,
.page-head > a.btn,
.page-head > .btn {
  margin-left: auto;
  flex-shrink: 0;
}

/* Modern select / dropdown look (admin + dashboard) — soft minimal */
.dash-content .form-select,
.admin-theme .form-select,
.form-ks .form-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  padding: 0.6rem 2.2rem 0.6rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  font-weight: 600;
  color: #1e293b;
  background-color: #fafbfc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 14px;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.dash-content .form-select-sm,
.admin-theme .form-select-sm {
  min-height: 38px;
  padding: 0.4rem 1.8rem 0.4rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 12px;
}
.dash-content .form-control-sm,
.admin-theme .form-control-sm {
  min-height: 38px;
  border-radius: 12px;
}
.dash-content .form-control,
.admin-theme .form-control,
.form-ks .form-control {
  min-height: 44px;
  padding: 0.6rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  font-weight: 600;
  background-color: #fafbfc;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.dash-content .form-select:hover,
.admin-theme .form-select:hover,
.dash-content .form-control:hover,
.admin-theme .form-control:hover {
  border-color: #d0d5dd;
  background-color: #fff;
}
.dash-content .form-select:focus,
.admin-theme .form-select:focus,
.dash-content .form-control:focus,
.admin-theme .form-control:focus {
  border-color: #782484;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(120, 36, 132, 0.08);
  outline: none;
}

/* Horizontal scroll for admin/dashboard tables (mobile-safe) */
.table-responsive,
.ks-card.table-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-responsive > .table,
.table-responsive > .table-ks,
.ks-card.table-responsive > .table,
.ks-card.table-responsive > .table-ks {
  margin-bottom: 0;
  min-width: 720px;
}

.ks-card {
  max-width: 100%;
}

.dash-content,
.dash-main {
  overflow-x: hidden;
  min-width: 0;
}

/* Alerts (legacy inline — prefer toasts) */
.alert-ks {
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  padding: 1rem 1.25rem;
}

/* Fixed toast stack — top center, does not shift page content */
.ks-toast-stack {
  position: fixed;
  top: 1rem;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: max-content;
  max-width: min(420px, calc(100vw - 1.5rem));
  pointer-events: none;
}
.ks-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
  color: #1e293b;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 12px 36px rgba(26, 10, 32, 0.16);
  width: 100%;
  max-width: min(420px, calc(100vw - 1.5rem));
  animation: ksToastIn 0.28s ease-out;
}
.ks-toast.ks-toast-out {
  animation: ksToastOut 0.28s ease-in forwards;
}
.ks-toast-icon {
  flex-shrink: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}
.ks-toast-msg {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.ks-toast-close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0.15rem;
  cursor: pointer;
}
.ks-toast-close:hover { opacity: 1; }
.ks-toast-success {
  background: linear-gradient(135deg, #ecfdf5, #fff);
  border-color: #6ee7b7;
  color: #065f46;
}
.ks-toast-success .ks-toast-icon { color: #10b981; }
.ks-toast-error {
  background: linear-gradient(135deg, #fef2f2, #fff);
  border-color: #fca5a5;
  color: #991b1b;
}
.ks-toast-error .ks-toast-icon { color: #ef4444; }
.ks-toast-info {
  background: linear-gradient(135deg, #f5f3ff, #fff);
  border-color: #c4b5fd;
  color: #5b21b6;
}
.ks-toast-info .ks-toast-icon { color: #782484; }
@keyframes ksToastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ksToastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}
@media (max-width: 575.98px) {
  .ks-toast-stack {
    top: 0.75rem;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
  }
  .ks-toast {
    max-width: 100%;
  }
}

/* Forms */
.form-label { font-weight: 800; font-size: 0.9rem; }

/* Confetti canvas */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ============================================
   Sidebar Collapse — Section + Full Minimize
   ============================================ */

/* Scroll area inside sidebar */
.side-scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.side-scroll-area nav {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Section heading with toggle — never overlaps links */
.side-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.7rem 0.9rem 0.2rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  font-weight: 800;
  min-height: 1.75rem;
  line-height: 1.2;
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.side-section-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-section-toggle {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.55;
  font-size: 0.65rem;
  padding: 0.25rem;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.2s ease;
  line-height: 1;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.side-section-toggle:hover {
  opacity: 1;
  background: rgba(255,255,255,0.08);
}

.side-section-toggle.collapsed {
  transform: rotate(-90deg);
}

/* Section items container — smooth collapse/expand, no overlap */
.side-section-items {
  max-height: 2400px;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  opacity: 1;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  position: relative;
  z-index: 0;
}

.side-section-items.collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

/* Collapse toggle in sidebar brand (top) */
.side-collapse-toggle.side-brand-collapse {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #C7D2FE;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

.side-collapse-toggle.side-brand-collapse:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Full sidebar minimized state */
.dash-sidebar.minimized {
  width: 68px;
}

.dash-sidebar.minimized .side-scroll-area nav {
  overflow-y: auto;
  overflow-x: hidden;
}

.dash-sidebar.minimized .side-brand-text-wrap,
.dash-sidebar.minimized .side-brand-text,
.dash-sidebar.minimized .side-brand-role,
.dash-sidebar.minimized .side-section-label,
.dash-sidebar.minimized .nav-label,
.dash-sidebar.minimized .side-section-toggle {
  display: none !important;
}

/* Tooltip — show link name on hover when minimized */
.dash-sidebar.minimized .nav-link {
  position: relative;
}

.dash-sidebar.minimized .nav-link::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #1A0A20;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  letter-spacing: 0.02em;
}

.dash-sidebar.minimized .nav-link:hover::after {
  opacity: 1;
}

/* Collapse-all button in sidebar brand */
.side-collapse-all-btn {
  background: none;
  border: none;
  color: #C7D2FE;
  font-size: 0.85rem;
  padding: 0;
  margin: 0;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
}
.side-collapse-all-btn:hover {
  opacity: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.side-collapse-all-btn.collapsed {
  opacity: 0.8;
  color: var(--gold-light, #E8C547);
}

.dash-sidebar.minimized .side-collapse-all-btn {
  display: none !important;
}

.dash-sidebar.minimized .side-brand {
  justify-content: center;
  padding: 1rem 0.5rem;
  gap: 0;
}

.dash-sidebar.minimized .side-brand img {
  width: 32px;
  height: 32px;
  margin: 0 auto;
}

.dash-sidebar.minimized .side-section {
  justify-content: center;
  padding: 0.4rem 0;
}

.dash-sidebar.minimized .side-section::after {
  content: '';
  display: block;
  width: 16px;
  height: 1px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.dash-sidebar.minimized .nav-link {
  justify-content: center;
  padding: 0.5rem 0;
  margin: 0 0.55rem;
  border-radius: 10px;
}

.dash-sidebar.minimized .nav-link i {
  width: 22px;
  font-size: 1rem;
  text-align: center;
  margin: 0;
  flex-shrink: 0;
}

.dash-sidebar.minimized .side-collapse-toggle.side-brand-collapse {
  opacity: 0.8;
  color: #fff;
}

/* Hide collapse-all button and close btn when minimized */
.dash-sidebar.minimized .side-collapse-all-btn,
.dash-sidebar.minimized .sidebar-close {
  display: none !important;
}

/* Main content adjusts */
.dash-sidebar.minimized + .dash-main {
  margin-left: 68px;
}

/* Re-show sidebar close on mobile even when minimized */
@media (max-width: 991.98px) {
  .dash-sidebar.minimized {
    width: min(280px, 86vw);
    transform: translateX(-100%);
  }
  .dash-sidebar.minimized.open {
    transform: translateX(0);
  }
  .dash-sidebar.minimized .side-section-label,
  .dash-sidebar.minimized .nav-label,
  .dash-sidebar.minimized .side-section-toggle {
    display: inline !important;
  }
  .dash-sidebar.minimized .nav-link {
    justify-content: flex-start;
    padding: 0.7rem 1.25rem;
  }
  .dash-sidebar.minimized .nav-link i {
    width: 22px;
    font-size: inherit;
  }
  .dash-sidebar.minimized .side-section {
    justify-content: space-between;
    padding: 0.85rem 1.1rem 0.25rem;
  }
  .dash-sidebar.minimized .side-section::after {
    display: none;
  }
  .dash-sidebar.minimized .side-brand {
    justify-content: flex-start;
    padding: 0 1.25rem 1.5rem;
    gap: 0.5rem;
  }
  .dash-sidebar.minimized .side-collapse-toggle {
    justify-content: flex-start;
    padding: 0.6rem 0.85rem;
  }
  .dash-sidebar.minimized .side-collapse-toggle.side-brand-collapse {
    padding: 0;
    justify-content: center;
  }
  .dash-sidebar.minimized .side-collapse-toggle i {
    transform: none;
  }
  .dash-sidebar.minimized + .dash-main {
    margin-left: 0;
  }
  .dash-sidebar.minimized .sidebar-close {
    display: inline-flex !important;
  }
}

/* Mobile sidebar */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  line-height: 1;
  padding: 0.25rem;
  min-width: 40px;
  min-height: 40px;
}

.dash-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 10, 32, 0.45);
  z-index: 99;
  border: none;
  padding: 0;
  cursor: pointer;
}

.dash-sidebar-backdrop.show {
  display: block;
}

@media (max-width: 991.98px) {
  .dash-sidebar {
    transform: translateX(-100%);
    width: min(288px, 88vw);
    z-index: 110;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.25);
  }
  .dash-sidebar.open {
    transform: translateX(0);
  }
  .dash-main { margin-left: 0; width: 100%; max-width: 100vw; }
  .dash-sidebar .side-brand {
    padding: 0.9rem 0.85rem;
  }
  .dash-sidebar .nav-link {
    margin: 0.08rem 0.5rem;
    padding: 0.55rem 0.75rem;
  }
  .sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .price-card.popular { transform: none; }
  .mascot-circle { width: 280px; height: 280px; font-size: 5rem; }
  .orbit { display: none !important; }

  .dash-topbar {
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  .dash-topbar .fw-bold {
    font-size: 0.95rem;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dash-topbar .badge-ks {
    max-width: 28vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }
  .dash-content {
    padding: 0.85rem 0.75rem 1.5rem;
  }

  .page-head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center !important;
    justify-content: space-between;
    gap: 0.65rem !important;
    margin-bottom: 0.9rem !important;
  }
  .page-head h2 {
    font-size: 1.2rem;
  }
  .page-head > a.btn,
  .page-head > .btn,
  .page-head-actions {
    width: auto;
    margin-left: auto;
  }
  .page-head-actions {
    justify-content: flex-end;
  }

  .table-ks thead {
    font-size: 0.72rem;
  }
  .table-ks td,
  .table-ks th {
    padding: 0.65rem 0.7rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .table-ks th:last-child,
  .table-ks td:last-child {
    text-align: right !important;
  }
  .admin-actions {
    justify-content: flex-end !important;
  }
  .table-responsive > .table,
  .table-responsive > .table-ks,
  .ks-card.table-responsive > .table,
  .ks-card.table-responsive > .table-ks {
    min-width: 640px;
  }

  .admin-actions {
    min-width: auto !important;
    display: inline-flex !important;
    justify-content: flex-end !important;
    gap: 0.25rem;
    align-items: center;
    width: 100%;
  }
  .admin-actions .btn-admin-edit,
  .admin-actions .btn-admin-delete {
    min-width: 36px !important;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 10px !important;
  }
  .admin-actions .btn-admin-edit .btn-label,
  .admin-actions .btn-admin-delete .btn-label {
    display: none;
  }

  .form-ks.ks-card,
  .ks-card.form-ks,
  form.ks-card {
    padding: 1rem !important;
  }
  .form-ks .row > [class*="col-"] {
    margin-bottom: 0;
  }

  .admin-stats-row .metric-card {
    min-height: 48px;
  }
  .admin-dash-charts canvas {
    max-height: 160px !important;
  }

  /* Filter rows */
  .dash-content form.row.g-2,
  .dash-content form.row.g-3 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .dash-topbar .badge-ks.admin-user-badge-full {
    display: none;
  }
  .table-responsive > .table,
  .table-responsive > .table-ks,
  .ks-card.table-responsive > .table,
  .ks-card.table-responsive > .table-ks {
    min-width: 560px;
  }
  .metric-card .metric-value {
    font-size: 1rem;
  }
  .hello-banner {
    padding: 1.25rem;
  }
}

/* Utility */
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-primary-soft { background: rgba(120, 36, 132, 0.12); color: var(--primary); }
.bg-teal-soft { background: rgba(155, 77, 202, 0.14); color: #782484; }
.bg-coral-soft { background: rgba(252, 132, 156, 0.18); color: #C43D68; }
.bg-yellow-soft { background: rgba(201, 162, 39, 0.22); color: #8A6A12; }
.bg-purple-soft { background: rgba(155, 77, 202, 0.14); color: var(--purple); }
.bg-gold-soft { background: rgba(201, 162, 39, 0.18); color: #8A6A12; }
.bg-pink-soft { background: rgba(252, 132, 156, 0.16); color: #C43D68; }

.rounded-ks { border-radius: var(--radius) !important; }
.rounded-ks-sm { border-radius: var(--radius-sm) !important; }

/* Lesson player */
.lesson-player {
  background: #0F172A;
  border-radius: var(--radius);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.lesson-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Quiz */
.quiz-option {
  display: block;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  cursor: pointer;
  font-weight: 700;
  transition: .2s;
}

.quiz-option:hover, .quiz-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--bg-soft);
}

.quiz-option input { margin-right: 0.75rem; }

/* Nav scrollbar (sidebar no longer scrolls — only inner nav does) */
.side-scroll-area nav::-webkit-scrollbar { width: 6px; }
.side-scroll-area nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

/* ---------- Anime as page BACKGROUND (one, big, transparent, no numbers) ---------- */
.page-anime-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.page-anime {
  position: absolute;
  bottom: 0;
  width: min(340px, 26vw);
  max-width: 360px;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  object-position: bottom center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none;
  filter: drop-shadow(0 16px 32px rgba(120, 36, 132, 0.18));
  opacity: 0.55; /* background feel — content stays readable */
  user-select: none;
  -webkit-user-drag: none;
  animation: animeBgFloat 5s ease-in-out infinite;
  transform-origin: bottom center;
}

.page-anime-left {
  left: 0;
  right: auto;
  transform: translateX(-4%);
}

.page-anime-right {
  right: 0;
  left: auto;
  transform: translateX(4%);
}

@keyframes animeBgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.page-anime-left {
  animation-name: animeBgFloatLeft;
}
.page-anime-right {
  animation-name: animeBgFloatRight;
}

@keyframes animeBgFloatLeft {
  0%, 100% { transform: translateX(-4%) translateY(0); }
  50% { transform: translateX(-4%) translateY(-14px); }
}
@keyframes animeBgFloatRight {
  0%, 100% { transform: translateX(4%) translateY(0); }
  50% { transform: translateX(4%) translateY(-14px); }
}

/* Content layers above anime background */
body.has-scatter-chars {
  position: relative;
  isolation: isolate;
}

body.has-scatter-chars .ks-navbar {
  position: sticky;
  z-index: 1040;
}

body.has-scatter-chars main,
body.has-scatter-chars .ks-footer,
body.has-scatter-chars .dash-wrapper,
body.has-scatter-chars .alert,
body.has-scatter-chars .banner-carousel-wrap {
  position: relative;
  z-index: 5;
}
/* Keep homepage banner edge-to-edge (not padded like content cards) */
body.has-scatter-chars .banner-carousel-wrap {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: 100%;
  z-index: 6;
}

body.has-scatter-chars .dash-sidebar {
  z-index: 100;
}

body.has-scatter-chars main > section,
body.has-scatter-chars main > .container,
body.has-scatter-chars .home-stats-top,
body.has-scatter-chars .section-pad,
body.has-scatter-chars .auth-page,
body.has-scatter-chars .ks-card,
body.has-scatter-chars .glass-card {
  position: relative;
  z-index: 5;
}

/* Soft white backdrop on content so text stays clear over anime */
body.has-scatter-chars main .container,
body.has-scatter-chars .home-stats-top .container,
body.has-scatter-chars .section-pad .container {
  position: relative;
  z-index: 6;
}

.home-stats-top {
  margin-top: 0;
  border-radius: 0 0 1.5rem 1.5rem;
}

/* —— Mobile alignment —— */
@media (max-width: 991.98px) {
  .page-anime {
    width: min(180px, 34vw);
    max-height: 42vh;
    opacity: 0.38;
    bottom: 0;
  }
  .page-anime-left { transform: translateX(-12%); }
  .page-anime-right { transform: translateX(12%); }
  @keyframes animeBgFloatLeft {
    0%, 100% { transform: translateX(-12%) translateY(0); }
    50% { transform: translateX(-12%) translateY(-10px); }
  }
  @keyframes animeBgFloatRight {
    0%, 100% { transform: translateX(12%) translateY(0); }
    50% { transform: translateX(12%) translateY(-10px); }
  }
}

@media (max-width: 575.98px) {
  .page-anime {
    width: min(130px, 36vw);
    max-height: 34vh;
    opacity: 0.30;
    bottom: env(safe-area-inset-bottom, 0);
  }
  .page-anime-left {
    left: -8px;
    transform: translateX(0);
  }
  .page-anime-right {
    right: -8px;
    transform: translateX(0);
  }
  @keyframes animeBgFloatLeft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
  }
  @keyframes animeBgFloatRight {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
  }

  /* Give content horizontal breathing room so text isn't under anime */
  body.has-scatter-chars main .container {
    padding-left: max(1rem, 12vw);
    padding-right: max(1rem, 12vw);
  }
}

/* Dashboard: keep anime behind main panel, not over sidebar */
.dash-wrapper .page-anime-bg,
body.has-scatter-chars .dash-main {
  position: relative;
  z-index: 2;
}
body.has-scatter-chars .dash-main {
  z-index: 5;
  background: transparent;
}
body.has-scatter-chars.student-theme .dash-content,
body.has-scatter-chars.parent-theme .dash-content,
body.has-scatter-chars.teacher-theme .dash-content,
body.has-scatter-chars.admin-theme .dash-content {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 1rem;
  min-height: calc(100vh - 90px);
}

@media (max-width: 991.98px) {
  body.has-scatter-chars .dash-main {
    margin-left: 0;
  }
  body.has-scatter-chars.student-theme .dash-content,
  body.has-scatter-chars.parent-theme .dash-content,
  body.has-scatter-chars.teacher-theme .dash-content,
  body.has-scatter-chars.admin-theme .dash-content {
    background: rgba(255, 255, 255, 0.94);
  }
}

/* ---------- Banner carousel — medium full-width (designed for 1920×500) ---------- */
.banner-carousel-wrap {
  position: relative;
  z-index: 6;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  background: #1a0a20;
  overflow: hidden;
}

.banner-carousel-wrap .carousel,
.banner-carousel-wrap .carousel-inner,
.banner-carousel-wrap .carousel-item {
  width: 100%;
}

/* Medium banner: ~500px max, scales down on smaller screens */
.banner-scroll-link {
  display: block;
  position: relative;
  width: 100%;
  height: clamp(220px, 36vh, 500px);
  text-decoration: none !important;
  color: inherit;
  overflow: hidden;
  background: #1a0a20;
}

.banner-scroll-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

@media (max-width: 575.98px) {
  .banner-scroll-link {
    height: clamp(180px, 32vh, 280px);
  }
  .banner-caption-inner {
    max-width: 100%;
  }
  .banner-title {
    font-size: 1.25rem !important;
  }
  .banner-sub {
    font-size: 0.85rem !important;
    margin-bottom: 0.4rem !important;
  }
}

.banner-scroll-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(90deg, rgba(45, 27, 51, 0.58) 0%, rgba(45, 27, 51, 0.18) 55%, transparent 100%);
  padding: 1rem 0 1.5rem;
  pointer-events: none;
  line-height: normal;
}

.banner-caption-inner {
  max-width: 520px;
  pointer-events: auto;
}

.banner-slide {
  background: linear-gradient(120deg, #3D1548, #782484 50%, #9B4DCA);
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 100%;
  min-height: 220px;
}

.min-banner-h { min-height: 220px; height: 100%; }

.banner-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 700;
  text-shadow: 0 3px 14px rgba(0,0,0,.35);
  margin-bottom: 0.25rem !important;
}

.banner-sub {
  font-weight: 600;
  font-size: 0.95rem;
  max-width: 460px;
  opacity: .95;
  margin-bottom: 0.5rem !important;
}

#homeBannerCarousel .carousel-indicators {
  margin-bottom: 0.6rem;
}

#homeBannerCarousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #fff;
  opacity: .5;
}

#homeBannerCarousel .carousel-indicators .active {
  opacity: 1;
  background-color: var(--gold-light);
}

#homeBannerCarousel .carousel-control-prev,
#homeBannerCarousel .carousel-control-next {
  width: 6%;
  z-index: 4;
}

@media (max-width: 767.98px) {
  .banner-scroll-link {
    height: clamp(200px, 34vh, 320px);
  }
  .banner-scroll-caption {
    background: linear-gradient(transparent, rgba(45, 27, 51, 0.85));
    align-items: flex-end;
    padding: 0.75rem 0 1.1rem;
  }
}

/* Characters section — split individuals + animations */
.characters-section {
  background: linear-gradient(180deg, #FFF5F8 0%, #fff 45%, #F8F0FC 100%);
  overflow: hidden;
}

.family-title {
  font-family: var(--font-display);
  color: var(--primary);
}

.family-emoji {
  display: inline-block;
  animation: bobEmoji 2.4s ease-in-out infinite;
}

@keyframes bobEmoji {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-6px) rotate(6deg); }
}

.character-card {
  transition: box-shadow .35s, border-color .35s;
  border: 2px solid transparent;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.character-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid transparent;
  pointer-events: none;
  transition: border-color .3s;
}

.character-card:hover {
  border-color: color-mix(in srgb, var(--char-color, var(--pink)) 45%, transparent);
  box-shadow: 0 18px 40px rgba(120, 36, 132, 0.14);
}

.character-img-wrap {
  position: relative;
  overflow: visible;
  border-radius: 1rem;
  background: linear-gradient(145deg, #fff, #FDF0F5 60%, #F8F0FC);
  padding: 0.65rem;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-img,
.char-sprite {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border-radius: 0.75rem;
  transform-origin: center bottom;
  will-change: transform;
}

.char-variant {
  color: var(--char-color, var(--primary));
  letter-spacing: 0.03em;
}

.char-sparkle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 25%, color-mix(in srgb, var(--char-color, #FC849C) 35%, transparent) 0 3px, transparent 4px),
    radial-gradient(circle at 80% 30%, color-mix(in srgb, var(--gold) 50%, transparent) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 75%, color-mix(in srgb, var(--char-color, #9B4DCA) 40%, transparent) 0 2.5px, transparent 3.5px);
  opacity: 0.85;
  animation: sparkleTwinkle 2.8s ease-in-out infinite;
  animation-delay: var(--anim-delay, 0s);
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Per-character animation styles */
.char-anim-float .char-sprite {
  animation: charFloat 3.2s ease-in-out infinite;
  animation-delay: var(--anim-delay, 0s);
}
.char-anim-bounce .char-sprite {
  animation: charBounce 2.4s ease-in-out infinite;
  animation-delay: var(--anim-delay, 0s);
}
.char-anim-wiggle .char-sprite {
  animation: charWiggle 2.6s ease-in-out infinite;
  animation-delay: var(--anim-delay, 0s);
}
.char-anim-pulse .char-sprite {
  animation: charPulse 2.8s ease-in-out infinite;
  animation-delay: var(--anim-delay, 0s);
}
.char-anim-swing .char-sprite {
  animation: charSwing 3s ease-in-out infinite;
  animation-delay: var(--anim-delay, 0s);
}
.char-anim-spin-slow .char-sprite {
  animation: charTilt 3.5s ease-in-out infinite;
  animation-delay: var(--anim-delay, 0s);
}

@keyframes charFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes charBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-18px) scale(1.04); }
  60% { transform: translateY(-8px) scale(0.98); }
}
@keyframes charWiggle {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-5deg) translateY(-6px); }
  75% { transform: rotate(5deg) translateY(-4px); }
}
@keyframes charPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
@keyframes charSwing {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
@keyframes charTilt {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.05); }
}

.character-card:hover .char-sprite {
  animation-play-state: paused;
  transform: scale(1.08) translateY(-6px);
  transition: transform .35s ease;
}

/* Marching parade of all 9 split characters */
.char-parade {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #FDF0F5, #F8F0FC, #FFF8F0);
  border: 2px solid var(--border);
  padding: 1rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.char-parade-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: paradeScroll 28s linear infinite;
}

.char-parade:hover .char-parade-track {
  animation-play-state: paused;
}

.parade-item {
  flex: 0 0 auto;
  width: 110px;
  height: 130px;
  background: #fff;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  animation: paradeBob 2.2s ease-in-out infinite;
}

.parade-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@keyframes paradeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes paradeBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 575.98px) {
  .character-img, .char-sprite { max-height: 130px; }
  .parade-item { width: 80px; height: 100px; }
  .ks-brand .brand-name { font-size: 1.05rem; }
  .ks-brand .brand-tagline { font-size: 0.58rem; }
}
