/* ======================================================
   SMART21BRAIN — CORE STYLESHEET
   Design system: tokens, typography, components
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Nunito:wght@400;500;600;700;800&display=swap');

/* Kill AOS's scroll-reveal fade/translate entirely. AOS's own CSS starts
   every [data-aos] element at opacity:0 with a transform offset until it
   scrolls into view and its JS adds .aos-animate. If a screenshot/PDF/
   capture tool (or a slow device, or a scroll-and-stitch "full page"
   capture) grabs the page mid-transition, content renders partially
   transparent and visually "ghosts" through whatever is behind it —
   exactly the double-exposed, overlapping look this was causing across
   the site. Forcing full opacity and no offset removes that risk
   completely; content is simply always visible, no reveal animation. */
[data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

:root {
  /* ---- Brand palette (from brief) ---- */
  --s21-primary: #0B6E4F;
  --s21-primary-dark: #084F39;
  --s21-primary-light: #E4F3EC;
  --s21-secondary: #FFD166;
  --s21-secondary-dark: #E8B334;
  --s21-secondary-tint: #FFF6E0;
  --s21-accent: #EF476F;
  --s21-accent-dark: #D22F58;
  --s21-accent-tint: #FDECF1;
  --s21-bg: #F7FAF8;
  --s21-text: #1E2A24;
  --s21-text-soft: #5B6470;
  --s21-white: #FFFFFF;
  --s21-border: #E7E9EC;

  /* ---- Subject accent colors (per learning strand) ---- */
  --subj-math: #3A86FF;
  --subj-science: #06A77D;
  --subj-language: #FF6B81;
  --subj-computer: #7B61FF;
  --subj-social: #FF9F1C;
  --subj-creative: #EF6C00;

  /* ---- Surfaces ---- */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --card-shadow: 0 4px 18px rgba(11, 110, 79, 0.08);
  --card-shadow-hover: 0 14px 32px rgba(11, 110, 79, 0.16);

  /* ---- Page background: soft blue + green tint instead of flat white ---- */
  --s21-bg-image: linear-gradient(135deg, #EAF4FF 0%, #F6FBF8 42%, #E7F5EC 100%);

  /* ---- Type ---- */
  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;

  /* ---- Radii / spacing ---- */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* ---- Transitions ---- */
  --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-theme="dark"] {
  --s21-bg: #0F1712;
  --s21-text: #EDEFEC;
  --s21-text-soft: #9DA8A2;
  --s21-white: #17221C;
  --s21-border: #23302A;
  --s21-primary-light: #16302A;
  --glass-bg: rgba(23, 34, 28, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.5);
  --s21-bg-image: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--s21-bg);
  background-image: var(--s21-bg-image);
  background-attachment: fixed;
  color: var(--s21-text);
  line-height: 1.6;
  transition: background .3s var(--ease), color .3s var(--ease);
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--s21-text);
}

a { color: var(--s21-primary); text-decoration: none; }
a:hover { color: var(--s21-accent); }

.text-soft { color: var(--s21-text-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--s21-primary);
  background: var(--s21-primary-light);
  padding: .4rem .9rem;
  border-radius: var(--radius-pill);
}

.section {
  padding: 5rem 0;
}
.section-tight { padding: 3rem 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

/* ---- Buttons ---- */
.btn-s21 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .95rem;
  padding: .8rem 1.6rem;
  border-radius: var(--radius-pill);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn-s21:active { transform: translateY(1px); }

.btn-s21-primary {
  background: var(--s21-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 110, 79, .28);
}
.btn-s21-primary:hover {
  background: var(--s21-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(11, 110, 79, .34);
}

.btn-s21-secondary {
  background: var(--s21-secondary);
  color: #3D2B00;
  box-shadow: 0 8px 20px rgba(255, 209, 102, .35);
}
.btn-s21-secondary:hover {
  background: var(--s21-secondary-dark);
  color: #3D2B00;
  transform: translateY(-2px);
}

.btn-s21-outline {
  background: transparent;
  color: var(--s21-text);
  border: 2px solid var(--s21-border);
}
.btn-s21-outline:hover {
  border-color: var(--s21-primary);
  color: var(--s21-primary);
  transform: translateY(-2px);
}

.btn-s21-ghost-white {
  background: rgba(255,255,255,.16);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.5);
  backdrop-filter: blur(6px);
}
.btn-s21-ghost-white:hover { background: rgba(255,255,255,.28); color: #fff; }

/* ---- Navbar ---- */
.s21-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
  padding: .7rem 0;
}

.s21-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--s21-text);
}
.s21-logo .mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--s21-primary), var(--s21-primary-dark));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(11,110,79,.35);
  flex-shrink: 0;
}
.s21-logo .mark svg { width: 24px; height: 24px; }
.s21-logo .brand-21 { color: var(--s21-secondary); }

.s21-nav-link {
  font-weight: 600;
  font-size: .95rem;
  color: var(--s21-text);
  padding: .55rem 1rem !important;
  border-radius: var(--radius-pill);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.s21-nav-link:hover, .s21-nav-link.active {
  background: var(--s21-secondary);
  color: #3D2B00;
}

.icon-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--s21-border);
  background: var(--s21-white);
  color: var(--s21-text);
  transition: all .2s var(--ease);
}
.icon-btn:hover { border-color: var(--s21-primary); color: var(--s21-primary); transform: translateY(-2px); }

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 4.5rem;
  min-height: 640px;
  display: flex;
  align-items: center;
  background-color: var(--s21-primary-dark);
  background-size: cover;
  background-position: center;
  color: #fff;
  isolation: isolate;
}
/* Photo hero: dark brand-tinted gradient so white text stays readable over any image */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(6,20,15,.94) 8%, rgba(8,45,33,.86) 42%, rgba(11,110,79,.5) 75%, rgba(8,45,33,.4) 100%);
  z-index: -2;
}
/* Fine dot texture on top of the overlay for depth */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  opacity: .5;
  z-index: -1;
  pointer-events: none;
}
/* Hero without a photo (interior pages) falls back to the brand gradient */
.hero.hero-plain {
  min-height: 0;
  background-image: none !important;
}
.hero.hero-plain::before {
  background: radial-gradient(120% 100% at 15% 0%, #0E8060 0%, var(--s21-primary) 45%, var(--s21-primary-dark) 100%);
}

.hero-badge {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  backdrop-filter: blur(6px);
  font-family: var(--font-body);
  font-size: .74rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .5rem 1rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  line-height: 1.1;
}
.hero h1 em {
  font-style: italic;
  font-weight: 700;
  color: var(--s21-secondary);
}
.hero .lead {
  color: rgba(255,255,255,.88);
  font-size: 1.15rem;
  max-width: 540px;
}
.hero .lead-sub {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  max-width: 560px;
}

/* Divider link under the CTA row, e.g. "View all subjects" */
.hero-divider-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255,255,255,.25);
  width: 100%;
  max-width: 300px;
}
.hero-divider-link a {
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: var(--radius-pill);
  padding: .6rem 1.3rem;
  transition: all .2s var(--ease);
}
.hero-divider-link a:hover { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; }
.hero-search {
  background: #fff;
  border-radius: var(--radius-pill);
  padding: .5rem .5rem .5rem 1.4rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 20px 44px rgba(0,0,0,.22);
  max-width: 560px;
}
.hero-search input {
  border: none; outline: none; flex: 1;
  font-family: var(--font-body); font-size: .98rem;
  padding: .6rem 0;
  background: transparent;
  color: var(--s21-text);
}
.hero-search button {
  background: var(--s21-accent);
  color: #fff; border: none;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Learning-path signature element in hero */
.hero-path { position: relative; }
.path-node {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  color: #fff; font-weight: 700; font-size: .78rem; text-align: center;
  width: 92px;
}
.path-node .dot {
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  border: 3px solid rgba(255,255,255,.55);
}
.hero-visual-card {
  background: var(--glass-bg);
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  color: var(--s21-text);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}

.stat-strip {
  display: flex; flex-wrap: wrap; gap: 2.2rem;
  margin-top: 2.6rem;
}
.stat-strip .num {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 700; color: #fff;
}
.stat-strip .label { color: rgba(255,255,255,.75); font-size: .82rem; }

/* ---- Cards ---- */
.s21-card {
  background: var(--s21-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--s21-border);
  box-shadow: var(--card-shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  overflow: hidden;
  height: 100%;
}
/* Use on any .s21-card placed inside a Bootstrap .row alongside a taller
   sibling column (e.g. a sticky sidebar next to long article content).
   .s21-card's own `height: 100%` combined with the row's default flex
   stretch makes the card match the TALLEST column in the row — if that
   card is also `position: sticky`, it becomes a giant sticky box that
   overlaps content/footer far below it as the page scrolls. This class
   opts a card out of that stretch so it only sticks to its own content. */
.sticky-card {
  height: auto;
  align-self: flex-start;
}
.s21-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

.subject-card {
  padding: 1.6rem;
  display: flex; flex-direction: column; gap: .9rem;
  border-left: 5px solid var(--tint, var(--s21-primary));
}
.subject-card .subject-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: color-mix(in srgb, var(--tint, var(--s21-primary)) 14%, white);
  color: var(--tint, var(--s21-primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}

.media-card { position: relative; }
.media-card .thumb-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--s21-primary-light); }
.media-card .thumb-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.media-card:hover .thumb-wrap img { transform: scale(1.08); }
.media-card .play-btn {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.media-card .play-btn span {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--s21-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transform: scale(.85);
  transition: transform .3s var(--ease);
}
.media-card:hover .play-btn span { transform: scale(1); }
.media-card .duration-badge {
  position: absolute; bottom: .6rem; right: .6rem;
  background: rgba(0,0,0,.72); color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: .18rem .5rem; border-radius: 6px;
}
.media-card .cat-badge {
  position: absolute; top: .6rem; left: .6rem;
  background: var(--s21-secondary); color: #3D2B00;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: .25rem .6rem; border-radius: var(--radius-pill);
}
.media-card .body { padding: 1rem 1.1rem 1.2rem; }
.media-card .body h3 { font-size: 1rem; margin-bottom: .35rem; }
.media-card .meta { font-size: .82rem; color: var(--s21-text-soft); display: flex; align-items: center; gap: .5rem; }

.book-card .cover-wrap { aspect-ratio: 3/4; overflow: hidden; background: var(--s21-primary-light); position: relative; }
.book-card .cover-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.book-card:hover .cover-wrap img { transform: scale(1.06) rotate(-.5deg); }

.game-card { text-align: center; padding: 1.6rem 1.2rem; position: relative; }
.game-emoji {
  width: 68px; height: 68px; margin: 0 auto .9rem;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--s21-secondary), #FFB703);
  box-shadow: 0 10px 22px rgba(255,183,3,.35);
}

.badge-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; font-weight: 700;
  padding: .3rem .7rem; border-radius: var(--radius-pill);
  background: var(--s21-primary-light); color: var(--s21-primary);
}
.badge-pill.pink { background: var(--s21-accent-tint); color: var(--s21-accent); }
.badge-pill.gold { background: var(--s21-secondary-tint); color: #A66A00; }

.progress-s21 {
  height: 8px; border-radius: var(--radius-pill);
  background: var(--s21-border); overflow: hidden;
}
.progress-s21 span {
  display: block; height: 100%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--s21-primary), #16A76B);
}

/* ---- Testimonials ---- */
.testimonial-card {
  padding: 1.8rem;
  position: relative;
}
.testimonial-card .quote-mark {
  font-family: var(--font-display);
  font-size: 3rem; color: var(--s21-secondary);
  line-height: 1; margin-bottom: -.6rem;
}
.avatar-ring {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--s21-secondary); padding: 2px;
}
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ---- Newsletter / CTA ---- */
.cta-band {
  background: linear-gradient(120deg, var(--s21-accent), #FF6B8B);
  border-radius: var(--radius-lg);
  padding: 3rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* ---- Footer ---- */
.s21-footer {
  background: #0C1712;
  color: #C8D2CC;
  padding: 4rem 0 1.5rem;
}
.s21-footer h6 {
  color: #fff; font-family: var(--font-body); font-weight: 700;
  font-size: .85rem; text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 1.1rem;
}
.s21-footer a { color: #A9B7AF; }
.s21-footer a:hover { color: var(--s21-secondary); }
.s21-footer .social-circle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid #2A3A32;
  display: flex; align-items: center; justify-content: center;
  color: #C8D2CC;
}
.s21-footer .social-circle:hover { background: var(--s21-primary); border-color: var(--s21-primary); color: #fff; }
.footer-bottom { border-top: 1px solid #1C2921; padding-top: 1.5rem; font-size: .85rem; color: #7E8C84; }

/* ---- Floating actions ---- */
.floating-stack {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 1200;
  display: flex; flex-direction: column; gap: .7rem; align-items: flex-end;
}
.fab {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.25rem; border: none;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
  transition: transform .25s var(--ease);
}
.fab:hover { transform: scale(1.08); }
.fab.whatsapp { background: #25D366; }
.fab.ai { background: linear-gradient(135deg, var(--s21-accent), #FF7A9C); }
.fab.top { background: var(--s21-text); width: 44px; height: 44px; font-size: 1rem; opacity: 0; pointer-events: none; }
.fab.top.show { opacity: 1; pointer-events: auto; }

.fab-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  border: 3px solid var(--s21-secondary);
  padding: 0; overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
  transition: transform .25s var(--ease);
  position: relative;
}
.fab-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fab-avatar::after {
  content: "";
  position: absolute; bottom: 1px; right: 1px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #2ECC71; border: 2px solid #fff;
}
.fab-avatar:hover { transform: scale(1.08); }

/* ---- Search dropdown ---- */
.s21-search-wrap { position: relative; }
.s21-search-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + .7rem);
  background: var(--s21-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--s21-border);
  box-shadow: 0 20px 48px rgba(0,0,0,.18);
  padding: 1rem;
  display: none;
  z-index: 50;
  text-align: left;
  max-height: 360px;
  overflow-y: auto;
}
.s21-search-panel.open { display: block; }
.s21-search-group { margin-bottom: .8rem; }
.s21-search-group span {
  display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--s21-text-soft); margin-bottom: .4rem;
}
.s21-search-item {
  display: flex; align-items: center; gap: .55rem;
  width: 100%; text-align: left; background: none; border: none;
  padding: .5rem .6rem; border-radius: 10px; font-size: .9rem; color: var(--s21-text);
}
.s21-search-item:hover { background: var(--s21-primary-light); color: var(--s21-primary); }
.s21-search-item em { margin-left: auto; font-style: normal; font-size: .72rem; color: var(--s21-text-soft); }
.s21-search-empty { font-size: .85rem; color: var(--s21-text-soft); padding: .4rem .6rem; }

/* ---- Favorite / heart buttons ---- */
.fav-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.92); color: var(--s21-text-soft);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.fav-btn.is-fav { color: var(--s21-accent); }
.fav-btn.is-fav i { font-weight: 900; }

@keyframes s21-heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  60% { transform: scale(.9); }
  100% { transform: scale(1); }
}
.fav-btn.is-popping i,
[data-fav-id].is-popping i { animation: s21-heart-pop .45s var(--ease); }

/* ---- Toast notifications ---- */
.s21-toast-stack {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  z-index: 2400;
  display: flex;
  flex-direction: column-reverse;
  gap: .6rem;
  width: min(92vw, 380px);
  pointer-events: none;
}
.s21-toast {
  display: flex;
  align-items: center;
  gap: .65rem;
  background: var(--s21-white);
  color: var(--s21-text);
  border: 1px solid var(--s21-border);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 32px rgba(0,0,0,.28);
  padding: .75rem 1rem;
  font-size: .88rem;
  font-weight: 600;
  pointer-events: auto;
  animation: s21-toast-in .35s var(--ease) both;
}
.s21-toast.is-leaving { animation: s21-toast-out .3s var(--ease) both; }
.s21-toast .s21-toast-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  background: var(--s21-primary-light); color: var(--s21-primary);
}
.s21-toast.is-success .s21-toast-icon { background: var(--s21-primary-light); color: var(--s21-primary); }
.s21-toast.is-error .s21-toast-icon { background: var(--s21-accent-tint); color: var(--s21-accent); }
.s21-toast.is-info .s21-toast-icon { background: var(--s21-secondary-tint); color: #A66A00; }

@keyframes s21-toast-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes s21-toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(10px) scale(.96); }
}

@media (max-width: 575.98px) {
  .s21-toast-stack { bottom: 5.5rem; } /* clear the floating action buttons on mobile */
}

/* ---- A touch more tactile feedback on interactive chrome ---- */
.icon-btn:active,
.fav-btn:active,
[data-fav-id]:active { transform: scale(.9); }
.badge-pill { transition: transform .18s var(--ease); }
a.badge-pill:hover, button.badge-pill:hover { transform: translateY(-1px); }

/* ---- Inline button spinner (form submit / async actions) ---- */
.btn-s21.is-loading { pointer-events: none; opacity: .85; }
.btn-s21 .btn-spinner { display: inline-block; }

/* ---- AI Assistant panel ---- */
#s21-ai-panel {
  position: fixed; right: 1.4rem; bottom: 6rem; z-index: 1300;
  width: min(360px, 90vw); max-height: 480px;
  background: var(--s21-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  border: 1px solid var(--s21-border);
  display: flex; flex-direction: column;
  transform: translateY(16px) scale(.97); opacity: 0; pointer-events: none;
  transition: all .25s var(--ease);
  overflow: hidden;
}
#s21-ai-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
#s21-ai-panel .ai-head {
  background: var(--s21-primary); color: #fff; padding: 1rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between;
}
#s21-ai-panel .ai-log { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.ai-bubble { padding: .6rem .9rem; border-radius: 14px; font-size: .88rem; max-width: 85%; }
.ai-bubble-user { align-self: flex-end; background: var(--s21-primary-light); color: var(--s21-primary-dark); }
.ai-bubble-ai { align-self: flex-start; background: var(--s21-accent-tint); color: #7A0E33; }
#s21-ai-panel form { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid var(--s21-border); }
#s21-ai-panel form input { flex: 1; border: 1px solid var(--s21-border); border-radius: var(--radius-pill); padding: .55rem 1rem; font-size: .88rem; }
#s21-ai-panel form button { border: none; background: var(--s21-accent); color: #fff; width: 40px; border-radius: 50%; }
.ai-disclaimer { font-size: .72rem; color: var(--s21-text-soft); padding: 0 1.2rem .7rem; }

/* ---- Game screen (Addition Race, etc.) ---- */
.game-panel {
  background: linear-gradient(160deg, var(--s21-primary) 0%, var(--s21-primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  color: #fff;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.game-panel::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.1) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  z-index: 0;
}
.game-panel > * { position: relative; z-index: 1; }

.game-hud {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; margin-bottom: 1.6rem; flex-wrap: wrap; gap: .8rem;
}
.game-hud .hud-chip {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-pill);
  padding: .4rem 1rem;
  font-weight: 700;
  font-size: .85rem;
  display: flex; align-items: center; gap: .4rem;
}

.game-problem-display {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.6rem;
}

.game-answer-input {
  width: 160px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  padding: .6rem;
  color: var(--s21-text);
}

.game-emoji-lg { font-size: 4.5rem; line-height: 1; margin-bottom: 1rem; }

/* ---- Book reader ---- */
.reader-shell {
  background: var(--s21-white);
  border: 1px solid var(--s21-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.reader-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .6rem;
  padding: .8rem 1.1rem;
  background: var(--s21-primary-light);
  border-bottom: 1px solid var(--s21-border);
}
.reader-toolbar .grp { display: flex; align-items: center; gap: .3rem; }
.reader-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--s21-border);
  background: var(--s21-white);
  color: var(--s21-text);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: all .2s var(--ease);
}
.reader-btn:hover:not(:disabled) { border-color: var(--s21-primary); color: var(--s21-primary); }
.reader-btn:disabled { opacity: .4; cursor: not-allowed; }
.reader-btn.is-active { background: var(--s21-primary); color: #fff; border-color: var(--s21-primary); }
.reader-page-indicator { font-size: .85rem; font-weight: 700; color: var(--s21-text-soft); min-width: 90px; text-align: center; }

.reader-page-area {
  min-height: 420px;
  max-height: 560px;
  overflow-y: auto;
  padding: 3rem 3.5rem;
  background: #FFFDF7;
  transition: font-size .2s var(--ease), transform .2s var(--ease);
}
[data-theme="dark"] .reader-page-area { background: #10241C; }
.reader-page-area h2 {
  font-size: 1.4em;
  margin-bottom: .8rem;
}
.reader-page-area p {
  line-height: 1.9;
  margin-bottom: 1rem;
}
.reader-page-area mark {
  background: var(--s21-secondary);
  color: #3D2B00;
  border-radius: 3px;
  padding: 0 .1em;
}

@media (max-width: 575.98px) {
  .reader-page-area { padding: 1.6rem 1.2rem; max-height: 440px; }
}

/* ---- Quiz ---- */
.quiz-option {
  display: flex; align-items: center; gap: .8rem;
  width: 100%; text-align: left;
  padding: .9rem 1.1rem;
  border: 2px solid var(--s21-border);
  border-radius: var(--radius-md);
  background: var(--s21-white);
  font-weight: 600; font-size: .95rem;
  color: var(--s21-text);
  transition: all .18s var(--ease);
}
.quiz-option:hover:not(:disabled) { border-color: var(--s21-primary); background: var(--s21-primary-light); }
.quiz-option .opt-letter {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--s21-primary-light); color: var(--s21-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; flex-shrink: 0;
}
.quiz-option.is-correct { border-color: #0B6E4F; background: #E4F3EC; }
.quiz-option.is-correct .opt-letter { background: #0B6E4F; color: #fff; }
.quiz-option.is-wrong { border-color: var(--s21-accent); background: var(--s21-accent-tint); }
.quiz-option.is-wrong .opt-letter { background: var(--s21-accent); color: #fff; }
.quiz-option:disabled { cursor: default; opacity: .85; }

.quiz-progress-track {
  display: flex; gap: .35rem; margin-bottom: 1.6rem;
}
.quiz-progress-track span {
  flex: 1; height: 6px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.25);
}
.quiz-progress-track span.done { background: var(--s21-secondary); }
.quiz-progress-track span.current { background: #fff; }

/* ---- Auth pages ---- */
.auth-shell {
  min-height: 100vh;
  display: flex;
}
.auth-visual {
  flex: 1;
  background: linear-gradient(160deg, var(--s21-primary) 0%, var(--s21-primary-dark) 100%);
  background-image: linear-gradient(160deg, rgba(6,20,15,.7), rgba(11,110,79,.55)), url('https://images.unsplash.com/photo-1544776193-352d25ca82cd?w=1200&q=70&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background-color: var(--s21-bg);
  background-image: var(--s21-bg-image);
}
.auth-card { width: 100%; max-width: 420px; }
.auth-role-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin-bottom: 1.6rem;
}
.auth-role-tabs input { display: none; }
.auth-role-tabs label {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  border: 2px solid var(--s21-border);
  border-radius: var(--radius-md);
  padding: .7rem .3rem;
  font-size: .74rem; font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.auth-role-tabs input:checked + label {
  border-color: var(--s21-primary);
  background: var(--s21-primary-light);
  color: var(--s21-primary);
}
.auth-input-group { position: relative; }
.auth-input-group .toggle-pw {
  position: absolute; right: .9rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--s21-text-soft);
}
.form-control.s21-input {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--s21-border);
  padding: .7rem 1rem;
}
.form-control.s21-input:focus {
  border-color: var(--s21-primary);
  box-shadow: 0 0 0 3px var(--s21-primary-light);
}
.was-validated .form-control:invalid { border-color: var(--s21-accent); }

@media (max-width: 991.98px) {
  .auth-visual { display: none; }
}

/* ---- Dashboard ---- */
.dash-welcome {
  background: linear-gradient(120deg, var(--s21-primary) 0%, #0E8060 100%);
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.dash-welcome::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
}
.dash-welcome > * { position: relative; z-index: 1; }
.dash-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid var(--s21-secondary);
  object-fit: cover;
}
.dash-stat-card {
  padding: 1.4rem;
  text-align: center;
}
.dash-stat-card .stat-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .7rem; font-size: 1.15rem;
}
.dash-stat-card .stat-num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.streak-flame {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius-pill);
  padding: .4rem 1rem;
  font-weight: 700; font-size: .85rem;
}
.badge-earned {
  text-align: center;
}
.badge-earned .badge-icon {
  width: 64px; height: 64px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; margin: 0 auto .5rem;
  box-shadow: 0 8px 18px rgba(0,0,0,.1);
}
.badge-earned.locked .badge-icon { background: #EEF0F2 !important; color: #B7BEC7; filter: grayscale(1); opacity: .7; }
.badge-earned .badge-name { font-size: .78rem; font-weight: 700; }

/* ---- Teacher / Parent dashboard extras ---- */
.dash-table { font-size: .88rem; }
.dash-table th { color: var(--s21-text-soft); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--s21-border); padding-bottom: .6rem; }
.dash-table td { padding: .8rem 0; border-bottom: 1px solid var(--s21-border); vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: none; }
.status-chip { font-size: .72rem; font-weight: 700; padding: .25rem .65rem; border-radius: var(--radius-pill); }
.status-chip.active { background: var(--s21-primary-light); color: var(--s21-primary); }
.status-chip.pending { background: var(--s21-secondary-tint); color: #A66A00; }

.s21-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.s21-switch input { opacity: 0; width: 0; height: 0; }
.s21-switch .slider { position: absolute; inset: 0; background: #D9DEE3; border-radius: 999px; transition: .2s; cursor: pointer; }
.s21-switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.s21-switch input:checked + .slider { background: var(--s21-primary); }
.s21-switch input:checked + .slider::before { transform: translateX(20px); }

.child-tab {
  display: flex; align-items: center; gap: .6rem;
  border: 2px solid var(--s21-border);
  border-radius: var(--radius-pill);
  padding: .5rem 1.1rem .5rem .5rem;
  font-weight: 700; font-size: .85rem;
  background: var(--s21-white);
  transition: all .18s var(--ease);
}
.child-tab img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.child-tab.active { border-color: var(--s21-primary); background: var(--s21-primary-light); color: var(--s21-primary); }

/* ---- Pricing ---- */
.pricing-card {
  padding: 2.2rem 1.8rem;
  text-align: center;
  position: relative;
  border-width: 2px;
  overflow: visible; /* .s21-card sets overflow:hidden, which would clip .popular-tag (positioned above the card's own top edge) */
}
.pricing-card.featured {
  border-color: var(--s21-primary);
  box-shadow: var(--card-shadow-hover);
}
.pricing-card .popular-tag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--s21-primary); color: #fff;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: .35rem 1rem; border-radius: var(--radius-pill);
}
.pricing-card .price {
  font-family: var(--font-display); font-weight: 700;
  font-size: 2.4rem; margin: .6rem 0 .2rem;
}
.pricing-card .price span { font-size: .95rem; font-weight: 600; color: var(--s21-text-soft); }
.pricing-feature-list { text-align: left; font-size: .88rem; }
.pricing-feature-list li { display: flex; align-items: flex-start; gap: .6rem; padding: .45rem 0; }

/* ---- Contact ---- */
.contact-info-card {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.1rem;
}
.contact-info-card .icon-circle {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--s21-primary-light); color: var(--s21-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
/* .map-placeholder removed — contact.html now embeds a real Google Map
   via the key-free google.com/maps?...&output=embed URL format. */

/* ---- Admin dashboard ---- */
.admin-shell { display: flex; min-height: calc(100vh - 76px); }
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--s21-white);
  border-right: 1px solid var(--s21-border);
  padding: 1.6rem 1rem;
}
.admin-sidebar .nav-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem .9rem; border-radius: 10px;
  color: var(--s21-text-soft); font-weight: 600; font-size: .88rem;
}
.admin-sidebar .nav-link.active, .admin-sidebar .nav-link:hover {
  background: var(--s21-primary-light); color: var(--s21-primary);
}
.admin-content { flex: 1; padding: 1.8rem; min-width: 0; }
.moderation-row {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem; border-radius: var(--radius-md);
  border: 1px solid var(--s21-border);
  margin-bottom: .7rem;
}
.moderation-row img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
@media (max-width: 991.98px) {
  .admin-sidebar { display: none; }
  .admin-content { padding: 1.2rem; }
}

/* ---- Gallery / lightbox ---- */
.gallery-grid {
  columns: 4 220px;
  column-gap: 1rem;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}
.gallery-item img { width: 100%; display: block; transition: transform .4s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .gallery-cat {
  position: absolute; bottom: .5rem; left: .5rem;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: var(--radius-pill);
}
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(6,20,15,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease);
}
.lightbox-overlay.open { opacity: 1; pointer-events: auto; }
.lightbox-overlay img { max-width: 90vw; max-height: 82vh; border-radius: var(--radius-md); box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.lightbox-close, .lightbox-nav {
  position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
}
.lightbox-close { top: 1.4rem; right: 1.4rem; }
.lightbox-nav.prev { left: 1.4rem; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 1.4rem; top: 50%; transform: translateY(-50%); }
.lightbox-caption { position: absolute; bottom: 1.4rem; left: 0; right: 0; text-align: center; color: #fff; font-size: .88rem; }
@media (max-width: 767.98px) {
  .gallery-grid { columns: 2 160px; }
}

/* ---- Custom video player ---- */
.player-shell {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
}
.player-shell video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.player-shell.theater { aspect-ratio: 21/9; }

.player-big-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.15);
  border: none; cursor: pointer;
}
.player-big-play span {
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--s21-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.player-shell.is-playing .player-big-play { opacity: 0; pointer-events: none; }

.player-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,0));
  padding: 2.2rem .9rem .7rem;
  opacity: 1;
  transition: opacity .25s var(--ease);
}
.player-shell.controls-hidden .player-controls { opacity: 0; pointer-events: none; }

.player-seek {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; border-radius: 999px;
  background: rgba(255,255,255,.3);
  margin-bottom: .6rem;
  cursor: pointer;
}
.player-seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--s21-secondary);
  box-shadow: 0 0 0 3px rgba(255,209,102,.25);
}
.player-seek::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--s21-secondary); border: none; }

.player-row { display: flex; align-items: center; gap: .6rem; color: #fff; }
.player-btn {
  background: none; border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
}
.player-btn:hover { background: rgba(255,255,255,.14); }
.player-time { font-size: .78rem; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.9); min-width: 92px; }
.player-volume { -webkit-appearance: none; appearance: none; width: 70px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.3); }
.player-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.player-spacer { flex: 1; }
.player-menu {
  position: relative;
}
.player-menu-list {
  position: absolute; bottom: 44px; right: 0;
  background: rgba(20,20,20,.96);
  border-radius: 10px;
  padding: .4rem;
  min-width: 130px;
  display: none;
}
.player-menu-list.open { display: block; }
.player-menu-list button {
  width: 100%; text-align: left; background: none; border: none; color: #fff;
  padding: .45rem .6rem; border-radius: 6px; font-size: .8rem;
}
.player-menu-list button:hover, .player-menu-list button.active { background: rgba(255,255,255,.14); }
.player-menu-list button.active { color: var(--s21-secondary); }

.chapter-marker {
  cursor: pointer; padding: .6rem .7rem; border-radius: 10px;
  display: flex; justify-content: space-between; font-size: .85rem;
}
.chapter-marker:hover { background: var(--s21-primary-light); }
.chapter-marker.active { background: var(--s21-primary-light); color: var(--s21-primary); font-weight: 700; }

/* ---- Onboarding flow (language / level / referral / goals) ---- */
.onboard-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.2rem;
  background: radial-gradient(120% 100% at 50% 0%, #0E8060 0%, var(--s21-primary-dark) 55%, #061410 100%);
}
.onboard-card {
  width: 100%;
  max-width: 560px;
  background: var(--s21-white);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  box-shadow: 0 30px 70px rgba(0,0,0,.4);
}
.onboard-progress {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.8rem;
}
.onboard-progress span {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--s21-border);
  overflow: hidden;
}
.onboard-progress span::after {
  content: "";
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--s21-primary), #16A76B);
  transition: width .3s var(--ease);
}
.onboard-progress span.done::after,
.onboard-progress span.current::after { width: 100%; }

.onboard-step { display: none; }
.onboard-step.active { display: block; animation: s21-fade-up .4s var(--ease) both; }

.onboard-eyebrow {
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--s21-primary);
}
.onboard-title { font-size: 1.5rem; margin: .4rem 0 .3rem; }
.onboard-sub { color: var(--s21-text-soft); font-size: .92rem; margin-bottom: 1.6rem; }

.onboard-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin-bottom: 1.8rem;
}
.onboard-option {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem 1.1rem;
  border: 2px solid var(--s21-border);
  border-radius: var(--radius-md);
  background: var(--s21-white);
  text-align: left;
  font-weight: 700;
  font-size: .92rem;
  color: var(--s21-text);
  transition: all .18s var(--ease);
}
.onboard-option i { font-size: 1.2rem; color: var(--s21-primary); flex-shrink: 0; }
.onboard-option:hover { border-color: var(--s21-primary); background: var(--s21-primary-light); }
.onboard-option.selected {
  border-color: var(--s21-primary);
  background: var(--s21-primary-light);
  box-shadow: 0 0 0 3px var(--s21-primary-light);
}
.onboard-option.selected i { color: var(--s21-primary); }
.onboard-option .check {
  margin-left: auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--s21-border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .65rem; color: #fff;
}
.onboard-option.selected .check { background: var(--s21-primary); border-color: var(--s21-primary); }

.onboard-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.onboard-skip { font-size: .82rem; color: var(--s21-text-soft); background: none; border: none; }

/* Big two-way fork (Guest vs Join) — distinct from the grid-of-options
   pattern since this is a branching decision, not a multiple-choice pick. */
.onboard-choice-row {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  margin-bottom: 1.6rem;
}
.onboard-choice {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.3rem;
  border: 2px solid var(--s21-border);
  border-radius: var(--radius-lg);
  background: var(--s21-white);
  text-align: left;
  transition: all .18s var(--ease);
}
.onboard-choice:hover { border-color: var(--s21-primary); background: var(--s21-primary-light); transform: translateY(-2px); }
.onboard-choice .choice-icon {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff;
}
.onboard-choice .choice-text { flex: 1; }
.onboard-choice .choice-title { font-weight: 800; font-size: 1rem; color: var(--s21-text); }
.onboard-choice .choice-sub { font-size: .82rem; color: var(--s21-text-soft); }
.onboard-choice .fa-chevron-right { color: var(--s21-text-soft); }
.onboard-choice.join .choice-icon { background: linear-gradient(135deg, var(--s21-primary), #16A76B); }
.onboard-choice.guest .choice-icon { background: linear-gradient(135deg, var(--s21-secondary), #FFB703); color: #3D2B00; }

@media (max-width: 480px) {
  .onboard-options { grid-template-columns: 1fr; }
  .onboard-card { padding: 1.8rem 1.3rem; }
}

/* ---- Splash screen ---- */
.splash-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 100% at 50% 20%, #0E8060 0%, var(--s21-primary-dark) 55%, #061410 100%);
  text-align: center;
  padding: 2rem;
}
.splash-mark {
  width: min(260px, 60vw);
  animation: s21-splash-pop .7s var(--ease) both;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.35));
  border-radius: 28px;
  background: #fff;
  padding: .6rem;
}
.splash-wordmark {
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: #fff;
  animation: s21-fade-up .6s var(--ease) .2s both;
}
.splash-wordmark .brand-21 { color: var(--s21-secondary); }
.splash-tagline {
  color: rgba(255,255,255,.8);
  font-size: .92rem;
  margin-top: .3rem;
  animation: s21-fade-up .6s var(--ease) .3s both;
}
.splash-dots {
  display: flex; gap: .5rem; margin-top: 2rem;
  animation: s21-fade-up .6s var(--ease) .4s both;
}
.splash-dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  animation: s21-dot-bounce 1.2s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: .15s; }
.splash-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes s21-splash-pop {
  from { opacity: 0; transform: scale(.8); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes s21-dot-bounce {
  0%, 80%, 100% { opacity: .4; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-6px); }
}

/* ---- Utility ---- */
.divider-soft { height: 1px; background: var(--s21-border); border: none; }
.rounded-xl { border-radius: var(--radius-lg) !important; }
.bg-primary-soft { background: var(--s21-primary-light); }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--s21-primary); color: #fff;
  padding: .7rem 1.2rem; z-index: 2000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--s21-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
