@font-face {
  font-family: 'Siddhanta';
  src: url('fonts/Siddhanta.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  html { -webkit-tap-highlight-color: transparent; }
  a, button, select, input, textarea, [onclick] { -webkit-tap-highlight-color: transparent; }
  :root {
    --blue-dark: #5c2f26;
    --blue-mid: #935447;
    --blue-light: #b87765;
    --sky: #f0ddd3;
    --sky-pale: #faf1ec;
    --white: #ffffff;
    --red: #b91c1c;
    --text: #1a2a3a;
    --text-light: #7a5548;
  }
  html { scroll-behavior: smooth; background: var(--sky-pale); }
  body { font-family: 'Noto Sans Devanagari', sans-serif; background: var(--sky-pale); color: var(--text); overflow-x: hidden; }
  h1, h2, h3 { letter-spacing: -0.01em; }
  ::selection { background: var(--blue-mid); color: var(--white); }

  /* TOP BAR */
  .topbar { background: var(--blue-dark); color: #f2ded4; font-size: 0.78rem; display: flex; justify-content: space-between; align-items: center; padding: 6px 5%; gap: 12px; flex-wrap: wrap; }
  .topbar a { color: #f2ded4; text-decoration: none; }

  /* HEADER */
  header { background: var(--white); padding: 22px 5%; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--sky); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 var(--blue-mid), 0 4px 20px rgba(147,84,71,0.08); flex-wrap: wrap; transition: box-shadow .2s; }
  .header-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .logo-area { display: flex; align-items: center; gap: 9px; }
  .aditya-logo-img { height: 90px; width: 160px; object-fit: contain; display: block; }
  .aditya-access-icon { color: var(--blue-mid); display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
  .aditya-access-icon svg * { transform-box: fill-box; transform-origin: center; }
  .aditya-access-icon .ac-path { transform-origin: top right; }
  nav { display: flex; gap: 2px; flex-wrap: wrap; }
  nav a { color: var(--blue-dark); text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 8px 14px; border-radius: 8px; transition: background .25s ease, color .25s ease, transform .15s ease; }
  nav a:hover { transform: translateY(-1px); }
  nav a:hover, nav a.active { background: var(--blue-mid); color: var(--white); }
  .btn-admit { background: var(--red); color: var(--white) !important; border-radius: 6px; font-weight: 700 !important; }
  .btn-admit:hover { background: #991b1b !important; }

  /* HEADER 3-DOT MENU */
  .header-menu { position: relative; }
  .menu-dots-btn { background: var(--white); border: 1.5px solid var(--blue-mid); color: var(--blue-dark); width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s, transform .15s; }
  .menu-dots-btn:hover { background: var(--blue-mid); color: var(--white); }
  .menu-dots-btn:active { transform: scale(0.92); }
  .header-dropdown { position: absolute; top: calc(100% + 10px); right: 0; background: var(--white); border: 1px solid #f0ddd3; border-radius: 12px; box-shadow: 0 10px 30px rgba(147,84,71,0.18); padding: 10px; min-width: 160px; opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.97); transform-origin: top right; transition: opacity .18s ease, transform .18s ease, visibility .18s; z-index: 200; }
  .header-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
  .header-dropdown .auth-box { justify-content: center; }
  .theme-picker { padding: 4px 4px 10px; border-bottom: 1px solid var(--sky); margin-bottom: 8px; }
  .theme-picker-label { font-size: 0.72rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; text-align: center; }
  .menu-admin-link { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px; border-radius: 8px; text-decoration: none; color: var(--text-light); font-size: 0.85rem; font-weight: 600; transition: background .15s; }
  .menu-admin-link:hover { background: var(--sky-pale); }
  .theme-swatches { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; max-width: 190px; }
  .theme-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 1.5px #d8d8d8; cursor: pointer; padding: 0; transition: transform .15s, box-shadow .15s; }
  .theme-swatch:hover { transform: scale(1.12); }
  .theme-swatch.active { box-shadow: 0 0 0 2.5px var(--blue-mid); }

  /* HERO */
  .hero { background: linear-gradient(160deg, #fdf5f0 0%, #f9ece4 50%, #ecd2c1 100%); min-height: auto; display: flex; align-items: center; justify-content: center; padding: 30px 5% 20px; gap: 40px; flex-wrap: wrap; position: relative; overflow: hidden; }
  .hero::after {
    content: "";
    position: absolute;
    inset: -60px;
    background:
      radial-gradient(circle at 20% 25%, rgba(147,84,71,0.55) 0%, transparent 42%),
      radial-gradient(circle at 82% 18%, rgba(184,119,101,0.50) 0%, transparent 42%),
      radial-gradient(circle at 30% 85%, rgba(92,47,38,0.30) 0%, transparent 45%),
      radial-gradient(circle at 85% 80%, rgba(236,210,193,0.75) 0%, transparent 45%);
    filter: blur(50px);
    animation: heroBlobMove 14s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
  }
  @keyframes heroBlobMove {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-4%, 3%) scale(1.18); }
    100% { transform: translate(3%, -3%) scale(1); }
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 14px;
    background: rgba(255,255,255,0.42);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 34px rgba(92,47,38,0.22), 0 2px 8px rgba(92,47,38,0.14);
    z-index: 1;
    pointer-events: none;
  }
  .hero-text, .wheel-container { position: relative; z-index: 2; }
  .hero-text { flex: 1 1 320px; }
  .hero-eyebrow { display: inline-block; background: var(--blue-mid); color: var(--white); font-size: 0.75rem; font-weight: 700; letter-spacing: .08em; padding: 4px 14px; border-radius: 20px; margin-bottom: 16px; }
  .hero-text h2 { font-family: 'Noto Serif Devanagari', serif; font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 700; color: var(--blue-dark); line-height: 1.35; margin-bottom: 14px; }
  .hero-text h2 span { color: var(--blue-mid); }
  .hero-text h2.hero-shloka { font-size: clamp(1.5rem, 3.4vw, 2.3rem); line-height: 1.55; margin-top: -18px; }
  .shloka-rotator { transition: opacity .35s ease; }
  .shloka-rotator.fading { opacity: 0; }
  .hero-text p { font-size: 0.97rem; color: var(--text-light); line-height: 1.75; margin-bottom: 26px; max-width: 460px; }
  .hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
  .btn-primary { background: var(--blue-mid); color: var(--white); padding: 13px 26px; border-radius: 10px; font-size: 0.93rem; font-weight: 700; text-decoration: none; transition: background .25s ease, transform .18s ease, box-shadow .25s ease; display: inline-block; box-shadow: 0 4px 14px rgba(147,84,71,.22); }
  .btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(147,84,71,.3); }
  .btn-primary:active { transform: translateY(0); }
  .btn-outline { border: 2px solid var(--blue-mid); color: var(--blue-mid); padding: 11px 22px; border-radius: 10px; font-size: 0.93rem; font-weight: 700; text-decoration: none; transition: background .25s ease, color .25s ease, transform .18s ease; display: inline-block; }
  .btn-outline:hover { background: var(--blue-mid); color: var(--white); transform: translateY(-2px); }

  /* WHEEL */
  .wheel-container { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .wheel-svg-wrap { position: relative; width: 500px; height: 500px; cursor: grab; user-select: none; filter: drop-shadow(0 10px 28px rgba(147,84,71,.16)); transition: filter .25s ease; }
  .wheel-svg-wrap:hover { filter: drop-shadow(0 14px 34px rgba(147,84,71,.22)); }
  .wheel-svg-wrap:active { cursor: grabbing; }
  .wheel-svg-wrap svg { width: 100%; height: 100%; overflow: visible; }
  .spin-hint { font-size: 0.75rem; color: var(--blue-mid); font-weight: 600; opacity: 0.75; text-align: center; }

  /* Segment colors alternating */
  .seg-a { fill: #f5e6de; stroke: #935447; stroke-width: 2; transition: fill .2s; }
  .seg-b { fill: #ecd4c9; stroke: #935447; stroke-width: 2; transition: fill .2s; }
  .seg-a:hover { fill: #d9ab98; }
  .seg-b:hover { fill: #c98a72; }

  /* STATS */
  @keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  .stats-banner {
    position: relative;
    background: linear-gradient(135deg, #5c2f26, #935447, #b87765, #935447, #5c2f26);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    padding: 34px 5%;
    display: flex;
    justify-content: center;
    gap: 56px;
    flex-wrap: wrap;
    text-align: center;
  }
  .stat { color: var(--white); }
  .stat-num { font-family: 'Noto Serif Devanagari', serif; font-size: 2.3rem; font-weight: 700; color: #ffffff; display: block; line-height: 1; text-shadow: 0 2px 16px rgba(59,130,209,0.7), 0 1px 4px rgba(0,0,0,0.3); }
  .stat-label { font-size: 0.83rem; opacity: .85; margin-top: 6px; color: #f2ded4; }

  /* WHY */
  .why-section { background: #fdf1ec; padding: 30px 5% 76px; text-align: center; position: relative; }
  .section-label { color: var(--blue-mid); font-size: 0.78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
  .section-title { font-family: 'Noto Serif Devanagari', serif; font-size: clamp(1.2rem, 2.5vw, 1.85rem); color: var(--blue-dark); font-weight: 700; margin-bottom: 10px; position: relative; }
  .section-title::after { content: ''; display: block; width: 46px; height: 3px; background: var(--blue-mid); border-radius: 2px; margin: 14px auto 0; opacity: .5; }
  .section-sub { color: var(--text-light); font-size: 0.93rem; margin-bottom: 50px; }

  /* ABOUT — photo + text card, banner below (matches reference layout) */
  .about-inner { display: flex; align-items: flex-start; gap: 34px; max-width: 1080px; margin: 0 auto 26px; text-align: left; flex-wrap: nowrap; }
  .about-photo { flex: 0 0 280px; max-width: 280px; }
  .about-photo img { width: 100%; display: block; border-radius: 10px; box-shadow: 0 14px 34px rgba(92,47,38,0.28); }
  .about-textcard { flex: 1 1 420px; min-width: 0; background: var(--sky); border-radius: 20px; padding: 34px 38px; display: flex; align-items: center; }
  .about-text { font-family: 'Khand', 'Noto Sans Devanagari', sans-serif; text-align: justify; font-size: 1.02rem; line-height: 1.85; color: #241a16; font-weight: 600; }
  .sahitya-banner { display: flex; align-items: center; justify-content: center; gap: 22px; max-width: 1080px; margin: 0 auto; background: #a48078; color: #fff; padding: 26px 30px; border-radius: 22px; text-decoration: none; box-shadow: 0 8px 24px rgba(92,47,38,0.25); transition: transform .2s ease, box-shadow .2s ease; }
  .sahitya-banner:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(92,47,38,0.32); }
  .sahitya-icon { width: 60px; height: 60px; flex: 0 0 auto; object-fit: contain; }
  .sahitya-name { font-family: 'Khand', 'Noto Sans Devanagari', sans-serif; font-weight: 700; font-size: clamp(1.3rem, 2.8vw, 1.9rem); letter-spacing: .01em; }
  @media (max-width: 560px) {
    .why-section { padding-top: 14px; padding-bottom: 20px; }
    .about-inner { gap: 14px; margin-bottom: 16px; }
    .about-photo { flex-basis: 120px; max-width: 120px; }
    .about-textcard { padding: 14px 16px; border-radius: 14px; }
    .about-text { font-size: 0.58rem; line-height: 1.5; }
    .sahitya-banner { gap: 10px; padding: 14px 14px; border-radius: 16px; }
    .sahitya-icon { width: 36px; height: 36px; }
  }

  /* SHOWCASE — photo/text pair, YouTube row, social icons */
  .showcase-section { background: #fdf1ec; padding: 20px 5% 70px; }
  .showcase-slider { max-width: 1080px; margin: 0 auto; }
  .showcase-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-snap-stop: always; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
  .showcase-slides::-webkit-scrollbar { display: none; }
  .showcase-slide { flex: 0 0 100%; scroll-snap-align: start; opacity: .5; transform: scale(.95); transition: opacity .4s ease, transform .4s ease; will-change: opacity, transform; }
  .showcase-slide.active { opacity: 1; transform: scale(1); }
  .showcase-top { display: flex; gap: 24px; align-items: stretch; }
  .showcase-text { flex: 0 0 240px; max-width: 240px; background: var(--sky); border-radius: 18px; display: flex; align-items: center; justify-content: center; padding: 26px; }
  .showcase-text p { font-family: 'Khand', 'Noto Sans Devanagari', sans-serif; font-weight: 600; text-align: center; color: var(--blue-dark); font-size: 1rem; line-height: 1.65; margin: 0; }
  .showcase-photo { flex: 1 1 500px; border-radius: 18px; overflow: hidden; min-height: 220px; }
  .showcase-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .showcase-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
  .showcase-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-light); opacity: .35; transition: opacity .2s, transform .2s; cursor: pointer; }
  .showcase-dots span.active { opacity: 1; transform: scale(1.2); }
  .yt-heading { display: flex; align-items: center; gap: 10px; max-width: 1080px; margin: 0 auto 20px; }
  .yt-heading svg { width: 32px; height: 32px; }
  .yt-heading span { font-family: 'Khand', 'Noto Sans Devanagari', sans-serif; font-weight: 800; font-size: 1.7rem; color: #1a1a1a; }
  .yt-row { display: flex; gap: 20px; max-width: 1080px; margin: 0 auto 46px; overflow-x: auto; padding-bottom: 8px; }
  .yt-card { flex: 0 0 300px; text-decoration: none; color: inherit; }
  .yt-card img { width: 100%; display: block; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,0.15); }
  .yt-card p { margin: 10px 0 0; font-size: 0.9rem; color: var(--text-light); font-family: 'Khand', 'Noto Sans Devanagari', sans-serif; }
  .social-row { display: flex; justify-content: center; gap: 22px; max-width: 1080px; margin: 0 auto; flex-wrap: wrap; }
  .social-icon { width: 58px; height: 58px; border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .social-icon svg { width: 100%; height: 100%; }
  .social-icon img { border-radius: 14px; }
  .social-icon.disabled { opacity: 0.4; pointer-events: none; }
  @media (max-width: 560px) {
    .showcase-section { padding-top: 8px; }
    .showcase-top { gap: 14px; }
    .showcase-text { flex-basis: 120px; max-width: 120px; padding: 14px; }
    .showcase-text p { font-size: 0.62rem; line-height: 1.4; }
    .showcase-photo { min-height: 140px; }
    .social-icon { width: 46px; height: 46px; }
  }
  .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; max-width: 980px; margin: 0 auto; }
  .feature-card { background: linear-gradient(135deg, var(--sky-pale), var(--white)); border: 1.5px solid #e8d2c8; border-radius: 16px; padding: 30px 20px 24px; text-align: center; transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s ease, border-color .25s ease; }
  .feature-card:hover { transform: translateY(-6px); box-shadow: 0 14px 32px rgba(147,84,71,.16); border-color: var(--blue-light); }
  .feature-icon { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-mid), var(--blue-light)); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 1.5rem; box-shadow: 0 6px 16px rgba(147,84,71,.28); transition: transform .25s ease; }
  .feature-card:hover .feature-icon { transform: scale(1.08) rotate(-4deg); }
  .feature-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 7px; }
  .feature-card p { font-size: 0.8rem; color: var(--text-light); line-height: 1.6; }

  /* NOTICE */
  .notice-section { background: var(--sky-pale); padding: 68px 5%; }
  .notice-inner { max-width: 860px; margin: 0 auto; }
  .notice-list { list-style: none; margin-top: 30px; }
  .notice-list li { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; background: var(--white); border-radius: 10px; border-left: 4px solid var(--blue-mid); margin-bottom: 12px; box-shadow: 0 2px 8px rgba(147,84,71,.06); }
  .notice-date { background: var(--blue-mid); color: var(--white); border-radius: 8px; padding: 5px 9px; text-align: center; font-size: 0.73rem; font-weight: 700; line-height: 1.4; min-width: 46px; flex-shrink: 0; }
  .notice-text strong { display: block; color: var(--blue-dark); font-size: 0.93rem; margin-bottom: 2px; }
  .notice-text span { font-size: 0.8rem; color: var(--text-light); }


  /* GALLERY */
  .gallery-section { background: var(--white); padding: 68px 5%; text-align: center; }
  .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 32px; text-align: left; }
  .gallery-card { border-radius: 12px; overflow: hidden; box-shadow: 0 3px 16px rgba(147,84,71,0.10); background: var(--sky-pale); transition: transform .22s, box-shadow .22s; cursor: pointer; }
  .gallery-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(147,84,71,0.18); }
  .gallery-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
  .gallery-card .g-desc { padding: 12px 14px; font-size: 0.88rem; color: var(--text); line-height: 1.5; }

  /* NEWS FEED */
  .news-feed-section { background: var(--sky-pale); padding: 68px 5%; text-align: center; }
  .news-feed-heading { display: flex; align-items: center; justify-content: center; gap: 14px; font-family: 'Noto Serif Devanagari', serif; font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.4rem); color: #1a6b4f; margin: 0 0 32px; }
  .news-feed-heading span { font-size: 0.75em; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }
  .news-feed-list { display: flex; flex-direction: column; gap: 20px; max-width: 1080px; margin: 0 auto; text-align: left; }
  .news-feed-card { background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: 0 3px 16px rgba(147,84,71,0.10); }
  .news-feed-card img { width: 100%; max-height: 320px; object-fit: cover; display: block; }
  .news-feed-card .nf-body { padding: 16px 18px; }
  .news-feed-card h3 { font-family: 'Noto Serif Devanagari', serif; font-size: 1.15rem; color: var(--blue-dark); margin-bottom: 14px; }
  .nf-columns { font-family: 'Khand', 'Noto Sans Devanagari', sans-serif; font-size: 0.66rem; line-height: 1.6; text-align: justify; column-count: 3; column-gap: 28px; }
  .nf-columns img { max-width: 100%; border-radius: 10px; margin: 6px 0; display: block; break-inside: avoid; }
  .nf-columns p { margin: 0 0 1em; }
  @media (max-width: 560px) {
    .nf-columns { font-size: 0.4rem; line-height: 1.3; column-gap: 20px; }
  }
  .nf-single { font-family: 'Khand', 'Noto Sans Devanagari', sans-serif; font-size: 0.8rem; line-height: 1.65; text-align: justify; column-count: 1; }
  .nf-single img { max-width: 100%; border-radius: 12px; margin: 12px 0; display: block; }
  .nf-single p { margin: 0 0 1em; }
  @media (max-width: 560px) {
    .nf-single { font-size: 0.58rem; line-height: 1.4; }
  }
  .news-feed-empty { color: var(--text-light); font-size: 0.9rem; margin-top: 20px; }

  /* AD CAROUSEL — auto + manual swipe loop */
  .ad-carousel { max-width: 1080px; margin: 28px auto 0; }
  .ad-carousel-track { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 360px; border-radius: 16px; overflow: hidden; background: var(--sky-pale); touch-action: pan-y; }
  .ad-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; pointer-events: none; }
  .ad-slide.active { opacity: 1; }
  .ad-slide img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; user-select: none; }

  /* ══ AUTH BOX (HEADER) ══ */
  .auth-box { display: flex; align-items: center; gap: 6px; }
  .auth-btn { display: flex; align-items: center; gap: 6px; background: var(--white); border: 1.5px solid var(--blue-mid); color: var(--blue-mid); font-weight: 700; font-size: 0.8rem; padding: 7px 13px; border-radius: 7px; cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
  .auth-btn:hover { background: var(--blue-mid); color: var(--white); }
  .auth-user { display: flex; align-items: center; gap: 5px; font-size: 0.68rem; color: var(--blue-dark); font-weight: 600; }
  .auth-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-mid); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; flex-shrink: 0; }
  .auth-logout { background: none; border: none; color: var(--red); font-size: 0.64rem; font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; white-space: nowrap; }
  .auth-box-hero { padding: 4px 0; }
  .auth-box-hero .auth-btn { padding: 10px 20px; font-size: 0.93rem; border-radius: 8px; }
  .auth-box-hero .auth-avatar { width: 34px; height: 34px; font-size: 1rem; }
  .auth-box-hero .auth-logout { font-size: 0.8rem; }
  .teacher-badge { background: var(--blue-dark); color: var(--white); font-size: 0.56rem; font-weight: 700; padding: 1px 6px; border-radius: 9px; margin-left: 2px; white-space: nowrap; }

  /* ══ COMMUNITY / POSTS SECTION ══ */
  /* सूचना (कालोपाटी) को लाइक/कमेन्ट/सेयर */
  .notice-social { max-width: 640px; margin: 22px auto 0; background: var(--white); border-radius: 14px; padding: 10px 14px 14px; box-shadow: 0 3px 14px rgba(147,84,71,0.09); border: 1px solid #faf1ec; }
  .notice-social .post-actions { display: flex; }

  .community-section { background: linear-gradient(180deg, #eaf3fc 0%, var(--sky-pale) 100%); padding: 44px 5% 60px; }
  .community-inner { max-width: 720px; margin: 0 auto; }
  .community-head { text-align: center; margin-bottom: 8px; }
  .post-form { background: var(--white); border-radius: 18px; padding: 24px 22px; margin: 26px 0; box-shadow: 0 10px 34px rgba(147,84,71,0.14); border: 1px solid #e5eef7; }

  /* form header */
  .post-form-head { display: flex; align-items: center; gap: 12px; margin-bottom: 0; padding-bottom: 16px; border-bottom: 1.5px dashed #f0ddd3; cursor: pointer; user-select: none; }
  .post-form-body { padding-top: 20px; }
  .post-form-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--blue-mid), var(--blue-dark)); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; box-shadow: 0 4px 12px rgba(147,84,71,0.3); }
  .post-form-head > div { flex: 1; min-width: 0; }
  .post-form-title { font-family: 'Noto Serif Devanagari', serif; font-weight: 700; font-size: 1.08rem; color: var(--blue-dark); line-height: 1.3; }
  .post-form-sub { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
  .post-form-toggle { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--sky-pale); color: var(--blue-mid); border: 1.5px solid #f0ddd3; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, transform .15s; padding: 0; }
  .post-form-toggle:hover { background: var(--blue-light); color: var(--white); }
  .post-form-toggle:active { transform: scale(0.92); }

  /* field grouping with labels */
  .field-group { margin-bottom: 14px; }
  .field-label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--blue-mid); margin-bottom: 6px; letter-spacing: 0.2px; }

  .post-form input, .post-form textarea, .post-form select { width: 100%; border: 1.5px solid #f0ddd3; border-radius: 10px; padding: 12px 14px; font-family: inherit; font-size: 0.92rem; resize: vertical; background: var(--sky-pale); transition: border-color .2s, box-shadow .2s, background .2s; }
  .post-form input:focus, .post-form textarea:focus, .post-form select:focus { outline: none; border-color: var(--blue-mid); background: var(--white); box-shadow: 0 0 0 3px rgba(147,84,71,0.12); }
  .post-form input::placeholder, .post-form textarea::placeholder { color: #9fb3c8; }

  /* custom select arrow, consistent cross-browser */
  .select-wrap { position: relative; }
  .select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; }
  .select-wrap::after { content: ''; position: absolute; right: 14px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--blue-mid); border-bottom: 2px solid var(--blue-mid); transform: translateY(-65%) rotate(45deg); pointer-events: none; }

  .post-form button { background: linear-gradient(135deg, var(--blue-mid), var(--blue-dark)); color: var(--white); border: none; padding: 13px 22px; border-radius: 11px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: background .2s, transform .1s, box-shadow .2s; box-shadow: 0 6px 16px rgba(147,84,71,0.25); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
  .post-form button:hover { background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid)); box-shadow: 0 8px 20px rgba(147,84,71,0.32); }
  .post-form button:active { transform: scale(0.97); }
  .notice-form-actions { display: flex; gap: 10px; margin-top: 6px; }
  #noticeSubmitBtn { flex: 1; }
  #noticeCancelBtn { background: var(--white) !important; color: var(--text-light) !important; border: 1.5px solid #f0ddd3 !important; box-shadow: none !important; }
  #noticeCancelBtn:hover { background: #f3f7fb !important; color: var(--text) !important; }
  .notice-row-2 { display: flex; gap: 10px; }
  .notice-row-2 .field-group { flex: 1; margin-bottom: 14px; }

  /* toggle switch instead of plain checkbox */
  .notice-table-toggle { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--text); margin: 4px 0 16px; padding: 10px 14px; background: var(--sky-pale); border-radius: 10px; cursor: pointer; }
  .notice-table-toggle em { color: var(--text-light); font-style: normal; }
  .toggle-switch { position: relative; flex-shrink: 0; width: 38px; height: 22px; }
  .toggle-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
  .toggle-slider { position: absolute; inset: 0; background: #c7d6e8; border-radius: 20px; transition: background .2s; }
  .toggle-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: var(--white); border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
  .toggle-switch input:checked + .toggle-slider { background: var(--blue-mid); }
  .toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }
  .table-builder-label { font-size: 0.82rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 8px; }
  .table-columns-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
  .table-column-cell { display: flex; align-items: center; gap: 4px; }
  .table-column-cell input { width: 84px; margin-bottom: 0; padding: 8px 9px; font-size: 0.82rem; }
  .table-rows-container { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
  .table-row-cells { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding-bottom: 2px; }
  .table-row-cells input { flex: 0 0 84px; width: 84px; margin-bottom: 0; padding: 8px 9px; font-size: 0.82rem; }
  .table-remove-btn { flex-shrink: 0; background: #fde8e8; color: var(--red); border: none; width: 26px; height: 26px; border-radius: 50%; font-size: 0.75rem; cursor: pointer; line-height: 1; }
  .table-remove-btn:hover { background: #f9caca; }
  .table-add-btn { background: var(--sky-pale) !important; color: var(--blue-dark) !important; font-size: 0.8rem !important; padding: 8px 16px !important; margin-bottom: 12px; }
  .table-add-btn:hover { background: var(--blue-light) !important; }
  .notice-manage-list { max-width: 1100px; margin: 18px auto 0; display: flex; flex-direction: column; gap: 10px; }
  .notice-manage-empty { text-align: center; color: var(--text-light); font-size: 0.85rem; padding: 10px; }
  .notice-manage-item { background: var(--white); border: 1px solid #e5eef7; border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; box-shadow: 0 2px 10px rgba(147,84,71,0.06); }
  .notice-manage-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .notice-manage-text b { color: var(--blue-dark); font-size: 0.9rem; }
  .notice-manage-text span { color: var(--text-light); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .notice-manage-actions { display: flex; gap: 8px; flex-shrink: 0; }
  .notice-manage-actions button { background: var(--sky-pale); color: var(--blue-dark); border: none; padding: 7px 12px; border-radius: 8px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
  .notice-manage-actions button:hover { background: var(--blue-light); }
  .notice-manage-actions .notice-delete-btn { background: #fde8e8; color: var(--red); }
  .notice-manage-actions .notice-delete-btn:hover { background: #f9caca; }
  .media-hint { font-size: 0.74rem; color: var(--text-light); margin: -6px 0 10px; }
  .post-media { margin-bottom: 12px; border-radius: 10px; overflow: hidden; }
  .post-media img, .post-media video { width: 100%; max-height: 420px; object-fit: cover; display: block; background: #000; }
  .post-media iframe { width: 100%; aspect-ratio: 16/9; border: none; display: block; }
  .login-hint { text-align: center; color: var(--blue-dark); font-size: 0.86rem; padding: 16px; background: var(--white); border-radius: 12px; margin: 22px 0; border: 1px dashed var(--blue-mid); }
  .post-card { background: var(--white); border-radius: 16px; padding: 20px; margin-bottom: 18px; box-shadow: 0 3px 14px rgba(147,84,71,0.09); border: 1px solid #faf1ec; transition: box-shadow .25s ease, transform .25s cubic-bezier(.2,.8,.3,1), border-color .25s ease; animation: postIn .35s ease; }
  .post-card:hover { box-shadow: 0 12px 30px rgba(147,84,71,0.18); transform: translateY(-3px); border-color: var(--sky); }
  @keyframes postIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  .post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
  .post-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-mid), var(--blue-dark)); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.95rem; flex-shrink: 0; overflow: hidden; box-shadow: 0 2px 6px rgba(147,84,71,0.3); }
  .post-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .post-author { font-weight: 700; color: var(--blue-dark); font-size: 0.9rem; }
  .post-date { font-size: 0.72rem; color: var(--text-light); }
  .post-title { font-weight: 700; font-size: 1.02rem; margin-bottom: 6px; color: var(--text); }
  .post-body { font-size: 0.89rem; line-height: 1.7; color: var(--text); white-space: pre-wrap; margin-bottom: 12px; }
  .post-actions { display: flex; gap: 8px; border-top: 1px solid #faf1ec; padding-top: 10px; }
  .post-action-btn { background: none; border: none; display: flex; align-items: center; gap: 6px; font-size: 0.83rem; font-weight: 600; color: var(--text-light); cursor: pointer; padding: 8px 12px; border-radius: 20px; transition: background .25s cubic-bezier(.4,0,.2,1), color .25s cubic-bezier(.4,0,.2,1), transform .2s cubic-bezier(.4,0,.2,1); flex: 1; justify-content: center; }
  .post-action-btn:hover { background: var(--sky-pale); color: var(--blue-mid); transform: translateY(-1px); }
  .post-action-btn:active { transform: scale(0.96); }
  .post-action-btn.liked { color: var(--red); }
  .post-action-btn .like-icon, .post-action-btn .comment-icon, .post-action-btn .share-icon { display: flex; align-items: center; justify-content: center; transition: transform .3s cubic-bezier(.4,0,.2,1); }
  .post-action-btn .like-icon svg, .post-action-btn .comment-icon svg, .post-action-btn .share-icon svg { display: block; }
  .post-action-btn .like-icon svg path { transition: fill .25s ease; }
  .post-action-btn.liked .like-icon svg path { fill: currentColor; }
  .like-count { font-size: 0.8rem; font-weight: 700; min-width: 10px; text-align: left; transition: color .25s ease; }
  .post-action-btn.liked .like-icon { animation: likeBounce .5s cubic-bezier(.22,1,.36,1); }
  .post-action-btn.like-burst .like-icon { transform: scale(1.2); }
  .post-action-btn.comments-active { background: var(--sky-pale); color: var(--blue-mid); }
  .post-action-btn.comments-active .comment-icon { transform: rotate(-6deg) scale(1.08); }
  .post-action-btn:hover .share-icon { transform: rotate(-14deg) scale(1.08); }
  .post-action-btn.share-pulse { background: #e6f7ec; color: #1f8a4c; animation: sharePulse .6s cubic-bezier(.22,1,.36,1); }
  @keyframes likeBounce { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 70% { transform: scale(0.94); } 100% { transform: scale(1); } }
  @keyframes sharePulse { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
  .like-particle { position: fixed; z-index: 999; font-size: 1rem; pointer-events: none; transform: translate(-50%, -50%); animation: likeFloat .85s cubic-bezier(.22,1,.36,1) forwards; }
  @keyframes likeFloat {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
    25% { opacity: 1; transform: translate(calc(-50% + var(--tx) * 0.3), calc(-50% + var(--ty) * 0.3)) scale(1.1); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.75); }
  }
  .comment-box { max-height: 0; overflow: hidden; margin-top: 0; border-top: 1px solid transparent; padding-top: 0; transition: max-height .4s cubic-bezier(.4,0,.2,1), margin-top .4s cubic-bezier(.4,0,.2,1), padding-top .4s cubic-bezier(.4,0,.2,1), border-color .4s ease; }
  .comment-box.open { max-height: 900px; margin-top: 12px; border-top: 1px solid #faf1ec; padding-top: 12px; }
  .comment-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-size: 0.83rem; margin-bottom: 8px; line-height: 1.5; background: var(--sky-pale); padding: 8px 12px; border-radius: 10px; animation: commentIn .3s cubic-bezier(.4,0,.2,1); transition: opacity .22s cubic-bezier(.4,0,.2,1), transform .22s cubic-bezier(.4,0,.2,1); }
  .comment-item.comment-item-removing { opacity: 0; transform: scale(0.96) translateY(-4px); }
  @keyframes commentIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
  .comment-item-main { flex: 1; }
  .comment-item b { color: var(--blue-dark); }
  .comment-edited-tag { font-size: 0.7rem; color: var(--text-light); margin-left: 6px; font-style: italic; }
  .comment-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
  .comment-mini-btn { background: var(--white); border: 1px solid #f0ddd3; border-radius: 8px; width: 26px; height: 26px; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, transform .12s, border-color .15s; padding: 0; }
  .comment-mini-btn:hover { background: var(--sky-pale); border-color: var(--blue-mid); transform: translateY(-1px); }
  .comment-mini-btn:active { transform: scale(0.9); }
  .comment-mini-delete:hover { background: #fde8e8; border-color: var(--red); }
  .comment-mini-save:hover { background: #e6f7ec; border-color: #1f8a4c; }
  .comment-item-editing { flex-direction: column; align-items: stretch; background: var(--white); border: 1.5px solid var(--blue-mid); }
  .comment-edit-input { width: 100%; border: 1.5px solid #f0ddd3; border-radius: 8px; padding: 7px 10px; font-family: inherit; font-size: 0.83rem; resize: vertical; margin-bottom: 6px; }
  .comment-edit-input:focus { outline: none; border-color: var(--blue-mid); }
  .comment-item-editing .comment-item-actions { justify-content: flex-end; }
  .comment-input-row { display: flex; gap: 8px; margin-top: 10px; }
  .comment-input-row input { flex: 1; border: 1.5px solid #f0ddd3; border-radius: 20px; padding: 9px 15px; font-family: inherit; font-size: 0.83rem; transition: border-color .15s, box-shadow .15s; }
  .comment-input-row input:focus { outline: none; border-color: var(--blue-mid); box-shadow: 0 0 0 3px rgba(147,84,71,0.12); }
  .comment-input-row button { background: var(--blue-mid); color: var(--white); border: none; padding: 9px 18px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; cursor: pointer; transition: background .15s, transform .12s; }
  .comment-input-row button:hover { background: var(--blue-dark); }
  .comment-input-row button:active { transform: scale(0.94); }
  .posts-empty, .posts-loading { text-align: center; color: var(--text-light); font-size: 0.88rem; padding: 30px 20px; background: var(--white); border-radius: 14px; }
  .gallery-loading { color: var(--text-light); font-size: 0.93rem; padding: 32px; }

  /* LIGHTBOX */
  .lb-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.88); z-index: 900; }
  .lb-backdrop.open { display: flex; align-items: center; justify-content: center; }
  .lb-img { max-width: 90vw; max-height: 80vh; border-radius: 8px; object-fit: contain; }
  .lb-close { position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }
  .lb-caption { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 0.93rem; background: rgba(0,0,0,0.5); padding: 8px 18px; border-radius: 20px; max-width: 80vw; text-align: center; }

  /* LEKH MODAL */
  .lekh-backdrop { display: none; position: fixed; inset: 0; background: rgba(10,20,40,0.72); z-index: 800; }
  .lekh-backdrop.open { display: block; }
  .lekh-modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.96); width: min(720px, 92vw); max-height: 82vh; overflow-y: auto; background: var(--white); border-radius: 16px; z-index: 810; box-shadow: 0 16px 60px rgba(10,20,60,0.28); padding: 40px 36px 36px; }
  .lekh-modal.open { display: block; transform: translate(-50%,-50%) scale(1); }
  .lekh-close { position: absolute; top: 14px; right: 18px; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-light); }

  /* ══ ABOUT MODAL (विशेषता + सूचना + ग्यालरी) ══ */
  .about-backdrop { display: none; position: fixed; inset: 0; background: rgba(10,20,40,0.72); z-index: 800; }
  .about-backdrop.open { display: block; }
  .about-modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.97); width: min(980px, 94vw); max-height: 90vh; overflow-y: auto; background: var(--white); border-radius: 16px; z-index: 810; box-shadow: 0 16px 60px rgba(10,20,60,0.28); }
  .about-modal.open { display: block; transform: translate(-50%,-50%) scale(1); }
  .about-close { position: sticky; top: 12px; float: right; margin: 12px 14px 0 0; background: var(--white); border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-light); width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.15); z-index: 5; }
  .about-modal-inner section { padding: 44px 5%; }
  .lekh-content h2 { font-family: 'Noto Serif Devanagari', serif; color: var(--blue-dark); font-size: 1.5rem; margin-bottom: 6px; }
  .lekh-content .lekh-sub { color: var(--text-light); font-size: 0.85rem; margin-bottom: 22px; }
  .lekh-content p { line-height: 1.9; font-size: 0.97rem; color: var(--text); margin-bottom: 14px; }
  .lekh-content h3 { font-family: 'Noto Serif Devanagari', serif; color: var(--blue-mid); font-size: 1.1rem; margin: 22px 0 8px; }

  /* CTA */
  .cta-section { background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 55%, var(--blue-light) 100%); padding: 78px 5%; text-align: center; color: var(--white); }
  .cta-section h2 { font-family: 'Noto Serif Devanagari', serif; font-size: clamp(1.2rem, 2.5vw, 1.9rem); margin-bottom: 12px; }
  .cta-section p { opacity: .85; margin-bottom: 28px; font-size: 0.97rem; }
  .btn-white { background: var(--white); color: var(--blue-dark); padding: 13px 30px; border-radius: 8px; font-size: 0.98rem; font-weight: 700; text-decoration: none; display: inline-block; transition: transform .2s; }
  .btn-white:hover { transform: translateY(-2px); }

  /* FOOTER */
  footer { background: var(--blue-dark); color: #e0bfae; padding: 52px 5% 26px; }
  .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 32px; margin-bottom: 32px; }
  .footer-col h4 { color: var(--white); font-size: 0.93rem; font-weight: 700; margin-bottom: 12px; padding-bottom: 7px; border-bottom: 2px solid var(--blue-light); display: inline-block; }
  .footer-col p, .footer-col a { font-size: 0.82rem; line-height: 1.9; color: #e0bfae; text-decoration: none; display: block; }
  .footer-col a:hover { color: var(--white); }
  .footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.76rem; color: #b98d7a; }

  /* ══ BLACKBOARD NEWS SECTION ══ */
  .news-section { background: var(--sky-pale); padding: 0 5% 68px; }
  .news-inner   { max-width: 1100px; margin: 0 auto; }

  /* सूचना-पाटी title — नीलो banner भित्र, सेतो अक्षरमा, loop मा एनिमेटेड */
  .notice-panel-title { text-align: center; margin: 0; }
  .notice-panel-title span {
    display: inline-block;
    font-family: 'Noto Serif Devanagari', serif;
    font-weight: 900;
    font-size: 2.7rem;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 2px 16px rgba(59,130,209,0.7), 0 1px 4px rgba(0,0,0,0.3);
    animation: noticeTitlePulse 2.4s ease-in-out infinite;
  }
  @keyframes noticeTitlePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.06); opacity: 0.85; }
  }

  /* 0. बाहिरी wrapper — बाहिरी ब्याज ट्यागको लागि reference बनाउन */
  .bb-outer {
    position: relative;
  }

  /* 1. Outer board wrapper — fixed aspect ratio, clips everything */
  .bb-wrap {
    position: relative;
    width: 100%;
    margin-top: 32px;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
    background: transparent;
  }
  .bb-wrap:active { cursor: grabbing; }

  /* 2. Blackboard photo — तपाईँको फितो जस्ताको तस्तै देखिन्छ */
  .bb-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    pointer-events: none;
    z-index: 0;
  }

  /*
   * 3. Text viewport — sits over the chalk-writing area of the board.
   *    Board image has wooden frame (~10% top, ~12% bottom, ~8% sides).
   *    ALL text must stay inside this box — overflow:hidden enforces it.
   */
  .bb-viewport {
    position: absolute;
    top: 10%;
    bottom: 13%;
    left: 8%;
    right: 8%;
    overflow: hidden;          /* ← key: clips slides at board edge */
    z-index: 1;
  }

  /* 4. Slide strip — fills viewport, slides horizontally */
  .bb-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.45s cubic-bezier(.4,0,.2,1);
    will-change: transform;
  }

  /* 5. Each slide = exactly the viewport width/height */
  .bb-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;  /* शीर्षक जहिले पनि माथि नै, टेक्स्टको लम्बाइले तल-माथि नहोस् */
    text-align: center;
    box-sizing: border-box;
    padding: 0.5% 4% 2%;
    overflow: hidden;          /* extra safety per slide */
  }

  /* Chalk-style text — all sizes relative to vw so they scale with board */
  .bb-top-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;   /* ब्याज बाहिरिएपछि अब मिति मात्र, दायाँतिर */
    width: 100%;
    margin-bottom: 3%;
    gap: 8px;
  }
  .bb-date {
    font-family: var(--bb-font, 'Akshar', 'Noto Sans Devanagari', sans-serif);
    font-size: clamp(0.5rem, 1vw, 0.9rem);
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  }
  .bb-footer {
    font-family: var(--bb-font, 'Noto Sans Devanagari', sans-serif);
    font-size: clamp(0.4rem, 0.85vw, 0.7rem);
    font-style: italic;
    color: rgba(255,255,255,0.55);
    margin-top: 3%;
    width: 100%;
    text-align: right;
  }
  .bb-miti {
    font-family: var(--bb-font, 'Akshar', 'Noto Sans Devanagari', sans-serif);
    font-size: clamp(0.55rem, 1.1vw, 1.05rem);
    font-weight: 700;
    color: rgba(255,255,255,0.88);
    width: 100%;
    text-align: right;
    margin-bottom: 2%;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bb-heading {
    font-family: var(--bb-font, 'Akshar', 'Noto Sans Devanagari', sans-serif);
    font-size: clamp(0.85rem, 2vw, 1.9rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.6);
    margin-bottom: 3%;
    letter-spacing: 0.05em;
    text-decoration: underline;
    text-underline-offset: 4px;
    line-height: 1.3;
    width: 100%;
  }
  .bb-lines {
    display: flex;
    flex-direction: column;
    gap: 4%;
    width: 100%;
  }
  .bb-line {
    font-family: var(--bb-font, 'Akshar', 'Noto Sans Devanagari', sans-serif);
    font-size: clamp(0.6rem, 1.35vw, 1.2rem);
    color: rgba(255,255,255,0.92);
    line-height: 1.5;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    letter-spacing: 0.02em;
  }

  /* 6. Chalk dots — inside wrapper, below the writing area */
  .bb-dots {
    position: absolute;
    bottom: 4%;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 2;
    pointer-events: none;
  }
  .bb-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.32);
    border: none;
    pointer-events: all;
    cursor: pointer;
    transition: background .25s, transform .25s;
    padding: 0;
  }
  .bb-dot.active { background: rgba(255,255,255,0.92); transform: scale(1.4); }

  /* Loading */
  .bb-loading-msg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    z-index: 3;
  }

  /* ── Exam table inside blackboard ── */
  .bb-table-wrap {
    width: 100%;
    overflow: hidden;
  }
  .bb-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--bb-font, 'Akshar', 'Noto Sans Devanagari', sans-serif);
    table-layout: fixed;
  }
  .bb-table th {
    font-size: clamp(0.45rem, 1vw, 0.72rem);
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: clamp(1px, 0.5%, 4px) clamp(1px, 0.8%, 6px);
    text-align: center;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
  .bb-table td {
    font-size: clamp(0.4rem, 0.9vw, 0.65rem);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.18);
    padding: clamp(1px, 0.4%, 3px) clamp(1px, 0.6%, 5px);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  }
  .bb-table td:first-child {
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    font-size: clamp(0.38rem, 0.82vw, 0.6rem);
  }
  .bb-table tr:nth-child(even) td {
    background: rgba(255,255,255,0.05);
  }

  /* ── RESULT BUTTON ── */
  .btn-result {
    background: #15803d;
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.93rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, transform .15s;
    display: inline-block;
    cursor: pointer;
  }
  .btn-result:hover { background: #166534; transform: translateY(-1px); }

  /* ── RESULT MODAL ── */
  #resultModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
  .rm-box {
    background: var(--white);
    border-radius: 16px;
    padding: 32px 28px 28px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.28);
    position: relative;
    font-family: 'Noto Sans Devanagari', sans-serif;
  }
  .rm-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
  }
  .rm-title {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 22px;
    text-align: center;
  }
  .rm-field { margin-bottom: 14px; }
  .rm-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 5px;
  }
  .rm-field input, .rm-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e8d2c8;
    border-radius: 8px;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    transition: border .2s;
  }
  .rm-field input:focus, .rm-field select:focus { border-color: var(--blue-mid); }
  .rm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .rm-btn {
    width: 100%;
    margin-top: 8px;
    background: var(--blue-mid);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
  }
  .rm-btn:hover { background: var(--blue-dark); }
  .rm-error { color: var(--red); font-size: 0.82rem; margin-top: 6px; text-align: center; display:none; }

  /* ── RESULT TABLE ── */
  #resultDisplay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
  .rd-box {
    background: var(--white);
    border-radius: 16px;
    padding: 28px;
    max-width: 580px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0,0,0,0.28);
    position: relative;
    font-family: 'Noto Sans Devanagari', sans-serif;
  }
  .rd-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
  }
  .rd-name {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 4px;
  }
  .rd-meta { font-size: 0.82rem; color: var(--text-light); margin-bottom: 18px; }
  .rd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
  }
  .rd-table th {
    background: var(--blue-mid);
    color: var(--white);
    padding: 8px 12px;
    text-align: left;
    font-weight: 700;
  }
  .rd-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3e2d8;
    color: var(--text);
  }
  .rd-table tr:nth-child(even) td { background: var(--sky-pale); }
  .rd-total {
    margin-top: 12px;
    text-align: right;
    font-weight: 700;
    color: var(--blue-dark);
    font-size: 0.95rem;
  }
  .rd-back {
    margin-top: 14px;
    background: none;
    border: 2px solid var(--blue-mid);
    color: var(--blue-mid);
    border-radius: 8px;
    padding: 8px 18px;
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s;
  }
  .rd-back:hover { background: var(--blue-mid); color: var(--white); }

  @media (min-width: 681px) {
    .hero { padding: 50px 5%; }
    .hero-text { max-width: 520px; }
  }

  /* ══ माथिल्लो भाग (header+hero+stats) सधैं desktop layout मा, तल भने mobile-responsive ══ */
  #siteHeader { width: 1080px; position: fixed; top: 0; left: 0; transform-origin: top left; }
  #desktopTopWrap { overflow: hidden; }
  #desktopTopInner { width: 1080px; }
  #siteHeader, #desktopTopWrap { opacity: 0; }
  #siteHeader.top-ready, #desktopTopWrap.top-ready { opacity: 1; transition: opacity .18s ease; }
  @media (min-width: 1080px) {
    #siteHeader { width: 100%; position: sticky; transform: none !important; }
    #headerSpacer { height: auto !important; }
    #desktopTopInner { width: 100%; transform: none !important; }
    #desktopTopWrap { overflow: visible; height: auto !important; }
  }
