@font-face { font-family: 'Leora Digits'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url('/assets/fonts/leora-digits.woff2') format('woff2'); unicode-range: U+0030-0039; }
:root {
  --brand: #EA580C;
  --ink: #2B3133;
  --cream: #FFF7EC;
  --lang: #EA580C;
  --sun: #FBBF24;
  --sprout: #16A34A;
  --trust: #1E3A8A;
  --sky: #4CC9F0;
  --leaf: #22C55E;
  --berry: #EC4899;
  --grape: #8B5CF6;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-size: max(16px, 1em); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

html, body {
  touch-action: manipulation;
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 201, 60, .35) 0 90px, transparent 91px),
    radial-gradient(circle at 92% 22%, rgba(76, 201, 240, .28) 0 70px, transparent 71px),
    radial-gradient(circle at 85% 92%, rgba(236, 72, 153, .18) 0 110px, transparent 111px),
    radial-gradient(circle at 6% 70%, rgba(34, 197, 94, .18) 0 60px, transparent 61px),
    var(--cream);
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: screenIn .35s cubic-bezier(.2, 1.4, .4, 1);
}

.scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.game-surface {
  touch-action: none;
  overscroll-behavior: none;
  position: relative;
  overflow: hidden;
}

.ethiopic { font-family: 'Leora Digits', 'Noto Sans Ethiopic', 'Fredoka', sans-serif; }

.btn3d {
  position: relative;
  border: 0;
  border-radius: 24px;
  cursor: pointer;
  color: #fff;
  font-weight: 700;
  background: var(--c, var(--brand));
  box-shadow: 0 6px 0 var(--d, rgba(0, 0, 0, .22)), 0 10px 20px rgba(0, 0, 0, .12);
  transition: transform .08s, box-shadow .08s;
}
.btn3d:active, .btn3d.pressed {
  transform: translateY(5px);
  box-shadow: 0 1px 0 var(--d, rgba(0, 0, 0, .22)), 0 3px 8px rgba(0, 0, 0, .12);
}
.btn3d.light { color: var(--ink); background: #fff; --d: rgba(43, 49, 51, .14); }

.card {
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 6px 0 rgba(43, 49, 51, .08), 0 12px 28px rgba(43, 49, 51, .08);
}

.icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 26px;
}

.mascot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.mascot .rig {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 90%;
  filter: drop-shadow(0 10px 12px rgba(43, 49, 51, .18));
}
.mascot .rig img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  -webkit-user-select: none;
  user-select: none;
}
.mascot .m-jaw { will-change: transform; }
.mascot .m-cavity {
  position: absolute;
  height: 0;
  opacity: 0;
  transform: translateX(-50%);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, #E7707B 0 45%, transparent 47%), linear-gradient(#3A0B12, #5C1520);
}
.mascot .m-gesture {
  position: absolute;
  z-index: 6;
  font-size: 42px;
  line-height: 1;
  transform: translate(-50%, -50%);
  animation: gesturePop 1.5s cubic-bezier(.2, 1.4, .4, 1) forwards;
  pointer-events: none;
}
@keyframes gesturePop {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(.3) rotate(-20deg); }
  20% { opacity: 1; transform: translate(-50%, -60%) scale(1.15) rotate(8deg); }
  35% { transform: translate(-50%, -60%) scale(1) rotate(-6deg); }
  50% { transform: translate(-50%, -60%) scale(1) rotate(6deg); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -110%) scale(.9); }
}
.mascot.idle .rig, .mascot.hi .rig { animation: breathe 3s ease-in-out infinite; }
.mascot.talking .rig { animation: breathe 2.4s ease-in-out infinite; }
.mascot.speaking .rig { animation: talkSway 1.6s ease-in-out infinite; }
.mascot.happy .rig { animation: hop .5s cubic-bezier(.3, 1.6, .5, 1) 3; }
.mascot.eating .rig { animation: chomp .22s ease-in-out 6; }
.mascot.encourage .rig { animation: tilt 1.2s ease-in-out 2; }
.mascot.hungry .rig { animation: wobble 1.6s ease-in-out infinite; }
.mascot.thinking .rig { animation: breathe 3s ease-in-out infinite; }
@keyframes talkSway { 0%, 100% { transform: rotate(0) translateY(0); } 25% { transform: rotate(-1.2deg) translateY(-1px); } 75% { transform: rotate(1.2deg) translateY(-1px); } }
.mascot .mouth {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 34%;
  height: 16%;
  transform: translateX(-50%);
  border-radius: 50%;
}
.mascot.drop-ready .mouth {
  box-shadow: 0 0 0 6px rgba(255, 201, 60, .7), 0 0 30px 10px rgba(255, 201, 60, .6);
  animation: pulse .6s ease-in-out infinite alternate;
}

.bubble {
  position: absolute;
  width: max-content;
  max-width: 220px;
  padding: 10px 16px;
  border-radius: 22px;
  background: #fff;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  box-shadow: 0 6px 0 rgba(43, 49, 51, .08), 0 8px 20px rgba(43, 49, 51, .12);
  animation: pop .35s cubic-bezier(.2, 1.6, .4, 1);
  z-index: 5;
}
.bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 28px;
  border: 10px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}

.tile {
  border-radius: 22px;
  background: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 5px 0 rgba(43, 49, 51, .10), 0 8px 16px rgba(43, 49, 51, .08);
  transition: transform .1s;
}
.tile:active { transform: scale(.94); }

.balloon {
  position: absolute;
  width: 92px;
  height: 108px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%;
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .55) 0 10%, transparent 11%), var(--c);
  box-shadow: inset -8px -10px 0 rgba(0, 0, 0, .12);
  cursor: pointer;
  will-change: transform;
}
.balloon::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  width: 14px;
  height: 12px;
  transform: translateX(-50%);
  background: var(--c);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.balloon::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 46px;
  background: rgba(43, 49, 51, .25);
  margin-top: 2px;
}
.balloon.popped { animation: popOut .25s ease-out forwards; pointer-events: none; }
.balloon.nope { animation: shake .4s; }

.train-track {
  height: 10px;
  background: repeating-linear-gradient(90deg, #8B5E3C 0 14px, transparent 14px 26px), #C8A27A;
  border-radius: 6px;
}
.train { display: flex; align-items: flex-end; gap: 6px; will-change: transform; }
.train.arrive { animation: arrive 1.2s cubic-bezier(.2, .9, .3, 1) both; }
.train.leave { animation: leave 1.6s cubic-bezier(.6, 0, .9, .4) forwards; }
.train.chug .car, .train.chug .engine { animation: chug .25s ease-in-out infinite alternate; }
.car, .engine {
  position: relative;
  border-radius: 14px 14px 8px 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-weight: 700;
}
.car { width: 58px; height: 58px; background: var(--c); }
.car .slot {
  width: 44px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .85);
  display: grid;
  place-items: center;
  font-size: 28px;
}
.car.next .slot { outline: 3px dashed var(--ink); outline-offset: -3px; animation: pulse .7s ease-in-out infinite alternate; }
.car.filled .slot { animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.engine { width: 86px; height: 82px; background: #E63946; color: #fff; font-size: 40px; }
.engine::before {
  content: '';
  position: absolute;
  top: -22px;
  right: 12px;
  width: 18px;
  height: 24px;
  background: #2B3133;
  border-radius: 4px 4px 0 0;
}
.wheels { position: absolute; bottom: -10px; left: 0; right: 0; display: flex; justify-content: space-around; }
.wheels i { width: 18px; height: 18px; border-radius: 50%; background: #2B3133; border: 4px solid #9CA3AF; }
.smoke {
  position: absolute;
  top: -40px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  animation: smoke 1.2s ease-out infinite;
}

.star-node { cursor: pointer; transition: transform .15s; transform-box: fill-box; transform-origin: center; }
.star-node.next { animation: pulseSvg .7s ease-in-out infinite alternate; }

.dragging {
  position: fixed !important;
  z-index: 50;
  pointer-events: none;
  transform: scale(1.15) rotate(-4deg);
  transition: none;
}

.shake { animation: shake .4s; }
.wiggle { animation: tilt .6s; }
.bounce-in { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }

#fx { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti {
  position: absolute;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  will-change: transform, opacity;
}
.sparkle { position: absolute; font-size: 28px; will-change: transform, opacity; }

.win-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px 0;
  overflow-y: auto;
  background: rgba(255, 247, 236, .88);
  backdrop-filter: blur(4px);
  animation: screenIn .3s ease-out;
}
@media (max-height: 700px) {
  .lesson-guide > * { width: 64px !important; height: 80px !important; }
}
.win-overlay > :first-child { margin-top: auto; }
.win-overlay > :last-child { margin-bottom: auto; }

@keyframes screenIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02, .985); } }
@keyframes talk { from { transform: rotate(-1.5deg) scale(1); } to { transform: rotate(1.5deg) scale(1.02); } }
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-14%) scale(.96, 1.05); } 70% { transform: translateY(0) scale(1.06, .94); } }
@keyframes chomp { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.06, .92); } }
@keyframes tilt { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-2deg) translateY(-2%); } }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes popOut { to { transform: scale(1.8); opacity: 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes pulseSvg { from { transform: scale(1); } to { transform: scale(1.3); } }
@keyframes arrive { from { transform: translateX(110vw); } to { transform: translateX(0); } }
@keyframes leave { to { transform: translateX(-130vw); } }
@keyframes chug { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes smoke { from { transform: translate(0, 0) scale(.6); opacity: .9; } to { transform: translate(-30px, -40px) scale(1.8); opacity: 0; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.floaty { animation: floaty 2.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.hint-glow { box-shadow: 0 0 0 4px #FFC93C, 0 0 18px 6px rgba(255, 201, 60, .7); animation: pulse .7s ease-in-out infinite alternate; }

.scene { width: 100%; height: 100%; display: block; }
.scene g, .scene circle, .scene path, .scene text { transform-box: fill-box; }
.scene .actor { transform-origin: 50% 100%; }
.s-bob { animation: sBob 2.6s ease-in-out infinite; }
.s-breathe { animation: sBreathe 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.s-sleep { animation: sBreathe 4.6s ease-in-out infinite; transform-origin: 50% 100%; }
.s-tilt { animation: sTilt 3s ease-in-out infinite; transform-origin: 50% 100%; }
.s-walk { animation: sWalk 7s ease-in-out infinite alternate; }
.s-hop { animation: sHop 1.1s cubic-bezier(.3, 1.5, .5, 1) infinite; }
.s-fly { animation: sFly 4s ease-in-out infinite; }
.s-swim { animation: sSwim 3.4s ease-in-out infinite; }
.s-flap { animation: sFlap .35s ease-in-out infinite alternate; }
.s-twinkle { animation: sTwinkle 2.4s ease-in-out infinite; transform-origin: center; }
.s-glow { animation: sGlow 4s ease-in-out infinite; transform-origin: center; }
.s-drift { animation: sDrift 9s ease-in-out infinite alternate; }
.s-sway { animation: sSway 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.s-zzz { animation: sZzz 3s ease-out infinite; opacity: 0; }
.s-wind { animation: sWind 3s ease-in-out infinite; opacity: 0; }
.s-firefly { animation: sFirefly 4s ease-in-out infinite; }
.s-shoot { animation: sShoot 4.5s ease-in infinite; }
.s-pop { animation: sPop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.s-wobble { animation: sWobble 2.6s ease-in-out infinite; }
.s-boat { animation: sBoat 3.6s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes sBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sBreathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
@keyframes sTilt { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes sWalk { from { transform: translateX(-18px); } to { transform: translateX(18px); } }
@keyframes sHop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px); } }
@keyframes sFly { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(10px, -8px); } 50% { transform: translate(0, -14px); } 75% { transform: translate(-10px, -6px); } }
@keyframes sSwim { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-14px, -6px) rotate(-6deg); } }
@keyframes sFlap { from { transform: rotate(10deg); } to { transform: rotate(-30deg); } }
@keyframes sTwinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes sGlow { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes sDrift { from { transform: translateX(-12px); } to { transform: translateX(12px); } }
@keyframes sSway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes sZzz { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -40px) scale(1.2); } }
@keyframes sWind { 0% { opacity: 0; transform: translateX(-30px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateX(40px); } }
@keyframes sFirefly { 0%, 100% { transform: translate(0, 0); opacity: .3; } 30% { opacity: 1; } 50% { transform: translate(12px, -14px); opacity: .8; } 80% { transform: translate(-8px, -4px); opacity: 1; } }
@keyframes sShoot { 0%, 70% { transform: translate(0, 0); opacity: 0; } 75% { opacity: 1; } 100% { transform: translate(240px, 96px); opacity: 0; } }
@keyframes sPop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes sWobble { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(1.15); } }
@keyframes sBoat { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(2px); } }

.story-dark { background: linear-gradient(#0B1B3F, #1E2A5A) !important; color: #F4F1FF; }
.story-word { border-radius: 8px; padding: 0 2px; transition: background .15s, color .15s; cursor: pointer; }
.story-word.on { background: #FFC93C; color: #2B3133; }
.story-word.ok { color: #22C55E; }
.story-word.near { color: #F59E0B; }
.story-word.miss { color: #F87171; text-decoration: underline wavy; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shine { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(260%) skewX(-20deg); } }
@keyframes nudge { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-5deg) scale(1.04); } 96% { transform: rotate(5deg) scale(1.04); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 201, 60, .7), 0 6px 0 var(--d, rgba(0,0,0,.22)); } 50% { box-shadow: 0 0 0 10px rgba(255, 201, 60, 0), 0 6px 0 var(--d, rgba(0,0,0,.22)); } }
.tile-fun { overflow: hidden; }
.tile-fun::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shine 5s ease-in-out infinite; pointer-events: none; }
.nudge { animation: nudge 4s ease-in-out infinite; }
.glow-pulse { animation: glowPulse 1.6s ease-in-out infinite; }
.world { position: relative; height: 210px; border-radius: 0 0 36px 36px; overflow: hidden; box-shadow: 0 8px 0 rgba(43,49,51,.06); }
.world > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scroll.flex-col > * { flex-shrink: 0; }

.mem-card { perspective: 700px; border: 0; padding: 0; background: none; cursor: pointer; }
.mem-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.mem-card.open .mem-inner, .mem-card.done .mem-inner { transform: rotateY(180deg); }
.mem-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 5px 0 rgba(43,49,51,.12); overflow: hidden; }
.mem-front { transform: rotateY(180deg); }
.mem-card.done .mem-front { box-shadow: 0 0 0 4px #22C55E, 0 5px 0 rgba(43,49,51,.12); animation: pop .4s cubic-bezier(.2,1.6,.4,1); }
.catch-item { position: absolute; display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; box-shadow: inset -5px -7px 0 rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.12); will-change: transform; }
.catch-basket { position: absolute; bottom: 10px; will-change: transform; font-size: 76px; line-height: 1; filter: drop-shadow(0 8px 6px rgba(0,0,0,.2)); }

.no-bar { scrollbar-width: none; }
.no-bar::-webkit-scrollbar { display: none; }

.logo-flash { position: fixed; left: 50%; top: 42%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; z-index: 499; pointer-events: none; box-shadow: 0 0 0 0 rgba(251,191,36,.6), 0 0 0 0 rgba(234,88,12,.35); animation: spFlash .9s ease-out forwards; }
@keyframes spFlash { to { box-shadow: 0 0 0 70vmax rgba(251,191,36,0), 0 0 0 40vmax rgba(234,88,12,0); } }

@media (min-width: 760px) {
  #app {
    left: calc(50% - 340px);
    right: auto;
    width: 680px;
    background: var(--cream);
    box-shadow: 0 0 0 1px rgba(43, 49, 51, .05), 0 12px 60px rgba(43, 49, 51, .14);
  }
}

body.ui-ethiopic, body.ui-ethiopic button, body.ui-ethiopic input, body.ui-ethiopic select { font-family: 'Leora Digits', 'Noto Sans Ethiopic', 'Fredoka', system-ui, sans-serif; }
body.ui-ethiopic .text-2xl, body.ui-ethiopic .text-3xl { letter-spacing: 0; line-height: 1.25; }
.journey-book { position: relative; display: flex; border-radius: 10px 22px 22px 10px; background: var(--book); box-shadow: 0 8px 0 rgba(0,0,0,.35), 0 14px 30px rgba(0,0,0,.35); overflow: hidden; color: #FFF8E7; transform-origin: left center; transition: transform .2s; }
.journey-book:active { transform: perspective(900px) rotateY(-8deg) scale(.99); }
.journey-book::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.18), transparent 40%, rgba(0,0,0,.18)); pointer-events: none; }
.journey-spine { width: 18px; flex: none; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,.08) 60%, rgba(255,255,255,.18)); border-right: 2px solid rgba(252,211,77,.55); }
.journey-face { flex: 1; min-width: 0; padding: 14px 14px 14px 12px; background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(0,0,0,.28)); border: 3px solid rgba(252,211,77,.45); border-left: 0; border-radius: 0 20px 20px 0; }
.journey-title { font-family: 'Leora Digits', 'Fredoka', 'Noto Sans Ethiopic', sans-serif; font-weight: 700; font-size: 30px; line-height: 1.05; margin: 4px 0 10px; text-shadow: 0 2px 0 rgba(0,0,0,.35); overflow-wrap: anywhere; }
.journey-window { border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; border: 3px solid rgba(252,211,77,.7); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.journey-window svg { width: 100%; height: 100%; display: block; }
@media print {
  .no-print, .lesson-guide, #splash { display: none !important; }
  html, body, #app { background: #fff !important; height: auto !important; overflow: visible !important; }
  .scroll { overflow: visible !important; height: auto !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd; break-inside: avoid; }
}
.a11y-font body, .a11y-font button, .a11y-font input { font-family: 'Atkinson Hyperlegible', 'Fredoka', 'Noto Sans Ethiopic', sans-serif !important; letter-spacing: .03em; word-spacing: .12em; }
.a11y-font .ethiopic { font-family: 'Noto Sans Ethiopic', sans-serif !important; letter-spacing: 0; }
.a11y-big { font-size: 112.5%; }
.a11y-calm *, .a11y-calm *::before, .a11y-calm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
.a11y-calm .confetti, .a11y-calm canvas.fx { display: none !important; }
:focus-visible { outline: 3px solid #2563EB !important; outline-offset: 3px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none !important; }
.a11y-caption { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); max-width: min(92vw, 640px); padding: 8px 14px; border-radius: 14px; background: rgba(17, 24, 39, .88); color: #fff; font-weight: 700; font-size: 18px; line-height: 1.3; text-align: center; z-index: 400; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.a11y-caption.on { opacity: 1; transform: translate(-50%, 0); }
:is(.opacity-40, .opacity-50, .opacity-60, .opacity-70):is(.text-xs, .text-sm, .text-base, .text-lg, .text-xl, .font-semibold, .font-bold, span, div, p, label) { opacity: .8 !important; }
:is(.opacity-75, .opacity-80, .opacity-90):is(.text-xs, .text-sm, .text-base, .text-lg, .font-semibold, .font-bold, span, div, p) { opacity: .9 !important; }
.btn3d { min-height: 44px; }
.btn3d.icon-btn { min-width: 44px; }
.home-footer button { min-height: 44px; padding: 0 10px; border-radius: 12px; color: #374151; }
.home-footer button:active { background: rgba(0, 0, 0, .06); }

.piano-white { flex: 1; height: 100%; background: linear-gradient(#fff 80%, #F1E7DA); border-radius: 0 0 12px 12px; box-shadow: inset 0 -5px 0 rgba(43,49,51,.1), 0 2px 0 rgba(43,49,51,.2); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; padding-bottom: 10px; color: #2B3133; transition: transform .05s; }
.piano-white.down { transform: translateY(3px); background: linear-gradient(#FEF3C7 80%, #FDE68A); box-shadow: inset 0 -2px 0 rgba(43,49,51,.1); }
.piano-dot { width: 14px; height: 14px; border-radius: 50%; pointer-events: none; }
.piano-white span { pointer-events: none; }
.piano-black { position: absolute; top: 0; width: 8%; height: 58%; background: linear-gradient(#374151, #111827); border-radius: 0 0 8px 8px; box-shadow: 0 4px 0 rgba(0,0,0,.35); z-index: 2; transition: transform .05s; }
.piano-black.down { transform: translateY(2px); background: #6D28D9; }
.piano-white.next, .piano-black.next { animation: keyGlow 0.9s ease-in-out infinite; }
.piano-white.next { background: linear-gradient(#BBF7D0 70%, #4ADE80); }
.piano-black.next { background: linear-gradient(#22C55E, #15803D); }
@keyframes keyGlow { 50% { box-shadow: 0 0 0 4px #22C55E, 0 0 18px 4px rgba(34,197,94,.7); } }
.drum-pad { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: min(13vh, 96px); border-radius: 22px; color: #fff; background: var(--c); box-shadow: 0 6px 0 rgba(0,0,0,.22); cursor: pointer; }
.drum-pad span { pointer-events: none; }
.drum-pad.hit { animation: drumHit .16s ease-out; }
@keyframes drumHit { 0% { transform: translateY(4px) scale(.96); filter: brightness(1.35); box-shadow: 0 2px 0 rgba(0,0,0,.22); } 100% { transform: none; filter: none; } }

.launch-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 20px; color: #2A1600; font-weight: 700; font-size: 17px; background: linear-gradient(135deg, #FFD65C, #FF9F1C 60%, #FF6B35); box-shadow: 0 5px 0 #C2570C, 0 10px 22px rgba(255,120,30,.35); animation: lx-glow 2.4s ease-in-out infinite; }
.launch-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #C2570C; }
@keyframes lx-glow { 50% { box-shadow: 0 5px 0 #C2570C, 0 10px 30px rgba(255,160,40,.75); } }
.lx-stage { position: absolute; inset: 0; display: flex; flex-direction: column; color: #fff; background: radial-gradient(120% 70% at 50% 0%, #4C1D95 0%, #1E1B5C 45%, #0B1033 100%); overflow: hidden; }
.lx-stage > .flex .text-2xl, .lx-stage > .flex .text-sm { color: #fff; }
.lx-body { flex: 1; min-height: 0; padding: 6px 16px 28px; display: flex; flex-direction: column; gap: 14px; }
.lx-loading { margin: auto; font-size: 56px; }
.lx-hero { position: relative; text-align: center; padding: 10px 8px 6px; }
.lx-logo { width: 84px; margin: 0 auto 4px; filter: drop-shadow(0 6px 18px rgba(255,190,70,.55)); }
.lx-title { font-size: 34px; line-height: 1.1; font-weight: 700; background: linear-gradient(180deg, #FFF3C4, #FFC93C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-sub { font-weight: 600; opacity: .85; margin-top: 4px; }
.lx-spark { position: absolute; color: #FFD65C; animation: lx-twinkle 2.2s ease-in-out infinite; }
.lx-spark.s1 { left: 12%; top: 12px; font-size: 22px; }
.lx-spark.s2 { right: 14%; top: 34px; font-size: 16px; animation-delay: .7s; }
.lx-spark.s3 { left: 22%; top: 78px; font-size: 12px; animation-delay: 1.3s; }
@keyframes lx-twinkle { 50% { opacity: .25; transform: scale(.7); } }
.lx-card { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.lx-h2 { font-size: 20px; font-weight: 700; }
.lx-input { width: 100%; padding: 14px 16px; border-radius: 16px; border: 0; font-size: 20px; font-weight: 700; color: #1E1B5C; background: #fff; -webkit-user-select: text; user-select: text; }
.lx-msg { min-height: 20px; color: #FFD0D0; font-weight: 600; }
.lx-cta { padding: 14px 22px; border: 0; border-radius: 18px; font-size: 19px; font-weight: 700; color: #2A1600; background: linear-gradient(135deg, #FFD65C, #FF9F1C); box-shadow: 0 5px 0 #B9610B; }
.lx-cta:active { transform: translateY(3px); box-shadow: 0 2px 0 #B9610B; }
.lx-game { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 0; border-radius: 24px; text-align: left; color: #fff; box-shadow: 0 6px 0 rgba(0,0,0,.28); }
.lx-game:active:not([disabled]) { transform: translateY(3px); }
.lx-game[disabled] { opacity: .6; }
.lx-game.gold { background: linear-gradient(135deg, #F59E0B, #EA580C); }
.lx-game.violet { background: linear-gradient(135deg, #8B5CF6, #4F46E5); }
.lx-game-icon { font-size: 40px; line-height: 1; }
.lx-game-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lx-game-title { font-size: 21px; font-weight: 700; }
.lx-game-sub { font-size: 14px; font-weight: 600; opacity: .9; }
.lx-game-stat { font-size: 13px; font-weight: 700; margin-top: 4px; color: #FFF3C4; }
.lx-game-cta { padding: 8px 14px; border-radius: 14px; font-weight: 700; background: rgba(255,255,255,.22); }
.lx-link { background: none; border: 0; color: #fff; opacity: .75; font-weight: 600; padding: 8px; text-decoration: underline; }
.lx-trivia { padding: calc(var(--safe-top) + 14px) 16px calc(var(--safe-bottom) + 16px); gap: 12px; }
.lx-trivia-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lx-close { width: 44px; height: 44px; border: 0; border-radius: 14px; color: #fff; font-size: 18px; font-weight: 700; background: rgba(255,255,255,.14); }
.lx-count { font-weight: 700; font-size: 18px; opacity: .9; }
.lx-score { font-weight: 700; font-size: 24px; color: #FFD65C; min-width: 44px; text-align: right; }
.lx-score span { font-size: 13px; opacity: .8; }
.lx-time { height: 10px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.lx-time-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #22C55E, #FFD65C 60%, #F97316); }
.lx-q { flex: 1; min-height: 0; display: grid; place-items: center; text-align: center; font-size: 25px; line-height: 1.25; font-weight: 700; padding: 6px 4px; }
.lx-answers { display: grid; gap: 10px; }
.lx-answer { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 10px 14px; border: 0; border-radius: 18px; color: #fff; font-size: 18px; font-weight: 700; text-align: left; box-shadow: 0 5px 0 rgba(0,0,0,.28); transition: opacity .2s, transform .15s; }
.lx-answer:active:not([disabled]) { transform: translateY(3px); }
.lx-answer.a0 { background: #E5484D; } .lx-answer.a1 { background: #2F7DE1; } .lx-answer.a2 { background: #E8A100; } .lx-answer.a3 { background: #16A34A; }
.lx-answer.dim { opacity: .3; }
.lx-answer.right { outline: 4px solid #fff; animation: lx-pop .4s ease; }
.lx-answer.wrong { opacity: .55; animation: lx-shake .35s ease; }
@keyframes lx-pop { 50% { transform: scale(1.04); } }
@keyframes lx-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.lx-mark { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.25); }
.lx-answer-text { flex: 1; min-width: 0; }
.lx-result { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.lx-result-icon { font-size: 76px; }
.lx-rank { font-size: 24px; font-weight: 700; padding: 8px 20px; border-radius: 16px; color: #2A1600; background: linear-gradient(135deg, #FFD65C, #FF9F1C); }
.launch-wide { width: calc(100% - 32px); }
.launch-btn.flex-col { font-size: 18px; line-height: 1.2; } .launch-btn.flex-col > :first-child { font-size: 40px; }

.calm { --calm: 1; }
.calm .font-bold { font-weight: 600; }
.calm .btn3d { font-weight: 600; }
.calm .btn3d:not(.light) { filter: saturate(.68) brightness(1.06); box-shadow: 0 2px 0 rgba(43,49,51,.14) !important; }
.calm .btn3d.light { box-shadow: 0 1px 0 rgba(43,49,51,.1) !important; }
.calm .card { box-shadow: 0 1px 3px rgba(43,49,51,.07); }
.calm [style*="linear-gradient"] { filter: saturate(.62) brightness(1.06); }
.calm .text-2xl { font-size: 1.35rem; }

.mascot .rig.g-sway { animation: g-sway .9s ease-in-out 2; transform-origin: 50% 100%; }
.mascot .rig.g-bob { animation: g-bob .42s ease-in-out 4; }
.mascot .rig.g-nod { animation: g-nod .55s ease-in-out 3; transform-origin: 50% 100%; }
.mascot .rig.g-lean { animation: g-lean 1.5s ease-in-out 1; transform-origin: 50% 100%; }
.mascot .rig.g-hop { animation: hop .5s cubic-bezier(.3, 1.6, .5, 1) 3; }
.mascot .rig.g-jump { animation: g-jump .7s cubic-bezier(.3, 1.4, .5, 1) 2; }
.mascot .rig.g-spin { animation: g-spin 1.1s ease-in-out 1; }
.mascot .rig.g-tilt { animation: tilt 1.2s ease-in-out 1; }
.mascot .rig.g-dance { animation: g-dance .8s ease-in-out 2; transform-origin: 50% 100%; }
@keyframes g-sway { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes g-bob { 50% { transform: translateY(5%) scale(1.03, .97); } }
@keyframes g-nod { 50% { transform: rotate(3deg) translateY(2%); } }
@keyframes g-lean { 40%, 60% { transform: rotate(7deg) translateX(3%); } }
@keyframes g-jump { 45% { transform: translateY(-20%) scale(.96, 1.05); } }
@keyframes g-spin { to { transform: rotateY(360deg); } }
@keyframes g-dance { 25% { transform: rotate(-8deg) translateY(-4%); } 50% { transform: rotate(0) translateY(0); } 75% { transform: rotate(8deg) translateY(-4%); } }

.example-mark { position: relative; overflow: visible; }
.example-hand { position: absolute; right: 6px; bottom: -6px; font-size: 40px; line-height: 1; pointer-events: none; animation: exampleTap 1s ease-in-out infinite; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); z-index: 3; }
@keyframes exampleTap { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-12px) scale(1.12); } }

.melody-wrap { position: absolute; inset: 0; pointer-events: none; }
.melody-phones { position: absolute; inset: 0; width: 100%; height: 100%; }
.melody-note { position: absolute; bottom: 45%; font-size: 22px; color: #DB2777; pointer-events: none; animation: melodyNote 2s ease-out forwards; z-index: 2; }
@keyframes melodyNote { from { transform: translateY(0) rotate(-8deg); opacity: 1; } to { transform: translateY(-90px) rotate(14deg); opacity: 0; } }
.gtr { position: relative; width: 100%; height: 300px; border-radius: 28px; overflow: hidden; touch-action: none; user-select: none; background: radial-gradient(circle at 50% 50%, #3B2314 0 62px, #B45309 64px, #D97706 72%, #92400E 100%); box-shadow: inset 0 0 0 6px #78350F, 0 6px 0 rgba(0,0,0,.14); }
.gtr-string { position: absolute; left: 0; right: 0; height: 50px; display: flex; align-items: center; padding: 0 10px; }
.gtr-string::after { content: ''; flex: 1; height: var(--t, 3px); background: linear-gradient(#FEF3C7, #A16207); border-radius: 3px; transform-origin: center; }
.gtr-string.plucked::after { animation: gtrShake .28s linear; }
.gtr-name { position: absolute; left: 10px; color: #FEF3C7; font-weight: 700; font-size: 13px; background: rgba(0,0,0,.45); border-radius: 999px; padding: 0 7px; }
@keyframes gtrShake { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(-3px); } 75% { transform: translateY(3px); } }
.kit { width: 100%; touch-action: none; user-select: none; }
.kit [data-pad] { cursor: pointer; transform-box: fill-box; transform-origin: center; }
.kit [data-pad].hit { animation: kitHit .16s ease-out; }
.kit text { font: 700 13px 'Leora Digits', Fredoka, sans-serif; fill: #2B3133; pointer-events: none; }
@keyframes kitHit { 0% { transform: scale(1); } 40% { transform: scale(.94); filter: brightness(1.25); } 100% { transform: scale(1); } }

.gtr.krar { background: radial-gradient(ellipse 34% 62% at 14% 50%, #5B3A1E 0 96%, transparent 100%), linear-gradient(90deg, #E7D3B1 0 27%, #8B5A2B 27.5%, #A16207 100%); box-shadow: inset 0 0 0 6px #5B3A1E, 0 6px 0 rgba(0,0,0,.14); }
.mix-slot { width: 72px; height: 72px; border-radius: 999px; background: #F1EDE6; display: grid; place-items: center; flex-shrink: 0; }
.mix-slot.big { width: 110px; height: 110px; }

#app.full-app { max-width: none !important; width: 100% !important; left: 0 !important; right: 0 !important; margin: 0 !important; transform: none !important; border-radius: 0 !important; }

.book-frame { position: relative; overflow: hidden; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: 100%; background: #111827; backface-visibility: hidden; }
.book-frame.shake { animation: bookShake .5s ease-in-out 3; }
.book-pic { display: block; width: 100%; height: 100%; object-fit: cover; }
.book-pic.drift { animation: bookDrift 16s ease-in-out infinite alternate; }
.book-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.book-bit { position: absolute; bottom: 8%; color: #fff; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.55); animation: bookRise 2.7s ease-out forwards; }
.book-bit.fall { bottom: auto; top: 12%; animation-name: bookFall; }
@keyframes bookDrift { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.05) translate(-1%, -1%); } }
@keyframes bookShake { 0%, 100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-5px) rotate(-.5deg); } 40% { transform: translateX(5px) rotate(.5deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes bookRise { from { transform: translateY(0) scale(.7); opacity: 0; } 15% { opacity: .95; } to { transform: translateY(-150px) scale(1.15) rotate(10deg); opacity: 0; } }
@keyframes bookFall { from { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } to { transform: translateY(150px); opacity: 0; } }

.book-screen { position: relative; }
@media (min-width: 600px), (orientation: landscape) { .book-hint { display: none; } }
@media (max-height: 520px) and (orientation: landscape) {
  .book-top { position: absolute; top: 4px; left: 0; z-index: 3; padding: 4px 8px; width: 96px; }
  .book-top > div { display: none; }
  .book-bar { position: absolute; top: 0; bottom: 0; right: 8px; z-index: 3; width: 112px; padding: 8px 0; flex-direction: column; justify-content: center; }
  .book-bar button:not(.icon-btn) { flex: none; width: 100%; font-size: 13px; white-space: normal; padding: 8px 4px; }
  .book-screen .book-frame { border-radius: 8px; }
}

.lesson-tight { gap: 8px; }
.lesson-tight > .card { padding-top: 8px; padding-bottom: 8px; }
.lesson-tight > .card.min-h-\[140px\] { min-height: 96px; }
.lesson-tight .tile { min-height: 64px; padding: 6px; }
.lesson-tight .text-xl { font-size: 1.1rem; }
.lesson-tight .text-2xl { font-size: 1.3rem; }

.premium-veil { position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; display: flex; align-items: flex-start; justify-content: flex-end; padding: 8px; background: rgba(71, 85, 105, .46); -webkit-backdrop-filter: grayscale(1); backdrop-filter: grayscale(1); }
.premium-veil.round { border-radius: 9999px; align-items: flex-start; justify-content: flex-start; padding: 2px; }
