/* ============================================================
   KidiGo — Duolingo-inspired Friendly Vietnamese Kids PWA UI
   Mobile-first, tactile 3D chunky buttons, cheerful pastel palette
   ============================================================ */

:root {
  --bg-cream: #fffdf7;
  --bg-card: #ffffff;
  --ink: #2b3445;
  --ink-muted: #6b7688;
  --border: #e5e9f0;
  --border-strong: #d5dce6;

  --green: #58cc02;
  --green-dark: #46a302;
  --green-soft: #e8fad8;

  --blue: #1cb0f6;
  --blue-dark: #1389c4;
  --blue-soft: #dff6ff;

  --yellow: #ffc800;
  --yellow-dark: #e0a800;
  --yellow-soft: #fff5cc;

  --coral: #ff5c5c;
  --coral-dark: #d93b3b;
  --coral-soft: #ffe8e8;

  --orange: #ff9600;
  --pink: #ff4b82;
  --purple: #a560e8;

  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --font-display: 'Baloo 2', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 74px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: #eef7e8;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Desktop cheerful sky/meadow backdrop around mobile PWA frame */
#app-backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 224, 102, 0.45), transparent 36%),
    radial-gradient(circle at 85% 15%, rgba(28, 176, 246, 0.25), transparent 35%),
    radial-gradient(circle at 80% 85%, rgba(88, 204, 2, 0.22), transparent 38%),
    linear-gradient(160deg, #effaf0 0%, #e6f5ff 52%, #fff8e6 100%);
  z-index: 0;
}

#app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg-cream);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 520px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
  }
  #app-shell {
    height: min(92vh, 860px);
    border-radius: 34px;
    border: 6px solid #ffffff;
    box-shadow:
      0 24px 60px rgba(43, 52, 69, 0.16),
      0 6px 20px rgba(88, 204, 2, 0.1);
  }
}

#app-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.page-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(var(--nav-height) + var(--safe-bottom) + 26px);
}

/* ============================================================
   Tactile 3D Duolingo-style Buttons
   ============================================================ */
.btn-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.3px;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.12s ease;
}

.btn-3d:active:not(:disabled) {
  transform: translateY(4px);
}

.btn-3d:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-lg {
  font-size: 17px;
  padding: 15px 22px;
}

.btn-block {
  width: 100%;
}

.btn-green {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 5px 0 var(--green-dark);
}
.btn-green:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--green-dark);
}

.btn-blue {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 5px 0 var(--blue-dark);
}
.btn-blue:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--blue-dark);
}

.btn-coral {
  background: var(--coral);
  color: #ffffff;
  box-shadow: 0 5px 0 var(--coral-dark);
}
.btn-coral:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--coral-dark);
}

.btn-ghost {
  background: #ffffff;
  color: var(--ink-muted);
  border: 2px solid var(--border);
  box-shadow: 0 4px 0 var(--border);
}
.btn-ghost:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--border);
}

/* ============================================================
   Onboarding Screen
   ============================================================ */
.onboarding-screen {
  flex: 1;
  overflow-y: auto;
  padding: calc(18px + var(--safe-top)) 18px calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(180deg, #f3fde8 0%, #fffdf7 46%, #fffdf7 100%);
}

.onboarding-hero {
  text-align: center;
}

.brand-pill {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 800;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.mascot-stage {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

.mascot-hero-img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 32px;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 26px rgba(88, 204, 2, 0.2);
}

.onboarding-title {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.15;
  margin: 10px 0 6px;
}

.onboarding-title span {
  color: var(--green);
}

.onboarding-desc {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-muted);
  line-height: 1.45;
}

.onboarding-card {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: 0 6px 0 rgba(43, 52, 69, 0.04);
}

.field-label {
  display: block;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--ink);
}

.kid-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--border-strong);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  background: #fafcff;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

.kid-input:focus {
  border-color: var(--green);
  background: #ffffff;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.avatar-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 6px;
  border-radius: 16px;
  border: 2.5px solid var(--border);
  background: var(--av-bg, #f7f9fc);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.avatar-choice.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.22);
  transform: scale(1.03);
}

.avatar-choice-emoji {
  font-size: 28px;
  line-height: 1;
}

.avatar-choice-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.onboarding-hint {
  text-align: center;
  margin: 10px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* ============================================================
   Top Bar & Sub Headers
   ============================================================ */
.top-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  background: #ffffff;
  border-bottom: 2px solid var(--border);
  z-index: 10;
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.top-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.top-greeting {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.top-app-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--green);
}

.top-kid-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-muted);
}

.stats-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 900;
  background: #f5f7fb;
  border: 1.5px solid var(--border);
}

.stat-streak {
  color: #e66a00;
  background: #fff3e0;
  border-color: #ffd9a8;
}

.stat-xp {
  color: #c28a00;
  background: #fff9db;
  border-color: #ffe787;
}

.stat-heart {
  color: #e63956;
  background: #ffedf0;
  border-color: #ffc2cc;
}

.sub-header {
  padding: calc(14px + var(--safe-top)) 16px 12px;
  background: #ffffff;
  border-bottom: 2px solid var(--border);
}

.sub-header-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
}

.sub-header-sub {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* ============================================================
   Daily Goal Banner & Units Winding Path
   ============================================================ */
.daily-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 0 rgba(43, 52, 69, 0.04);
}

.daily-banner-left {
  flex: 1;
}

.daily-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 5px;
}

.daily-bar-track {
  height: 12px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
  margin-bottom: 5px;
}

.daily-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffc800, #ff9600);
  transition: width 0.4s ease;
}

.daily-sub {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 700;
}

.daily-sound-btn {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 18px;
  border: 2.5px solid var(--green);
  background: #ffffff;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.daily-sound-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.daily-sound-btn span {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 1px 3px;
}

.unlock-all-ribbon {
  background: #edf8ff;
  border: 2px dashed var(--blue);
  color: var(--blue-dark);
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
}

.units-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.unit-header-card {
  background: var(--u-color);
  color: #ffffff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 6px 0 var(--u-dark);
}

.unit-banner-wrap {
  position: relative;
  height: 112px;
  background: var(--u-soft);
  overflow: hidden;
}

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

.unit-progress-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(43, 52, 69, 0.78);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.unit-header-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px 14px;
}

.unit-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
}

.unit-subtitle {
  margin: 3px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.94;
  line-height: 1.3;
}

.btn-guidebook {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 8px 9px;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-guidebook span {
  font-size: 18px;
  line-height: 1;
}

.btn-guidebook small {
  font-size: 11px;
  margin-top: 2px;
}

/* Winding Path Stepping Stones */
.lesson-path {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 0 10px;
  gap: 28px;
  position: relative;
}

.path-row {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.path-row:has(.start-bubble) {
  padding-top: 22px;
}

.node-wrapper {
  position: relative;
  transform: translateX(var(--offset, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.start-bubble {
  position: absolute;
  top: -38px;
  background: #ffffff;
  color: var(--u-color);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 12px;
  border: 2.5px solid var(--border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  animation: floatBounce 1.7s ease-in-out infinite;
  z-index: 3;
}

.start-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-right: 2.5px solid var(--border);
  border-bottom: 2.5px solid var(--border);
}

.lesson-node {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.lesson-node:active {
  transform: translateY(5px);
}

.lesson-node--current,
.lesson-node--unlocked {
  background: var(--u-color);
  box-shadow: 0 8px 0 var(--u-dark);
}

.lesson-node--current:active,
.lesson-node--unlocked:active {
  box-shadow: 0 2px 0 var(--u-dark);
}

.lesson-node--completed {
  background: linear-gradient(180deg, #ffd43b, #ffb800);
  box-shadow: 0 8px 0 #d99500;
}

.lesson-node--locked {
  background: #e5eaf0;
  box-shadow: 0 7px 0 #cbd3de;
}

.node-pulse-ring {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 4px solid var(--u-color);
  opacity: 0.45;
  animation: pulseRing 1.9s ease-out infinite;
  pointer-events: none;
}

.node-icon {
  font-size: 34px;
  line-height: 1;
}

.node-check {
  position: absolute;
  right: -2px;
  top: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #ffffff;
}

.node-meta {
  margin-top: 9px;
  text-align: center;
  max-width: 150px;
}

.node-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.node-stars {
  font-size: 13px;
  margin-top: 2px;
}

.node-xp {
  display: inline-block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-muted);
}

.path-mascot {
  position: absolute;
  top: 6px;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  animation: floatBounce 2.6s ease-in-out infinite;
}

.path-mascot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.path-mascot--left {
  left: 16px;
}

.path-mascot--right {
  right: 16px;
}

/* Treasure Chest Node */
.chest-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 20px;
  border: 2.5px solid var(--border);
  background: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-muted);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--border);
}

.chest-node.ready {
  background: var(--yellow-soft);
  border-color: var(--yellow);
  color: #a67100;
  box-shadow: 0 5px 0 var(--yellow-dark);
  animation: floatBounce 1.8s ease-in-out infinite;
}

.chest-node.opened {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-dark);
  box-shadow: 0 4px 0 var(--green-dark);
}

.chest-emoji {
  font-size: 26px;
  line-height: 1;
}

/* ============================================================
   Word Visual Renderer (Colors, Counting, ABCs, Emojis)
   ============================================================ */
.word-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  flex-shrink: 0;
}

.word-visual--sm {
  width: 58px;
  height: 58px;
  border-radius: 16px;
}
.word-visual--sm .visual-emoji {
  font-size: 32px;
}
.word-visual--sm .color-blob {
  width: 34px;
  height: 34px;
}
.word-visual--sm .count-big-num {
  font-size: 22px;
}
.word-visual--sm .count-dots {
  font-size: 9px;
}

.word-visual--md {
  width: 84px;
  height: 84px;
  margin: 0 auto;
}
.word-visual--md .visual-emoji {
  font-size: 48px;
}
.word-visual--md .color-blob {
  width: 48px;
  height: 48px;
}
.word-visual--md .count-big-num {
  font-size: 32px;
}
.word-visual--md .count-dots {
  font-size: 12px;
}

.word-visual--lg {
  width: 112px;
  height: 112px;
  margin: 0 auto;
  border-radius: 26px;
}
.word-visual--lg .visual-emoji {
  font-size: 64px;
}
.word-visual--lg .color-blob {
  width: 64px;
  height: 64px;
}
.word-visual--lg .count-big-num {
  font-size: 42px;
}
.word-visual--lg .count-dots {
  font-size: 14px;
}

.word-visual--xl {
  width: 132px;
  height: 132px;
  margin: 0 auto 10px;
  border-radius: 30px;
}
.word-visual--xl .visual-emoji {
  font-size: 74px;
}
.word-visual--xl .color-blob {
  width: 76px;
  height: 76px;
}
.word-visual--xl .count-big-num {
  font-size: 48px;
}
.word-visual--xl .count-dots {
  font-size: 15px;
}

.visual-emoji {
  line-height: 1;
}

.letter-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--green);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--green-dark);
}

.color-blob {
  position: relative;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}

.color-blob-shine {
  position: absolute;
  top: 18%;
  left: 20%;
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.count-big-num {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}

.count-dots {
  display: flex;
  gap: 2px;
  margin-top: 2px;
  line-height: 1;
}

/* ============================================================
   Vocab Tab
   ============================================================ */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 10px;
  scrollbar-width: none;
}

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

.chip {
  flex-shrink: 0;
  padding: 8px 13px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: #ffffff;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12.5px;
  color: var(--ink-muted);
  cursor: pointer;
}

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

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

.vocab-card {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 10px 11px;
  text-align: center;
  box-shadow: 0 4px 0 var(--border);
  cursor: pointer;
}

.vocab-card.learned {
  border-color: #cdeca9;
}

.vocab-learned-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 14px;
}

.vocab-en {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  margin-top: 8px;
  color: var(--ink);
}

.vocab-phonetic {
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-dark);
}

.vocab-vi {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-muted);
  margin: 2px 0 9px;
}

.vocab-card-actions {
  display: flex;
  gap: 6px;
}

.vocab-speak-btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12.5px;
  padding: 7px 6px;
  cursor: pointer;
}

.vocab-slow-btn {
  border: none;
  border-radius: 12px;
  background: var(--green-soft);
  padding: 7px 9px;
  font-size: 14px;
  cursor: pointer;
}

/* ============================================================
   Rewards & Stickers Tab
   ============================================================ */
.reward-hero-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: 0 5px 0 var(--border);
}

.reward-hero-img {
  width: 82px;
  height: 82px;
  border-radius: 20px;
  object-fit: cover;
  flex-shrink: 0;
}

.reward-hero-info {
  flex: 1;
}

.reward-hero-badge {
  display: inline-block;
  background: var(--yellow-soft);
  color: #a67100;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.reward-hero-info h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
}

.reward-hero-info p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 700;
}

.section-heading {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 19px;
}

.section-sub {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 700;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sticker-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 6px;
  border-radius: 18px;
  border: 2px solid var(--border);
  background: var(--st-bg, #ffffff);
  box-shadow: 0 4px 0 var(--border);
  cursor: pointer;
  text-align: center;
}

.sticker-tile.locked {
  background: #f2f4f8;
  opacity: 0.72;
}

.sticker-emoji {
  font-size: 36px;
  line-height: 1.1;
}

.sticker-name {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.sticker-en {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  color: var(--blue-dark);
}

/* ============================================================
   Profile & Settings Tab
   ============================================================ */
.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 14px;
}

.profile-avatar-big {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-identity {
  flex: 1;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-name-row h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.btn-edit-mini {
  border: 1.5px solid var(--border);
  background: #f8fafd;
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-muted);
  cursor: pointer;
}

.profile-level {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--green-dark);
}

.stats-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.mini-stat-card {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mini-stat-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.mini-stat-card strong {
  font-family: var(--font-display);
  font-size: 18px;
}

.mini-stat-card small {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

.pwa-promo-card {
  background: linear-gradient(135deg, #e7f8ff, #f2ffe6);
  border: 2px solid #b6e6fd;
  border-radius: var(--radius-xl);
  padding: 15px;
  margin-bottom: 14px;
}

.pwa-promo-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pwa-app-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.pwa-promo-top h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
}

.pwa-promo-top p {
  margin: 3px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-muted);
  line-height: 1.35;
}

.settings-card {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
}

.settings-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 17px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1.5px solid #f0f3f8;
}

.setting-row strong {
  display: block;
  font-size: 14px;
}

.setting-row small {
  display: block;
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 600;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d6dde8;
  transition: 0.2s;
  border-radius: 999px;
}

.slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.switch input:checked + .slider {
  background-color: var(--green);
}

.switch input:checked + .slider::before {
  transform: translateX(22px);
}

.btn-danger-outline {
  margin-top: 14px;
  width: 100%;
  padding: 11px;
  border-radius: 14px;
  border: 2px solid #ffd1d1;
  background: #fff6f6;
  color: var(--coral-dark);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
}

/* ============================================================
   Bottom Navigation Bar (Native Mobile Feel)
   ============================================================ */
.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #ffffff;
  border-top: 2px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 20;
}

.nav-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-weight: 800;
  padding: 6px 2px;
}

.nav-icon {
  font-size: 22px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 14px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-label {
  font-size: 11px;
  white-space: nowrap;
}

.nav-item--ai {
  color: #7c3aed;
}

.nav-item--ai .nav-icon {
  background: #f3e8ff;
}

.nav-item.active {
  color: var(--green-dark);
}

.nav-item.active .nav-icon {
  background: var(--green-soft);
  transform: scale(1.06);
}

.nav-item--ai.active {
  color: #6d28d9;
}

.nav-item--ai.active .nav-icon {
  background: #e2cbff;
}

/* ============================================================
   Fullscreen Lesson Player Overlay
   ============================================================ */
.overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-cream);
  z-index: 40;
  display: flex;
  flex-direction: column;
}

.lesson-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.lesson-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 16px 10px;
}

.lesson-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #ffffff;
  font-size: 18px;
  font-weight: 900;
  color: var(--ink-muted);
  cursor: pointer;
}

.lesson-progress-track {
  flex: 1;
  height: 16px;
  border-radius: 999px;
  background: #e6ebf2;
  overflow: hidden;
}

.lesson-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  position: relative;
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-shine {
  position: absolute;
  top: 3px;
  left: 8px;
  right: 8px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.lesson-hearts {
  font-size: 20px;
}

.lesson-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 18px 18px;
  display: flex;
  flex-direction: column;
}

.ex-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--purple);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.ex-heading {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
}

/* Intro Flashcard */
.intro-flashcard {
  background: #ffffff;
  border: 2.5px solid var(--border);
  border-radius: 26px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 6px 0 var(--border);
}

.intro-word-en {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}

.intro-word-phonetic {
  margin-top: 4px;
  font-size: 14px;
  color: var(--blue-dark);
  font-weight: 700;
}

.intro-word-phonetic span {
  opacity: 0.7;
  font-size: 12.5px;
}

.intro-word-vi {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--green-dark);
}

.intro-audio-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-audio-big {
  flex: 1.3;
  border: none;
  border-radius: 16px;
  background: var(--blue);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  padding: 12px;
  box-shadow: 0 4px 0 var(--blue-dark);
  cursor: pointer;
}

.btn-audio-slow {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: #f5fbff;
  color: var(--blue-dark);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  padding: 12px 10px;
  box-shadow: 0 4px 0 var(--border);
  cursor: pointer;
}

.intro-tip-box {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  background: #fff9e6;
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
}

.intro-ex-line {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* Listen & Pick Speaker Orb */
.listen-speaker-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
}

.big-speaker-orb {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 28px;
  border: none;
  background: var(--blue);
  box-shadow: 0 7px 0 var(--blue-dark);
  font-size: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.big-speaker-orb:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--blue-dark);
}

.big-speaker-orb.speaking {
  animation: pulsePop 0.5s ease-in-out infinite alternate;
}

.slow-turtle-pill {
  border: 2px solid var(--border);
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  color: var(--blue-dark);
  cursor: pointer;
}

/* Picture Options Grid (2x2) */
.pic-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.pic-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 2.5px solid var(--border);
  border-radius: 22px;
  padding: 14px 10px;
  box-shadow: 0 5px 0 var(--border);
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.12s ease, background 0.12s ease;
}

.pic-option-card:active {
  transform: translateY(3px);
}

.pic-option-card.selected {
  border-color: var(--blue);
  background: #eef9ff;
  box-shadow: 0 5px 0 var(--blue);
}

.pic-option-card.correct {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 5px 0 var(--green);
}

.pic-option-card.wrong {
  border-color: var(--coral);
  background: var(--coral-soft);
  box-shadow: 0 5px 0 var(--coral);
}

.pic-option-vi {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
}

/* Prompt Visual & Word Options */
.prompt-visual-box {
  background: #ffffff;
  border: 2.5px solid var(--border);
  border-radius: 24px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.prompt-vi-label {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

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

.word-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 2.5px solid var(--border);
  border-radius: 18px;
  padding: 15px 10px;
  box-shadow: 0 5px 0 var(--border);
  cursor: pointer;
}

.word-option-btn.selected {
  border-color: var(--blue);
  background: #eef9ff;
  box-shadow: 0 5px 0 var(--blue);
}

.word-option-btn.correct {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 5px 0 var(--green);
}

.word-option-btn.wrong {
  border-color: var(--coral);
  background: var(--coral-soft);
  box-shadow: 0 5px 0 var(--coral);
}

.word-opt-en {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.word-opt-ph {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* Word Prompt Banner */
.word-prompt-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  border: 2.5px solid var(--blue);
  border-radius: 20px;
  padding: 12px 18px;
  margin-bottom: 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 #bfe9fd;
}

.wp-speaker {
  font-size: 28px;
}

.wp-en {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.wp-ph {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-dark);
}

/* Match Pairs */
.match-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.match-col {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.match-tile {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 8px;
  border-radius: 18px;
  border: 2.5px solid var(--border);
  background: #ffffff;
  box-shadow: 0 4px 0 var(--border);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}

.match-tile.selected {
  border-color: var(--blue);
  background: #eef9ff;
  box-shadow: 0 4px 0 var(--blue);
}

.match-tile.matched {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
  box-shadow: none;
  opacity: 0.62;
  cursor: default;
}

.match-tile.wrong-shake {
  border-color: var(--coral);
  background: var(--coral-soft);
  animation: shakeX 0.36s ease;
}

.match-emoji {
  font-size: 24px;
  display: inline-flex;
  align-items: center;
}

.mini-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-block;
}

.match-hint-bar {
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-muted);
  padding: 10px;
}

/* Word Bank Sentence Builder */
.phrase-prompt-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 16px;
}

.phrase-emoji {
  font-size: 38px;
  line-height: 1;
}

.phrase-vi-ask {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.phrase-hint-audio {
  margin-top: 4px;
  border: none;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.answer-tray {
  min-height: 76px;
  background: #ffffff;
  border: 2.5px dashed var(--border-strong);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.tray-placeholder {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.word-bank-pool {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.bank-chip {
  border: 2px solid var(--border-strong);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 4px 0 var(--border-strong);
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}

.bank-chip.used {
  opacity: 0.25;
  pointer-events: none;
  box-shadow: none;
}

.bank-chip--tray {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue-dark);
  box-shadow: 0 3px 0 var(--blue);
}

/* Speak Along */
.speak-card {
  background: #ffffff;
  border: 2.5px solid var(--border);
  border-radius: 24px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.speak-mic-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mic-orb-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 2.5px solid var(--purple);
  background: #f5ecff;
  color: #6b2fb3;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.mic-orb-btn.recording {
  background: var(--coral-soft);
  border-color: var(--coral);
  color: var(--coral-dark);
  animation: pulsePop 0.6s ease infinite alternate;
}

.mic-icon {
  font-size: 24px;
}

.speak-feedback-note {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
  text-align: center;
}

/* Lesson Footer & Feedback Drawer */
.lesson-footer {
  padding: 12px 16px calc(14px + var(--safe-bottom));
  background: #ffffff;
  border-top: 2px solid var(--border);
}

.feedback-drawer {
  padding: 16px 16px calc(18px + var(--safe-bottom));
  border-top: 3px solid transparent;
  animation: slideUp 0.22s ease;
}

.feedback-correct {
  background: #e9fcd6;
  border-top-color: var(--green);
}

.feedback-wrong {
  background: #ffecec;
  border-top-color: var(--coral);
}

.feedback-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.feedback-icon {
  font-size: 30px;
  line-height: 1;
}

.feedback-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.feedback-detail {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* Lesson Complete Screen */
.complete-screen {
  flex: 1;
  overflow-y: auto;
  padding: calc(20px + var(--safe-top)) 18px calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  text-align: center;
  background: linear-gradient(180deg, #fff9db 0%, #fffdf7 45%, #fffdf7 100%);
}

.complete-mascot {
  width: 146px;
  height: 146px;
  border-radius: 34px;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 12px 28px rgba(255, 200, 0, 0.28);
}

.complete-title {
  margin: 10px 0 4px;
  font-family: var(--font-display);
  font-size: 27px;
  color: var(--green-dark);
}

.complete-sub {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
  font-weight: 700;
}

.complete-stars {
  font-size: 36px;
  margin-top: 6px;
  letter-spacing: 6px;
}

.complete-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.c-stat {
  border-radius: 20px;
  padding: 12px;
  border: 2.5px solid transparent;
}

.c-stat span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.c-stat strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 22px;
}

.c-stat--xp {
  background: #fff6cc;
  border-color: var(--yellow);
  color: #9e6b00;
}

.c-stat--acc {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-dark);
}

.new-sticker-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 20px;
  border: 2.5px solid var(--yellow);
}

.ns-emoji {
  font-size: 40px;
}

.ns-tag {
  font-size: 11px;
  font-weight: 900;
  color: #a67100;
}

.complete-words-summary {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 12px;
}

.cw-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.cw-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.cw-pill {
  border: 1.5px solid var(--border);
  background: #f7fafd;
  border-radius: 999px;
  padding: 6px 11px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

/* ============================================================
   Modal Sheets (Guidebook, Chest, PWA, Locked Lesson)
   ============================================================ */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 34, 48, 0.55);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  backdrop-filter: blur(2px);
}

.modal-sheet {
  width: 100%;
  background: #ffffff;
  border-radius: 26px;
  padding: 20px 18px calc(18px + var(--safe-bottom));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.2s ease;
  max-height: 86%;
  display: flex;
  flex-direction: column;
}

.modal-sheet--tall {
  padding: 0;
  overflow: hidden;
  max-height: 84%;
}

.modal-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 14px;
}

.guide-badge {
  display: inline-block;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
}

.guide-sub {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.icon-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}

.guide-word-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-word-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-radius: 18px;
  border: 2px solid var(--border);
  background: #ffffff;
  cursor: pointer;
}

.guide-word-info {
  flex: 1;
  min-width: 0;
}

.guide-word-en {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.guide-word-phonetic {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--blue-dark);
  font-weight: 700;
}

.guide-word-vi {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--green-dark);
}

.guide-word-ex {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.guide-audio-btns {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mini-audio-btn {
  width: 36px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: var(--blue-soft);
  font-size: 16px;
  cursor: pointer;
}

.mini-audio-slow {
  background: var(--green-soft);
}

.modal-emoji {
  font-size: 48px;
  text-align: center;
  margin-bottom: 6px;
}

.modal-title {
  margin: 0 0 8px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 21px;
}

.modal-body {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reward-pill {
  display: inline-block;
  background: var(--yellow-soft);
  color: #9e6b00;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  padding: 6px 16px;
  border-radius: 999px;
}

.pwa-steps {
  text-align: left;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pwa-step {
  background: #f6f9fd;
  border-radius: 16px;
  padding: 11px 13px;
  font-size: 13px;
}

.pwa-step p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-weight: 700;
}

.pwa-note {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--green-dark);
  text-align: center;
}

/* Confetti Canvas */
.confetti-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 80;
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes floatBounce {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

.bounce-slow {
  animation: floatBounce 2.4s ease-in-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.95);
    opacity: 0.65;
  }
  100% {
    transform: scale(1.24);
    opacity: 0;
  }
}

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

.pulse-pop {
  animation: pulsePop 0.25s ease;
}

@keyframes shakeX {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

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

/* ============================================================
   AI Photo-to-Lesson Studio & Components
   ============================================================ */
.btn-purple {
  background: linear-gradient(180deg, #b56dff, #9344e6);
  color: #ffffff;
  box-shadow: 0 5px 0 #7028bd;
}
.btn-purple:active:not(:disabled) {
  box-shadow: 0 1px 0 #7028bd;
}

.ai-home-cta {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 13px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  border: 2.5px solid #d9b8ff;
  background: linear-gradient(135deg, #f6edff 0%, #eaf7ff 100%);
  box-shadow: 0 5px 0 #dfc5ff;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.ai-home-cta:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #dfc5ff;
}

.ai-home-cta-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #ffffff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(147, 68, 230, 0.15);
}

.ai-home-cta-text {
  flex: 1;
  min-width: 0;
}

.ai-home-pill {
  display: inline-block;
  background: var(--purple);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 3px;
}

.ai-home-cta-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15.5px;
  color: var(--ink);
  line-height: 1.2;
}

.ai-home-cta-text small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-top: 2px;
}

.ai-home-arrow {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--purple);
}

.sub-header--ai {
  background: linear-gradient(180deg, #f7f0ff 0%, #ffffff 100%);
}

.ai-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  margin-bottom: 14px;
  border: 2px solid var(--border);
}

.ai-status--live {
  background: #eefce3;
  border-color: #b7ea8f;
}

.ai-status--demo {
  background: #f6f0ff;
  border-color: #dfc5ff;
}

.ai-status-text {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ai-status-text strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.ai-status-text small {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-muted);
  line-height: 1.3;
}

.ai-key-mini-btn {
  flex-shrink: 0;
  border: 2px solid rgba(112, 40, 189, 0.2);
  background: #ffffff;
  color: #6d28d9;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 12px;
  cursor: pointer;
}

.ai-studio-card {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 5px 0 rgba(43, 52, 69, 0.04);
}

.ai-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15.5px;
  margin-bottom: 10px;
  color: var(--ink);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--purple);
  color: #ffffff;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.opt-tag {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

.ai-dropzone {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 22px 14px;
  border-radius: 20px;
  border: 2.5px dashed #c8a2ff;
  background: #faf6ff;
  color: var(--ink);
  font-family: var(--font-body);
  cursor: pointer;
  text-align: center;
}

.ai-dropzone-icon {
  font-size: 38px;
  line-height: 1;
}

.ai-dropzone strong {
  font-family: var(--font-display);
  font-size: 16px;
  color: #6d28d9;
}

.ai-dropzone small {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

.ai-photo-preview-box {
  border-radius: 20px;
  overflow: hidden;
  border: 2.5px solid #c8a2ff;
  background: #faf6ff;
}

.ai-photo-preview-img {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  display: block;
}

.ai-photo-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--green-dark);
}

.ai-change-photo-btn {
  border: 1.5px solid #c8a2ff;
  background: #ffffff;
  color: #6d28d9;
  border-radius: 10px;
  padding: 5px 10px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.ai-samples-wrap {
  margin-top: 12px;
}

.ai-samples-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-muted);
  margin-bottom: 7px;
}

.ai-samples-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ai-sample-btn {
  padding: 5px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ai-sample-btn.selected {
  border-color: var(--purple);
  background: #f5ecff;
}

.ai-sample-btn img {
  width: 100%;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
}

.ai-sample-btn span {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

/* Difficulty Level Cards */
.ai-level-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-level-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 11px 12px;
  border-radius: 16px;
  border: 2.5px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.ai-level-card.selected {
  border-color: var(--lv-color);
  background: var(--lv-bg);
}

.ai-lv-icon {
  font-size: 26px;
  line-height: 1;
}

.ai-lv-main {
  flex: 1;
  min-width: 0;
}

.ai-lv-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ai-lv-top strong {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
}

.ai-lv-age {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-muted);
}

.ai-lv-main small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

.ai-lv-radio {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  flex-shrink: 0;
}

.ai-level-card.selected .ai-lv-radio {
  background: var(--lv-color);
  border-color: var(--lv-color);
}

.ai-error-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--coral-soft);
  border: 2px solid #ffb8b8;
  color: var(--coral-dark);
  font-size: 13px;
  font-weight: 800;
}

.ai-loading-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f3e8ff, #e6f6ff);
  border: 2px solid #d4b3ff;
}

.ai-loading-mascot {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

.ai-loading-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  color: #6d28d9;
}

.ai-loading-box small {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* Generated Result Card */
.ai-result-card {
  background: #ffffff;
  border: 3px solid var(--green);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 6px 0 var(--green-soft);
  animation: slideUp 0.25s ease;
}

.ai-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.ai-engine-tag {
  font-size: 11px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
}

.tag-gemini {
  background: var(--green-soft);
  color: var(--green-dark);
}

.tag-demo {
  background: #f3e8ff;
  color: #6d28d9;
}

.ai-lv-pill {
  font-size: 11px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
}

.ai-result-title {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 20px;
}

.ai-result-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff9e6;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.ai-result-words-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.ai-result-word-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ai-word-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 2px solid rgba(43, 52, 69, 0.08);
  text-align: left;
  cursor: pointer;
}

.ai-word-chip span {
  font-size: 22px;
}

.ai-word-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.1;
}

.ai-word-chip small {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.ai-result-phrase-note {
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue-dark);
  text-align: center;
}

/* Saved AI Lessons List */
.ai-library-section {
  margin-top: 4px;
}

.ai-saved-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-saved-card {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 4px 0 var(--border);
}

.ai-saved-thumb {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}

.ai-saved-info {
  flex: 1;
  min-width: 0;
}

.ai-saved-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.ai-saved-stars {
  font-size: 11.5px;
}

.ai-saved-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-saved-info small {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

.ai-saved-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.ai-play-mini {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: var(--green);
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 3px 0 var(--green-dark);
  cursor: pointer;
}

.ai-del-mini {
  width: 34px;
  height: 38px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #f8fafd;
  font-size: 14px;
  cursor: pointer;
}

/* Photo Reference Strip inside Active AI Lesson */
.lesson-photo-ref {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 2px solid #dfc5ff;
  border-radius: 16px;
  padding: 7px 10px;
  margin-bottom: 10px;
}

.lesson-photo-ref img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.lpr-tag {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: #7c3aed;
}

.lesson-photo-ref strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.2;
}

/* ============================================================
   Quick Practice Duo on Home & Speaking Practice (Tập nói) Tab
   ============================================================ */
.nav-item--talk {
  color: #0284c7;
}
.nav-item--talk .nav-icon {
  background: #e0f5ff;
}
.nav-item--talk.active {
  color: #0369a1;
}
.nav-item--talk.active .nav-icon {
  background: #bae6fd;
}

.quick-duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.quick-duo-card {
  text-align: left;
  padding: 12px 11px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.1s ease;
}

.quick-duo-card:active {
  transform: translateY(3px);
}

.quick-duo--talk {
  background: linear-gradient(145deg, #e3f8ff 0%, #e6fcf5 100%);
  border: 2.5px solid #9be2fc;
  box-shadow: 0 5px 0 #b8ebfd;
}

.quick-duo--ai {
  background: linear-gradient(145deg, #f5ebff 0%, #eef4ff 100%);
  border: 2.5px solid #d9b8ff;
  box-shadow: 0 5px 0 #dfc5ff;
}

.qd-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  color: #ffffff;
}

.quick-duo--talk .qd-badge {
  background: #0ea5e9;
}

.quick-duo--ai .qd-badge {
  background: var(--purple);
}

.qd-icon {
  font-size: 26px;
  line-height: 1.1;
  margin-top: 2px;
}

.quick-duo-card strong {
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.2;
}

.quick-duo-card small {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-muted);
  line-height: 1.25;
}

/* Profile Subtabs (Profile vs Stickers) */
.profile-subtabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.subtab-btn {
  padding: 8px 10px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: #f8fafd;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12.5px;
  color: var(--ink-muted);
  cursor: pointer;
}

.subtab-btn.active {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-dark);
}

/* Talk Practice Layout */
.talk-header {
  padding: calc(10px + var(--safe-top)) 14px 8px;
  background: linear-gradient(180deg, #e9f8ff 0%, #ffffff 100%);
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}

.talk-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.talk-teacher-id {
  display: flex;
  align-items: center;
  gap: 10px;
}

.talk-teacher-avatar {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  object-fit: cover;
  border: 2.5px solid var(--blue);
  flex-shrink: 0;
}

.talk-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.15;
}

.talk-sub {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

.talk-reset-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #ffffff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.talk-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 9px;
}

.speed-pills {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 12px;
}

.speed-pill {
  border: none;
  background: transparent;
  padding: 4px 8px;
  border-radius: 9px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
}

.speed-pill.active {
  background: #ffffff;
  color: var(--blue-dark);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.auto-speak-pill {
  border: 1.5px solid var(--border);
  background: #ffffff;
  border-radius: 10px;
  padding: 5px 8px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
}

.auto-speak-pill.on {
  background: var(--green-soft);
  border-color: #b5e88b;
  color: var(--green-dark);
}

.talk-topics-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 8px 0 2px;
  scrollbar-width: none;
}

.talk-topics-strip::-webkit-scrollbar {
  display: none;
}

.talk-topic-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: #ffffff;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}

.talk-topic-chip.active {
  background: var(--tp-bg);
  border-color: var(--tp-color);
  color: var(--ink);
}

/* Chat Stream */
.talk-chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-cream);
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-row--kid {
  justify-content: flex-end;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  flex-shrink: 0;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.chat-avatar--kidi {
  border: 2px solid var(--yellow);
}

.kidi-bubble {
  max-width: 84%;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 20px 20px 20px 6px;
  padding: 12px 13px;
  box-shadow: 0 4px 0 rgba(43, 52, 69, 0.04);
}

.kidi-praise {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 5px;
}

.kidi-en {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.kidi-phonetic {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--blue-dark);
  font-weight: 700;
}

.kidi-vi {
  margin-top: 3px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-muted);
}

.kidi-tip {
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 12px;
  background: #fff9e6;
  font-size: 12px;
  font-weight: 700;
  color: #7c5800;
  line-height: 1.35;
}

.kidi-audio-actions {
  display: flex;
  gap: 7px;
  margin-top: 9px;
}

.kidi-audio-btn {
  flex: 1;
  border: none;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  padding: 7px 8px;
  cursor: pointer;
}

.kidi-audio-btn--turtle {
  background: var(--green-soft);
  color: var(--green-dark);
}

.kidi-typing {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-muted);
}

.kid-bubble {
  max-width: 78%;
  background: var(--green);
  color: #ffffff;
  border-radius: 20px 20px 6px 20px;
  padding: 10px 14px;
  box-shadow: 0 4px 0 var(--green-dark);
  cursor: pointer;
}

.kid-bubble-en {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.kid-bubble-meta {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
}

/* Bottom Speaking Dock */
.talk-dock {
  flex-shrink: 0;
  background: #ffffff;
  border-top: 2px solid var(--border);
  padding: 9px 12px calc(var(--nav-height) + var(--safe-bottom) + 10px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.talk-sug-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-muted);
  margin-bottom: 5px;
}

.talk-sug-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 152px;
  overflow-y: auto;
}

.talk-sug-item {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.talk-sug-listen {
  width: 38px;
  border-radius: 13px;
  border: 2px solid #bfe9fd;
  background: #eef9ff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.talk-sug-send {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 7px 10px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: #fafcff;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.talk-sug-send:active {
  background: var(--green-soft);
  border-color: var(--green);
}

.sug-emoji {
  font-size: 20px;
  line-height: 1;
}

.sug-texts {
  flex: 1;
  min-width: 0;
}

.sug-texts strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.15;
}

.sug-texts small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.talk-mic-hint {
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-dark);
  background: #edf8ff;
  border-radius: 11px;
  padding: 6px 10px;
  text-align: center;
}

.talk-input-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.talk-mic-main {
  flex: 1;
  padding: 12px 14px;
  font-size: 14.5px;
}

.talk-kbd-toggle {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  border: 2px solid var(--border);
  background: #f8fafd;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.talk-kbd-toggle.active {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.talk-text-form {
  display: flex;
  gap: 8px;
}

.talk-text-input {
  flex: 1;
  padding: 10px 12px;
  font-size: 14.5px;
}

.talk-send-btn {
  padding: 10px 16px;
  font-size: 14.5px;
}

/* ============================================================
   Voice Persona Picker (Baby Girl, Baby Boy, Teachers • EN/VI)
   ============================================================ */
.talk-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.voice-persona-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 2px solid currentColor;
  border-radius: 12px;
  padding: 5px 9px;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.kidi-vi--clickable {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kidi-vi--clickable span {
  font-size: 12px;
  opacity: 0.7;
}

.voice-card-section {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 14px;
}

.voice-section-sub {
  margin: -6px 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.voice-persona-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.voice-persona-card {
  padding: 11px 10px;
  border-radius: 18px;
  border: 2.5px solid var(--border);
  background: #fafcff;
  cursor: pointer;
  text-align: left;
  transition: transform 0.1s ease, border-color 0.12s ease, background 0.12s ease;
}

.voice-persona-card.selected {
  background: var(--vp-bg);
  border-color: var(--vp-color);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.06);
}

.vp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.vp-emoji {
  font-size: 28px;
  line-height: 1;
}

.vp-preview-btn {
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.voice-persona-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.2;
}

.voice-persona-card small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  line-height: 1.25;
}

/* ============================================================
   Minimalist Visual-First Polish (Less Text, More Breathing Room)
   ============================================================ */
.daily-banner--slim {
  padding: 10px 12px;
}

.daily-slim-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.daily-xp-tag {
  font-size: 12.5px;
  font-weight: 900;
  color: #c28a00;
}

.daily-sound-btn--sm {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.quick-duo--compact {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
}

.quick-duo--compact .qd-icon {
  font-size: 24px;
  margin-top: 0;
}

.btn-guidebook--compact {
  min-width: 44px;
  height: 42px;
  padding: 0;
  border-radius: 13px;
}

.sub-header--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header-count-pill {
  background: var(--yellow-soft);
  color: #9e6b00;
  font-weight: 900;
  font-size: 13px;
  padding: 5px 11px;
  border-radius: 999px;
}

.ai-level-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.ai-level-pill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: 16px;
  border: 2.5px solid var(--border);
  background: #ffffff;
  cursor: pointer;
}

.ai-level-pill-card.selected {
  border-color: var(--lv-color);
  background: var(--lv-bg);
}

.ai-level-pill-card strong {
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--ink);
}

.ai-level-pill-card small {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-muted);
}

.ex-heading--center {
  text-align: center;
  margin-bottom: 16px;
}

/* ============================================================
   KidiGo 2.0 — 2026 Wonderland Claymorphism & Floating Glass UI
   Living Sky Canvas • Glossy 3D Toy Islands • Frosted Glass Dock
   ============================================================ */

#app-backdrop {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 210, 82, 0.52), transparent 34%),
    radial-gradient(circle at 86% 14%, rgba(56, 189, 248, 0.42), transparent 36%),
    radial-gradient(circle at 82% 84%, rgba(168, 85, 247, 0.28), transparent 38%),
    radial-gradient(circle at 20% 86%, rgba(88, 204, 2, 0.30), transparent 36%),
    linear-gradient(150deg, #dff4ff 0%, #f1edff 50%, #fff7df 100%);
}

#app-shell {
  background: linear-gradient(180deg, #e7f6ff 0%, #f5fbff 32%, #fffdf6 100%);
}

@media (min-width: 520px) {
  #app-shell {
    border-radius: 38px;
    border: 7px solid rgba(255, 255, 255, 0.92);
    box-shadow:
      0 30px 70px rgba(30, 52, 92, 0.20),
      0 8px 24px rgba(28, 176, 246, 0.14);
  }
}

.page-scroll {
  position: relative;
  padding: 14px 16px calc(var(--nav-height) + var(--safe-bottom) + 34px);
}

/* Frosted Glass Top Header */
.top-stats-bar,
.sub-header,
.talk-header {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 20px rgba(42, 74, 118, 0.06);
}

.top-avatar-btn {
  border-radius: 16px;
  box-shadow:
    0 6px 14px rgba(42, 74, 118, 0.12),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

.stat-pill {
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(42, 74, 118, 0.08);
}

/* Floating VisionOS / iOS-26 Frosted Glass Bottom Dock */
.bottom-nav {
  left: 12px;
  right: 12px;
  bottom: calc(10px + var(--safe-bottom));
  height: 68px;
  padding: 4px 6px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 14px 34px rgba(28, 52, 88, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.95);
}

.nav-item {
  border-radius: 20px;
  padding: 4px 2px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-icon {
  font-size: 21px;
  padding: 4px 11px;
  border-radius: 15px;
  background: transparent !important;
}

.nav-item.active {
  background: linear-gradient(180deg, #eefce2, #dbf7c1);
  color: #388800;
  box-shadow:
    0 4px 12px rgba(88, 204, 2, 0.18),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.9);
}

.nav-item--talk.active {
  background: linear-gradient(180deg, #e0f5ff, #c5ebff);
  color: #0369a1;
  box-shadow: 0 4px 12px rgba(28, 176, 246, 0.22);
}

.nav-item--ai.active {
  background: linear-gradient(180deg, #f3e8ff, #e4ccff);
  color: #6d28d9;
  box-shadow: 0 4px 12px rgba(165, 96, 232, 0.22);
}

/* Dreamy Floating Clouds behind Home */
.sky-clouds {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  filter: blur(1px);
}

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

.cloud-1 {
  width: 96px;
  height: 28px;
  top: 14px;
  left: -14px;
  animation: cloudDrift 18s ease-in-out infinite alternate;
}
.cloud-1::before {
  width: 42px;
  height: 42px;
  top: -18px;
  left: 14px;
}
.cloud-1::after {
  width: 30px;
  height: 30px;
  top: -12px;
  right: 16px;
}

.cloud-2 {
  width: 80px;
  height: 24px;
  top: 44px;
  right: -10px;
  opacity: 0.65;
  animation: cloudDrift 22s ease-in-out infinite alternate-reverse;
}
.cloud-2::before {
  width: 34px;
  height: 34px;
  top: -15px;
  left: 12px;
}

@keyframes cloudDrift {
  from { transform: translateX(0px); }
  to { transform: translateX(34px); }
}

/* ============================================================
   Fabulous Kidi Magic Island Hero Card
   ============================================================ */
.hero-island {
  position: relative;
  z-index: 2;
  border-radius: 30px;
  padding: 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #21b8f8 0%, #24d59c 56%, #64d407 100%);
  color: #ffffff;
  overflow: hidden;
  box-shadow:
    0 16px 34px rgba(34, 184, 186, 0.30),
    inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.hero-island-glow {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  top: -70px;
  right: -40px;
  background: radial-gradient(circle, rgba(255, 245, 160, 0.52), transparent 68%);
  pointer-events: none;
}

.hero-island-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-island-info {
  flex: 1;
  min-width: 0;
}

.hero-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
  letter-spacing: 0.3px;
}

.hero-hello {
  margin: 5px 0 9px;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 60, 80, 0.16);
}

.hero-xp-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-xp-track {
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  padding: 2px;
  overflow: hidden;
}

.hero-xp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe249, #ffaa00);
  box-shadow: 0 0 10px rgba(255, 226, 73, 0.7);
  transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-xp-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.hero-mascot-btn {
  position: relative;
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 24px;
  border: 3.5px solid rgba(255, 255, 255, 0.95);
  background: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 10px 22px rgba(0, 60, 80, 0.22);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-mascot-btn:active {
  transform: scale(0.92) rotate(-4deg);
}

.hero-mascot-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.mascot-ring {
  position: absolute;
  inset: -7px;
  border-radius: 29px;
  border: 2.5px solid rgba(255, 255, 255, 0.55);
  animation: pulseRing 2.2s ease-out infinite;
  pointer-events: none;
}

.hero-launchers {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hero-pill {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 10px;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 6px 0 rgba(14, 96, 118, 0.16),
    0 10px 18px rgba(0, 60, 80, 0.12);
  cursor: pointer;
}

.hero-pill:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(14, 96, 118, 0.16);
}

.hero-pill-icon {
  font-size: 21px;
  line-height: 1;
}

.hero-pill strong {
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--ink);
}

.hero-pill--ai strong {
  color: #6d28d9;
}

.hero-pill--talk strong {
  color: #0369a1;
}

/* ============================================================
   Storybook 3D Unit Portal Cards & Curved Adventure Trail
   ============================================================ */
.unit-section {
  position: relative;
  z-index: 2;
}

.unit-portal-card {
  position: relative;
  height: 156px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--u-color);
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 16px 30px rgba(36, 58, 92, 0.15),
    0 6px 0 var(--u-dark);
}

.unit-portal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.unit-portal-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 30, 48, 0.04) 0%,
    rgba(20, 30, 48, 0.12) 45%,
    color-mix(in srgb, var(--u-dark) 92%, #111827 8%) 100%
  );
}

.unit-portal-footer {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
}

.unit-portal-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.9;
}

.unit-portal-footer .unit-title {
  font-size: 21px;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.btn-portal-guide {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.btn-portal-guide:active {
  transform: scale(0.92);
}

/* Winding Curved SVG Adventure Trail */
.lesson-path {
  position: relative;
  padding: 36px 0 12px;
  gap: 32px;
}

.path-trail-svg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.trail-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 18;
  stroke-linecap: round;
}

.trail-dots {
  fill: none;
  stroke: var(--u-color);
  stroke-opacity: 0.34;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 2 16;
}

.path-row {
  z-index: 1;
}

/* Glossy 3D Toy Jelly Lesson Islands */
.lesson-node {
  width: 82px;
  height: 82px;
  border: 3.5px solid rgba(255, 255, 255, 0.92);
  overflow: visible;
}

.node-gloss {
  position: absolute;
  top: 7px;
  left: 16px;
  right: 16px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.lesson-node--current,
.lesson-node--unlocked {
  background: linear-gradient(180deg, color-mix(in srgb, var(--u-color) 86%, #ffffff 14%), var(--u-color));
  box-shadow:
    0 9px 0 var(--u-dark),
    0 16px 26px color-mix(in srgb, var(--u-color) 36%, transparent);
}

.lesson-node--completed {
  background: linear-gradient(180deg, #ffe259, #ffb300);
  box-shadow:
    0 9px 0 #d48900,
    0 14px 24px rgba(255, 184, 0, 0.34);
}

.lesson-node--locked {
  background: linear-gradient(180deg, #f0f4fa, #dde5f0);
  box-shadow:
    0 7px 0 #c5d0df,
    0 10px 18px rgba(42, 74, 118, 0.10);
}

.start-bubble {
  top: -42px;
  background: linear-gradient(135deg, #ffffff, #fffef5);
  color: var(--u-dark);
  border: 2.5px solid var(--u-color);
  border-radius: 14px;
  padding: 5px 13px;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--u-color) 25%, transparent);
}

.start-bubble::after {
  border-right-color: var(--u-color);
  border-bottom-color: var(--u-color);
}

.node-title {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  padding: 2px 10px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(42, 74, 118, 0.06);
}

.chest-node {
  border-radius: 22px;
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 6px 0 var(--border-strong),
    0 12px 22px rgba(42, 74, 118, 0.10);
}

/* ============================================================
   Live Soundwave Speaking Avatar (Talk Tab + Home)
   ============================================================ */
.talk-live-orb {
  position: relative;
  width: 48px;
  height: 48px;
  cursor: pointer;
  flex-shrink: 0;
}

.talk-live-orb .talk-teacher-avatar {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  border: 3px solid #ffffff;
  box-shadow: 0 6px 14px rgba(28, 176, 246, 0.25);
}

.live-wave {
  position: absolute;
  inset: -4px;
  border-radius: 21px;
  border: 2.5px solid var(--blue);
  opacity: 0;
  pointer-events: none;
}

.kidi-live-avatar.is-speaking {
  animation: mascotTalkBounce 0.46s ease-in-out infinite alternate;
}

.kidi-live-avatar.is-speaking .live-wave-1 {
  animation: speakWave 1.1s ease-out infinite;
}

.kidi-live-avatar.is-speaking .live-wave-2 {
  animation: speakWave 1.1s ease-out 0.45s infinite;
}

@keyframes mascotTalkBounce {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.07) translateY(-3px); }
}

@keyframes speakWave {
  0% { transform: scale(0.95); opacity: 0.75; }
  100% { transform: scale(1.42); opacity: 0; }
}

/* Plush Clay Talk Bubbles & Dock */
.talk-chat-scroll {
  background: transparent;
}

.kidi-bubble {
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px 24px 24px 8px;
  box-shadow:
    0 10px 24px rgba(34, 62, 102, 0.09),
    inset 0 2px 0 rgba(255, 255, 255, 0.95);
}

.kid-bubble {
  background: linear-gradient(135deg, #5fd304, #3ab800);
  border-radius: 24px 24px 8px 24px;
  box-shadow:
    0 8px 18px rgba(88, 204, 2, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.talk-dock {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  padding: 10px 14px calc(var(--nav-height) + var(--safe-bottom) + 18px);
}

.talk-sug-send {
  border-radius: 16px;
  border: 1.5px solid rgba(215, 228, 244, 0.9);
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(42, 74, 118, 0.06);
}

/* ============================================================
   Magic Polaroid AI Photo Studio & Shimmer CTA
   ============================================================ */
.polaroid-studio {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(247, 240, 255, 0.92));
  box-shadow:
    0 16px 34px rgba(130, 74, 214, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.95);
}

.polaroid-frame {
  background: #ffffff;
  padding: 9px 9px 4px;
  border-radius: 22px;
  box-shadow: 0 12px 26px rgba(42, 74, 118, 0.14);
  transform: rotate(-0.6deg);
}

.polaroid-frame .ai-photo-preview-img {
  border-radius: 15px;
}

.polaroid-dropzone {
  border: 2.5px dashed #bfa0ff;
  border-radius: 22px;
  background: linear-gradient(145deg, #fbf7ff, #eef8ff);
  padding: 24px 14px;
}

.polaroid-lens {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: linear-gradient(135deg, #a855f7, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.30);
  margin-bottom: 4px;
}

.btn-purple {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #9333ea 0%, #c026d3 52%, #ec4899 100%);
  box-shadow:
    0 6px 0 #701a75,
    0 12px 24px rgba(192, 38, 211, 0.28);
}

.btn-purple::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-24deg);
  animation: shimmerSweep 3.2s ease-in-out infinite;
}

@keyframes shimmerSweep {
  0%, 60% { left: -120%; }
  100% { left: 160%; }
}

/* ============================================================
   Plush Claymorphism Upgrade for Vocab, Stickers, Profile, & Lesson
   ============================================================ */
.vocab-card,
.sticker-tile,
.profile-card,
.voice-card-section,
.settings-card,
.reward-hero-card,
.ai-saved-card,
.intro-flashcard,
.pic-option-card,
.word-option-btn,
.prompt-visual-box,
.speak-card {
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 10px 24px rgba(36, 62, 102, 0.09),
    0 4px 0 rgba(198, 212, 232, 0.55),
    inset 0 2px 0 rgba(255, 255, 255, 0.95);
}

.vocab-card:active,
.sticker-tile:active {
  transform: translateY(3px) scale(0.98);
}

.btn-green {
  background: linear-gradient(180deg, #69df06, #52c400);
  box-shadow:
    0 6px 0 #3f9900,
    0 10px 20px rgba(88, 204, 2, 0.26);
}

.btn-blue {
  background: linear-gradient(180deg, #32c0ff, #129ee6);
  box-shadow:
    0 6px 0 #0d7cb8,
    0 10px 20px rgba(28, 176, 246, 0.26);
}

/* Magical Tap Sparkle Particles */
.tap-sparkle {
  position: absolute;
  pointer-events: none;
  z-index: 95;
  font-size: 16px;
  line-height: 1;
  transform: translate(-50%, -50%);
  animation: sparkleBurst 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sparkleBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.25) rotate(24deg);
  }
}

/* ============================================================
   Landing & Home PWA Install Buttons
   ============================================================ */
.hero-chip-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.hero-install-pill {
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.95);
  color: #0369a1;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 60, 80, 0.16);
  transition: transform 0.12s ease;
}

.hero-install-pill:active {
  transform: scale(0.94);
}

.btn-install-landing {
  margin-top: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 18px;
  border: 2px solid #bae6fd;
  background: rgba(255, 255, 255, 0.92);
  color: #0369a1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(14, 165, 233, 0.14);
}

.btn-install-landing:active {
  transform: translateY(2px);
}
