/* ═══════════════════════════════════════════════════════════════
   JSU City — Aleph Bet v3 "Jerusalem stone at golden hour"
   Visual-only layer for the Aleph Bet course + vowel labs.
   Every rule is scoped to #alephCourseOverlay.aleph-v3 (the class is
   added by js/aleph-v3.js) so removing that one class restores v2.
   Requires the tokens defined in css/ui-v3.css.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --av-heb: "Frank Ruhl Libre", "Noto Serif Hebrew", "David Libre", "Taamey Frank CLM", "SBL Hebrew", "Times New Roman", serif;
  --av-parch-1: #fbf2dc;
  --av-parch-2: #f1e0b6;
  --av-parch-3: #e0c48b;
  --av-ink: #2a1a0b;
  --av-ink-soft: #5a4128;
  --av-ok: #3f9a4a;
  --av-ok-glow: rgba(99, 205, 110, 0.55);
  --av-bad: #c9432f;
}

#alephCourseOverlay.aleph-v3 {
  background:
    radial-gradient(130% 55% at 50% -8%, rgba(255, 190, 102, 0.26), rgba(255, 190, 102, 0) 62%),
    radial-gradient(90% 40% at 100% 100%, rgba(111, 195, 234, 0.08), rgba(0, 0, 0, 0) 70%),
    var(--jc-noise),
    linear-gradient(180deg, #2b1e11 0%, #1a120a 46%, #0d0a10 100%);
  background-size: auto, auto, 200px 200px, auto;
  background-blend-mode: normal, normal, overlay, normal;
  font-family: Nunito, system-ui, sans-serif;
}
#alephCourseOverlay.aleph-v3 .ac-content {
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
#alephCourseOverlay.aleph-v3 .ac-title {
  font-family: Cinzel, Georgia, serif;
  color: var(--jc-gold-bright);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 14px rgba(242, 181, 69, 0.28);
}
#alephCourseOverlay.aleph-v3 .ac-wp {
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(13px, 3.6vw, 17px);
  font-weight: 900;
  color: var(--jc-gold-ink);
  background: linear-gradient(180deg, var(--jc-gold-hi), var(--jc-gold) 60%, #d9932c);
  border: 2px solid var(--jc-gold-dk);
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: 0 3px 0 #8f5f14, inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ── Shared surfaces ───────────────────────────────────────── */
#alephCourseOverlay.aleph-v3 .acv-parchment,
#alephCourseOverlay.aleph-v3 .ac-flashcard,
#alephCourseOverlay.aleph-v3 .ac-vowel-flash {
  position: relative;
  color: var(--av-ink);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%),
    var(--jc-noise),
    linear-gradient(170deg, var(--av-parch-1) 0%, var(--av-parch-2) 55%, var(--av-parch-3) 100%);
  background-size: auto, 220px 220px, auto;
  background-blend-mode: normal, multiply, normal;
  border: 2px solid #b48a47;
  border-radius: 22px;
  box-shadow:
    0 0 0 4px rgba(58, 36, 8, 0.55),
    0 0 0 5px rgba(242, 181, 69, 0.55),
    0 18px 40px rgba(0, 0, 0, 0.55),
    inset 0 0 40px rgba(160, 110, 40, 0.28);
}

/* ── MAP ───────────────────────────────────────────────────── */
#alephCourseOverlay.aleph-v3 .ac-map { max-width: 520px; }
#alephCourseOverlay.aleph-v3 .ac-map-progress {
  margin-bottom: 8px;
  padding: 12px 14px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(58, 42, 24, 0.9), rgba(28, 20, 12, 0.92));
  border: 1px solid var(--jc-hairline);
  box-shadow: inset 0 1px 0 rgba(255, 233, 173, 0.12), 0 8px 18px rgba(0, 0, 0, 0.35);
}
#alephCourseOverlay.aleph-v3 .ac-map-pbar {
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}
#alephCourseOverlay.aleph-v3 .ac-map-pfill {
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe9ad, #f2b545 55%, #c98a25);
  box-shadow: 0 0 12px rgba(242, 181, 69, 0.55);
}
#alephCourseOverlay.aleph-v3 .ac-map-ptext {
  color: var(--jc-stone-lt);
  font-size: 15px;
  font-weight: 800;
  margin-top: 8px;
  letter-spacing: 0.01em;
}

/* Path of 22 stones */
.acv-path {
  position: relative;
  width: 100%;
  margin: 10px 0 18px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(100% 70% at 50% 0%, rgba(255, 205, 128, 0.2), rgba(0, 0, 0, 0) 70%),
    var(--jc-noise),
    linear-gradient(180deg, #3b2a17, #24190e);
  background-size: auto, 180px 180px, auto;
  background-blend-mode: normal, overlay, normal;
  border: 1px solid var(--jc-hairline);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.55), 0 10px 24px rgba(0, 0, 0, 0.4);
}
.acv-path-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 12px 14px 0;
  color: var(--jc-stone-lt);
  font-weight: 900; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
}
.acv-path-head b { color: var(--jc-gold-bright); font-family: Cinzel, Georgia, serif; letter-spacing: 0.04em; font-size: 16px; text-transform: none; }
.acv-path-svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.acv-stone {
  position: absolute;
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--av-heb);
  font-size: 30px; font-weight: 700; line-height: 1;
  padding-bottom: 3px;
  border: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s var(--jc-pop), filter 0.2s ease;
  color: rgba(245, 230, 200, 0.28);
  background: radial-gradient(70% 70% at 35% 30%, #5a4a37, #3a2d1f 70%, #2a2016);
  box-shadow: 0 4px 0 #1a120a, 0 8px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.acv-stone:nth-child(3n) { border-radius: 52% 48% 46% 54% / 48% 55% 45% 52%; }
.acv-stone:nth-child(3n+1) { border-radius: 55% 45% 52% 48% / 50% 50% 50% 50%; }
.acv-stone.lit {
  color: #3a2408;
  background:
    radial-gradient(60% 55% at 35% 28%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 60%),
    radial-gradient(80% 80% at 50% 50%, #f6e6bf, #e3c589 65%, #c69c5c);
  box-shadow: 0 4px 0 #8a6a3a, 0 0 18px rgba(255, 200, 100, 0.45), 0 8px 14px rgba(0, 0, 0, 0.4), inset 0 -3px 6px rgba(120, 80, 30, 0.35);
}
.acv-stone.next {
  color: var(--jc-gold-bright);
  background: radial-gradient(70% 70% at 35% 30%, #7a6040, #4b3822 70%, #36281a);
  box-shadow: 0 4px 0 #1a120a, 0 0 0 2px rgba(242, 181, 69, 0.75), 0 0 20px rgba(242, 181, 69, 0.5);
  animation: acvStonePulse 2.4s ease-in-out infinite;
}
.acv-stone.next.first { animation-duration: 1.6s; }
.acv-stone.locked { cursor: default; }
.acv-stone:not(.locked):active { transform: scale(0.92); }
.acv-stone .acv-stone-num {
  position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%);
  font-family: Nunito, sans-serif; font-size: 10px; font-weight: 900;
  color: rgba(245, 230, 200, 0.45); letter-spacing: 0.02em;
}
.acv-stone.lit .acv-stone-num { color: rgba(255, 233, 173, 0.8); }
@keyframes acvStonePulse {
  0%, 100% { box-shadow: 0 4px 0 #1a120a, 0 0 0 2px rgba(242, 181, 69, 0.7), 0 0 12px rgba(242, 181, 69, 0.35); }
  50% { box-shadow: 0 4px 0 #1a120a, 0 0 0 3px rgba(255, 215, 110, 0.95), 0 0 26px rgba(242, 181, 69, 0.7); }
}

/* Lesson cards as carved stone tablets */
#alephCourseOverlay.aleph-v3 .ac-lesson-card {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(242, 181, 69, 0.28);
  background:
    var(--jc-noise),
    linear-gradient(160deg, #4d3820 0%, #2f2213 55%, #221810 100%);
  background-size: 180px 180px, auto;
  background-blend-mode: overlay, normal;
  box-shadow: 0 6px 0 #140d07, 0 12px 22px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 233, 173, 0.14);
  transition: transform 0.16s var(--jc-ease), box-shadow 0.16s var(--jc-ease), filter 0.2s;
  cursor: pointer;
}
#alephCourseOverlay.aleph-v3 .ac-lesson-card.available {
  border-color: rgba(255, 215, 110, 0.75);
  box-shadow: 0 6px 0 #140d07, 0 0 0 1px rgba(242, 181, 69, 0.35), 0 0 26px rgba(242, 181, 69, 0.22), 0 12px 22px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 233, 173, 0.2);
}
#alephCourseOverlay.aleph-v3 .ac-lesson-card.completed { border-color: rgba(143, 208, 120, 0.45); }
#alephCourseOverlay.aleph-v3 .ac-lesson-card.locked { opacity: 1; filter: saturate(0.35) brightness(0.72); cursor: default; }
#alephCourseOverlay.aleph-v3 .ac-lesson-card:not(.locked):active { transform: translateY(4px); box-shadow: 0 2px 0 #140d07, 0 6px 12px rgba(0, 0, 0, 0.4); }
#alephCourseOverlay.aleph-v3 .ac-lesson-icon { min-width: 0; font-size: 0; }
.acv-medal {
  position: relative;
  width: 62px; height: 62px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(60% 55% at 35% 28%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 60%),
    radial-gradient(circle at 50% 55%, #f6e6bf, #e0c080 70%, #b88a4a);
  box-shadow: 0 0 0 3px #7a5320, 0 0 0 5px rgba(242, 181, 69, 0.7), 0 6px 12px rgba(0, 0, 0, 0.5), inset 0 -4px 8px rgba(120, 80, 30, 0.35);
}
.acv-medal-heb { font-family: var(--av-heb); font-weight: 700; font-size: 38px; line-height: 1; color: #3a2408; padding-bottom: 4px; }
.ac-lesson-card.locked .acv-medal { background: radial-gradient(circle at 50% 55%, #6b5a45, #463829 70%, #2d241a); }
.ac-lesson-card.locked .acv-medal-heb { color: rgba(246, 230, 191, 0.4); }
.acv-medal-badge {
  position: absolute; right: -4px; bottom: -4px;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #1a120a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.acv-medal-badge svg { width: 13px; height: 13px; }
.acv-medal-badge.done { background: linear-gradient(180deg, #9be08a, #3f9a4a); }
.acv-medal-badge.open { background: linear-gradient(180deg, #ffe9ad, #f2b545); }
.acv-medal-badge.lock { background: linear-gradient(180deg, #8d7b66, #4e4032); }
#alephCourseOverlay.aleph-v3 .ac-lesson-title {
  font-family: Cinzel, Georgia, serif;
  font-size: 17px; line-height: 1.2;
  color: var(--jc-stone-hi);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
#alephCourseOverlay.aleph-v3 .ac-lesson-letters { gap: 6px; direction: rtl; justify-content: flex-end; flex-wrap: wrap; margin: 6px 0; }
#alephCourseOverlay.aleph-v3 .ac-map-letter {
  font-family: var(--av-heb); font-weight: 700; font-size: 24px; line-height: 1;
  color: var(--jc-gold-bright);
  min-width: 30px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(242, 181, 69, 0.22);
  padding-bottom: 2px;
}
#alephCourseOverlay.aleph-v3 .ac-lesson-meta { color: rgba(246, 230, 191, 0.66); font-size: 14px; font-weight: 700; }
#alephCourseOverlay.aleph-v3 .ac-lesson-action {
  flex: 0 0 auto;
  font-weight: 900; font-size: 15px;
  color: var(--jc-gold-ink);
  background: linear-gradient(180deg, var(--jc-gold-hi), var(--jc-gold) 60%, #d9932c);
  border: 2px solid #8f5f14;
  border-radius: 12px;
  padding: 10px 14px;
  min-height: 44px; box-sizing: border-box;
  display: inline-flex; align-items: center;
  box-shadow: 0 3px 0 #8f5f14, inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
#alephCourseOverlay.aleph-v3 .ac-lesson-card.completed .ac-lesson-action {
  color: var(--jc-stone-hi);
  background: linear-gradient(180deg, #6a5438, #4a3a26);
  border-color: #2c2013;
  box-shadow: 0 3px 0 #2c2013, inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
#alephCourseOverlay.aleph-v3 .ac-map-connector {
  width: 4px; height: 22px;
  background: repeating-linear-gradient(180deg, rgba(242, 181, 69, 0.18) 0 5px, transparent 5px 9px);
}
#alephCourseOverlay.aleph-v3 .ac-map-connector.active { background: repeating-linear-gradient(180deg, rgba(242, 181, 69, 0.75) 0 5px, transparent 5px 9px); }

/* Section heads injected by the vowel lab */
#alephCourseOverlay.aleph-v3 .ac-learn-section-head {
  width: 100%; box-sizing: border-box;
  border: 0; border-radius: 0; background: none;
  padding: 6px 2px; margin: 8px 0 10px;
  border-bottom: 1px solid var(--jc-hairline-soft);
}
#alephCourseOverlay.aleph-v3 .ac-section-kicker {
  color: var(--jc-gold-ink);
  background: linear-gradient(180deg, var(--jc-gold-hi), var(--jc-gold));
  border: 1px solid #8f5f14;
}
#alephCourseOverlay.aleph-v3 .ac-section-title { font-family: Cinzel, Georgia, serif; color: var(--jc-gold-bright); }
#alephCourseOverlay.aleph-v3 .ac-section-copy { color: rgba(246, 230, 191, 0.7); }
#alephCourseOverlay.aleph-v3 .ac-vowel-section { border-top: 0; width: 100%; }
#alephCourseOverlay.aleph-v3 .ac-vowel-card {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(111, 195, 234, 0.16), rgba(0, 0, 0, 0) 60%),
    var(--jc-noise),
    linear-gradient(160deg, #3d3a2a 0%, #262216 60%, #1a170f 100%);
  background-size: auto, 180px 180px, auto;
  background-blend-mode: normal, overlay, normal;
  border-color: rgba(111, 195, 234, 0.45);
}
#alephCourseOverlay.aleph-v3 .ac-vowel-chip {
  font-family: var(--av-heb); font-size: 26px; font-weight: 700;
  color: var(--av-ink);
  background: linear-gradient(180deg, var(--av-parch-1), var(--av-parch-3));
  border: 1px solid #b48a47;
  border-radius: 10px;
  min-width: 40px; padding: 4px 8px 8px;
}

/* ── FLASHCARD ─────────────────────────────────────────────── */
#alephCourseOverlay.aleph-v3 .ac-flashcard-wrap { max-width: 480px; }
#alephCourseOverlay.aleph-v3 .ac-flashcard {
  padding: 16px 18px 20px;
  margin-bottom: 18px;
  animation: acvCardIn 0.45s var(--jc-ease) both;
}
@keyframes acvCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.acv-card-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--av-ink-soft);
}
.acv-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(90, 60, 25, 0.1);
  border: 1px solid rgba(90, 60, 25, 0.25);
}
.acv-chip b { font-family: var(--av-heb); font-size: 15px; letter-spacing: 0; text-transform: none; }
#alephCourseOverlay.aleph-v3 .ac-flash-letter {
  position: relative;
  width: min(62vw, 230px); height: min(62vw, 230px);
  margin: 6px auto 4px;
  font-size: 0; line-height: 0;
  text-shadow: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 250, 235, 0.95), rgba(255, 245, 220, 0.5) 58%, rgba(255, 245, 220, 0) 72%);
}
.acv-glyph-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.acv-glyph-svg text {
  font-family: var(--av-heb);
  font-weight: 700;
  font-size: 150px;
  text-anchor: middle;
}
.acv-glyph-shadow { fill: rgba(90, 55, 15, 0.18); transform: translate(3px, 5px); }
.acv-glyph-fill { fill: #22150a; opacity: 0; animation: acvFillIn 0.7s ease 1.05s forwards; }
.acv-glyph-stroke {
  fill: none; stroke: #b07a22; stroke-width: 2.4px; stroke-linejoin: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: acvTrace 1.6s cubic-bezier(0.55, 0.1, 0.35, 1) 0.15s forwards;
}
.acv-glyph-gild { fill: none; stroke: rgba(242, 181, 69, 0.65); stroke-width: 1px; opacity: 0; animation: acvFillIn 0.6s ease 1.5s forwards; }
@keyframes acvTrace { to { stroke-dashoffset: 0; } }
@keyframes acvFillIn { to { opacity: 1; } }
.acv-replay-trace {
  position: absolute; right: 2px; bottom: 6px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(90, 60, 25, 0.35);
  background: rgba(255, 250, 235, 0.85);
  color: var(--av-ink-soft);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.acv-replay-trace svg { width: 18px; height: 18px; }

#alephCourseOverlay.aleph-v3 .ac-flash-name {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px;
  color: var(--av-ink);
  font-family: Cinzel, Georgia, serif;
  font-size: 30px;
  margin: 2px 0 10px;
}
#alephCourseOverlay.aleph-v3 .ac-flash-phonetic {
  font-family: Nunito, sans-serif;
  font-size: 16px; font-weight: 900;
  color: #8a5a14;
  background: rgba(242, 181, 69, 0.18);
  border: 1px solid rgba(169, 113, 29, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
}
#alephCourseOverlay.aleph-v3 .ac-speak-btn {
  width: 48px; height: 48px; padding: 0;
  border-radius: 50%;
  font-size: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
#alephCourseOverlay.aleph-v3 .ac-speak-btn svg { width: 24px; height: 24px; }
#alephCourseOverlay.aleph-v3 .ac-speak-btn.playing { animation: acvPing 0.9s ease-out; }
@keyframes acvPing {
  0% { box-shadow: 0 4px 0 var(--bte), 0 0 0 0 rgba(242, 181, 69, 0.7); }
  100% { box-shadow: 0 4px 0 var(--bte), 0 0 0 16px rgba(242, 181, 69, 0); }
}
.acv-actions { display: flex; justify-content: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.acv-btn {
  min-height: 44px; padding: 8px 16px;
  display: inline-flex; align-items: center; gap: 8px;
  font: 900 15px Nunito, sans-serif;
  color: var(--av-ink);
  background: linear-gradient(180deg, #fff7e2, #ecd7a4);
  border: 2px solid #a9814f;
  border-radius: 12px;
  box-shadow: 0 3px 0 #7a5a33, inset 0 1px 0 rgba(255, 255, 255, 0.8);
  cursor: pointer;
}
.acv-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #7a5a33; }
.acv-btn svg { width: 18px; height: 18px; }
#alephCourseOverlay.aleph-v3 .ac-flash-mnemonic {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic; font-size: 20px; line-height: 1.35;
  color: #6b3f0e;
  margin: 4px 0 10px;
}
#alephCourseOverlay.aleph-v3 .ac-flash-shape,
#alephCourseOverlay.aleph-v3 .ac-flash-desc {
  font-size: 16px; line-height: 1.55;
  color: var(--av-ink-soft);
  margin-bottom: 10px;
}
#alephCourseOverlay.aleph-v3 .ac-flash-shape {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(120, 80, 30, 0.07);
  border-left: 3px solid rgba(169, 113, 29, 0.55);
  text-align: left;
}
#alephCourseOverlay.aleph-v3 .ac-flash-example {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  font-size: 16px; font-weight: 800; color: var(--av-ink);
  padding-top: 10px;
  border-top: 1px dashed rgba(120, 80, 30, 0.35);
}
#alephCourseOverlay.aleph-v3 .ac-heb-example {
  font-family: var(--av-heb); font-weight: 700; font-size: 32px; line-height: 1.25;
  color: #7a4a0c;
  direction: rtl;
}
#alephCourseOverlay.aleph-v3 button.ac-heb-example {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(169, 113, 29, 0.4);
  background: rgba(255, 250, 235, 0.7);
  border-radius: 12px;
  padding: 2px 12px 6px;
  cursor: pointer;
}
#alephCourseOverlay.aleph-v3 button.ac-heb-example svg { width: 16px; height: 16px; color: #a9711d; }
.acv-voice-hint {
  display: none;
  margin: 8px auto 0; padding: 6px 10px;
  font-size: 12px; font-weight: 700; color: #7a4a0c;
  background: rgba(242, 181, 69, 0.14);
  border-radius: 10px;
}
html.aleph-no-hebrew-voice .acv-voice-hint.show { display: block; }

#alephCourseOverlay.aleph-v3 .ac-nav-btn {
  min-height: 52px;
  font-weight: 900; font-size: 17px;
  border-radius: 14px;
  color: var(--jc-stone-hi);
  background: linear-gradient(180deg, #6a5438, #4a3a26);
  border: 2px solid #2c2013;
  box-shadow: 0 4px 0 #1f160d, inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
#alephCourseOverlay.aleph-v3 .ac-nav-btn.ac-primary {
  color: var(--jc-gold-ink);
  background: linear-gradient(180deg, var(--jc-gold-hi), var(--jc-gold) 60%, #d9932c);
  border-color: #8f5f14;
  box-shadow: 0 4px 0 #8f5f14, 0 10px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
#alephCourseOverlay.aleph-v3 .ac-nav-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1f160d; }
#alephCourseOverlay.aleph-v3 .ac-dot { width: 9px; height: 9px; background: rgba(246, 230, 191, 0.18); }
#alephCourseOverlay.aleph-v3 .ac-dot.active { background: var(--jc-gold-bright); box-shadow: 0 0 10px rgba(242, 181, 69, 0.8); }
#alephCourseOverlay.aleph-v3 .ac-dot.done { background: rgba(143, 208, 120, 0.75); }

/* Trace pad */
.acv-trace-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; border-radius: 50%; cursor: crosshair; }
.acv-trace-bar { display: none; justify-content: center; gap: 10px; margin: 0 0 12px; }
.acv-tracing .acv-trace-bar { display: flex; }
.acv-tracing .acv-actions, .acv-tracing .acv-glyph-svg, .acv-tracing .acv-replay-trace { display: none; }
.acv-trace-msg { min-height: 20px; font-size: 14px; font-weight: 900; color: #8a5a14; margin: -2px 0 8px; }
.acv-trace-msg.ok { color: var(--av-ok); }

/* ── QUESTIONS ─────────────────────────────────────────────── */
#alephCourseOverlay.aleph-v3 .ac-question-wrap { max-width: 520px; }
#alephCourseOverlay.aleph-v3 .ac-q-pbar { height: 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6); }
#alephCourseOverlay.aleph-v3 .ac-q-pfill { border-radius: 999px; background: linear-gradient(180deg, #ffe9ad, #f2b545 55%, #c98a25); }
#alephCourseOverlay.aleph-v3 .ac-q-ptext { color: rgba(246, 230, 191, 0.7); font-size: 14px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
#alephCourseOverlay.aleph-v3 .ac-q-prompt { margin: 6px 0 18px; }
#alephCourseOverlay.aleph-v3 .ac-q-prompt-letter {
  width: 150px; height: 150px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--av-heb); font-weight: 700; font-size: 104px; line-height: 1;
  padding-bottom: 12px; box-sizing: border-box;
  color: var(--av-ink);
  text-shadow: 2px 4px 0 rgba(90, 55, 15, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(60% 55% at 35% 28%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 60%),
    var(--jc-noise),
    radial-gradient(circle at 50% 50%, var(--av-parch-1), var(--av-parch-2) 65%, var(--av-parch-3));
  background-size: auto, 160px 160px, auto;
  background-blend-mode: normal, multiply, normal;
  box-shadow: 0 0 0 4px #7a5320, 0 0 0 7px rgba(242, 181, 69, 0.65), 0 0 40px rgba(242, 181, 69, 0.28), 0 14px 26px rgba(0, 0, 0, 0.5);
  animation: acvPop 0.4s var(--jc-pop) both;
}
@keyframes acvPop { from { transform: scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }
#alephCourseOverlay.aleph-v3 .ac-q-prompt-name {
  font-family: Cinzel, Georgia, serif;
  font-size: 34px; color: var(--jc-gold-bright);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 0 18px rgba(242, 181, 69, 0.3);
  margin-bottom: 10px;
}
#alephCourseOverlay.aleph-v3 .ac-q-prompt-text { color: var(--jc-stone-hi); font-size: 20px; font-weight: 900; }
#alephCourseOverlay.aleph-v3 .ac-q-options { gap: 12px; }
#alephCourseOverlay.aleph-v3 .ac-q-options.acv-grid { display: grid; grid-template-columns: 1fr 1fr; }
#alephCourseOverlay.aleph-v3 .ac-q-opt {
  position: relative;
  min-height: 58px;
  font: 900 20px Nunito, sans-serif;
  color: var(--av-ink);
  background:
    var(--jc-noise),
    linear-gradient(180deg, #fbf0d4 0%, #ead3a0 60%, #d8b878 100%);
  background-size: 160px 160px, auto;
  background-blend-mode: multiply, normal;
  border: 2px solid #9c733f;
  border-radius: 16px;
  box-shadow: 0 5px 0 #6b4f2c, 0 10px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.12s var(--jc-ease), box-shadow 0.12s var(--jc-ease), filter 0.2s;
  -webkit-tap-highlight-color: transparent;
  animation: acvOptIn 0.35s var(--jc-ease) both;
}
#alephCourseOverlay.aleph-v3 .ac-q-opt:nth-child(2) { animation-delay: 0.04s; }
#alephCourseOverlay.aleph-v3 .ac-q-opt:nth-child(3) { animation-delay: 0.08s; }
#alephCourseOverlay.aleph-v3 .ac-q-opt:nth-child(4) { animation-delay: 0.12s; }
@keyframes acvOptIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#alephCourseOverlay.aleph-v3 .ac-q-opt:active { transform: translateY(4px); box-shadow: 0 1px 0 #6b4f2c, 0 4px 8px rgba(0, 0, 0, 0.3); }
#alephCourseOverlay.aleph-v3 .ac-q-opt.heb-option { font-family: var(--av-heb); font-weight: 700; font-size: 50px; line-height: 1; min-height: 96px; padding-bottom: 12px; }
#alephCourseOverlay.aleph-v3 .ac-q-opt.correct {
  color: #fff;
  background: linear-gradient(180deg, #8fdc7e 0%, #4caf50 55%, #2f8a3a 100%);
  border-color: #1f5c25;
  box-shadow: 0 5px 0 #1f5c25, 0 0 0 3px rgba(155, 240, 140, 0.55), 0 0 28px var(--av-ok-glow);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  animation: acvCorrect 0.5s var(--jc-pop) both;
}
#alephCourseOverlay.aleph-v3 .ac-q-opt.wrong {
  color: #fff;
  background: linear-gradient(180deg, #f39a86 0%, #d9503d 60%, #a83325 100%);
  border-color: #6e2016;
  box-shadow: 0 5px 0 #6e2016, 0 0 18px rgba(217, 80, 61, 0.5);
  animation: acvShake 0.45s ease both;
}
#alephCourseOverlay.aleph-v3 .ac-q-options.answered .ac-q-opt:not(.correct):not(.wrong) { filter: saturate(0.4) brightness(0.8); opacity: 0.75; }
@keyframes acvCorrect { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes acvShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); }
}
#alephCourseOverlay.aleph-v3 .ac-explanation {
  margin-top: 16px; padding: 14px 16px;
  border-radius: 16px;
  color: var(--av-ink);
  background: linear-gradient(180deg, #fff6df, #f0dcae);
  border: 2px solid #b48a47;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  animation: acvCardIn 0.35s var(--jc-ease) both;
}
#alephCourseOverlay.aleph-v3 .ac-exp-text { color: var(--av-ink-soft); font-size: 16px; font-weight: 700; }
#alephCourseOverlay.aleph-v3 .ac-exp-next { min-height: 48px; width: 100%; font-weight: 900; font-size: 17px; }

/* Sparkle burst (DOM, capped) */
.acv-spark {
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe6, #ffd76e 55%, rgba(242, 181, 69, 0));
  pointer-events: none;
  animation: acvSpark 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes acvSpark {
  from { transform: translate(0, 0) scale(1); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

/* ── RESULTS ───────────────────────────────────────────────── */
#alephCourseOverlay.aleph-v3 .ac-results-wrap { max-width: 480px; position: relative; }
#alephCourseOverlay.aleph-v3 .ac-results-score {
  position: relative;
  width: 200px; height: 200px; box-sizing: border-box;
  margin: 8px auto 20px; padding: 0;
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 0;
  background:
    radial-gradient(60% 55% at 35% 28%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 60%),
    radial-gradient(circle, #fbf0d4, #e7cd95 70%, #c9a261);
  box-shadow: 0 0 0 6px #7a5320, 0 0 0 10px rgba(242, 181, 69, 0.7), 0 0 60px rgba(242, 181, 69, 0.35), 0 18px 30px rgba(0, 0, 0, 0.5);
  animation: acvPop 0.55s var(--jc-pop) both;
}
#alephCourseOverlay.aleph-v3 .ac-results-score.failed {
  background: radial-gradient(circle, #efe2c8, #cdb48a 70%, #9f845a);
  box-shadow: 0 0 0 6px #5c4325, 0 0 0 10px rgba(217, 80, 61, 0.55), 0 18px 30px rgba(0, 0, 0, 0.5);
}
#alephCourseOverlay.aleph-v3 .ac-results-pct { font-family: Cinzel, Georgia, serif; font-size: 56px; color: var(--av-ink); line-height: 1; }
#alephCourseOverlay.aleph-v3 .ac-results-detail { font-size: 15px; font-weight: 900; color: var(--av-ink-soft); margin-top: 6px; padding: 0 16px; text-align: center; }
#alephCourseOverlay.aleph-v3 .ac-results-rewards,
#alephCourseOverlay.aleph-v3 .ac-results-fail {
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(58, 42, 24, 0.92), rgba(28, 20, 12, 0.94));
  border: 1px solid var(--jc-hairline);
  box-shadow: inset 0 1px 0 rgba(255, 233, 173, 0.12), 0 10px 20px rgba(0, 0, 0, 0.35);
}
#alephCourseOverlay.aleph-v3 .ac-reward-title { font-family: Cinzel, Georgia, serif; color: var(--jc-gold-bright); font-size: 22px; }
#alephCourseOverlay.aleph-v3 .ac-reward-item { color: var(--jc-stone-hi); font-size: 17px; font-weight: 700; }
#alephCourseOverlay.aleph-v3 .ac-results-fail p { color: var(--jc-stone-hi); font-size: 17px; padding: 4px; margin: 0; }
#alephCourseOverlay.aleph-v3 .ac-result-btn {
  min-height: 52px; border-radius: 14px;
  font-weight: 900; font-size: 17px;
  color: var(--jc-stone-hi);
  background: linear-gradient(180deg, #6a5438, #4a3a26);
  border: 2px solid #2c2013;
  box-shadow: 0 4px 0 #1f160d, inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
#alephCourseOverlay.aleph-v3 .ac-result-btn.ac-primary {
  color: var(--jc-gold-ink);
  background: linear-gradient(180deg, var(--jc-gold-hi), var(--jc-gold) 60%, #d9932c);
  border-color: #8f5f14;
  box-shadow: 0 4px 0 #8f5f14, inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
#alephCourseOverlay.aleph-v3 .ac-result-btn.ac-secondary {
  color: #0c2233;
  background: linear-gradient(180deg, #a7dcf5, #4a90d9 60%, #2f6fae);
  border-color: #1a3f5c;
  box-shadow: 0 4px 0 #1a3f5c, inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
#alephCourseOverlay.aleph-v3 .ac-result-btn:active { transform: translateY(3px); }
.acv-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 600; }

/* ── VOWEL LAB ─────────────────────────────────────────────── */
#alephCourseOverlay.aleph-v3 .ac-vowel-hero {
  border-radius: 20px;
  color: var(--av-ink);
  background:
    var(--jc-noise),
    linear-gradient(170deg, var(--av-parch-1), var(--av-parch-2) 60%, var(--av-parch-3));
  background-size: 200px 200px, auto;
  background-blend-mode: multiply, normal;
  border: 2px solid #b48a47;
  box-shadow: 0 0 0 4px rgba(58, 36, 8, 0.55), 0 0 0 5px rgba(242, 181, 69, 0.5), 0 14px 30px rgba(0, 0, 0, 0.5);
}
#alephCourseOverlay.aleph-v3 .ac-vowel-title { font-family: Cinzel, Georgia, serif; color: #6b3f0e; }
#alephCourseOverlay.aleph-v3 .ac-vowel-copy { color: var(--av-ink-soft); font-weight: 600; }
#alephCourseOverlay.aleph-v3 .ac-vowel-tile {
  background: linear-gradient(180deg, #fffaf0, #f0dfb8);
  border: 1px solid #c29a5c;
  border-radius: 14px;
  box-shadow: 0 3px 0 #a5824d, inset 0 1px 0 #fff;
}
#alephCourseOverlay.aleph-v3 .ac-vowel-letter,
#alephCourseOverlay.aleph-v3 .ac-vowel-big {
  font-family: var(--av-heb); font-weight: 700;
  color: var(--av-ink);
  text-shadow: 2px 3px 0 rgba(90, 55, 15, 0.14);
}
#alephCourseOverlay.aleph-v3 .ac-vowel-big { font-size: 132px; line-height: 1.15; }
#alephCourseOverlay.aleph-v3 .ac-vowel-name,
#alephCourseOverlay.aleph-v3 .ac-vowel-card-name { color: #8a5a14; font-family: Cinzel, Georgia, serif; }
#alephCourseOverlay.aleph-v3 .ac-vowel-sound,
#alephCourseOverlay.aleph-v3 .ac-vowel-card-sound { color: #1f6a8a; }
#alephCourseOverlay.aleph-v3 .ac-vowel-hint { color: var(--av-ink-soft); }
#alephCourseOverlay.aleph-v3 .ac-vowel-mouth { color: #1f6a8a; background: rgba(111, 195, 234, 0.16); border-color: rgba(31, 106, 138, 0.3); }
#alephCourseOverlay.aleph-v3 .ac-vowel-flash { padding: 20px 18px; margin-bottom: 18px; }
#alephCourseOverlay.aleph-v3 .ac-vowel-speak {
  min-height: 48px; padding: 10px 16px;
  font-weight: 900; font-size: 15px;
  color: #0c2233;
  background: linear-gradient(180deg, #a7dcf5, #6fc3ea 55%, #3f95c7);
  border: 2px solid #1a3f5c;
  border-radius: 12px;
  box-shadow: 0 3px 0 #1a3f5c, inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
#alephCourseOverlay.aleph-v3 .ac-vowel-progress { color: rgba(246, 230, 191, 0.7); }

@media (min-width: 900px) {
  #alephCourseOverlay.aleph-v3 .ac-content { padding-top: 26px; }
  #alephCourseOverlay.aleph-v3 .ac-flash-letter { width: 250px; height: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  .acv-glyph-fill, .acv-glyph-gild { opacity: 1 !important; animation: none !important; }
  .acv-glyph-stroke { stroke-dashoffset: 0 !important; animation: none !important; }
  .acv-stone.next { animation: none !important; }
}
