/* Keep the landing page fluid at every inspected viewport width. */
@media (max-width: 640px) {
  .navbar { height: auto; min-height: 56px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 6px 10px; }
  .nav-links { gap: clamp(8px, 3vw, 18px); min-width: 0; }
  .nav-links a, .btn-nav-login, .btn-nav-signup { font-size: clamp(0.7rem, 2.5vw, 0.85rem); }
  .btn-nav-login, .btn-nav-signup { padding: 7px clamp(8px, 2vw, 14px); }
  .nav-actions { gap: 4px; }
  .hero { min-height: auto; }
  .hero-inner { width: 100%; }
  .hero-headline { letter-spacing: 0; }
  .btn-register, .btn-trailer { max-width: 100%; }
  .contact-item { max-width: 100%; }
  .contact-item span { max-width: 100%; overflow-wrap: anywhere; text-align: center; }
}
@media (max-width: 420px) {
  .navbar { grid-template-columns: auto minmax(0, 1fr); }
  .nav-actions { grid-column: 2; justify-self: end; }
  .nav-links { grid-column: 1 / -1; grid-row: 2; justify-content: center; width: 100%; padding-bottom: 2px; }
}
/* ============================================================
   BARYO — Landing Site Shared Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Baloo+2:wght@400;600;700;800&family=Lora:wght@400;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --brown-dark:   #3B1F0A;
  --brown-mid:    #7B4A1E;
  --brown-btn:    #7B4214;
  --brown-card:   #A0622A;
  --brown-warm:   #9B6235;
  --sand-light:   #F5EDD8;
  --sand-mid:     #E8D5AD;
  --sand-warm:    #D4B896;
  --sand-sidebar: #D9BE9A;
  --yellow-card:  #E8C96A;
  --text-dark:    #1E0E03;
  --text-mid:     #4A2C10;
  --text-light:   #FDF3E7;
  --white:        #ffffff;
  --shadow-warm:  0 6px 32px rgba(59,31,10,0.18);
  --shadow-card:  0 2px 16px rgba(59,31,10,0.22);
  --radius-btn:   40px;
  --radius-card:  16px;
  --font-display: 'Playfair Display', serif;
  --font-body:    'Baloo 2', cursive;
  --font-serif:   'Lora', serif;
  --nav-h:        72px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.97);
  border-bottom: 1.5px solid var(--sand-mid);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 40px;
  z-index: 500;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(59,31,10,0.07);
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  justify-self: start;
}
.navbar .logo img,
.navbar .logo .logo-icon {
  width: 52px; height: 52px;
  object-fit: contain;
}
.navbar .logo-icon { font-size: 2.4rem; }

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  list-style: none;
  min-width: 0;
  justify-self: center;
}
.nav-links a {
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-mid);
  letter-spacing: 0.5px;
  transition: color 0.15s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--brown-btn);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover { color: var(--brown-dark); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--brown-dark); font-weight: 800; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  justify-self: end;
}
.btn-nav-login {
  background: transparent;
  border: 2px solid var(--brown-dark);
  color: var(--brown-dark);
  padding: 9px 22px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.5px;
}
.btn-nav-login:hover { background: var(--brown-dark); color: #fff; }

.btn-nav-signup {
  background: var(--brown-btn);
  border: 2px solid var(--brown-btn);
  color: #fff;
  padding: 9px 22px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: 0.5px;
}
.btn-nav-signup:hover { background: var(--brown-dark); }

/* ══════════════════════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

/* subtle warm grain texture overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 65% 40%, rgba(228,185,100,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 80%, rgba(155,98,53,0.08) 0%, transparent 45%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 2;
}

.hero-text { display: flex; flex-direction: column; gap: 28px; }

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--text-dark);
  letter-spacing: -1px;
}

.hero-ctas {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.btn-register {
  background: var(--brown-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 15px 32px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.18s, transform 0.14s, box-shadow 0.14s;
  box-shadow: 0 4px 18px rgba(59,31,10,0.28);
}
.btn-register:hover {
  background: var(--brown-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59,31,10,0.32);
}

.btn-trailer {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--text-dark);
  border-radius: var(--radius-btn);
  padding: 13px 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.18s, color 0.18s;
}
.btn-trailer:hover { background: var(--text-dark); color: #fff; }
.btn-trailer .play-icon {
  width: 22px; height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Phone mockup */
.phone-frame {
  background: #111;
  border-radius: 28px;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.35),
    inset 0 0 0 2px #333;
  max-width: 500px;
  width: 100%;
  animation: float 4s ease-in-out infinite;
}
.phone-screen {
  border-radius: 18px;
  overflow: hidden;
  background: #1a0a02;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.phone-screen-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0d0500 0%, #2a1005 50%, #0d0500 100%);
}
.game-logo-text {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--sand-light);
  text-shadow: 0 0 20px rgba(228,185,100,0.6), 3px 3px 0 var(--brown-dark);
  letter-spacing: 3px;
}
.game-btns { display: flex; flex-direction: column; gap: 8px; width: 140px; }
.game-btn {
  padding: 8px 0;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.82rem;
  text-align: center;
  letter-spacing: 1px;
}
.game-btn-play { background: #4CAF50; color: #fff; }
.game-btn-how  { background: #B8860B; color: #fff; }
.game-btn-adm  { background: #7B4214; color: #fff; }

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

/* ══════════════════════════════════════════════════════════════
   ABOUT SECTION
══════════════════════════════════════════════════════════════ */
.about {
  background: var(--white);
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 18px 0 10px;
}

.about-characters {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(0, 1.5fr) minmax(110px, 1fr);
  align-items: end;
  gap: 18px;
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

.char-figure {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 240px;
  filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.15));
}

.char-figure img {
  display: block;
  width: clamp(110px, 13vw, 220px);
  height: auto;
  max-height: 220px;
  object-fit: contain;
}
.char-left  { animation: bobLeft  3s ease-in-out infinite; }
.char-right { animation: bobRight 3.4s ease-in-out infinite; }

@keyframes bobLeft  { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes bobRight { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.about-center {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  gap: 0;
  padding: 20px 24px 0;
}

.about-logo {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--brown-dark);
  letter-spacing: 4px;
  border: 4px solid var(--brown-dark);
  border-radius: 12px;
  padding: 8px 28px;
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
  background: var(--white);
}

.about-card {
  background: var(--brown-card);
  border-radius: 18px;
  padding: 22px 32px 18px;
  color: var(--text-light);
  text-align: center;
  width: min(100%, 860px);
  margin-bottom: 18px;
  box-shadow: 0 8px 22px rgba(59,31,10,0.08);
}

.about-card p {
  font-family: var(--font-serif);
  font-size: 0.94rem;
  line-height: 1.5;
  margin-bottom: 10px;
}
.about-card p:last-child { margin-bottom: 0; }
.about-card p strong { font-weight: 700; }

@media (min-width: 1025px) {
  .about-characters {
    grid-template-columns: minmax(130px, 0.8fr) minmax(0, 2.4fr) minmax(130px, 0.8fr);
    width: min(100%, 1400px);
    padding: 0 28px;
  }

  .about-center {
    max-width: 1040px;
  }

  .about-card {
    width: 100%;
    padding: 24px 48px 20px;
  }
}

.about-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 18px 0 10px;
  list-style: none;
}
.about-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-mid);
  letter-spacing: 0.5px;
  transition: color 0.15s;
}
.about-nav a:hover, .about-nav a.active { color: var(--brown-dark); }
.about-nav a.active { font-weight: 800; }

/* ══════════════════════════════════════════════════════════════
   CONTACT SECTION
══════════════════════════════════════════════════════════════ */
.contact {
  background: var(--white);
  padding: 50px 40px 80px;
  position: relative;
  overflow: hidden;
}

.contact-characters {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
}
.contact-char { font-size: 7rem; line-height: 1; }
.contact-char-left  { animation: bobLeft  3.2s ease-in-out infinite; }
.contact-char-right { animation: bobRight 3.8s ease-in-out infinite; }

.contact-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.contact-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 36px;
  letter-spacing: -0.5px;
}

.contact-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-dark);
  transition: transform 0.15s;
}
.contact-item:hover { transform: translateY(-4px); }

.contact-icon-wrap {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  box-shadow: var(--shadow-card);
}
.contact-icon-email { background: #008080; color: #fff; }
.contact-icon-fb    { background: #1877F2; color: #fff; }

.contact-item span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-mid);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes popIn {
  from { opacity: 0; transform: scale(0.86); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-headline { animation: fadeUp 0.7s 0.1s ease both; }
.hero-ctas     { animation: fadeUp 0.7s 0.3s ease both; }
.phone-frame   { animation: fadeUp 0.7s 0.2s ease both, float 4s 1s ease-in-out infinite; }

/* ── Smooth section anchors ─────────────────────────────────── */
section { scroll-margin-top: var(--nav-h); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner { gap: 32px; }
  .hero-headline { font-size: clamp(2.2rem, 4vw, 3.5rem); }
  .phone-frame { max-width: 380px; }
  .about { min-height: auto; padding: 28px 0 12px; }
  .about-characters { padding: 0 20px; }
  .char-figure { font-size: 6rem; }
  .about-center { padding: 16px 20px 0; }
  .about-logo { font-size: 2.5rem; padding: 6px 20px; }
  .about-card { width: min(100%, 760px); padding: 26px 24px 20px; }
  .contact { padding: 40px 20px 60px; }
  .contact-char { font-size: 6rem; }
  .contact-title { font-size: 1.8rem; }
  .contact-links { gap: 40px; }
  .contact-icon-wrap { width: 70px; height: 70px; font-size: 2rem; }
}

@media (max-width: 768px) {
  .about {
    min-height: auto;
    padding: 20px 0 40px;
  }

  .about-characters {
    grid-template-columns: 1fr;
    padding: 0 16px;
    gap: 20px;
  }

  .char-figure {
    min-height: auto;
  }

  .about-center {
    padding: 0;
  }

  .about-card {
    padding: 24px 18px;
  }
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 24px;
  }
  .hero-ctas { justify-content: center; }
  .phone-frame { max-width: 320px; }
  .navbar { padding: 0 20px; }
  .nav-links { gap: 20px; }
  .about-card { padding: 28px 22px; }
  .contact-links { gap: 36px; }
  .about-characters { flex-direction: column; align-items: center; gap: 20px; padding: 0 20px; }
  .char-figure { font-size: 5rem; }
  .about-center { padding: 12px 16px 0; }
  .about-logo { font-size: 2rem; padding: 6px 16px; margin-bottom: 8px; }
  .about-nav { gap: 24px; }
  .contact { padding: 30px 20px 50px; }
  .contact-characters { flex-direction: column; align-items: center; gap: 20px; }
  .contact-char { font-size: 5rem; }
  .contact-title { font-size: 1.6rem; margin-bottom: 24px; }
  .contact-links { gap: 30px; }
  .contact-item { gap: 10px; }
  .contact-icon-wrap { width: 60px; height: 60px; font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .hero-inner { padding: 30px 16px; }
  .hero-headline { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn-register, .btn-trailer { width: 100%; max-width: 280px; }
  .phone-frame { max-width: 280px; }
  .navbar { padding: 0 12px; height: 56px; }
  .navbar .logo img { width: 44px; height: 44px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 0.85rem; }
  .btn-nav-login, .btn-nav-signup { padding: 7px 16px; font-size: 0.85rem; }
  .about-card { padding: 20px 16px; }
  .contact-links { gap: 24px; flex-wrap: wrap; }
  .about-characters { padding: 0 16px; gap: 16px; }
  .char-figure { font-size: 4rem; }
  .about-center { padding: 8px 12px 0; }
  .about-logo { font-size: 1.6rem; padding: 4px 12px; margin-bottom: 6px; }
  .about-nav { gap: 16px; padding: 14px 0 8px; }
  .about-nav a { font-size: 0.85rem; }
  .contact { padding: 20px 16px 40px; }
  .contact-characters { gap: 16px; }
  .contact-char { font-size: 4rem; }
  .contact-title { font-size: 1.4rem; margin-bottom: 20px; }
  .contact-links { gap: 20px; }
  .contact-item { gap: 8px; }
  .contact-icon-wrap { width: 50px; height: 50px; font-size: 1.5rem; }
  .contact-item span { font-size: 0.85rem; }
}
    /* ══════════════════════════════════════════════════════════════
       BARANGAY CODEX SECTION
    ══════════════════════════════════════════════════════════════ */
    #words {
      background: var(--brown-dark);
      padding: 80px 40px;
      position: relative;
      overflow: hidden;
    }

    /* decorative faded background glyph */
    #words::before {
      content: '𝓑';
      position: absolute;
      font-size: 28rem;
      font-weight: 900;
      color: rgba(255,255,255,0.03);
      top: -60px; right: -40px;
      pointer-events: none;
      line-height: 1;
    }

    .words-inner {
      max-width: 1100px;
      margin: 0 auto;
      position: relative;
      z-index: 2;
    }

    .words-header {
      text-align: center;
      margin-bottom: 14px;
    }
    .words-eyebrow {
      font-family: var(--font-body);
      font-size: 0.82rem;
      font-weight: 700;
      letter-spacing: 3px;
      color: var(--yellow-card);
      text-transform: uppercase;
      margin-bottom: 10px;
    }
    .words-title {
      font-family: var(--font-display);
      font-size: clamp(2rem, 4vw, 3rem);
      font-weight: 900;
      color: var(--sand-light);
      letter-spacing: -0.5px;
      margin-bottom: 14px;
    }
    .words-subtitle {
      font-family: var(--font-serif);
      font-size: 1.02rem;
      color: var(--sand-warm);
      max-width: 560px;
      margin: 0 auto 40px;
      line-height: 1.7;
    }

    /* Search + filter bar */
    .words-controls {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 32px;
      flex-wrap: wrap;
      justify-content: center;
    }
    .words-search-wrap {
      display: flex;
      align-items: center;
      gap: 10px;
      background: rgba(19, 11, 7, 0.22);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 999px;
      padding: 10px 18px;
      flex: 1;
      max-width: 340px;
      transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    }
    .words-search-wrap:focus-within {
      border-color: rgba(232, 201, 106, 0.75);
      background: rgba(19, 11, 7, 0.3);
      box-shadow: 0 0 0 3px rgba(232, 201, 106, 0.12);
    }
    .words-search-wrap input {
      background: transparent;
      border: none;
      outline: none;
      font-family: var(--font-body);
      font-size: 0.95rem;
      color: var(--sand-light);
      flex: 1;
      min-width: 0;
    }
    .words-search-wrap input::placeholder { color: rgba(255,255,255,0.38); }
    .words-search-icon { color: rgba(255,255,255,0.45); font-size: 0.95rem; }

    .words-filter-btns {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: center;
    }
    .words-filter-btn {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 999px;
      padding: 8px 16px;
      font-family: var(--font-body);
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--sand-warm);
      cursor: pointer;
      transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
      letter-spacing: 0.3px;
    }
    .words-filter-btn:hover,
    .words-filter-btn.active {
      background: rgba(232, 201, 106, 0.14);
      border-color: rgba(232, 201, 106, 0.7);
      color: var(--sand-light);
      transform: translateY(-1px);
    }

    /* Letter group header */
    .words-letter-group { margin-bottom: 32px; }
    .words-letter-heading {
      font-family: var(--font-display);
      font-size: 1.5rem;
      font-weight: 900;
      color: var(--yellow-card);
      margin-bottom: 14px;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(255,255,255,0.10);
    }

    /* Item grid */
    .words-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 12px;
    }

    .words-item {
      background: rgba(255,255,255,0.06);
      border: 1.5px solid rgba(255,255,255,0.10);
      border-radius: 12px;
      padding: 16px 14px 14px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      transition: background 0.18s, border-color 0.18s, transform 0.18s;
      text-decoration: none;
    }
    .words-item:hover {
      background: rgba(232,201,106,0.14);
      border-color: var(--yellow-card);
      transform: translateY(-3px);
    }
    .words-item-icon {
      font-size: 1.6rem;
      margin-bottom: 2px;
    }
    .words-item-name {
      font-family: var(--font-body);
      font-size: 0.92rem;
      font-weight: 800;
      color: var(--sand-light);
      line-height: 1.3;
    }
    .words-item-tag {
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--yellow-card);
      background: rgba(232,201,106,0.15);
      padding: 2px 8px;
      border-radius: 20px;
      letter-spacing: 0.3px;
    }
    .words-item.hidden { display: none; }

    /* Empty state */
    .words-empty {
      text-align: center;
      padding: 48px;
      color: var(--sand-warm);
      font-family: var(--font-serif);
      font-size: 1rem;
      display: none;
    }

    /* CTA at bottom */
    .words-cta {
      text-align: center;
      margin-top: 48px;
    }
    .words-cta p {
      font-family: var(--font-serif);
      color: var(--sand-warm);
      font-size: 0.95rem;
      margin-bottom: 16px;
    }
    .btn-words-explore {
      background: var(--yellow-card);
      color: var(--brown-dark);
      border: none;
      border-radius: var(--radius-btn);
      padding: 14px 34px;
      font-family: var(--font-body);
      font-size: 1rem;
      font-weight: 800;
      cursor: pointer;
      letter-spacing: 0.3px;
      transition: background 0.18s, transform 0.14s;
      box-shadow: 0 4px 20px rgba(232,201,106,0.30);
    }
    .btn-words-explore:hover {
      background: #f0d060;
      transform: translateY(-2px);
    }

    /* ── Responsive ── */
    @media (max-width: 1024px) {
      .words-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    }

    @media (max-width: 768px) {
      #words { padding: 60px 20px; }
      .words-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
      .words-controls { flex-direction: column; align-items: stretch; }
      .words-search-wrap { max-width: 100%; }
    }

    @media (max-width: 480px) {
      #words { padding: 40px 16px; }
      .words-title { font-size: clamp(1.5rem, 5vw, 2.2rem); }
      .words-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
      .words-item { padding: 12px 10px 10px; }
      .words-item-icon { font-size: 1.4rem; }
      .words-item-name { font-size: 0.85rem; }
      .words-item-tag { font-size: 0.68rem; padding: 1px 6px; }
    }

/* Final mobile overrides: keep these after the base rules in the cascade. */
@media (max-width: 640px) {
  .navbar { height: auto; min-height: 56px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 6px 10px; }
  .nav-links { gap: clamp(8px, 3vw, 18px); min-width: 0; }
  .nav-links a, .btn-nav-login, .btn-nav-signup { font-size: clamp(0.7rem, 2.5vw, 0.85rem); }
  .btn-nav-login, .btn-nav-signup { padding: 7px clamp(8px, 2vw, 14px); }
  .nav-actions { gap: 4px; }
  .hero { min-height: auto; }
  .hero-inner { width: 100%; min-width: 0; }
  .hero-text, .hero-visual, .about-center, .contact-inner { min-width: 0; }
  .hero-headline { letter-spacing: 0; }
  .contact-item span { max-width: 100%; overflow-wrap: anywhere; text-align: center; }
  .about-logo { max-width: 100%; }
  .about-logo img, .contact-char img { display: block; max-width: 100%; height: auto; }
  button, .btn-register, .btn-trailer { touch-action: manipulation; }
}
@media (max-width: 420px) {
  .navbar { grid-template-columns: auto minmax(0, 1fr); }
  .nav-actions { grid-column: 2; justify-self: end; }
  .nav-links { grid-column: 1 / -1; grid-row: 2; justify-content: center; width: 100%; padding-bottom: 2px; }
}
/* Password eye toggle */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrap .auth-input {
  padding-right: 48px;
  width: 100%;
}

.btn-eye {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9B6235;
  z-index: 5;
  line-height: 1;
}

.btn-eye:hover {
  color: #3B1F0A;
}

.btn-eye svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}
.school-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 14, 3, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.school-modal {
  background: var(--sand-light);
  border-radius: 18px;
  padding: 36px 40px;
  width: min(400px, 92vw);
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  border: 2px solid var(--brown-warm);
}

.school-modal h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.school-modal p {
  font-size: 0.95rem;
  color: var(--text-mid);
  margin-bottom: 28px;
}

.school-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.school-modal-btn {
  background: var(--brown-card);
  color: #fff;
  border: 2px solid var(--brown-dark);
  border-radius: 14px;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.school-modal-btn:hover {
  background: var(--brown-btn);
  transform: translateY(-2px);
}

.school-modal-cancel {
  background: transparent;
  border: none;
  color: var(--brown-warm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}

.school-modal-cancel:hover {
  color: var(--brown-dark);
}
/* ============================================================
   HERO UI ENHANCEMENT — DESKTOP STACKED LAYOUT
   Match the mobile composition on desktop:
   headline + buttons on top, phone frame below.
   Mobile/tablet rules remain unchanged.
============================================================ */
@media (min-width: 769px) {
  .hero {
    min-height: calc(100vh - var(--nav-h));
    align-items: flex-start;
  }

  .hero-inner {
    width: min(100%, 1240px);
    max-width: 1240px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 28px;
    padding: 48px 40px 54px;
  }

  .hero-text {
    width: 100%;
    align-items: center;
    gap: 22px;
  }

  .hero-headline {
    font-size: clamp(2.8rem, 4.4vw, 4rem);
    line-height: 1.02;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-visual {
    width: 100%;
  }

  .phone-frame {
    width: min(100%, 520px);
    max-width: 520px;
    margin-inline: auto;
  }
}

/* ============================================================
   HERO UI ENHANCEMENT — EXACT DESKTOP ORDER
   1. Headline
   2. Phone frame
   3. Register / Watch Trailer buttons
   The mobile layout is not changed.
============================================================ */
@media (min-width: 769px) {
  .hero {
    min-height: calc(100vh - var(--nav-h));
    align-items: flex-start;
    overflow: hidden;
  }

  .hero-inner {
    width: min(100%, 1100px);
    max-width: 1100px;
    padding: 44px 32px 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
  }

  /* Flatten the existing text wrapper so the headline,
     phone and CTA row can be ordered independently. */
  .hero-text {
    display: contents;
  }

  .hero-headline {
    order: 1;
    width: min(100%, 900px);
    text-align: center;
    font-size: clamp(2.7rem, 4.6vw, 4.15rem);
    line-height: 1.02;
    letter-spacing: -1px;
    margin: 0;
  }

  /* Turn the original four HTML lines into two visual lines:
     MAKE YOUR IMAGINATIONS / TURN INTO REALITY */
  .hero-headline br {
    display: none;
  }

  .hero-visual {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 28px;
  }

  .phone-frame {
    width: min(100%, 600px);
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-ctas {
    order: 3;
    justify-content: center;
    margin-top: 28px;
    gap: 14px;
  }
}

/* ============================================================
   HERO — DESKTOP MATCHES MOBILE STACK
   Desktop order:
   1. MAKE YOUR IMAGINATIONS / TURN INTO REALITY
   2. Phone frame
   3. Register / Watch Trailer buttons (BOTTOM)
============================================================ */
@media (min-width: 769px) {
  .hero {
    min-height: calc(100vh - var(--nav-h));
    height: calc(100vh - var(--nav-h));
    overflow: hidden;
    align-items: flex-start;
  }

  .hero-inner {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 34px 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }

  /* Let the headline, phone, and buttons become three separate rows. */
  .hero-text {
    display: contents;
  }

  .hero-headline {
    order: 1;
    width: 100%;
    max-width: 1050px;
    text-align: center;
    font-size: clamp(2.8rem, 4.3vw, 4.3rem);
    line-height: 1.02;
    letter-spacing: -1px;
    margin: 0;
    flex-shrink: 0;
  }
  .hero-headline br {
    display: none;
  }

  .hero-visual {
    order: 2;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 14px 0;
  }

  .phone-frame {
    width: min(62vw, 600px);
    max-width: 600px;
    max-height: 100%;
    margin: 0 auto;
  }

  .hero-ctas {
    order: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    flex-shrink: 0;
    padding-bottom: 4px;
  }
}

/* On shorter desktop screens, keep the complete hero visible. */
@media (min-width: 769px) and (max-height: 800px) {
  .hero-inner {
    padding-top: 22px;
    padding-bottom: 20px;
  }

  .hero-headline {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
  }

  .hero-visual {
    margin: 8px 0;
  }

  .phone-frame {
    width: min(54vw, 500px);
  }
}


/* ============================================================
   BARYO BRANDING ENHANCEMENT
   - Clean BARYO icon + wordmark with no outline/border
   - BARYO wordmark beside the icon in the upper-left navbar
============================================================ */
.navbar .logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.navbar .logo img,
.navbar .logo .baryo-logo,
.navbar .logo .baryo-text,
.navbar .logo .navbar-brand-text,
.navbar .logo .navbar-brand-text img {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.navbar .logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.navbar .navbar-brand-text {
  display: inline-flex;
  align-items: center;
  width: 92px;
  height: 42px;
  flex-shrink: 0;
}

.navbar .navbar-brand-text img {
  width: 100%;
  height: auto;
  max-height: 42px;
  object-fit: contain;
  display: block;
}

/* Clean wordmark treatment used by the About-section BARYO text. */
.about-logo {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  margin-bottom: 10px;
}

.about-logo img,
.about-logo .baryo-text,
.about-logo .baryo-logo {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  filter: none !important;
  display: block;
  width: min(190px, 55vw);
  height: auto;
  object-fit: contain;
}
@media (max-width: 600px) {
  .main-content { padding: 14px 12px; }
  .page-header { margin-bottom: 20px; }
  .header-actions { width: 100%; justify-content: flex-end; }
  .profile-card { padding: 22px 16px; }
  .profile-info-row { flex-direction: column; }
  .profile-info-label { min-width: 0; width: 100%; border-right: 0; border-bottom: 1.5px solid var(--brown-warm); }
  .profile-actions { flex-wrap: wrap; }
  .profile-actions button { flex: 1 1 140px; }
  .teacher-row, .classroom-joined-card { align-items: flex-start; flex-wrap: wrap; }
  .teacher-row-name, .classroom-joined-info { min-width: 0; overflow-wrap: anywhere; }
  .notification-banner { align-items: flex-start; }
}
/* =============================================
   BARYO — Shared Stylesheet
   Filipino Folklore Adventure Game Website
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=Lora:wght@400;600;700&family=Nunito:wght@400;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────── */
:root {
  --brown-dark:    #3B1F0A;
  --brown-mid:     #7B4A1E;
  --brown-warm:    #9B6235;
  --brown-btn:     #7B4214;
  --brown-card:    #A0622A;
  --sand-light:    #F5EDD8;
  --sand-mid:      #E8D5AD;
  --sand-warm:     #D4B896;
  --sand-sidebar:  #D9BE9A;
  --yellow-card:   #E8C96A;
  --yellow-light:  #F0D98A;
  --text-dark:     #1E0E03;
  --text-mid:      #4A2C10;
  --text-light:    #FDF3E7;
  --red-delete:    #CC2222;
  --green-gen:     #2E7D32;
  --shadow-warm:   0 4px 18px rgba(59, 31, 10, 0.18);
  --shadow-card:   0 2px 12px rgba(59, 31, 10, 0.22);
  --radius-card:   14px;
  --radius-btn:    30px;
  --sidebar-w:     220px;
  /* One consistent font across devices and portals */
  --font-display:  'Nunito', Arial, Helvetica, sans-serif;
  --font-body:     'Nunito', Arial, Helvetica, sans-serif;
  --font-serif:    'Nunito', Arial, Helvetica, sans-serif;
  --letter-tight: -0.025em;
  --letter-wide: 0.045em;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Global typography lock: prevents mobile/browser fallback fonts from changing the look. */
html, body, body * {
  font-family: 'Nunito', Arial, Helvetica, sans-serif !important;
  font-synthesis: none;
}

html, body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-optical-sizing: auto;
}

h1, h2, h3, h4, h5, h6, .logo-text, .page-title, .auth-logo,
.hero-title, .hero-headline, button, .btn, .nav-item, label, input, select, textarea {
  font-family: 'Nunito', Arial, Helvetica, sans-serif !important;
}

h1, h2, h3, .page-title, .hero-title, .hero-headline {
  font-weight: 900;
  letter-spacing: var(--letter-tight);
}

button, .btn, .nav-item {
  font-weight: 800;
  letter-spacing: var(--letter-wide);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--sand-light);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ── Layout Shell ──────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sand-sidebar);
  border-right: 2px solid var(--brown-warm);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 8px;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 3px 0 16px rgba(59,31,10,0.10);
}

.sidebar .logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--brown-warm);
}

.sidebar .logo-area img {
  width: 38px; height: 38px;
  object-fit: contain;
}

.sidebar .logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--brown-dark);
  letter-spacing: 0.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-mid);
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}

.nav-item:hover,
.nav-item.active {
  background: var(--brown-warm);
  color: var(--text-light);
}

.nav-item .nav-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar .spacer { flex: 1; }

/* ── Mobile Menu Button ────────────────────── */
.btn-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--brown-dark);
  padding: 8px;
  z-index: 150;
}

.btn-close-sidebar {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--brown-dark);
  padding: 8px;
  position: absolute;
  top: 16px;
  right: 16px;
}

/* Sidebar overlay backdrop on mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
}
.sidebar-backdrop.open {
  display: block;
}

.btn-logout {
  width: 100%;
  flex-shrink: 0;
  display: block;
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding: 11px;
  background: var(--brown-btn);
  color: var(--text-light);
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 -6px 12px rgba(217, 190, 154, 0.9);
  transition: background 0.18s, transform 0.12s;
}
.btn-logout:hover { background: var(--brown-dark); transform: translateY(-1px); }

/* ── Main Content ──────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px 36px;
  background: var(--sand-light);
  min-height: 100vh;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brown-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  background: none;
  border: 2px solid var(--brown-warm);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--brown-warm);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--brown-warm); color: #fff; }

/* ── Dashboard Cards (2x2 grid) ─────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 1000px;
  width: 100%;
}

.dash-card {
  background: var(--brown-card);
  border-radius: var(--radius-card);
  padding: 24px 22px 20px;
  border: 2.5px solid var(--brown-dark);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.15s;
}
.dash-card:hover { transform: translateY(-2px); }

.dash-card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.btn-ghost {
  background: var(--sand-mid);
  color: var(--text-mid);
  border: none;
  border-radius: var(--radius-btn);
  padding: 9px 20px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  align-self: center;
  transition: background 0.15s, transform 0.12s;
}
.btn-ghost:hover { background: var(--sand-warm); transform: translateY(-1px); }

/* ── List Cards (classroom, student, perf) ─── */
.list-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.btn-create {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--brown-mid);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}
.btn-create:hover { background: var(--sand-mid); }
.btn-create .plus-icon { font-size: 1.3rem; color: var(--brown-warm); }

.item-card {
  background: var(--brown-card);
  border-radius: var(--radius-card);
  border: 2px solid var(--brown-dark);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  animation: fadeSlideIn 0.3s ease both;
}
.item-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.item-card-sub {
  font-size: 0.8rem;
  color: var(--yellow-light);
  margin-top: 2px;
}
.item-card-actions { display: flex; gap: 8px; align-items: center; }

.btn-view {
  background: var(--sand-light);
  color: var(--text-mid);
  border: 1.5px solid var(--brown-dark);
  border-radius: var(--radius-btn);
  padding: 7px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.btn-view:hover { background: var(--sand-warm); }

.btn-delete {
  background: var(--red-delete);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.btn-delete:hover { background: #991111; }

/* ── Student Row (inside classroom) ─────────── */
.student-row {
  background: var(--brown-card);
  border-radius: 10px;
  border: 1.5px solid var(--brown-dark);
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
}
.student-row-info { flex: 1; }
.student-row-name {
  font-weight: 800;
  color: #fff;
  font-size: 0.98rem;
}
.student-row-meta {
  font-size: 0.8rem;
  color: var(--yellow-light);
  margin-top: 2px;
}
.student-code-tag {
  font-size: 0.78rem;
  color: var(--yellow-card);
  font-family: monospace;
  margin-bottom: 10px;
}

/* ── Modal / Panel overlays ─────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal-panel {
  background: var(--sand-light);
  border-radius: 16px;
  padding: 0;
  width: min(520px, 95vw);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  overflow: hidden;
  animation: popIn 0.25s cubic-bezier(.34,1.4,.64,1) both;
}

.modal-header {
  background: var(--sand-mid);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--brown-warm);
}
.modal-header h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brown-dark);
}
.modal-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.btn-exit {
  background: var(--brown-btn);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-exit:hover { background: var(--brown-dark); }

/* ── Form Elements ──────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-mid);
}
.form-input {
  background: var(--sand-mid);
  border: 1.5px solid var(--brown-warm);
  border-radius: var(--radius-btn);
  padding: 11px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-input:focus {
  border-color: var(--brown-dark);
  box-shadow: 0 0 0 3px rgba(123,74,30,0.15);
}

.form-input-row {
  display: flex;
  gap: 8px;
}
.form-input-row .form-input { flex: 1; }

.btn-generate {
  background: var(--green-gen);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 10px 18px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-generate:hover { background: #1b5e20; }

.btn-copy {
  background: var(--sand-warm);
  color: var(--text-mid);
  border: 1.5px solid var(--brown-warm);
  border-radius: var(--radius-btn);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.88rem;
  transition: background 0.15s;
}
.btn-copy:hover { background: var(--sand-mid); }

.btn-primary {
  background: var(--brown-btn);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  align-self: center;
  transition: background 0.15s, transform 0.12s;
  letter-spacing: 0.3px;
}
.btn-primary:hover { background: var(--brown-dark); transform: translateY(-1px); }

/* ── Bulk Account Import ─────────────────────── */
.acc-mgmt-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--sand-warm);
}

.acc-mgmt-tab {
  background: none;
  border: none;
  padding: 10px 4px;
  margin-bottom: -2px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--brown-warm);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.acc-mgmt-tab:hover { color: var(--brown-dark); }

.acc-mgmt-tab.active {
  color: var(--brown-dark);
  border-bottom-color: var(--brown-btn);
}

.btn-secondary {
  background: var(--sand-light);
  color: var(--brown-dark);
  border: 1.5px solid var(--brown-warm);
  border-radius: var(--radius-btn);
  padding: 11px 22px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover { background: var(--sand-mid); transform: translateY(-1px); }

.bulk-instructions {
  color: var(--text-mid);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 18px;
  max-width: 720px;
}

.bulk-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.bulk-file-label { position: relative; }

.bulk-textarea {
  width: 100%;
  min-height: 130px;
  font-family: 'Nunito', Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.bulk-preview-container { margin-top: 20px; }

.bulk-empty-msg {
  color: var(--brown-warm);
  font-size: 0.88rem;
  font-style: italic;
}

.bulk-preview-summary {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.bulk-table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--sand-warm);
  border-radius: var(--radius-card);
}

.bulk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 720px;
}

.bulk-table th {
  background: var(--sand-sidebar);
  color: var(--text-dark);
  text-align: left;
  padding: 10px 12px;
  font-weight: 800;
  white-space: nowrap;
}

.bulk-table td {
  padding: 9px 12px;
  border-top: 1px solid var(--sand-warm);
  color: var(--text-mid);
  vertical-align: top;
}

.bulk-row-error {
  color: var(--red-delete);
  font-size: 0.76rem;
  margin-top: 4px;
  max-width: 220px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.status-pending { background: var(--sand-mid); color: var(--text-mid); }
.status-badge.status-creating { background: var(--yellow-light); color: var(--text-dark); }
.status-badge.status-success { background: var(--green-gen); color: #fff; }
.status-badge.status-error { background: var(--red-delete); color: #fff; cursor: help; }

.bulk-progress-summary {
  margin-top: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

/* ── Student Info / Progress View ───────────── */
.info-card {
  background: var(--sand-mid);
  border-radius: var(--radius-card);
  padding: 22px 26px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.info-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.info-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.info-fields { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.info-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-field-box {
  display: flex;
  align-items: center;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--brown-warm);
  flex: 1;
}
.info-field-label {
  background: var(--sand-warm);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-mid);
  white-space: nowrap;
  border-right: 1.5px solid var(--brown-warm);
}
.info-field-value {
  background: #fff;
  padding: 8px 12px;
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-dark);
  min-height: 36px;
}

/* ── Quiz results table ─────────────────────── */
.quiz-table {
  border-collapse: collapse;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--brown-warm);
}
.quiz-table th {
  background: var(--brown-warm);
  color: #fff;
  padding: 10px 16px;
  font-size: 0.88rem;
  text-align: left;
}
.quiz-table td {
  padding: 10px 16px;
  background: var(--sand-mid);
  border-bottom: 1px solid var(--sand-warm);
  font-size: 0.88rem;
}
.quiz-table tr:last-child td { border-bottom: none; }

/* ── Performance: quiz type chooser ─────────── */
.quiz-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

/* ── Resources page ─────────────────────────── */
.resources-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  max-width: 1000px;
  width: 100%;
}
.resource-card {
  background: var(--yellow-light);
  border: 2px solid var(--brown-warm);
  border-radius: var(--radius-card);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s, box-shadow 0.15s;
}
.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(59,31,10,0.25);
}
.resource-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brown-dark);
}
.btn-view-resource {
  background: var(--brown-btn);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 11px 28px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  width: 100%;
  max-width: 200px;
}
.btn-view-resource:hover { background: var(--brown-dark); transform: translateY(-2px); }

/* ── Page transitions ───────────────────────── */
.page { display: none; animation: fadeSlideIn 0.28s ease both; }
.page.active { display: block; }

/* ── Back button ────────────────────────────── */
.btn-back {
  background: var(--brown-btn);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.btn-back:hover { background: var(--brown-dark); }

/* ── Auth pages (Login/Signup) ──────────────── */
.auth-bg {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(210,155,90,0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(180,120,60,0.18) 0%, transparent 55%),
    linear-gradient(160deg, #C9A87C 0%, #D9BE9A 40%, #EDD8B4 70%, #F5EDD8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

.auth-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.08;
}
.auth-deco-1 {
  width: 340px; height: 340px;
  border-radius: 50%;
  background: var(--brown-dark);
  bottom: -100px; left: -80px;
}
.auth-deco-2 {
  width: 220px; height: 220px;
  border-radius: 50%;
  background: var(--brown-mid);
  top: -60px; right: -40px;
}

.auth-card {
  background: var(--sand-light);
  border-radius: 20px;
  padding: 40px 42px;
  width: min(440px, calc(100vw - 32px));
  max-width: 100%;
  box-shadow: 0 12px 48px rgba(59,31,10,0.28);
  border: 2px solid var(--sand-warm);
  position: relative;
  z-index: 2;
  animation: popIn 0.35s cubic-bezier(.34,1.4,.64,1) both;
  box-sizing: border-box;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
}
.auth-logo-icon {
  font-size: 2.8rem;
}
.auth-logo-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brown-dark);
  letter-spacing: 1px;
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brown-dark);
  text-align: center;
  margin-bottom: 24px;
}
.auth-title img {
height: auto;
width : auto;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-input {
  width: 100%;
  background: var(--sand-mid);
  border: 1.5px solid var(--brown-warm);
  border-radius: var(--radius-btn);
  padding: 13px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-input:focus {
  border-color: var(--brown-dark);
  box-shadow: 0 0 0 3px rgba(123,74,30,0.15);
}
.auth-input::placeholder { color: var(--sand-warm); }

.forgot-link {
  align-self: flex-end;
  font-size: 0.85rem;
  color: var(--brown-mid);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
}

.btn-auth {
  width: 100%;
  background: var(--brown-btn);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 14px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.18s, transform 0.12s;
  margin-top: 4px;
}
.btn-auth:hover { background: var(--brown-dark); transform: translateY(-1px); }

.btn-google {
  width: 100%;
  background: #fff;
  color: var(--text-dark);
  border: 1.5px solid var(--sand-warm);
  border-radius: var(--radius-btn);
  padding: 13px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s, transform 0.12s;
}
.btn-google:hover { background: var(--sand-mid); transform: translateY(-1px); }

.google-g {
  font-size: 1.1rem;
  font-weight: 900;
  background: linear-gradient(to bottom right, #4285F4, #34A853, #FBBC05, #EA4335);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sand-warm);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--sand-warm);
}

.auth-switch {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-mid);
  margin-top: 6px;
}
.auth-switch a {
  color: var(--brown-mid);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Corner signup/login btn (auth pages) ───── */
.corner-btn {
  position: fixed;
  top: 18px; right: 20px;
  background: var(--brown-btn);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.92rem;
  z-index: 300;
  transition: background 0.15s;
  min-width: 104px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  box-sizing: border-box;
}
.corner-btn:hover { background: var(--brown-dark); }

@media (max-width: 360px) and (max-height: 800px) {
  .corner-btn,
  .back-index-btn {
    width: 92px !important;
    height: 38px !important;
    min-width: 92px !important;
    top: 12px !important;
    padding: 0 10px !important;
    font-size: 0.76rem !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
  }

  .corner-btn { right: 12px !important; left: auto !important; }
  .back-index-btn { left: 12px !important; right: auto !important; }
}

@media (max-width: 600px) {
  .auth-bg {
    padding: 56px 12px 20px;
  }

  .auth-card {
    width: 100%;
    max-width: 440px;
    padding: 24px 16px;
  }

  .corner-btn {
    top: 12px;
    right: 12px;
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .auth-logo {
    margin-bottom: 16px;
  }

  .auth-title {
    font-size: 1.28rem;
    margin-bottom: 16px;
  }

  .auth-form {
    gap: 10px;
  }

  .btn-auth,
  .btn-google {
    padding: 11px 12px;
  }

  .auth-switch {
    font-size: 0.78rem;
  }
}

@media (max-width: 380px) {
  .auth-bg {
    padding-top: 48px;
    padding-bottom: 16px;
  }

  .auth-card {
    padding: 20px 12px;
  }

  .auth-title {
    font-size: 1.1rem;
  }

  .auth-input,
  .btn-auth,
  .btn-google {
    font-size: 0.9rem;
  }
}

/* ── Animations ─────────────────────────────── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Utilities ──────────────────────────────── */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--brown-warm);
  font-size: 0.95rem;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sand-mid);
  border: 1.5px solid var(--brown-warm);
  border-radius: var(--radius-btn);
  padding: 8px 14px;
  max-width: 280px;
}
.search-bar input {
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dark);
  flex: 1;
}
.classroom-code {
  font-size: 0.82rem;
  color: var(--brown-mid);
  font-family: monospace;
  font-weight: 700;
  margin-bottom: 16px;
}
.sub-page { display: none; }
.sub-page.active { display: block; animation: fadeSlideIn 0.25s ease both; }

/* ── Parent-specific ────────────────────────── */
.parent-home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 800px;
  width: 100%;
}
.success-box {
  text-align: center;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.success-icon { font-size: 3rem; }
.success-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brown-dark);
}
.success-text {
  color: var(--text-mid);
  font-size: 0.95rem;
}

/* ── Teacher-specific ────────────────────────── */
.perf-row {
  background: var(--brown-card);
  border-radius: 10px;
  border: 1.5px solid var(--brown-dark);
  padding: 12px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
}
.perf-row-name { flex: 1; font-weight: 800; color: #fff; }
.perf-row-btns { display: flex; gap: 8px; }
.btn-view-prog {
  background: var(--yellow-card);
  color: var(--brown-dark);
  border: none;
  border-radius: var(--radius-btn);
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-view-prog:hover { background: var(--yellow-light); }
.btn-view-quiz {
  background: var(--sand-light);
  color: var(--text-mid);
  border: 1.5px solid var(--brown-dark);
  border-radius: var(--radius-btn);
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-view-quiz:hover { background: var(--sand-warm); }

/* Icon styling for better look */
.nav-icon img, .auth-logo-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.logo-area img {
  width: 42px;
  height: 42px;
}

/* Auth logo title image */
.auth-logo-title img {
  width: 100px;
  height: 100px;
}

/* ── Responsive Design for Mobile ────────────────────────── */
@media (max-width: 768px) {
  /* Mobile sidebar: overlay style */
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 280px;
    height: 100vh;
    transition: left 0.3s ease;
    z-index: 101;
    border-right: 2px solid var(--brown-warm);
    overflow-y: auto;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar:not(.open) .btn-logout {
    display: none;
  }

  .sidebar.open .btn-logout {
    position: fixed;
    left: 16px;
    bottom: 16px;
    width: 248px;
    z-index: 102;
    margin: 0;
  }

  /* Show close button on mobile */
  .btn-close-sidebar {
    display: block;
  }

  /* Show hamburger menu button */
  .btn-hamburger {
    display: block;
  }

  /* Adjust main content */
  .main-content {
    margin-left: 0;
    padding: 16px 20px;
  }

  /* Adjust page header */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-actions {
    align-self: flex-end;
  }

  /* Adjust dashboard grid */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
  }

  /* Adjust resources container */
  .resources-container {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  /* Adjust modal panels */
  .modal-panel {
    width: 95vw;
    margin: 20px;
  }

  /* Adjust form inputs */
  .form-input-row {
    flex-direction: column;
    gap: 12px;
  }

  /* Adjust auth card */
  .auth-card {
    padding: 30px 24px;
    width: min(380px, 90vw);
  }

  /* Adjust nav items if shown */
  .nav-item {
    padding: 12px 16px;
  }

  /* Adjust buttons */
  .btn-primary, .btn-auth {
    width: 100%;
  }

  /* Adjust quiz table */
  .quiz-table th, .quiz-table td {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  /* Adjust info card */
  .info-card {
    flex-direction: column;
    gap: 16px;
    padding: 16px 20px;
  }

  .info-avatar {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .page-title {
    font-size: 1.5rem;
  }

  .dash-card {
    padding: 16px 18px;
  }

  .modal-body {
    padding: 20px 24px;
  }

  .auth-title {
    font-size: 1.3rem;
  }

  .btn-download {
    padding: 12px 30px;
    font-size: 0.95rem;
  }
}

/* ── Parent-specific ────────────────────────── */
.teacher-row {
  background: var(--brown-card);
  border-radius: 10px;
  border: 1.5px solid var(--brown-dark);
  padding: 12px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-card);
  animation: fadeSlideIn 0.3s ease both;
}
.teacher-row-name {
  flex: 1;
  font-weight: 800;
  color: #fff;
  font-size: 0.98rem;
}
.btn-join-class {
  background: var(--yellow-card);
  color: var(--brown-dark);
  border: 1.5px solid var(--brown-dark);
  border-radius: var(--radius-btn);
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.btn-join-class:hover { background: var(--yellow-light); transform: translateY(-1px); }

.download-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px 0;
}
.baryo-logo-big {
  font-family: var(--font-display);
  font-size: 3.2rem;
  color: var(--brown-dark);
  letter-spacing: 3px;
  text-shadow: 3px 4px 0 var(--brown-warm);
  border: 4px solid var(--brown-dark);
  border-radius: 20px;
  padding: 18px 40px;
  background: var(--sand-mid);
}
.btn-download {
  background: var(--yellow-light);
  color: var(--brown-dark);
  border: 2px solid var(--brown-warm);
  border-radius: var(--radius-btn);
  padding: 14px 40px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  letter-spacing: 0.3px;
}
.btn-download:hover { background: var(--yellow-card); transform: translateY(-2px); }

@media (max-width: 600px) {
  .main-content { padding: 14px 12px; }
  .page-header { margin-bottom: 20px; }
  .header-actions { width: 100%; justify-content: flex-end; }
  .profile-card { padding: 22px 16px; }
  .profile-info-row { flex-direction: column; }
  .profile-info-label { min-width: 0; width: 100%; border-right: 0; border-bottom: 1.5px solid var(--brown-warm); }
  .profile-actions { flex-wrap: wrap; }
  .profile-actions button { flex: 1 1 140px; }
  .teacher-row, .classroom-joined-card { align-items: flex-start; flex-wrap: wrap; }
  .teacher-row-name, .classroom-joined-info { min-width: 0; overflow-wrap: anywhere; }
  .notification-banner { align-items: flex-start; }
}
/* Password eye toggle */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrap .auth-input {
  padding-right: 48px;
  width: 100%;
}

.btn-eye {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9B6235;
  z-index: 5;
  line-height: 1;
}

.btn-eye:hover {
  color: #3B1F0A;
}

.btn-eye svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}
.school-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 14, 3, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.school-modal {
  background: var(--sand-light);
  border-radius: 18px;
  padding: 36px 40px;
  width: min(400px, 92vw);
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  border: 2px solid var(--brown-warm);
}

.school-modal h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.school-modal p {
  font-size: 0.95rem;
  color: var(--text-mid);
  margin-bottom: 28px;
}

.school-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.school-modal-btn {
  background: var(--brown-card);
  color: #fff;
  border: 2px solid var(--brown-dark);
  border-radius: 14px;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.school-modal-btn:hover {
  background: var(--brown-btn);
  transform: translateY(-2px);
}

.school-modal-cancel {
  background: transparent;
  border: none;
  color: var(--brown-warm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}

.school-modal-cancel:hover {
  color: var(--brown-dark);
}
/* Keep the new brand compact on smaller screens. */
@media (max-width: 640px) {
  .navbar .logo {
    gap: 5px;
  }

  .navbar .logo img {
    width: 42px;
    height: 42px;
  }

  .navbar .navbar-brand-text {
    width: 72px;
    height: 32px;
  }

  .navbar .navbar-brand-text img {
    max-height: 32px;
  }
}

@media (max-width: 420px) {
  .navbar .navbar-brand-text {
    width: 64px;
  }
}

/* ============================================================
   BARYO LANDING PAGE — FINAL VIEWPORT OVERRIDES
   ============================================================ */
#home,#about,#words,#contact{height:100svh;min-height:100svh;max-height:100svh;overflow:hidden;scroll-margin-top:0}
#home{padding-top:var(--nav-h)}
#home .hero-inner{width:min(100%,1100px);height:calc(100svh - var(--nav-h));min-height:0;padding:clamp(18px,3vh,34px) 32px;display:grid;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr) auto;align-items:center;justify-items:center;gap:clamp(8px,1.8vh,18px)}
#home .hero-text{display:contents}
#home .hero-headline{order:1;text-align:center;font-size:clamp(2rem,5.2vw,4rem);line-height:.98;margin:0}
#home .hero-visual{order:2;width:100%;height:100%;min-height:0;display:flex;align-items:center;justify-content:center}
#home .phone-frame{width:min(52vw,620px);max-width:620px;max-height:100%}
#home .hero-ctas{order:3;justify-content:center;margin:0}

#about{padding:var(--nav-h) 0 0;display:flex;align-items:center}
#about .about-characters{width:min(100%,1320px);height:calc(100svh - var(--nav-h));min-height:0;padding:clamp(12px,2vh,24px) 28px;grid-template-columns:minmax(90px,.7fr) minmax(0,3fr) minmax(90px,.7fr);align-items:center;gap:clamp(8px,2vw,24px)}
#about .char-figure{min-height:0;height:100%;align-items:flex-end}
#about .char-figure img{width:clamp(90px,13vw,190px);max-height:48vh}
#about .about-center{max-width:1040px;max-height:100%;padding:0;justify-content:center}
#about .about-logo{margin-bottom:-1px;padding:5px 22px}
#about .about-card{width:100%;margin-bottom:0;padding:clamp(16px,2.2vh,24px) clamp(20px,3vw,48px)}
#about .about-card p{font-size:clamp(.78rem,1.15vw,.94rem);line-height:1.4;margin-bottom:clamp(6px,1vh,10px)}
#about .about-nav{padding:8px 0 0}

#words{padding:calc(var(--nav-h) + clamp(10px,2vh,20px)) 30px clamp(12px,2vh,20px);display:flex;align-items:center}
#words .words-inner{width:min(100%,1120px);max-width:1120px;max-height:calc(100svh - var(--nav-h) - 24px);overflow:hidden}
#words .words-header{margin-bottom:8px}
#words .words-eyebrow{margin-bottom:4px}
#words .words-title{margin-bottom:6px;font-size:clamp(1.7rem,3.5vw,2.7rem)}
#words .words-subtitle{max-width:680px;margin-bottom:12px;font-size:clamp(.78rem,1vw,.94rem);line-height:1.35}
#words .words-controls{margin-bottom:12px;gap:8px}
#words .words-filter-btn{padding:6px 12px}
#words .words-letter-group{margin-bottom:10px}
#words .words-letter-heading{font-size:1.1rem;margin-bottom:6px;padding-bottom:4px}
#words .words-grid{gap:8px;grid-template-columns:repeat(5,minmax(0,1fr))}
#words .words-item{padding:9px 10px 8px;gap:3px;min-height:70px}
#words .words-item-icon{font-size:1.25rem;margin-bottom:0}
#words .words-item-name{font-size:.8rem;line-height:1.2}
#words .words-item-tag{font-size:.62rem;padding:1px 6px}
#words .words-cta{margin-top:12px}
#words .words-cta p{font-size:.78rem;margin-bottom:7px}
#words .btn-words-explore{padding:9px 22px;font-size:.85rem}

#contact{padding:var(--nav-h) clamp(16px,4vw,40px) 12px;display:flex;align-items:center}
#contact .contact-characters{width:min(100%,1180px);height:calc(100svh - var(--nav-h) - 12px);margin:0 auto;align-items:center}
#contact .contact-title{margin-bottom:clamp(18px,3vh,32px);font-size:clamp(1.6rem,3vw,2.2rem)}
#contact .contact-links{gap:clamp(28px,5vw,60px)}
#contact .contact-icon-wrap{width:clamp(58px,6vw,78px);height:clamp(58px,6vw,78px)}
#contact .contact-item span{max-width:260px;overflow-wrap:anywhere;text-align:center}

@media(max-width:768px){
 #home .hero-inner{height:calc(100svh - var(--nav-h));padding:12px 16px 14px;gap:6px}
 #home .hero-headline{font-size:clamp(1.7rem,7vw,2.6rem)}
 #home .phone-frame{width:min(78vw,360px)}
 #home .hero-ctas{width:100%;gap:8px;flex-wrap:nowrap}
 #home .btn-register,#home .btn-trailer{width:auto;max-width:none;padding:10px 16px;font-size:.82rem}
 #about .about-characters{grid-template-columns:72px minmax(0,1fr) 72px;padding:12px 8px;gap:5px}
 #about .char-figure img{width:72px;max-height:34vh}
 #about .about-logo{font-size:1.5rem;padding:4px 12px}
 #about .about-card{padding:12px 14px;border-radius:14px}
 #about .about-card p{font-size:clamp(.66rem,2vw,.78rem);line-height:1.28;margin-bottom:5px}
 #about .about-nav{display:none}
 #words{padding:calc(var(--nav-h) + 8px) 12px 10px}
 #words .words-inner{max-height:calc(100svh - var(--nav-h) - 18px)}
 #words .words-subtitle{margin-bottom:8px;font-size:.72rem}
 #words .words-controls{flex-direction:column;align-items:stretch;margin-bottom:8px}
 #words .words-search-wrap{max-width:100%;padding:7px 12px}
 #words .words-filter-btns{gap:5px}
 #words .words-filter-btn{padding:5px 8px;font-size:.68rem}
 #words .words-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
 #words .words-item{padding:7px 6px;min-height:62px}
 #words .words-item-icon{font-size:1rem}
 #words .words-item-name{font-size:.67rem}
 #words .words-item-tag{font-size:.52rem}
 #words .words-cta{margin-top:8px}
 #words .words-cta p{font-size:.66rem;margin-bottom:5px}
 #words .btn-words-explore{padding:7px 15px;font-size:.7rem}
 #contact{padding:var(--nav-h) 10px 10px}
 #contact .contact-characters{height:calc(100svh - var(--nav-h) - 10px);display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;gap:5px}
 #contact .contact-char{display:flex;align-items:center;justify-content:center}
 #contact .contact-char img{width:52px;max-height:30vh}
 #contact .contact-title{font-size:clamp(1.2rem,5vw,1.7rem);margin-bottom:18px}
 #contact .contact-links{gap:18px}
 #contact .contact-icon-wrap{width:54px;height:54px}
 #contact .contact-item{gap:6px}
 #contact .contact-item span{font-size:.68rem;max-width:150px}
}
@media(max-width:480px){
 #home .hero-headline{font-size:clamp(1.45rem,7vw,2.1rem)}
 #home .phone-frame{width:min(82vw,300px)}
 #home .btn-register,#home .btn-trailer{flex:1 1 0;padding:9px 8px;font-size:.7rem}
 #about .about-characters{grid-template-columns:50px minmax(0,1fr) 50px}
 #about .char-figure img{width:50px;max-height:28vh}
 #about .about-card p{font-size:.62rem;line-height:1.24}
 #about .about-logo{font-size:1.25rem}
 #words .words-title{font-size:1.45rem}
 #words .words-eyebrow{font-size:.62rem;letter-spacing:2px}
 #words .words-grid{gap:4px}
 #words .words-item{min-height:56px;padding:5px 4px}
 #words .words-item-name{font-size:.58rem}
 #words .words-item-tag{display:none}
 #contact .contact-characters{grid-template-columns:42px minmax(0,1fr) 42px}
 #contact .contact-char img{width:42px}
 #contact .contact-title{font-size:1.15rem}
 #contact .contact-links{gap:12px}
 #contact .contact-icon-wrap{width:48px;height:48px}
 #contact .contact-item span{font-size:.6rem}
}
@media(max-height:700px) and (max-width:768px){
 #home .hero-headline{font-size:1.5rem}
 #home .phone-frame{width:min(58vw,230px)}
 #home .hero-inner{gap:3px}
 #about .about-card{padding:8px 10px}
 #about .about-card p{font-size:.58rem}
 #words .words-subtitle{display:none}
 #words .words-item{min-height:50px}
 #contact .contact-title{margin-bottom:10px}
}

/* ============================================================
   ABOUT + CONTACT — MOBILE SPACE BALANCE
   Keep desktop character artwork; let mobile content use the
   available viewport instead of squeezing between side art.
   ============================================================ */

/* Desktop: use the available section width more effectively. */
@media (min-width: 769px) {
  #about .about-characters {
    width: min(100%, 1400px);
    grid-template-columns: minmax(120px, .55fr) minmax(0, 4fr) minmax(120px, .55fr);
    padding-left: 36px;
    padding-right: 36px;
    gap: clamp(16px, 2.5vw, 34px);
  }

  #about .about-center {
    width: 100%;
    max-width: 1180px;
  }

  #about .about-card {
    width: 100%;
    padding: clamp(20px, 2.6vh, 32px) clamp(28px, 3.5vw, 58px);
  }

  #contact .contact-characters {
    width: min(100%, 1320px);
    grid-template-columns: minmax(100px, .7fr) minmax(0, 4fr) minmax(100px, .7fr);
    gap: clamp(18px, 3vw, 42px);
  }

  #contact .contact-inner {
    width: 100%;
  }
}

/* Mobile: remove decorative side characters so the content can breathe. */
@media (max-width: 768px) {
  #about .about-characters {
    display: block;
    width: 100%;
    height: calc(100svh - var(--nav-h));
    padding: 20px 18px 24px;
  }

  #about .char-figure {
    display: none;
  }

  #about .about-center {
    width: 100%;
    max-width: none;
    height: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #about .about-logo {
    margin-bottom: 8px;
    padding: 5px 16px;
  }

  #about .about-card {
    width: 100%;
    max-width: none;
    padding: 22px 22px;
    border-radius: 16px;
  }

  #about .about-card p {
    font-size: clamp(.72rem, 2.15vw, .86rem);
    line-height: 1.4;
    margin-bottom: 8px;
  }

  #contact .contact-characters {
    display: block;
    width: 100%;
    height: calc(100svh - var(--nav-h) - 10px);
    padding: 16px 18px 20px;
  }

  #contact .contact-char {
    display: none;
  }

  #contact .contact-inner {
    width: 100%;
    max-width: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  #contact .contact-title {
    margin-bottom: 28px;
  }

  #contact .contact-links {
    width: 100%;
    justify-content: center;
    gap: clamp(22px, 8vw, 46px);
  }

  #contact .contact-item {
    min-width: 0;
  }

  #contact .contact-item span {
    max-width: 190px;
    font-size: clamp(.66rem, 2vw, .78rem);
  }
}

@media (max-width: 480px) {
  #about .about-characters {
    padding: 18px 14px 22px;
  }

  #about .about-card {
    padding: 20px 18px;
  }

  #about .about-card p {
    font-size: .68rem;
    line-height: 1.34;
    margin-bottom: 7px;
  }

  #about .about-logo {
    font-size: 1.35rem;
  }

  #contact .contact-characters {
    padding: 14px 14px 18px;
  }

  #contact .contact-title {
    font-size: 1.25rem;
    margin-bottom: 24px;
  }

  #contact .contact-links {
    gap: 18px;
  }

  #contact .contact-icon-wrap {
    width: 52px;
    height: 52px;
  }

  #contact .contact-item span {
    font-size: .62rem;
    max-width: 170px;
  }
}

/* ============================================================
   ABOUT — DESKTOP FINAL BALANCE
   Keep the character artwork, but center the actual About content
   independently so the large empty area above it is reduced.
   ============================================================ */
@media (min-width: 769px) {
  #about .about-characters {
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  #about .char-figure {
    align-self: stretch;
    height: 100%;
    min-height: 0;
  }

  #about .char-figure img {
    width: clamp(150px, 14vw, 210px);
    max-height: 44vh;
  }

  #about .about-center {
    max-width: 1200px;
    transform: translateY(-4vh);
  }

  #about .about-logo img,
  #about .about-logo .baryo-text,
  #about .about-logo .baryo-logo {
    width: min(220px, 20vw);
  }

  #about .about-card {
    padding: clamp(26px, 3.2vh, 36px) clamp(34px, 4vw, 64px);
  }

  #about .about-card p {
    font-size: clamp(.9rem, 1.15vw, 1rem);
    line-height: 1.5;
    margin-bottom: clamp(8px, 1.2vh, 12px);
  }
}

/* ============================================================
   ABOUT — DESKTOP STORYBOOK / EDITORIAL LAYOUT
   Clear reading hierarchy: logo -> story panel -> characters.
   Mobile layout remains unchanged from the previous mobile tuning.
   ============================================================ */
@media (min-width: 769px) {
  #about {
    position: relative;
    display: block;
    min-height: calc(100svh - var(--nav-h));
    height: calc(100svh - var(--nav-h));
    overflow: hidden;
    padding: 0;
  }

  #about .about-characters {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
  }

  #about .about-center {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: min(78vw, 1020px);
    max-width: 1020px;
    padding: 0;
    margin: 0;
    transform: translate(-50%, -48%);
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Strong visual header instead of leaving the logo floating in space. */
  #about .about-logo {
    margin: 0 0 40px;
    padding: 0;
    line-height: auto;
  }

  #about .about-logo img {
    display: block;
    width: clamp(420px, 20vw, 300px);
    height: auto;
    margin: 0 auto;
  }

  /* Main reading panel */
  #about .about-card {
    position: relative;
    width: 100%;
    max-width: 1020px;
    margin: 0;
    padding: clamp(30px, 4vh, 44px) clamp(42px, 5vw, 72px);
    border-radius: 24px;
    text-align: left;
    box-shadow: 0 16px 36px rgba(73, 40, 14, .16);
  }

  /* Small visual cue that makes the panel read as a story section. */
  #about .about-card::before {
    content: 'OUR STORY';
    display: block;
    margin-bottom: 14px;
    color: rgba(255,255,255,.82);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .22em;
    text-align: left;
  }

  #about .about-card p {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(.94rem, 1.08vw, 1.08rem);
    line-height: 1.58;
    margin-bottom: 14px;
  }

  #about .about-card p:last-child {
    margin-bottom: 0;
  }

  /* Characters frame the content rather than sitting beside every line. */
  #about .char-figure {
    position: absolute;
    z-index: 2;
    bottom: -2px;
    width: clamp(155px, 15vw, 225px);
    height: auto;
    min-height: 0;
    display: block;
  }

  #about .char-left {
    left: clamp(24px, 6vw, 100px);
  }

  #about .char-right {
    right: clamp(24px, 6vw, 100px);
  }

  #about .char-figure img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 43vh;
    object-fit: contain;
    object-position: bottom center;
  }
}

/* Keep the already-tuned mobile About behavior exactly as before. */
@media (max-width: 768px) {
  #about .about-card::before {
    display: none;
  }
}

/* ============================================================
   HOME — DESKTOP CTA POSITION + SIZE
   Keep the Register / Watch Trailer buttons close to the phone
   so they are immediately visible and attention-grabbing.
   Mobile sizing/positioning remains unchanged.
   ============================================================ */
@media (min-width: 769px) {
  #home .hero-inner {
    justify-content: flex-start;
    padding-top: clamp(20px, 3vh, 30px);
    padding-bottom: 24px;
  }

  #home .hero-headline {
    margin-bottom: clamp(8px, 1.5vh, 14px);
  }

  #home .hero-visual {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    margin: 8px 0 clamp(16px, 2.5vh, 24px);
  }

  #home .phone-frame {
    width: min(62vw, 620px);
    max-width: 620px;
  }

  #home .hero-ctas {
    margin: 0;
    padding: 0;
    gap: 18px;
  }

  #home .btn-register,
  #home .btn-trailer {
    min-width: 215px;
    min-height: 58px;
    padding: 16px 30px;
    font-size: 1rem;
  }

  #home .btn-trailer .play-icon {
    width: 24px;
    height: 24px;
  }
}

/* ============================================================
   FINAL MOBILE LAYOUT TUNING
   Keep mobile character artwork hidden; use the viewport more
   efficiently without changing desktop layout.
   ============================================================ */
@media (max-width: 768px) {
  /* HOME: keep heading, phone and CTA together instead of
     distributing them across the entire viewport. */
  #home .hero-inner {
    grid-template-rows: auto auto auto;
    align-content: center;
    align-items: center;
    gap: clamp(14px, 3vh, 24px);
    padding: 14px 14px 18px;
  }

  #home .hero-visual {
    height: auto;
    min-height: 0;
  }

  #home .phone-frame {
    width: min(76vw, 310px);
    max-height: none;
  }

  #home .hero-ctas {
    width: auto;
    gap: 8px;
    flex-wrap: nowrap;
  }

  #home .btn-register,
  #home .btn-trailer {
    flex: 0 0 auto;
    min-width: 116px;
    padding: 10px 13px;
    font-size: .72rem;
  }

  /* ABOUT: enlarge the actual content block so the viewport is
     used for the story instead of leaving large empty zones. */
  #about .about-characters {
    padding: 12px 12px 16px;
  }

  #about .about-center {
    justify-content: center;
    height: auto;
    min-height: 0;
  }

  #about .about-logo {
    margin-bottom: 10px;
    padding: 4px 12px;
    font-size: 1.55rem;
  }

  #about .about-card {
    padding: 18px 18px 20px;
  }

  #about .about-card p {
    font-size: clamp(.72rem, 2.2vw, .84rem);
    line-height: 1.38;
    margin-bottom: 9px;
  }

  /* WORDS: move the content upward and give the cards more
     usable height so the section does not look mostly empty. */
  #words {
    align-items: flex-start;
    padding: calc(var(--nav-h) + 12px) 12px 12px;
  }

  #words .words-inner {
    width: 100%;
    height: calc(100svh - var(--nav-h) - 24px);
    max-height: none;
  }

  #words .words-header {
    margin-bottom: 10px;
  }

  #words .words-title {
    margin-bottom: 7px;
  }

  #words .words-subtitle {
    margin-bottom: 10px;
  }

  #words .words-controls {
    margin-bottom: 10px;
  }

  #words .words-letter-group {
    margin-bottom: 12px;
  }

  #words .words-grid {
    gap: 5px;
  }

  #words .words-item {
    min-height: 64px;
    padding: 8px 6px;
  }

  #words .words-cta {
    margin-top: 12px;
  }

  /* CONTACT: content remains character-free on mobile and uses
     the full width/height. */
  #contact .contact-characters {
    padding: 12px 12px 16px;
  }

  #contact .contact-inner {
    height: 100%;
    justify-content: center;
  }

  #contact .contact-title {
    margin-bottom: 24px;
  }

  #contact .contact-links {
    width: 100%;
    gap: clamp(18px, 7vw, 34px);
  }
}

@media (max-width: 480px) {
  #home .hero-inner {
    gap: 12px;
    padding: 12px 10px 16px;
  }

  #home .hero-headline {
    font-size: clamp(1.5rem, 7.2vw, 2rem);
    line-height: .98;
  }

  #home .phone-frame {
    width: min(72vw, 280px);
  }

  #home .hero-ctas {
    gap: 7px;
  }

  #home .btn-register,
  #home .btn-trailer {
    min-width: 104px;
    padding: 9px 10px;
    font-size: .66rem;
  }

  #about .about-logo {
    font-size: 1.45rem;
    margin-bottom: 9px;
  }

  #about .about-card {
    padding: 17px 15px 18px;
  }

  #about .about-card p {
    font-size: .67rem;
    line-height: 1.34;
    margin-bottom: 7px;
  }

  #words .words-inner {
    height: calc(100svh - var(--nav-h) - 22px);
  }

  #words .words-item {
    min-height: 60px;
  }
}

/* ============================================================
   FINAL MOBILE OVERRIDE — USE THE FULL MOBILE VIEWPORT
   These rules intentionally come last so they override the older
   responsive rules above them.
   ============================================================ */
@media (max-width: 768px) {
  /* HOME: keep the three hero elements together. The previous
     .hero-visual height:100% was creating the large blank gap. */
  #home .hero-inner {
    height: calc(100svh - var(--nav-h)) !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: auto auto auto !important;
    align-content: center !important;
    justify-content: center !important;
    align-items: center !important;
    gap: clamp(10px, 2.2vh, 18px) !important;
    padding: 12px 12px 18px !important;
  }

  #home .hero-headline {
    margin: 0 !important;
    line-height: .98 !important;
  }

  #home .hero-visual {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #home .phone-frame {
    width: min(76vw, 300px) !important;
    max-width: 300px !important;
    max-height: none !important;
  }

  #home .hero-ctas {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
  }

  #home .btn-register,
  #home .btn-trailer {
    flex: 0 0 auto !important;
    min-width: 112px !important;
    width: auto !important;
    padding: 9px 11px !important;
    font-size: .68rem !important;
  }

  /* ABOUT: characters stay hidden and the story uses the viewport. */
  #about .about-characters {
    display: block !important;
    width: 100% !important;
    height: calc(100svh - var(--nav-h)) !important;
    padding: 14px 12px 18px !important;
  }

  #about .char-figure {
    display: none !important;
  }

  #about .about-center {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    transform: none !important;
  }

  #about .about-logo {
    margin: 0 0 10px !important;
    padding: 0 !important;
  }

  #about .about-logo img {
    width: min(42vw, 170px) !important;
    height: auto !important;
  }

  #about .about-card {
    width: 100% !important;
    max-width: none !important;
    padding: 18px 18px 20px !important;
    border-radius: 16px !important;
  }

  #about .about-card p {
    font-size: clamp(.68rem, 2.25vw, .82rem) !important;
    line-height: 1.38 !important;
    margin-bottom: 8px !important;
  }

  /* WORDS: reduce the vertical dead space and let the content
     occupy the section instead of being vertically centered. */
  #words {
    padding: calc(var(--nav-h) + 6px) 10px 8px !important;
    align-items: flex-start !important;
  }

  #words .words-inner {
    width: 100% !important;
    height: auto !important;
    max-height: calc(100svh - var(--nav-h) - 14px) !important;
    overflow: hidden !important;
  }

  #words .words-header {
    margin-bottom: 7px !important;
  }

  #words .words-title {
    margin-bottom: 5px !important;
  }

  #words .words-subtitle {
    display: block !important;
    margin-bottom: 7px !important;
    font-size: .68rem !important;
    line-height: 1.25 !important;
  }

  #words .words-controls {
    margin-bottom: 7px !important;
  }

  #words .words-letter-group {
    margin-bottom: 8px !important;
  }

  #words .words-grid {
    gap: 4px !important;
  }

  #words .words-item {
    min-height: 56px !important;
    padding: 6px 5px !important;
  }

  #words .words-cta {
    margin-top: 7px !important;
  }

  /* CONTACT: characters stay hidden and contact content uses the
     full available width. */
  #contact .contact-characters {
    display: block !important;
    width: 100% !important;
    height: calc(100svh - var(--nav-h) - 8px) !important;
    padding: 12px 10px 14px !important;
  }

  #contact .contact-char {
    display: none !important;
  }

  #contact .contact-inner {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #contact .contact-title {
    margin-bottom: 20px !important;
  }

  #contact .contact-links {
    width: 100% !important;
    justify-content: center !important;
    gap: clamp(16px, 7vw, 28px) !important;
  }
}

@media (max-width: 480px) {
  #home .hero-inner {
    gap: 9px !important;
    padding: 10px 10px 14px !important;
  }

  #home .hero-headline {
    font-size: clamp(1.45rem, 7.2vw, 2rem) !important;
  }

  #home .phone-frame {
    width: min(70vw, 270px) !important;
  }

  #home .btn-register,
  #home .btn-trailer {
    min-width: 102px !important;
    padding: 8px 9px !important;
    font-size: .64rem !important;
  }

  #about .about-card {
    padding: 17px 15px 18px !important;
  }

  #about .about-card p {
    font-size: .66rem !important;
    line-height: 1.34 !important;
  }

  #about .about-logo img {
    width: min(44vw, 155px) !important;
  }
}


/* ============================================================
   ROLE MODAL — MOBILE PAGE-ORIENTATION / SCROLL FIX
   Do not lock body overflow when the role picker opens. The
   fixed overlay captures interaction instead, avoiding the
   mobile browser re-compositing the viewport behind the modal.
   ============================================================ */
@media (max-width: 600px) {
  #rolePickerOverlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #rolePickerOverlay .role-modal {
    touch-action: auto !important;
    transform: none !important;
    -webkit-transform: none !important;
    animation: none !important;
  }
}

/* ============================================================
   MOBILE ABOUT — USE THE SPACE BELOW THE BARYO LOGO
   Keep the logo at the top of the content area and let the
   description card occupy the remaining viewport height.
   ============================================================ */
@media (max-width: 768px) {
  #about .about-characters {
    display: block !important;
    width: 100% !important;
    height: calc(100svh - var(--nav-h)) !important;
    min-height: 0 !important;
    padding: 14px 12px 18px !important;
    box-sizing: border-box !important;
  }

  #about .about-center {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    transform: none !important;
  }

  #about .about-logo {
    flex: 0 0 auto !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    text-align: center !important;
  }

  #about .about-logo img {
    display: block !important;
    width: min(44vw, 155px) !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  #about .about-card {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 24px 20px 28px !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  #about .about-card p {
    flex: 0 0 auto !important;
    font-size: clamp(.68rem, 2.25vw, .82rem) !important;
    line-height: 1.38 !important;
    margin: 0 0 10px !important;
  }

  #about .about-card p:last-child {
    margin-bottom: 0 !important;
  }
}

@media (max-width: 480px) {
  #about .about-characters {
    padding: 12px 10px 14px !important;
  }

  #about .about-logo {
    margin-bottom: 10px !important;
  }

  #about .about-logo img {
    width: min(44vw, 155px) !important;
  }

  #about .about-card {
    padding: 22px 16px 26px !important;
  }

  #about .about-card p {
    font-size: .66rem !important;
    line-height: 1.34 !important;
    margin-bottom: 8px !important;
  }
}

/* ============================================================
   MOBILE ABOUT CARD — GIVE THE STORY CARD THE HEIGHT IT NEEDS
   The BARYO logo stays above the card; the card itself uses the
   remaining mobile viewport instead of shrinking around the text.
   ============================================================ */
@media (max-width: 768px) {
  #about .about-center {
    justify-content: flex-start !important;
  }

  #about .about-card {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: calc(100svh - var(--nav-h) - 120px) !important;
    height: auto !important;
    box-sizing: border-box !important;
    padding: 34px 24px 38px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  #about .about-card p {
    margin-bottom: 14px !important;
  }
}

@media (max-width: 480px) {
  #about .about-card {
    min-height: calc(100svh - var(--nav-h) - 105px) !important;
    padding: 32px 20px 36px !important;
  }

  #about .about-card p {
    margin-bottom: 12px !important;
  }
}

/* ============================================================
   MOBILE ABOUT PARAGRAPH — MATCH THE TALLER STORY CARD
   Keep the paragraph readable and proportionate to the expanded card.
   ============================================================ */
@media (max-width: 768px) {
  #about .about-card p {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(.78rem, 2.65vw, .95rem) !important;
    line-height: 1.55 !important;
    letter-spacing: .01em !important;
    margin: 0 0 16px !important;
  }

  #about .about-card p:last-child {
    margin-bottom: 0 !important;
  }
}

@media (max-width: 480px) {
  #about .about-card p {
    font-size: clamp(.76rem, 3.15vw, .9rem) !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
  }
}

/* ============================================================
   MOBILE ABOUT PARAGRAPH — PROPORTIONAL TO THE TALLER CARD
   Make the story text visibly fill the expanded card instead of
   remaining at the old compact mobile size.
   ============================================================ */
@media (max-width: 768px) {
  #about .about-card p {
    width: 100% !important;
    max-width: none !important;
    font-size: clamp(.88rem, 2.9vw, 1rem) !important;
    line-height: 1.58 !important;
    letter-spacing: .01em !important;
    margin: 0 0 18px !important;
  }

  #about .about-card p:last-child {
    margin-bottom: 0 !important;
  }
}

@media (max-width: 480px) {
  #about .about-card p {
    font-size: clamp(.86rem, 3.4vw, .98rem) !important;
    line-height: 1.55 !important;
    margin-bottom: 16px !important;
  }
}

/* ============================================================
   BARYO PREMIUM GAME UI — VISUAL POLISH LAYER
   Warm folklore palette, cinematic gradients, refined surfaces.
   Scoped to the public landing page to avoid changing portal UI.
   ============================================================ */
:root {
  --baryo-ink: #28170e;
  --baryo-coffee: #4a2814;
  --baryo-copper: #9b5b2b;
  --baryo-amber: #d6a64f;
  --baryo-cream: #fff8e9;
  --baryo-line: rgba(91, 52, 25, .16);
  --baryo-glow: 0 18px 48px rgba(49, 27, 12, .16);
  --baryo-ease: cubic-bezier(.2, .75, .25, 1);
}

html { scroll-padding-top: var(--nav-h); }
body {
  color: var(--baryo-ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Glass-like navigation with a warm, understated border. */
.navbar {
  background: rgba(255, 250, 239, .88);
  border-bottom: 1px solid rgba(107, 65, 31, .14);
  box-shadow: 0 8px 30px rgba(52, 30, 14, .07);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  transition: background .25s ease, box-shadow .25s ease;
}
.nav-links a {
  font-size: .88rem;
  letter-spacing: .075em;
  transition: color .2s ease;
}
.nav-links a::after {
  height: 3px;
  bottom: -8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--baryo-copper), var(--baryo-amber));
}
.btn-nav-login,
.btn-nav-signup {
  min-height: 42px;
  border-radius: 999px;
  padding-inline: 22px;
  transition: transform .2s var(--baryo-ease), box-shadow .2s ease, background .2s ease;
}
.btn-nav-login { border-color: rgba(74, 40, 20, .4); }
.btn-nav-signup {
  background: linear-gradient(135deg, #754019 0%, #9c5b2b 58%, #b8793b 100%);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(117, 64, 25, .2);
}
.btn-nav-login:hover,
.btn-nav-signup:hover { transform: translateY(-2px); }
.btn-nav-signup:hover { box-shadow: 0 10px 24px rgba(117, 64, 25, .28); }

/* Cinematic but still bright, inspired by warm storybook game art. */
.hero {
  background:
    radial-gradient(ellipse at 78% 42%, rgba(225, 177, 91, .24) 0%, transparent 42%),
    radial-gradient(ellipse at 8% 90%, rgba(159, 91, 43, .13) 0%, transparent 38%),
    linear-gradient(132deg, #fffaf0 0%, #f8edda 48%, #f0d9b5 100%);
}
.hero::before {
  background:
    radial-gradient(ellipse at 70% 35%, rgba(255, 255, 255, .72) 0%, transparent 48%),
    radial-gradient(ellipse at 16% 76%, rgba(173, 107, 47, .1) 0%, transparent 42%);
}
.hero-headline {
  color: var(--baryo-ink);
  letter-spacing: -.045em;
  line-height: .99;
  text-wrap: balance;
}
.hero-headline::selection { background: rgba(214, 166, 79, .35); }
.btn-register,
.btn-trailer {
  min-height: 52px;
  border-radius: 999px;
  padding: 15px 28px;
  transition: transform .22s var(--baryo-ease), box-shadow .22s ease, background .22s ease, border-color .22s ease;
}
.btn-register {
  background: linear-gradient(135deg, #4a2814 0%, #754019 54%, #a15f2d 100%);
  box-shadow: 0 10px 24px rgba(74, 40, 20, .23), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-register:hover {
  background: linear-gradient(135deg, #382012 0%, #6d3918 52%, #965326 100%);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(74, 40, 20, .28);
}
.btn-trailer {
  border: 1px solid rgba(74, 40, 20, .38);
  background: rgba(255, 252, 244, .58);
  backdrop-filter: blur(8px);
}
.btn-trailer:hover {
  color: var(--baryo-ink);
  background: rgba(255,255,255,.92);
  border-color: var(--baryo-copper);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(74, 40, 20, .12);
}
.btn-trailer .play-icon { flex: 0 0 auto; }
.phone-frame {
  padding: 7px;
  border: 1px solid rgba(255, 224, 165, .38);
  border-radius: 32px;
  background: linear-gradient(145deg, #362116, #100a06 58%, #714322);
  box-shadow: 0 30px 70px rgba(45, 25, 12, .3), 0 0 0 1px rgba(255,255,255,.12);
}
.phone-screen { border-radius: 25px; }
.phone-screen-placeholder {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(214,166,79,.2), transparent 54%),
    linear-gradient(145deg, #160c07 0%, #3c2112 52%, #160b06 100%);
}

/* About/story panel: tactile surface, clearer reading hierarchy. */
#about {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(222, 179, 107, .2), transparent 55%),
    linear-gradient(180deg, #fffaf0 0%, #f7ead4 100%);
}
#about .about-card {
  background: linear-gradient(135deg, #9b5b2b 0%, #8b4e24 48%, #713c1d 100%);
  border: 1px solid rgba(255, 232, 188, .34);
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(73, 40, 14, .19), inset 0 1px 0 rgba(255,255,255,.14);
}
#about .about-card p {
  color: rgba(255, 249, 237, .96);
  text-wrap: pretty;
}
#about .about-card p strong { color: #ffe3a0; }
#about .about-logo {
  border-color: rgba(74, 40, 20, .86);
  box-shadow: 0 8px 20px rgba(74, 40, 20, .08);
}

/* Words section: deeper contrast and a subtle golden atmosphere. */
#words {
  background:
    radial-gradient(ellipse at 50% -12%, rgba(177, 111, 52, .25), transparent 50%),
    linear-gradient(150deg, #28170e 0%, #3b2417 54%, #24150d 100%);
}
#words .words-title { letter-spacing: -.035em; }
#words .words-subtitle { color: rgba(245, 230, 200, .78); }
#words .words-search-wrap {
  border-color: rgba(255, 236, 198, .2);
  background: rgba(255, 248, 233, .065);
  backdrop-filter: blur(10px);
}
#words .words-filter-btn {
  border-color: rgba(255, 236, 198, .16);
  transition: transform .18s var(--baryo-ease), background .18s ease, border-color .18s ease, color .18s ease;
}
#words .words-filter-btn:hover { transform: translateY(-1px); }
#words .words-filter-btn.active,
#words .words-filter-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, #e8c96a, #f3d993);
  color: #2c1f16;
  border-color: transparent;
  box-shadow: 0 5px 16px rgba(232, 201, 106, .18);
}
#words .word-card,
#words .word-item,
#words .word-btn {
  transition: transform .22s var(--baryo-ease), box-shadow .22s ease, border-color .22s ease, filter .22s ease;
}
#words .word-card:hover,
#words .word-item:hover,
#words .word-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 14px 30px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.1);
}

/* Contact becomes a set of clear, high-quality contact tiles. */
#contact,
.contact {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(219, 173, 99, .2), transparent 48%),
    linear-gradient(135deg, #fffaf0 0%, #f4e4c9 100%);
}
.contact-title {
  color: var(--baryo-ink);
  letter-spacing: -.035em;
}
.contact-item {
  min-width: min(220px, 100%);
  padding: 22px 24px;
  border: 1px solid rgba(105, 65, 32, .12);
  border-radius: 22px;
  background: rgba(255, 252, 245, .7);
  box-shadow: 0 8px 26px rgba(73, 40, 14, .07), inset 0 1px 0 rgba(255,255,255,.8);
  transition: transform .22s var(--baryo-ease), box-shadow .22s ease, border-color .22s ease;
}
.contact-item:hover {
  transform: translateY(-5px);
  border-color: rgba(155, 91, 43, .34);
  box-shadow: 0 16px 34px rgba(73, 40, 14, .13), inset 0 1px 0 rgba(255,255,255,.9);
}
.contact-icon-wrap {
  background: linear-gradient(145deg, #8e4d23, #c18442) !important;
  color: #fffaf0;
  box-shadow: 0 8px 18px rgba(105, 58, 25, .2);
}
.contact-item span { overflow-wrap: anywhere; }

/* Consistent keyboard focus, without removing native accessibility cues. */
.navbar a:focus-visible,
button:focus-visible,
a:focus-visible,
#words input:focus-visible {
  outline: 3px solid #c58b3e;
  outline-offset: 4px;
}

@media (max-width: 768px) {
  .navbar {
    background: rgba(255, 250, 239, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .hero {
    background:
      radial-gradient(ellipse at 50% 36%, rgba(225, 177, 91, .18), transparent 52%),
      linear-gradient(160deg, #fffaf0 0%, #f7ead4 100%);
  }
  .hero-headline { letter-spacing: -.035em; }
  .btn-register, .btn-trailer { min-height: 48px; }
  #about .about-card {
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(73, 40, 14, .16), inset 0 1px 0 rgba(255,255,255,.12);
  }
  .contact-item { padding: 18px 14px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-headline, .hero-ctas, .phone-frame,
  .char-left, .char-right, .contact-char-left, .contact-char-right {
    animation: none !important;
  }
  .navbar *, .contact-item, .btn-register, .btn-trailer,
  .btn-nav-login, .btn-nav-signup { transition: none !important; }
}


/* ============================================================
   WORDS SECTION — keep CTA visible (do not clip bottom button)
   ============================================================ */
#words {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#words .words-inner {
  display: flex !important;
  flex-direction: column !important;
  width: min(100%, 1120px) !important;
  max-width: 1120px !important;
  max-height: calc(100svh - var(--nav-h) - 16px) !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  padding-bottom: 4px !important;
}

#words .words-header,
#words .words-controls,
#words .words-cta {
  flex: 0 0 auto !important;
}

#words .words-header {
  margin-bottom: 6px !important;
}

#words .words-subtitle {
  margin-bottom: 10px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#words .words-controls {
  margin-bottom: 10px !important;
}

/* Scrollable items area — this is what was pushing the CTA off-screen */
#words #wordsList {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  margin-bottom: 8px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 201, 106, 0.35) transparent;
}

#words #wordsList::-webkit-scrollbar {
  width: 6px;
}
#words #wordsList::-webkit-scrollbar-thumb {
  background: rgba(232, 201, 106, 0.35);
  border-radius: 999px;
}

#words .words-empty {
  flex: 0 0 auto !important;
}

/* CTA always pinned at the bottom of the words panel */
#words .words-cta {
  margin-top: auto !important;
  padding-top: 10px !important;
  padding-bottom: 6px !important;
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, transparent 0%, rgba(36, 21, 13, 0.92) 28%, rgba(36, 21, 13, 0.98) 100%);
}

#words .words-cta p {
  margin-bottom: 8px !important;
}

#words .btn-words-explore {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

/* Slightly tighter letter groups so more fits above the fold */
#words .words-letter-group {
  margin-bottom: 8px !important;
}

@media (max-width: 768px) {
  #words .words-inner {
    max-height: calc(100svh - var(--nav-h) - 12px) !important;
  }
  #words .words-subtitle {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  #words .words-cta {
    padding-top: 8px !important;
  }
}
