/* ═══════════════════════════════════════
   ALPHABET
═══════════════════════════════════════ */
.alph-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.prog-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.prog-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--primary), var(--coral));
  transition: width 0.6s var(--ease);
}

.prog-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  white-space: nowrap;
}

.alph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 9px;
}

/* ── Letter card accent colours (cycling) — white bg, gradient border ── */
.lcard:nth-child(7n+1) { --lc: #e11d48; --lc2: #ff6b8a; }
.lcard:nth-child(7n+2) { --lc: #6c4ef6; --lc2: #a78bfa; }
.lcard:nth-child(7n+3) { --lc: #2563eb; --lc2: #60a5fa; }
.lcard:nth-child(7n+4) { --lc: #0d9488; --lc2: #5eead4; }
.lcard:nth-child(7n+5) { --lc: #16a34a; --lc2: #86efac; }
.lcard:nth-child(7n+6) { --lc: #d97706; --lc2: #fcd34d; }
.lcard:nth-child(7n+0) { --lc: #ea580c; --lc2: #fdba74; }

.lcard {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(145deg, var(--lc2), var(--lc)) border-box;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  padding: 14px 8px 12px;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.3s var(--spring),
    box-shadow 0.25s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  animation: popIn 0.3s var(--spring) both;
}

.lcard:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

.lcard:active {
  animation: springTap 0.4s var(--spring) both;
  transition: none;
}

.lcard.played {
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.lcard.playing {
  animation: cardBounce 0.45s var(--spring);
}

@keyframes cardBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}

/* top accent bar */
.lcard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--lc, var(--primary));
  border-radius: 2px 2px 0 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.lcard:hover::before,
.lcard.played::before {
  opacity: 1;
}

.lcard-shine {
  display: none;
}

.l-played-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.lcard.played .l-played-badge {
  opacity: 1;
}

.l-big {
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-size: clamp(30px, 5.5vw, 42px);
  font-weight: 900;
  color: var(--lc, var(--primary));
  line-height: 1;
  letter-spacing: -0.5px;
}

.l-sm {
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-size: clamp(17px, 3.2vw, 24px);
  font-weight: 700;
  color: var(--lc, var(--text-soft));
  opacity: 0.6;
  line-height: 1;
}

.l-emoji {
  font-size: clamp(22px, 4.5vw, 30px);
  display: block;
  margin: 6px 0 4px;
  transition: transform 0.2s var(--spring);
}

.lcard:hover .l-emoji {
  transform: scale(1.2) rotate(5deg);
}

.l-word {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.2px;
}

.l-heb {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-soft);
  direction: rtl;
  margin-top: 2px;
}

.lcard-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(108, 79, 246, 0.2);
  transform: scale(0);
  animation: rippleOut 0.55s var(--ease) forwards;
  pointer-events: none;
}

@keyframes rippleOut {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ABC Song launch button */
.song-launch-btn {
  width: 100%;
  background: var(--primary-light);
  border: 2px solid #c4b5fd;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.25s var(--spring);
  box-shadow: var(--shadow-sm);
}

.song-launch-btn:hover {
  background: #e5deff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.song-launch-btn:active {
  transform: scale(0.97);
}

.slb-icon {
  font-size: clamp(30px, 7vw, 38px);
}

.slb-text {
  text-align: left;
}

.slb-title {
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-weight: 900;
  font-size: clamp(15px, 3.5vw, 18px);
  color: var(--primary);
  margin-bottom: 2px;
}

.slb-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  direction: rtl;
}

/* ═══════════════════════════════════════
   WORDS
═══════════════════════════════════════ */
.cat-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cat-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 40px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  min-height: 44px;
  display: flex;
  align-items: center;
  font-family: inherit;
}

.cat-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(108, 79, 246, 0.3);
}

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

.wcard {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 12px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s var(--spring), box-shadow 0.25s, border-color 0.2s;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  animation: popIn 0.35s var(--spring) both;
}

/* Remove old multicolor top bars */
.wcard::before { display: none; }

.wcard:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108,79,246,0.35);
}

.wcard:active {
  animation: springTap 0.4s var(--spring) both;
  transition: none;
}

.w-emoji {
  transition: transform 0.25s var(--spring);
}

.wcard:hover .w-emoji {
  transform: scale(1.18) rotate(-5deg);
}

.w-emoji {
  font-size: clamp(40px, 7vw, 50px);
  display: block;
  margin-bottom: 9px;
}

.w-en {
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-size: clamp(15px, 3vw, 19px);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.w-heb {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  direction: rtl;
}

.wcard-speak-btn,
.wcard-ask-btn {
  position: absolute;
  bottom: 7px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background .15s, transform .15s var(--spring);
  z-index: 2;
}
.wcard-speak-btn {
  right: 7px;
  background: rgba(124,91,248,.12);
  border: 1px solid rgba(124,91,248,.25);
  color: #a78bfa;
}
.wcard-ask-btn {
  left: 7px;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.3);
  color: #34d399;
}
.wcard-speak-btn:active { transform: scale(0.88); background: rgba(124,91,248,.28); }
.wcard-ask-btn:active   { transform: scale(0.88); background: rgba(16,185,129,.28); }
.wcard-speak-btn svg,
.wcard-ask-btn svg { width: 14px; height: 14px; }

/* ═══════════════════════════════════════
   PHRASES
═══════════════════════════════════════ */
.phrases-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 700px;
  margin: 0 auto;
}

.pcard {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: var(--shadow-sm);
  animation: popIn 0.35s var(--spring) both;
}

.pcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.pcard:active {
  transform: scale(0.97);
  transition: transform 0.1s var(--spring);
}

.p-emoji {
  font-size: clamp(22px, 4vw, 28px);
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  line-height: 1;
}

.pcard:nth-child(6n+1) .p-emoji { background: rgba(73,54,232,0.12); }
.pcard:nth-child(6n+2) .p-emoji { background: rgba(22,163,74,0.12); }
.pcard:nth-child(6n+3) .p-emoji { background: rgba(234,88,12,0.12); }
.pcard:nth-child(6n+4) .p-emoji { background: rgba(157,23,77,0.12); }
.pcard:nth-child(6n+5) .p-emoji { background: rgba(2,132,199,0.12); }
.pcard:nth-child(6n+0) .p-emoji { background: rgba(126,34,206,0.12); }

.p-body {
  flex: 1;
}

.p-en {
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-size: clamp(14px, 2.8vw, 17px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}

.p-heb {
  font-size: clamp(12px, 2vw, 13px);
  font-weight: 600;
  color: var(--text-soft);
  direction: rtl;
  text-align: right;
}

.p-play {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 10px;
  transition: transform 0.2s var(--spring), background 0.2s;
}

.p-play svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
}

.pcard:hover .p-play {
  transform: scale(1.15);
  background: var(--primary);
}

.pcard:hover .p-play svg {
  stroke: #fff;
}

/* ═══════════════════════════════════════
   LEARN SECTION — SUB-TABS
═══════════════════════════════════════ */
.learn-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.7);
  position: sticky;
  top: var(--top-h, 12px);
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.learn-tab {
  flex: 1;
  padding: 10px 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  white-space: nowrap;
  min-height: 44px;
}

.learn-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(108,79,246,0.35);
}

.learn-tab:not(.active):hover {
  background: rgba(108,79,246,0.08);
  color: var(--primary);
}

.learn-pane { }

.lp-hidden { display: none; }

/* Letter card speak button */
.lcard-speak-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(124,91,248,0.12);
  border: 1px solid rgba(124,91,248,0.22);
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 3;
  transition: background 0.15s, transform 0.15s;
}
.lcard-speak-btn:active {
  transform: scale(0.85);
  background: rgba(124,91,248,0.30);
}
.lcard-speak-btn svg { width: 11px; height: 11px; }

