/* Sannivesham Aksharam — Complete Modern Responsive Stylesheet */
/* Telugu cultural elegance with English UI, top rotating letter orb, 60fps mobile smoothness */

@import url('https://fonts.googleapis.com/css2?family=Ramabhadra&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700;9..144,900&family=Work+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&family=Noto+Sans+Telugu:wght@400;600;700;800;900&display=swap');

:root {
  /* Brand Palette */
  --maroon: #7A2048;
  --maroon-dark: #541432;
  --gold: #C9A227;
  --gold-dark: #9e7a17;
  --teal: #1F6F5C;
  --ivory: #FAF6F0;
  --ivory-deep: #F1EADD;
  --ink: #241B2F;
  --ink-soft: #5B5265;

  /* Gamification & Accents */
  --green-primary: #2e7d32;
  --green-shadow: #1b5e20;
  --flame-color: #e65100;
  --blue-primary: #1976d2;
  --border-subtle: rgba(122, 32, 72, 0.12);
  --border-thick: #d4d7db;

  /* Fonts */
  --font-telugu: 'Ramabhadra', 'Noto Sans Telugu', sans-serif;
  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout Sizes */
  --bottom-dock-height: 60px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* -------------------------------------------------------------
   🌌 AMBIENT FLOATING LETTERS (DESKTOP ONLY — ZERO MOBILE LAG)
------------------------------------------------------------- */
.ambient-letters {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ambient-letters span {
  position: absolute;
  left: var(--x);
  top: 105%;
  font-family: var(--font-telugu);
  font-size: var(--size, clamp(2.4rem, 4vw, 4.2rem));
  font-weight: 700;
  animation: floatUp var(--dur) linear infinite;
  animation-delay: var(--delay);
  user-select: none;
  will-change: transform;
}

.amb-maroon {
  color: rgba(122, 32, 72, 0.16);
  text-shadow: 0 0 14px rgba(122, 32, 72, 0.1);
}

.amb-gold {
  color: rgba(201, 162, 39, 0.22);
  text-shadow: 0 0 14px rgba(201, 162, 39, 0.12);
}

.amb-teal {
  color: rgba(31, 111, 92, 0.16);
  text-shadow: 0 0 14px rgba(31, 111, 92, 0.1);
}

@keyframes floatUp {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  12%  { opacity: 0.95; }
  85%  { opacity: 0.95; }
  100% { transform: translate3d(0, -125vh, 0) rotate(14deg); opacity: 0; }
}

@media (max-width: 768px) {
  .ambient-letters span {
    font-size: clamp(2rem, 6vw, 3rem);
  }
}

/* -------------------------------------------------------------
   🔝 SITE HEADER (FIXED ALIGNMENT & RESPONSIVE SAFE AREAS)
------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(250, 246, 240, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  min-height: 62px;
  padding: max(env(safe-area-inset-top, 0px), 8px) max(4vw, 20px) 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 1000;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-telugu);
  font-size: 1.35rem;
  color: var(--maroon-dark);
  font-weight: 700;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-link-btn:hover {
  color: var(--maroon);
  background: rgba(122, 32, 72, 0.06);
}

.nav-link-btn.is-active {
  color: #ffffff;
  background: var(--maroon);
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.top-stat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pill-streak { color: var(--flame-color); background: #fff3e0; border-color: #ffe0b2; }
.pill-gems { color: #0288d1; background: #e1f5fe; border-color: #b3e5fc; }
.pill-xp { color: var(--gold-dark); background: #fffde7; border-color: #fff59d; }

/* Header Auth Slot */
.header-auth-slot {
  display: flex;
  align-items: center;
  margin-left: 2px;
}

.btn-google-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-google-header:hover {
  background: #fdfdfd;
  border-color: var(--maroon);
  box-shadow: 0 2px 6px rgba(122, 32, 72, 0.12);
  transform: translateY(-1px);
}

.header-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 2px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid var(--maroon);
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-user-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(122, 32, 72, 0.15);
}

.header-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.header-user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--maroon-dark);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -------------------------------------------------------------
   🗂️ MAIN WRAPPER & TAB VIEWS
------------------------------------------------------------- */
.main-wrapper {
  position: relative;
  z-index: 10;
  min-height: calc(100vh - 62px);
  display: flex;
  flex-direction: column;
}

.tab-view {
  display: none;
  animation: fadeIn 0.2s ease;
  padding-bottom: 70px;
}

.tab-view.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------
   🌟 HERO SECTION WITH ROTATING CIRCLE ON TOP
------------------------------------------------------------- */
.hero-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem max(4vw, 20px) 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Centerpiece 3D Rotating Circle on TOP */
.hero-top-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.glow-orb {
  position: absolute;
  width: min(340px, 80vw);
  height: min(340px, 80vw);
  background: radial-gradient(circle, rgba(201, 162, 39, 0.22) 0%, rgba(122, 32, 72, 0.1) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(12px);
  z-index: -1;
  animation: orbPulse 6s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.letter-badge {
  position: relative;
  width: min(240px, 65vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--maroon) 0%, var(--maroon-dark) 65%, #35091f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px -15px rgba(84, 20, 50, 0.5);
  transform: translateZ(0);
}

.badge-ring {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 162, 39, 0.45);
}

.badge-ring--dash {
  inset: 0;
  border: 1.5px dashed rgba(250, 246, 240, 0.32);
  animation: rotateRing 40s linear infinite;
}

@keyframes rotateRing {
  to { transform: rotate(360deg); }
}

.cycle-letter {
  font-family: var(--font-telugu);
  font-size: clamp(4.5rem, 12vw, 6.5rem);
  color: var(--ivory);
  text-shadow: 0 0 28px rgba(201, 162, 39, 0.5);
  transition: opacity 0.35s ease, transform 0.35s ease;
  user-select: none;
}

.cycle-letter.letter-swap {
  opacity: 0;
  transform: scale(0.82);
}

.letter-caption {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.letter-caption .mono-tag {
  font-size: 0.95rem;
  padding: 3px 14px;
  border-radius: 6px;
  transition: opacity 0.35s ease;
}

.letter-caption .mono-tag.letter-swap {
  opacity: 0;
}

.caption-note {
  font-family: var(--font-telugu);
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Hero Text & Headlines */
.hero-text {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-telugu);
  font-size: 1.05rem;
  color: var(--maroon);
  margin-bottom: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(31, 111, 92, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31, 111, 92, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(31, 111, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 111, 92, 0); }
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--teal);
  background: rgba(31, 111, 92, 0.09);
  border: 1px solid rgba(31, 111, 92, 0.22);
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 600;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 1rem;
}

.hero-telugu-sub {
  display: block;
  font-family: var(--font-telugu);
  font-size: 0.48em;
  font-weight: 600;
  color: var(--maroon);
  margin-top: 0.35rem;
}

.text-gradient {
  background: linear-gradient(90deg, var(--maroon) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 38rem;
  margin-bottom: 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.btn-lg {
  padding: 0.95rem 2.2rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--maroon);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(122, 32, 72, 0.25);
}

.btn-primary:hover {
  background: var(--maroon-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(122, 32, 72, 0.32);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: #ffffff;
  color: var(--maroon);
  border: 2px solid var(--maroon);
}

.btn-ghost:hover {
  background: rgba(122, 32, 72, 0.05);
  transform: translateY(-2px);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.8rem;
}

.mini-tag {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(122, 32, 72, 0.05);
  border: 1px solid rgba(122, 32, 72, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
}

/* -------------------------------------------------------------
   🏛️ FEATURES GRID (ENGLISH HEADINGS & BULLETS)
------------------------------------------------------------- */
.features-container {
  max-width: 1140px;
  margin: 1.5rem auto 3.5rem;
  padding: 0 max(4vw, 20px);
}

.features-header {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.2rem;
}

.features-header h2 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--ink);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}

.feature-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.8rem 1.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--maroon);
}

.feature-card--teal::before { background: var(--teal); }
.feature-card--gold::before { background: var(--gold); }
.feature-card--purple::before { background: #6a1b9a; }

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px -10px rgba(36, 27, 47, 0.16);
}

.feature-icon {
  font-size: 1.9rem;
  margin-bottom: 0.9rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.2rem;
  flex: 1;
}

.feature-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--maroon);
}

.feature-card--teal .feature-link { color: var(--teal); }
.feature-card--gold .feature-link { color: var(--gold-dark); }
.feature-card--purple .feature-link { color: #6a1b9a; }

/* -------------------------------------------------------------
   📜 CULTURE STRIP BANNER
------------------------------------------------------------- */
.culture-strip {
  background: var(--maroon-dark);
  color: var(--ivory);
  padding: 4.5rem max(4vw, 20px);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 2.5rem 0;
}

.culture-glyph {
  position: absolute;
  font-family: var(--font-telugu);
  font-size: 22rem;
  color: rgba(250, 246, 240, 0.04);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  line-height: 1;
  user-select: none;
}

.culture-strip blockquote {
  position: relative;
  z-index: 2;
  max-width: 44rem;
  margin: 0 auto;
}

.culture-strip blockquote p {
  font-family: var(--font-telugu);
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.culture-strip cite {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: normal;
  opacity: 0.92;
  font-weight: 500;
}

/* -------------------------------------------------------------
   🗺️ ROADMAP TAB (LEARNING PATH)
------------------------------------------------------------- */
.roadmap-container {
  max-width: 660px;
  margin: 0 auto;
  padding: 2rem 16px;
}

.roadmap-header {
  text-align: center;
  margin-bottom: 2rem;
}

.roadmap-header h2 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.roadmap-header p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.path-unit {
  margin-bottom: 2.8rem;
}

.unit-banner {
  background: var(--unit-color, var(--maroon));
  border-radius: 18px;
  padding: 20px 24px;
  color: #ffffff;
  margin-bottom: 1.8rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.unit-banner::after {
  content: '';
  position: absolute;
  top: -24px; right: -24px;
  width: 120px; height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.unit-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.22);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.unit-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
}

.unit-sub {
  font-size: 0.9rem;
  opacity: 0.92;
  font-weight: 500;
}

.unit-path-nodes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 10px 0;
  position: relative;
}

.node-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.2s ease;
}

.path-node {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: none;
  background-color: var(--unit-color, var(--maroon));
  color: #ffffff;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease;
  outline: none;
}

.path-node:hover:not(.is-locked) {
  filter: brightness(1.08);
}

.path-node:active:not(.is-locked) {
  transform: translateY(6px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.node-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.path-node.is-completed {
  background-color: #ffc107;
  box-shadow: 0 8px 0 #d39e00;
}

.path-node.is-completed .node-inner {
  color: #5c3e00;
  font-weight: 900;
  font-size: 2rem;
}

.path-node.is-current {
  animation: bounceGentle 2s infinite ease-in-out;
}

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

.node-pulse-ring {
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 50%;
  border: 3px solid var(--unit-color, var(--maroon));
  opacity: 0.8;
  animation: pulseExpand 2s infinite;
  pointer-events: none;
}

@keyframes pulseExpand {
  0% { transform: scale(1); opacity: 0.8; }
  70% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

.node-tooltip {
  position: absolute;
  top: -38px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.node-tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0 4px;
  border-style: solid;
  border-color: var(--ink) transparent transparent transparent;
}

.path-node.is-locked {
  background-color: #e5e5e5;
  box-shadow: 0 8px 0 #afafaf;
  cursor: not-allowed;
  opacity: 0.85;
}

.path-node.is-locked .node-inner {
  filter: grayscale(1);
  font-size: 1.4rem;
}

.node-label {
  margin-top: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  max-width: 150px;
}

.node-en-name {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

.node-te-name {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-family: var(--font-telugu);
}

.chest-node {
  background: #ffb74d;
  box-shadow: 0 8px 0 #f57c00;
  width: 66px;
  height: 66px;
}

.chest-node.is-locked-chest {
  background: #e0e0e0;
  box-shadow: 0 8px 0 #9e9e9e;
}

/* -------------------------------------------------------------
   🎯 PRACTICE TAB (FREE REVISION)
------------------------------------------------------------- */
.practice-wrapper {
  max-width: 660px;
  margin: 0 auto;
  padding: 2rem 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.practice-hero {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border: 2px solid #a5d6a7;
  border-radius: 20px;
  padding: 30px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.practice-icon { font-size: 3.2rem; }
.practice-title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; color: #1b5e20; }
.practice-desc { font-size: 0.98rem; color: #2e7d32; max-width: 420px; line-height: 1.6; }

.btn-practice {
  margin-top: 4px;
  padding: 15px 34px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 999px;
  border: none;
  background: var(--green-primary);
  box-shadow: 0 6px 0 var(--green-shadow);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-practice:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--green-shadow);
}

.practice-benefits {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.benefit-item { display: flex; align-items: center; gap: 14px; }
.benefit-icon {
  font-size: 1.7rem;
  width: 48px; height: 48px;
  background: #f8fafc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.benefit-text h4 { font-size: 1rem; font-weight: 700; }
.benefit-text p { font-size: 0.86rem; color: var(--ink-soft); }

/* -------------------------------------------------------------
   📖 DICTIONARY TAB
------------------------------------------------------------- */
.dictionary-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem max(4vw, 20px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dict-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 18px;
  font-size: 1.2rem;
  color: var(--ink-soft);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  font-size: 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: 999px;
  outline: none;
  font-family: inherit;
  background: #ffffff;
  transition: border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.search-input:focus { border-color: var(--maroon); }

.filter-chips-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-chips-wrap::-webkit-scrollbar { display: none; }

.filter-chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-chip.is-active {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #ffffff;
}

.dict-count-bar {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.dict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.dict-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dict-card:hover {
  transform: translateY(-3px);
  border-color: var(--maroon);
  box-shadow: 0 10px 24px -10px rgba(122, 32, 72, 0.25);
}

.dict-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dict-cat-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  background: var(--ivory);
  border-radius: 4px;
  color: var(--ink-soft);
}

.dict-speaker-btn {
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  opacity: 0.7;
}

.dict-card:hover .dict-speaker-btn { opacity: 1; }

.dict-te {
  font-family: var(--font-telugu);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--maroon-dark);
  margin-bottom: 2px;
}

.dict-translit {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal);
  margin-bottom: 4px;
}

.dict-en {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.dict-example {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
}

.dict-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 16px;
  color: var(--ink-soft);
}

.dict-empty-state .empty-icon { font-size: 2.8rem; margin-bottom: 8px; display: block; }

/* -------------------------------------------------------------
   🔄 TRANSLATOR TAB
------------------------------------------------------------- */
.translator-wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem max(4vw, 20px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.trans-panel {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.trans-lang-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--ivory);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 700;
  font-size: 0.95rem;
}

.trans-swap-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: transform 0.25s, background-color 0.2s;
}

.trans-swap-btn:hover { background: #f0f0f0; transform: rotate(180deg); }

.trans-input {
  width: 100%;
  height: 130px;
  padding: 18px;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 1.1rem;
  color: var(--ink);
  background: #ffffff;
}

.trans-actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px 18px;
  border-top: 1px solid var(--border-subtle);
  background: #fafafa;
}

.btn-trans-action {
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  background: var(--maroon);
  color: #ffffff;
  cursor: pointer;
}

.trans-output-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.trans-output-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}

.trans-output-text.is-placeholder { color: var(--ink-soft); font-weight: 500; font-size: 1rem; }
.trans-out-footer { display: flex; justify-content: flex-end; margin-top: 12px; }

.btn-trans-copy {
  padding: 7px 16px;
  border: 1px solid var(--border-subtle);
  background: var(--ivory);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}

.quick-title { font-size: 0.92rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; display: block; }
.quick-chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-phrase-btn {
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-phrase-btn:hover {
  border-color: var(--maroon);
  background: rgba(122, 32, 72, 0.05);
  color: var(--maroon);
}

/* -------------------------------------------------------------
   👤 PROFILE TAB
------------------------------------------------------------- */
.profile-wrapper {
  max-width: 660px;
  margin: 0 auto;
  padding: 2rem 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.profile-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe0b2, #ffcc80);
  border: 3px solid #ff9800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}

.profile-avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--maroon);
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(122, 32, 72, 0.2);
}

.profile-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; }

.profile-email {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-top: -6px;
  word-break: break-all;
}

.profile-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-badge-pill {
  padding: 4px 14px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #ff8f00;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
}

.profile-sync-status {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #f0ede8;
  color: var(--ink-soft);
  border: 1px solid var(--border-subtle);
}

.profile-sync-status.is-synced {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #c8e6c9;
}

/* Profile Auth Box */
.profile-auth-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.auth-prompt-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.auth-prompt-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--ink);
}

.auth-prompt-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  max-width: 460px;
  line-height: 1.5;
}

.btn-google-sign-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #3c4043;
  border: 1.5px solid #dadce0;
  border-radius: 999px;
  padding: 11px 24px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-google-sign-in:hover {
  background: #f8f9fa;
  border-color: #4285F4;
  box-shadow: 0 3px 10px rgba(66, 133, 244, 0.22);
  transform: translateY(-1px);
}

.auth-signed-in-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.auth-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-user-info strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.auth-user-info span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.btn-sign-out {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #ffcdd2;
  background: #ffebee;
  color: #c62828;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-sign-out:hover {
  background: #ffcdd2;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.prof-stat-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prof-stat-icon { font-size: 1.5rem; margin-bottom: 2px; }
.prof-stat-val { font-size: 1.3rem; font-weight: 900; color: var(--ink); }
.prof-stat-lbl { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }

.profile-achievements {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.achieve-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.achieve-list { display: flex; flex-direction: column; gap: 10px; }
.achieve-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ivory);
  opacity: 0.45;
  filter: grayscale(1);
  transition: all 0.3s;
}

.achieve-item.is-unlocked-badge {
  opacity: 1;
  filter: grayscale(0);
  background: #fffde7;
  border: 1px solid #fff59d;
}

.achieve-icon { font-size: 2rem; }
.achieve-info h4 { font-size: 0.95rem; font-weight: 700; }
.achieve-info p { font-size: 0.8rem; color: var(--ink-soft); }

.profile-settings {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-btn {
  padding: 13px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--ivory);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.setting-btn:hover { background: #e8e2d8; }
.btn-danger { color: #d32f2f; border-color: #ffcdd2; background: #ffebee; }

/* -------------------------------------------------------------
   🎓 LESSON RUNNER FULLSCREEN MODAL (NO HEARTS)
------------------------------------------------------------- */
.lesson-modal {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.lesson-modal.is-active { display: flex; }

.lesson-modal-top {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 max(4vw, 20px);
  border-bottom: 1px solid var(--border-subtle);
}

.btn-close-lesson {
  background: none;
  border: none;
  font-size: 1.7rem;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  line-height: 1;
}

.btn-close-lesson:hover { color: var(--ink); background: #f0f0f0; }

.lesson-progress-bar {
  flex: 1;
  height: 12px;
  background: #e5e5e5;
  border-radius: 999px;
  overflow: hidden;
}

.lesson-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--green-primary);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.lesson-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 110px;
  overflow-y: auto;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.exercise-intro-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.intro-tag {
  padding: 4px 14px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #ff8f00;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
}

.intro-glyph-box {
  width: 140px; height: 140px;
  background: #ffffff;
  border: 4px solid var(--maroon);
  box-shadow: 0 8px 0 var(--maroon-dark);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s;
}

.intro-glyph-box:active { transform: translateY(4px); box-shadow: 0 4px 0 var(--maroon-dark); }
.intro-glyph {
  font-family: var(--font-telugu);
  font-size: 4.8rem;
  font-weight: 700;
  color: var(--maroon-dark);
  line-height: 1;
}

.intro-sound-btn {
  position: absolute;
  bottom: 8px; right: 8px;
  background: var(--ivory);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-translit {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal);
}

.intro-note { font-size: 1rem; color: var(--ink-soft); max-width: 340px; }

.intro-example {
  margin-top: 8px;
  background: var(--ivory);
  border: 2px dashed var(--border-subtle);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.ex-label { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.ex-word-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ex-te { font-family: var(--font-telugu); color: var(--maroon-dark); font-size: 1.35rem; }
.ex-en { color: var(--ink-soft); font-size: 0.95rem; }

.exercise-choice-wrap,
.exercise-sound-wrap,
.exercise-pairs-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: popIn 0.3s ease;
}

.exercise-question {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.speaker-large-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: var(--maroon);
  box-shadow: 0 6px 0 var(--maroon-dark);
  border: none;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  margin: 8px auto;
  transition: transform 0.1s;
}

.speaker-large-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--maroon-dark); }
.speaker-large-btn .speaker-icon { font-size: 2rem; }
.speaker-large-btn .speaker-label { font-size: 1.05rem; font-weight: 700; }

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.sound-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.option-card {
  display: flex;
  align-items: center;
  padding: 15px 18px;
  border: 2px solid var(--border-thick);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 0 var(--border-thick);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.1s ease;
  outline: none;
}

.option-card:hover { background: #fafafa; }
.option-card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border-thick); }

.option-card.is-selected {
  border-color: var(--maroon);
  background: #fdf5f8;
  box-shadow: 0 4px 0 var(--maroon-dark);
  color: var(--maroon-dark);
}

.option-num {
  width: 28px; height: 28px;
  border: 2px solid var(--border-thick);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  margin-right: 12px;
  color: var(--ink-soft);
}

.option-card.is-selected .option-num {
  border-color: var(--maroon);
  background: var(--maroon);
  color: #ffffff;
}

.option-text { font-size: 1.05rem; font-weight: 700; }

.glyph-option-card {
  justify-content: center;
  padding: 24px 16px;
}

.glyph-option-card .option-glyph {
  font-family: var(--font-telugu);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--maroon-dark);
}

/* Pair Matching Tiles */
.pairs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.pair-tile {
  min-height: 64px;
  padding: 12px 14px;
  border: 2px solid var(--border-thick);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 0 var(--border-thick);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.pair-tile-te {
  font-family: var(--font-telugu);
  font-size: 1.5rem;
  color: var(--maroon-dark);
}

.pair-tile:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border-thick); }

.pair-tile.is-active-tile {
  border-color: var(--maroon);
  background: #fdf5f8;
  box-shadow: 0 4px 0 var(--maroon-dark);
  color: var(--maroon-dark);
}

.pair-tile.is-matched {
  border-color: #c8e6c9;
  background: #e8f5e9;
  box-shadow: none;
  color: #2e7d32;
  cursor: default;
  opacity: 0.6;
  pointer-events: none;
}

.pair-tile.is-wrong-shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
  border-color: #d32f2f;
  background: #ffebee;
  color: #d32f2f;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Bottom Sheet Feedback */
.lesson-bottom-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 20px 24px;
  background: #ffffff;
  border-top: 2px solid var(--border-subtle);
  display: flex;
  justify-content: center;
  z-index: 1000;
}

.sheet-content {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lesson-bottom-sheet.sheet-correct { background: #d7ffb8; border-top-color: #46a302; }
.lesson-bottom-sheet.sheet-wrong { background: #fff0f0; border-top-color: #ff4b4b; }

.sheet-feedback { display: flex; align-items: center; gap: 14px; }
.sheet-icon { font-size: 2.2rem; }
.sheet-correct .sheet-title { color: #2b7500; font-size: 1.25rem; font-weight: 800; }
.sheet-correct .sheet-sub { color: #3b8e00; font-size: 0.9rem; font-weight: 700; }
.sheet-wrong .sheet-title { color: #c62828; font-size: 1.25rem; font-weight: 800; }
.sheet-wrong .sheet-sub { color: #d32f2f; font-size: 0.98rem; font-weight: 700; }

.btn-action-primary,
.btn-action-check,
.btn-sheet {
  width: 100%;
  max-width: 560px;
  padding: 15px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-action-primary { background: var(--green-primary); box-shadow: 0 5px 0 var(--green-shadow); color: #ffffff; }
.btn-action-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--green-shadow); }
.btn-action-check { background: var(--green-primary); box-shadow: 0 5px 0 var(--green-shadow); color: #ffffff; }

.btn-action-check:disabled,
.btn-action-primary:disabled {
  background: #e5e5e5;
  box-shadow: 0 4px 0 #afafaf;
  color: #afafaf;
  cursor: not-allowed;
}

.btn-sheet-correct { background: #58cc02; box-shadow: 0 5px 0 #46a302; color: #ffffff; }
.btn-sheet-wrong { background: #d32f2f; box-shadow: 0 5px 0 #b71c1c; color: #ffffff; }

/* Celebration */
.lesson-celebration-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  animation: popIn 0.3s ease;
}

.celebration-icon { font-size: 4rem; animation: bounceGentle 1.5s infinite ease-in-out; }
.celebration-title { font-family: var(--font-display); font-size: 1.9rem; font-weight: 900; }
.celebration-subtitle { font-family: var(--font-telugu); font-size: 1.1rem; color: var(--ink-soft); }

.celebration-stats-grid {
  display: flex;
  gap: 12px;
  margin: 12px 0;
  width: 100%;
}

.stat-pill {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-pill .stat-label { font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }
.stat-pill .stat-val { font-size: 1.25rem; font-weight: 900; color: var(--ink); }

/* -------------------------------------------------------------
   💻 LAPTOP / DESKTOP SIDE-BY-SIDE HERO LAYOUT (>= 900px)
------------------------------------------------------------- */
@media (min-width: 900px) {
  .hero-section {
    max-width: 1200px;
    padding: 3.5rem max(4vw, 32px) 4.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    text-align: left;
  }

  .hero-text {
    order: 1;
    flex: 1.2;
    max-width: 620px;
    align-items: flex-start;
    text-align: left;
  }

  .hero-text .eyebrow {
    justify-content: flex-start;
  }

  .hero-text h1 {
    text-align: left;
  }

  .hero-sub {
    text-align: left;
    margin: 0 0 2rem 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-tags {
    justify-content: flex-start;
  }

  .hero-top-visual {
    order: 2;
    flex: 0.95;
    margin-bottom: 0;
  }
}

/* -------------------------------------------------------------
   📱 MOBILE RESPONSIVENESS & SAFE AREAS (PERFECT HEADER FIT)
------------------------------------------------------------- */
.bottom-dock {
  display: none;
}

@media (max-width: 768px) {
  .site-header {
    padding: max(env(safe-area-inset-top, 0px), 6px) 10px 6px;
    min-height: 54px;
    gap: 6px;
    overflow: hidden;
  }

  .header-brand {
    min-width: 0;
    flex-shrink: 1;
  }

  .brand-link {
    gap: 6px;
  }

  .brand-logo-img {
    width: 28px;
    height: 28px;
  }

  .logo-brand-prefix {
    display: none;
  }

  .logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    white-space: nowrap;
  }

  .logo-sub {
    display: none;
  }

  .desktop-nav {
    display: none;
  }

  .header-stats {
    gap: 5px;
    flex-shrink: 0;
  }

  .top-stat-pill {
    padding: 3px 6px;
    font-size: 0.78rem;
    gap: 3px;
  }

  /* Hide XP in mobile header to guarantee Google Sign In button never gets pushed offscreen */
  .pill-xp {
    display: none;
  }

  .header-auth-slot {
    margin-left: 2px;
    flex-shrink: 0;
  }

  .btn-google-header {
    padding: 4px 9px;
    font-size: 0.8rem;
    gap: 4px;
  }

  .header-user-pill {
    padding: 2px 6px 2px 2px;
  }

  .header-user-avatar {
    width: 24px;
    height: 24px;
  }

  .header-user-name {
    max-width: 60px;
    font-size: 0.75rem;
  }

  .bottom-dock {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-dock-height);
    background: #ffffff;
    border-top: 1px solid var(--border-subtle);
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  }

  .dock-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    border: none;
    background: none;
    color: var(--ink-soft);
    cursor: pointer;
  }

  .dock-icon { font-size: 1.25rem; }
  .dock-label { font-size: 0.7rem; font-weight: 700; }

  .dock-tab.is-active {
    color: var(--maroon);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-section {
    padding-top: 1.5rem;
  }
}

@media (max-width: 520px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .dict-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .letter-badge {
    width: min(210px, 60vw);
  }

  .cycle-letter {
    font-size: 4rem;
  }
}

@media (max-width: 380px) {
  .btn-google-header .btn-google-text {
    font-size: 0.74rem;
  }

  .header-user-name {
    display: none;
  }
}
