/* Fredoka (SIL Open Font License), self-hosted so it works offline. */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/fredoka-hebrew.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/fredoka-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/fredoka-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --ink: #2b2350; --mute: #7a7399; --card: #fff; --pri: #6c4dff; --pri-d: #4b2fd6;
  --sun: #ffd23f; --ok: #22c55e; --bad: #ff5d73; --sky1: #5b3df5; --sky2: #29b6f6;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: 'Fredoka', 'Arial Rounded MT Bold', 'Arial Hebrew', system-ui, sans-serif;
  color: var(--ink); background: linear-gradient(160deg, var(--sky1), var(--sky2));
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
.en { font-family: 'Fredoka', 'Arial Rounded MT Bold', system-ui, sans-serif; unicode-bidi: isolate; }
#app { max-width: 480px; height: 100dvh; margin: 0 auto; position: relative; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
#toasts { position: fixed; top: 12px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; }
.toast { background: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 600; box-shadow: 0 8px 24px #0004; animation: toast 3s forwards; }
@keyframes toast { 0% { transform: translateY(-60px) scale(.8); opacity: 0 } 10%, 85% { transform: none; opacity: 1 } 100% { transform: translateY(-40px); opacity: 0 } }

.screen { height: 100%; display: flex; flex-direction: column; animation: enter .3s ease-out; padding-top: env(safe-area-inset-top); }
@keyframes enter { from { opacity: 0; transform: translateY(14px) } }

/* ---------- mascot ---------- */
.owl { width: 64px; height: 64px; flex: none; transform-origin: 50% 90%; animation: bob 2.6s ease-in-out infinite; }
.owl.big { width: 130px; height: 130px; }
.owl .lid { transform-origin: 50% 54px; animation: blink 4s infinite; }
.owl .wing { transform-origin: 50px 45px; }
.owl.happy { animation: jump .6s ease-out; }
.owl.happy .wl { animation: flapL .15s 4 alternate; } .owl.happy .wr { animation: flapR .15s 4 alternate; }
.owl.sad { animation: sad .7s ease-in-out; }
@keyframes bob { 50% { transform: translateY(-4px) } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(0) } 95% { transform: scaleY(1) } }
@keyframes jump { 30% { transform: translateY(-18px) scale(1.08, .95) } 60% { transform: translateY(0) scale(.95, 1.05) } }
@keyframes flapL { to { transform: rotate(-10deg) } } @keyframes flapR { to { transform: rotate(10deg) } }
@keyframes sad { 30% { transform: rotate(-10deg) translateY(3px) } 70% { transform: rotate(8deg) translateY(3px) } }

/* ---------- home ---------- */
.home-head { padding: 12px 16px 6px; color: #fff; display: flex; align-items: center; gap: 10px; }
.home-head h1 { font-size: 22px; margin: 0; flex: 1; line-height: 1.1; text-shadow: 0 2px 0 #0003; }
.home-head h1 small { display: block; font-size: 13px; font-weight: 500; opacity: .85; }
.chips { display: flex; gap: 6px; padding: 4px 16px 8px; flex-wrap: wrap; }
.chip { background: #ffffff2e; color: #fff; border-radius: 99px; padding: 5px 12px; font-weight: 600; font-size: 15px; backdrop-filter: blur(6px); white-space: nowrap; }
.chip.btn { margin-inline-start: auto; }
.tabs { display: flex; gap: 6px; padding: 0 12px; }
.tab { flex: 1; padding: 10px 4px; border-radius: 16px 16px 0 0; background: #ffffff38; color: #fff; font-weight: 600; font-size: 16px; }
.tab.on { background: #f4f1ff; color: var(--pri-d); }
.panel { flex: 1; overflow-y: auto; background: #f4f1ff; border-radius: 0; padding: 16px 14px calc(24px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }

.map { position: relative; margin: -16px -14px -24px; background: linear-gradient(#8fd3ff, #c8f0ff 45%, #b9f3d0); overflow: hidden; direction: ltr; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cloud { position: absolute; font-size: 44px; opacity: .85; animation: drift 26s linear infinite; }
@keyframes drift { from { transform: translateX(-90px) } to { transform: translateX(520px) } }
.node { position: absolute; width: 150px; margin-left: -75px; margin-top: -48px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.node .disc { width: 88px; height: 88px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 46px; box-shadow: 0 6px 0 #0002, 0 0 0 5px var(--c); position: relative; transition: transform .1s; }
.node:active .disc { transform: translateY(4px); box-shadow: 0 2px 0 #0002, 0 0 0 5px var(--c); }
.node .ico { position: absolute; right: -10px; bottom: -6px; font-size: 30px; filter: drop-shadow(0 2px 2px #0004); }
.node .nm { background: var(--c); color: #fff; font-weight: 700; padding: 2px 12px; border-radius: 99px; margin-top: 6px; font-size: 16px; direction: rtl; box-shadow: 0 3px 0 #0002; }
.node .st { font-size: 15px; letter-spacing: 1px; filter: drop-shadow(0 1px 1px #0003); }
.node.locked .disc { filter: grayscale(1); opacity: .65; } .node.locked .nm { background: #9aa3b5; }
.node.cur .disc { animation: pulse 1.4s infinite; }
.node .plane { position: absolute; top: -34px; font-size: 32px; animation: bob 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 6px 0 #0002, 0 0 0 5px var(--c), 0 0 0 16px #fff8 } }

.sec { background: #fff; border-radius: 22px; padding: 14px; margin-bottom: 14px; box-shadow: 0 4px 0 #dcd5ff; }
.sec h2 { margin: 0 0 4px; font-size: 19px; } .sec p { margin: 0 0 10px; color: var(--mute); font-size: 14px; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act { background: var(--bg, #efeaff); border-radius: 16px; padding: 12px 8px; font-weight: 600; font-size: 16px; min-height: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 4px 0 #0000001c; }
.act:active { transform: translateY(3px); box-shadow: 0 1px 0 #0000001c; }
.act b { font-size: 26px; line-height: 1; }
.act.wide { grid-column: 1 / -1; background: linear-gradient(90deg, #ffb703, #ff7a59); color: #fff; font-size: 19px; }
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stk { background: #fff; border-radius: 20px; padding: 12px 4px; text-align: center; box-shadow: 0 4px 0 #dcd5ff; font-size: 13px; font-weight: 600; }
.stk b { display: block; font-size: 46px; line-height: 1.15; } .stk.off b { filter: grayscale(1) brightness(1.6); opacity: .35; } .stk.off { color: var(--mute); }
.stk.on { animation: wiggle 3s ease-in-out infinite; } @keyframes wiggle { 50% { transform: rotate(-3deg) } }

.wl-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 6px; border-bottom: 1px solid #eee9ff; text-align: start; font-size: 17px; }
.wl-row .en { font-size: 21px; font-weight: 600; flex: 1; text-align: left; } .wl-row i { font-style: normal; font-size: 22px; }
.wl-row .he { color: var(--mute); }

/* ---------- play frame ---------- */
.play { background: #f4f1ff; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 6px; }
.topbar .x { width: 40px; height: 40px; border-radius: 50%; background: #e4dcff; font-size: 18px; font-weight: 700; color: var(--pri-d); flex: none; }
.bar { flex: 1; height: 16px; background: #e4dcff; border-radius: 99px; overflow: hidden; direction: ltr; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #22c55e, #a3e635); border-radius: 99px; transition: width .4s; }
.topbar .chip { background: #fff; color: var(--ink); box-shadow: 0 2px 0 #dcd5ff; }
.guide { display: flex; align-items: center; gap: 8px; padding: 2px 12px 8px; min-height: 76px; }
.bubble { background: #fff; border-radius: 18px; padding: 10px 14px; font-size: 16px; font-weight: 500; flex: 1; position: relative; box-shadow: 0 3px 0 #dcd5ff; line-height: 1.3; }
.combo { font-weight: 700; color: #ff7a00; font-size: 18px; min-width: 44px; text-align: center; } .combo.hit { animation: jump .4s; }
.stage { flex: 1; overflow-y: auto; padding: 4px 14px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }

.prompt { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bigspk { width: 110px; height: 110px; border-radius: 50%; background: linear-gradient(145deg, #8f73ff, var(--pri-d)); color: #fff; font-size: 52px; box-shadow: 0 8px 0 #3a22b0; animation: pulse2 1.6s infinite; }
.bigspk:active { transform: translateY(5px); box-shadow: 0 3px 0 #3a22b0; }
@keyframes pulse2 { 50% { transform: scale(1.06) } }
.hint { color: var(--mute); font-size: 14px; }
.word-btn { background: #fff; border-radius: 22px; padding: 16px 22px; font-size: 34px; font-weight: 600; box-shadow: 0 5px 0 #dcd5ff; max-width: 100%; line-height: 1.2; }
.word-btn.long { font-size: 24px; } .word-btn i { font-style: normal; font-size: .6em; margin-left: 8px; }
.q-he { font-size: 26px; font-weight: 700; text-align: center; background: #fff; padding: 12px 20px; border-radius: 20px; box-shadow: 0 5px 0 #dcd5ff; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { background: #fff; border-radius: 18px; padding: 14px 12px; font-size: 21px; font-weight: 600; min-height: 56px; box-shadow: 0 5px 0 #d5ccff; border: 2px solid #e4dcff; transition: transform .08s; }
.opt:active { transform: translateY(3px); box-shadow: 0 2px 0 #d5ccff; }
.opt.right { background: #dcfce7; border-color: var(--ok); box-shadow: 0 5px 0 #86efac; }
.opt.wrong { background: #ffe4e8; border-color: var(--bad); box-shadow: 0 5px 0 #fda4af; animation: shake .4s; }
.locked .opt { pointer-events: none; }
@keyframes shake { 20%, 60% { transform: translateX(-8px) } 40%, 80% { transform: translateX(8px) } }

/* balloons */
.skin-balloon .opts { flex-direction: row; justify-content: space-around; align-items: center; flex: 1; min-height: 240px; padding-bottom: 50px; }
.skin-balloon .opt { width: 30%; max-width: 120px; aspect-ratio: .84; border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%; color: #fff; border: 0; font-size: 26px; padding: 0 0 8px; position: relative; text-shadow: 0 2px 0 #0003; animation: float 3s ease-in-out infinite alternate; box-shadow: inset -10px -12px 0 #0000001f, inset 8px 10px 0 #ffffff40; }
.skin-balloon .opt::after { content: ''; position: absolute; top: 100%; left: 50%; width: 2px; height: 46px; background: #0003; }
.skin-balloon .o0 { background: #ff5d8f; } .skin-balloon .o1 { background: #29b6f6; animation-delay: -1s; margin-top: 50px; } .skin-balloon .o2 { background: #ffb703; animation-delay: -2s; }
.skin-balloon .opt.right { outline: 5px solid var(--ok); outline-offset: 3px; }
.skin-balloon .opt.wrong { filter: grayscale(.8); animation: shake .4s; }
.skin-balloon .opt.chosen { animation: pop .35s forwards; outline: 0; }
@keyframes float { from { transform: translateY(8px) rotate(-2deg) } to { transform: translateY(-14px) rotate(2deg) } }
@keyframes pop { 60% { transform: scale(1.35); opacity: 1 } 100% { transform: scale(1.7); opacity: 0 } }

/* falling words */
.skin-fall .opts { position: relative; flex: 1; min-height: 320px; overflow: hidden; border-radius: 22px; background: linear-gradient(#cfe8ff, #efe9ff); display: block; }
.skin-fall .opt { position: absolute; width: 31%; top: -22%; padding: 12px 2px; font-size: 19px; animation: fall 8s linear infinite; border-color: #fff; }
.skin-fall .o0 { left: 1.5%; } .skin-fall .o1 { left: 34.5%; animation-delay: -2.7s; } .skin-fall .o2 { left: 67.5%; animation-delay: -5.3s; }
.skin-fall .locked .opt, .skin-fall .opts.locked .opt { animation-play-state: paused; }
@keyframes fall { to { top: 104% } }

/* chat */
.skin-chat .prompt { align-items: stretch; background: #e7f6e9; border-radius: 22px; padding: 12px; gap: 8px; direction: ltr; min-height: 150px; justify-content: flex-end; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 20px; font-weight: 500; box-shadow: 0 2px 0 #0001; animation: enter .25s; }
.msg.in { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; } .msg.out { align-self: flex-end; background: #c6f7c3; border-bottom-right-radius: 4px; }
.msg.old { opacity: .55; font-size: 16px; }
.msg-who { font-size: 13px; color: var(--mute); align-self: flex-start; }
.skin-chat .opt { background: #c6f7c3; border-color: #9be29a; box-shadow: 0 5px 0 #8fd68d; font-size: 19px; }

/* reading */
.passage { background: #fffbea; border: 2px dashed #f2cf63; border-radius: 20px; padding: 12px 14px; direction: ltr; text-align: left; font-size: 20px; line-height: 1.55; align-self: stretch; position: relative; }
.passage .av { float: right; font-size: 40px; margin-left: 8px; }
.sent { border-radius: 8px; padding: 1px 3px; } .sent.tap:active, .sent.on { background: #ffe58a; }

/* wand */
.wand { align-items: center; text-align: center; }
.big-emoji { font-size: 84px; line-height: 1.1; } .pop-in { animation: popin .5s; }
@keyframes popin { from { transform: scale(0) rotate(-90deg) } 70% { transform: scale(1.25) } }
.wand-word { background: #fff; border-radius: 26px; padding: 12px 26px; font-size: 64px; font-weight: 700; box-shadow: 0 6px 0 #dcd5ff; letter-spacing: 2px; }
.wand-word .magic-e { display: inline-block; width: 0; opacity: 0; overflow: hidden; color: #ff9f1c; transition: width .4s, opacity .4s; vertical-align: bottom; }
.wand-word.long .magic-e { width: .62em; opacity: 1; animation: sparkle 1s 2; }
.wand-word .vowel { color: var(--pri); transition: color .4s; } .wand-word.long .vowel { color: #ef233c; text-decoration: overline; text-decoration-thickness: 5px; }
@keyframes sparkle { 50% { text-shadow: 0 0 18px #ffd23f, 0 0 30px #ff9f1c; transform: translateY(-6px) } }
.rule { min-height: 44px; font-size: 16px; font-weight: 500; color: var(--pri-d); padding: 0 6px; }
.cmp { display: flex; gap: 12px; justify-content: center; }
.cmp button { background: #fff; border-radius: 18px; padding: 10px 16px; font-size: 24px; font-weight: 600; box-shadow: 0 4px 0 #dcd5ff; }
.cta { background: linear-gradient(180deg, #7f63ff, var(--pri-d)); color: #fff; font-size: 21px; font-weight: 700; padding: 14px 28px; border-radius: 20px; box-shadow: 0 6px 0 #3420a8; align-self: center; min-width: 200px; }
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 #3420a8; }
.cta.magic { background: linear-gradient(180deg, #ffb703, #fb8500); box-shadow: 0 6px 0 #b85f00; animation: pulse2 1.4s infinite; }
.cta.ghost { background: #fff; color: var(--pri-d); box-shadow: 0 5px 0 #dcd5ff; }

/* memory */
.mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; flex: 1; align-content: center; }
.mem { aspect-ratio: 1 / .92; perspective: 600px; }
.mem-in { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform .35s; }
.mem.open .mem-in { transform: rotateY(180deg); }
.mem-back, .mem-front { position: absolute; inset: 0; border-radius: 18px; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-weight: 600; padding: 4px; text-align: center; }
.mem-back { background: linear-gradient(145deg, #8f73ff, var(--pri-d)); font-size: 34px; box-shadow: 0 5px 0 #3a22b0; }
.mem-front { background: #fff; transform: rotateY(180deg); font-size: 19px; box-shadow: 0 5px 0 #dcd5ff; border: 3px solid #ffd23f; }
.mem-front.is-en { font-size: 22px; border-color: #29b6f6; }
.mem.done .mem-front { background: #dcfce7; border-color: var(--ok); } .mem.done { animation: jump .5s; }

/* id card */
.idcard { background: #fff; border-radius: 20px; border: 3px solid var(--pri); padding: 10px 12px; direction: ltr; text-align: left; position: relative; box-shadow: 0 5px 0 #dcd5ff; }
.idcard h3 { margin: 0 0 4px; font-size: 15px; color: var(--pri-d); letter-spacing: 1px; display: flex; justify-content: space-between; align-items: center; }
.id-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 18px; }
.id-label { width: 86px; font-weight: 600; color: var(--mute); }
.slot { flex: 1; min-height: 34px; border-bottom: 2px dashed #c9bfff; text-align: left; font-size: 19px; font-weight: 600; padding: 2px 6px; border-radius: 8px 8px 0 0; }
.slot.act-slot { background: #fff4c2; border-bottom-color: #ffb703; animation: pulse3 1s infinite; } .slot.ok { color: #15803d; border-bottom-style: solid; border-bottom-color: var(--ok); }
@keyframes pulse3 { 50% { background: #ffe58a } }
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; direction: ltr; background: #e9e3ff; border-radius: 18px; padding: 10px; }
.bank button { background: #fff; border-radius: 14px; padding: 8px 14px; font-size: 19px; font-weight: 600; box-shadow: 0 4px 0 #cfc5ff; min-width: 46px; }
.bank button.shake { animation: shake .4s; background: #ffe4e8; }
.stamp { position: absolute; right: 10px; bottom: 10px; border: 4px solid #e11d48; color: #e11d48; font-weight: 700; padding: 4px 10px; border-radius: 10px; transform: rotate(-14deg); font-size: 20px; animation: stampin .4s cubic-bezier(.2, 2, .4, 1); background: #fff9; }
@keyframes stampin { from { transform: scale(3) rotate(-14deg); opacity: 0 } }

/* my passport form */
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; }
.form label span { width: 96px; flex: none; }
.form input { flex: 1; min-width: 0; font: inherit; font-size: 19px; padding: 9px 12px; border-radius: 14px; border: 2px solid #d5ccff; direction: ltr; text-align: left; user-select: text; -webkit-user-select: text; }
.step { display: flex; align-items: center; gap: 10px; direction: ltr; } .step button { width: 40px; height: 40px; border-radius: 50%; background: #e4dcff; font-size: 22px; font-weight: 700; } .step b { min-width: 28px; text-align: center; font-size: 21px; }
.avs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; } .avs button { font-size: 32px; width: 52px; height: 52px; border-radius: 50%; background: #fff; } .avs button.on { background: #ffd23f; box-shadow: 0 0 0 3px var(--pri); }
.say-row { display: block; width: 100%; background: #fff; border-radius: 14px; padding: 10px 12px; font-size: 19px; text-align: left; direction: ltr; box-shadow: 0 3px 0 #dcd5ff; }

/* overlays */
.intro, .result { align-items: center; justify-content: center; text-align: center; color: #fff; gap: 14px; padding: 20px; }
.intro .flag { font-size: 120px; animation: popin .6s; } .intro h2 { font-size: 30px; margin: 0; text-shadow: 0 3px 0 #0003; }
.intro .fly { font-size: 60px; animation: flyby 1.5s ease-in-out; }
@keyframes flyby { from { transform: translateX(-70vw) rotate(-10deg) } to { transform: translateX(70vw) rotate(10deg) } }
.result { overflow-y: auto; justify-content: flex-start; padding-top: 30px; }
.result h2 { font-size: 34px; margin: 0; text-shadow: 0 3px 0 #0003; }
.stars { font-size: 60px; display: flex; gap: 6px; direction: ltr; } .stars span { animation: popin .5s backwards; } .stars span:nth-child(2) { animation-delay: .3s; transform: translateY(-12px); } .stars span:nth-child(3) { animation-delay: .6s; }
.stars .off { filter: grayscale(1); opacity: .35; }
.score { font-size: 64px; font-weight: 700; background: #fff; color: var(--pri-d); border-radius: 50%; width: 150px; height: 150px; display: grid; place-items: center; box-shadow: 0 8px 0 #0002; }
.rcard { background: #fff; color: var(--ink); border-radius: 20px; padding: 12px 16px; width: 100%; font-size: 17px; font-weight: 500; }
.rcard .new { font-size: 56px; display: block; animation: popin .7s .8s backwards; }
.rcard .wl-row:last-child { border: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.wl-row.rev { flex-wrap: wrap; font-size: 15px; } .wl-row.rev .en { font-size: 17px; } .wl-row.rev .he { flex-basis: 100%; order: 3; text-align: start; }
#toasts { top: 64px; }
.stamp.top { top: 6px; bottom: auto; right: 64px; }
.welcome .rcard { font-size: 18px; } .welcome .form label { justify-content: center; } .welcome .form label span { width: auto; font-size: 20px; }
.home-head h1 small .en { font-weight: 700; }

/* ---------- fox v2 ---------- */
.owl { width: 74px; height: 74px; cursor: pointer; }
.owl.big { width: 160px; height: 160px; }
.owl .tail { transform-origin: 80px 102px; animation: wag .9s ease-in-out infinite alternate; }
.owl .scarf-end { transform-origin: 44px 94px; animation: wag 1.3s ease-in-out infinite alternate; }
.owl .ear-r { transform-origin: 84px 42px; animation: twitchR 5s infinite; }
.owl .ear-l { transform-origin: 36px 42px; animation: twitchL 7s 2s infinite; }
.owl .eyes { transform-origin: 60px 57px; animation: blink2 4.2s infinite; }
.owl .glint { animation: glint 3.5s infinite; }
.owl .eyes-happy, .owl .mouth-open, .owl .brows { display: none; }
.owl.happy, .owl.party { animation: jump .55s ease-out 2; }
.owl.party { animation: jump .7s ease-out infinite; }
.owl.happy .eyes, .owl.party .eyes, .owl.happy .mouth, .owl.party .mouth { display: none; }
.owl.happy .eyes-happy, .owl.party .eyes-happy, .owl.happy .mouth-open, .owl.party .mouth-open { display: block; }
.owl.happy .tail, .owl.party .tail { animation-duration: .16s; }
.owl.sad .brows { display: block; }
.owl.sad .ear-l { animation: none; transform: rotate(-24deg); } .owl.sad .ear-r { animation: none; transform: rotate(24deg); }
.owl.sad .tail { animation: none; transform: rotate(-22deg); }
@keyframes wag { from { transform: rotate(-8deg) } to { transform: rotate(14deg) } }
@keyframes twitchR { 0%, 88%, 100% { transform: none } 92% { transform: rotate(14deg) } 96% { transform: rotate(-5deg) } }
@keyframes twitchL { 0%, 88%, 100% { transform: none } 92% { transform: rotate(-14deg) } 96% { transform: rotate(5deg) } }
@keyframes blink2 { 0%, 92%, 100% { transform: none } 95% { transform: scaleY(.08) } }
@keyframes glint { 0%, 80%, 100% { opacity: .9 } 90% { opacity: .1 } }
.node .plane { top: -40px; font-size: 30px; background: #fff; border-radius: 50%; width: 46px; height: 46px; display: grid; place-items: center; box-shadow: 0 4px 0 #0002, 0 0 0 3px var(--c); z-index: 2; }
.intro .fly { white-space: nowrap; direction: ltr; }

/* ---------- foxy tricks ---------- */
.owl { position: relative; z-index: 5; } .owl svg { display: block; overflow: visible; }
.owl .gog { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); } .owl.pilot .gog { transform: translateY(27px); }
.owl.tickle svg { animation: tickle .12s linear 10; }
.owl.spin svg { animation: spin .8s ease-in-out; }
.owl.flip svg { animation: flip .9s ease-in-out; }
.owl.boing svg { animation: boing .7s ease-out; transform-origin: 50% 100%; }
.owl.dizzy svg { animation: dizzy 2.2s ease-in-out; } .owl.dizzy .eyes { animation: spin .5s linear infinite; }
@keyframes tickle { 0% { transform: rotate(-9deg) } 50% { transform: rotate(9deg) } 100% { transform: rotate(-9deg) } }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes flip { 30% { transform: translateY(-26px) rotate(0) } 70% { transform: translateY(-26px) rotate(-360deg) } 100% { transform: rotate(-360deg) } }
@keyframes boing { 20% { transform: scale(1.25, .7) } 45% { transform: scale(.8, 1.3) translateY(-14px) } 70% { transform: scale(1.1, .9) } }
@keyframes dizzy { 20% { transform: rotate(-16deg) } 40% { transform: rotate(14deg) } 60% { transform: rotate(-10deg) } 80% { transform: rotate(6deg) } }
.fox-say { position: absolute; top: 96%; right: 0; width: max-content; max-width: 230px; background: #fff; color: var(--ink); border-radius: 16px; border-start-end-radius: 16px; border-top-right-radius: 4px; padding: 7px 12px; font-size: 15px; font-weight: 600; box-shadow: 0 5px 16px #0003; animation: sayin .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; line-height: 1.25; text-shadow: none; }
.owl.big .fox-say { right: auto; left: 50%; translate: -50% 0; border-radius: 16px; text-align: center; }
@keyframes sayin { from { scale: .4; opacity: 0 } }
.modal { position: fixed; inset: 0; background: #1a1140a6; display: grid; place-items: center; z-index: 70; padding: 24px; animation: fadein .2s; backdrop-filter: blur(3px); }
.modal-card { background: #fff; border-radius: 28px; padding: 22px 20px; width: 100%; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; animation: sayin .3s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 20px 50px #0006; }
.modal-card .owl { width: 96px; height: 96px; }
.modal-card h3 { margin: 0; font-size: 24px; } .modal-card p { margin: 0 0 6px; color: var(--mute); font-size: 16px; }
.modal-card .cta { width: 100%; }
@keyframes fadein { from { opacity: 0 } }

/* ---------- country outfits ---------- */
.owl .hat { display: none; }
.owl[data-c="pilot"] .hat-pilot, .owl[data-c="il"] .hat-il, .owl[data-c="us"] .hat-us, .owl[data-c="pe"] .hat-pe, .owl[data-c="ru"] .hat-ru, .owl[data-c="et"] .hat-et, .owl[data-c="jp"] .hat-jp, .owl[data-c="boss"] .hat-boss { display: block; }
.play { position: relative; }
.wm { position: absolute; left: -10px; bottom: -10px; font-size: 190px; line-height: 1; opacity: .09; pointer-events: none; z-index: 0; }
.play .stage, .play .guide, .play .topbar { position: relative; z-index: 1; }
.play.themed .bubble { border-inline-start: 6px solid var(--c); }
.play.themed .topbar .x { background: color-mix(in srgb, var(--c) 22%, #fff); color: var(--c); }
.intro .flag { font-size: 64px; } .intro .hi { background: #ffffff2e; border-radius: 99px; padding: 8px 18px; font-size: 18px; font-weight: 600; }
.intro .hi .en { font-size: 22px; font-weight: 700; }
.stk.fit { font: inherit; font-size: 13px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stk.fit .owl { width: 70px; height: 70px; pointer-events: none; animation: none; } .stk.fit.off .owl { filter: grayscale(1) brightness(1.5); opacity: .4; }
.stk.fit.cur { box-shadow: 0 0 0 4px var(--pri), 0 4px 0 #dcd5ff; }
/* ---------- compact id card (no scrolling) ---------- */
.id-rows { display: flex; flex-wrap: wrap; column-gap: 12px; }
.id-rows .id-row { width: 100%; } .id-rows .id-row.half { width: calc(50% - 6px); } .id-row.half .id-label { width: auto; }
.stage.idc { gap: 8px; }
.idc .passage { font-size: 17px; line-height: 1.38; padding: 8px 12px; } .idc .passage .av { font-size: 30px; }
.idc .idcard { padding: 8px 12px; } .idc .id-row { font-size: 16px; padding: 1px 0; } .idc .id-label { width: 62px; }
.idc .slot { min-height: 30px; font-size: 17px; }
.idc .bank { padding: 8px; gap: 6px; } .idc .bank button { padding: 6px 12px; font-size: 17px; }
@media (max-height: 700px) {
  .guide { min-height: 60px; padding-bottom: 4px; } .play .owl { width: 56px; height: 56px; } .bubble { font-size: 15px; padding: 8px 12px; }
  .stage { gap: 8px; } .bigspk { width: 88px; height: 88px; font-size: 42px; } .opt { min-height: 50px; padding: 10px; font-size: 19px; }
  .passage { font-size: 18px; line-height: 1.4; padding: 8px 12px; } .q-he { font-size: 22px; padding: 8px 16px; }
  .big-emoji { font-size: 64px; } .wand-word { font-size: 52px; padding: 8px 22px; }
}
/* ---------- install pill ---------- */
.install { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; display: flex; background: #fff; border-radius: 99px; box-shadow: 0 8px 24px #0005; z-index: 20; animation: sayin .4s 1s backwards; white-space: nowrap; }
.install .go { padding: 12px 6px 12px 18px; font-weight: 700; font-size: 16px; color: var(--pri-d); } .install .no { padding: 12px 14px; color: var(--mute); font-size: 15px; }
.screen { position: relative; }
.steps { text-align: start; margin: 0 0 6px; padding-inline-start: 22px; font-size: 16px; line-height: 1.5; }
.id-rows .id-row.half { order: 2; }
.home-head h1 small.cls { font-size: 12px; opacity: .75; margin-top: 2px; }

/* ---------- subjects and the skill ladder ---------- */
.subj { display: flex; gap: 8px; padding: 0 14px 10px; }
.subj button { flex: 1; padding: 9px 6px; border-radius: 16px; background: #ffffff2e; color: #fff; font-weight: 700; font-size: 17px; }
.subj button.on { background: #fff; color: var(--pri-d); box-shadow: 0 4px 0 #0002; }
.map { overflow: clip; }
.go-card { position: sticky; top: 8px; z-index: 6; margin: 10px 12px 0; width: calc(100% - 24px); background: #fff; border-radius: 20px; padding: 10px 14px; box-shadow: 0 6px 0 #0002; direction: rtl; text-align: start; display: flex; align-items: center; gap: 12px; }
.go-card > b { font-size: 36px; line-height: 1; }
.go-card span { flex: 1; display: flex; flex-direction: column; font-size: 15px; color: var(--mute); font-weight: 500; }
.go-card span b { font-size: 19px; color: var(--pri-d); }
.go-card i { font-style: normal; font-size: 24px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #7f63ff, var(--pri-d)); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 4px 0 #3420a8; flex: none; }
.go-card.go:active { transform: translateY(3px); box-shadow: 0 3px 0 #0002; }
.go-card.first { flex-direction: column; align-items: stretch; gap: 8px; position: relative; top: 0; }
.go-card .row { flex-wrap: nowrap; }
.cta.sm { font-size: 16px; padding: 10px 12px; min-width: 0; flex: 1; border-radius: 16px; box-shadow: 0 4px 0 #3420a8; animation: none; }
.cta.sm.magic { box-shadow: 0 4px 0 #b85f00; } .cta.sm.ghost { box-shadow: 0 4px 0 #dcd5ff; }
.wtag { position: absolute; left: 50%; translate: -50% 0; z-index: 1; background: #fff; color: var(--c); border: 2px solid var(--c); font-weight: 700; font-size: 14px; padding: 4px 12px; border-radius: 99px; box-shadow: 0 3px 0 #0002; white-space: nowrap; direction: rtl; }
.node.sk .disc { font-size: 42px; }
.node.sk .nm { font-size: 14px; line-height: 1.2; text-align: center; border-radius: 14px; padding: 3px 10px; max-width: 150px; }
.node.sk .ico { font-size: 26px; }

/* math: big exercise, typed answer, keypad */
.big-q { font-size: 44px; font-weight: 700; background: #fff; border-radius: 22px; padding: 12px 20px; box-shadow: 0 5px 0 #dcd5ff; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; max-width: 100%; line-height: 1.15; white-space: pre-wrap; }
.big-q.long { font-size: 32px; } .big-q.xl { font-size: 22px; }
.pad-out { min-width: 1.7em; padding: 2px 12px; border-radius: 14px; background: #fff4c2; border-bottom: 4px solid #ffb703; color: var(--pri-d); text-align: center; }
.pad-out.ok { background: #dcfce7; border-color: var(--ok); color: #15803d; }
.pad-out.fix { background: #fff; outline: 3px dashed var(--ok); border-color: transparent; color: #15803d; }
.pad-out.no { background: #ffe4e8; border-color: var(--bad); color: #be123c; animation: shake .4s; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 330px; align-self: center; margin-top: auto; }
.key { background: #fff; border-radius: 16px; font-size: 27px; font-weight: 700; min-height: 56px; box-shadow: 0 4px 0 #d5ccff; border: 2px solid #e4dcff; }
.key:active { transform: translateY(3px); box-shadow: 0 1px 0 #d5ccff; }
.key.go { background: linear-gradient(180deg, #34d399, #16a34a); color: #fff; border-color: #16a34a; box-shadow: 0 4px 0 #15803d; }
.key.del { background: #efeaff; }
.pad.locked .key { pointer-events: none; opacity: .6; }
.opts.grid2 { display: grid; grid-template-columns: 1fr 1fr; }
.q-he.long { font-size: 19px; font-weight: 600; line-height: 1.4; text-align: start; }
.q-he.emo { font-size: 56px; line-height: 1.1; padding: 8px 22px; }
.skin-balloon .prompt .big-q, .skin-fall .prompt .big-q { font-size: 34px; padding: 8px 18px; }
.acts.three { grid-template-columns: repeat(3, 1fr); } .acts.three .act { min-height: 54px; }
.rcard.note { font-weight: 600; font-size: 18px; }
@media (max-height: 700px) {
  .big-q { font-size: 34px; padding: 8px 16px; } .big-q.long { font-size: 26px; } .key { min-height: 46px; font-size: 23px; } .q-he.long { font-size: 17px; }
}

/* ----- mini-games tab, tickets, "solve on paper" hint ----- */
.paper { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: #fff4c2; color: #8a5a00; font-size: 14px; font-weight: 600; }
.rcard.tix { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: linear-gradient(180deg, #fff8dc, #fff); }
.rcard.tix .new { font-size: 48px; }
.rcard.tix.dim { background: #ffffffcc; font-size: 15px; color: var(--mute); }
.tixbox { text-align: center; }
.tixbox .big { font-size: 34px; font-weight: 700; color: var(--pri-d); line-height: 1.1; }
.tixrow { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; font-size: 14px; color: var(--mute); }
.tixdots { display: flex; align-items: center; gap: 6px; direction: ltr; }
.tixdots i { width: 26px; height: 26px; border-radius: 50%; background: #e9e4ff; display: grid; place-items: center; font-style: normal; font-size: 14px; color: #fff; }
.tixdots i.on { background: var(--ok); }
.tixdots span { font-size: 24px; }
.acts.games .act { min-height: 104px; background: #fff; }
.acts.games .act b { font-size: 40px; }
.act small { font-size: 12px; font-weight: 500; color: var(--mute); }
.act.game.off { opacity: .55; filter: grayscale(.8); box-shadow: none; }
.tabs .tab { font-size: 14px; white-space: nowrap; }

/* ---------- how: step-by-step solutions (how.js) ---------- */
.how { background: var(--card); color: var(--ink); border-radius: 22px; padding: 12px 12px 14px; margin: 8px auto 0; width: 100%; max-width: 360px; box-shadow: 0 6px 0 #0002; display: flex; flex-direction: column; gap: 10px; animation: fadein .25s; overflow: hidden; }
.how-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.how-title { font-size: 20px; color: var(--pri-d); }
.how-sub { font-size: 14px; color: var(--mute); }
.how-board { direction: ltr; unicode-bidi: isolate; display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 14px; max-width: 100%; overflow: hidden;
  background-color: #fbfaff; background-image: linear-gradient(#e9e4ff 1px, transparent 1px), linear-gradient(90deg, #e9e4ff 1px, transparent 1px); background-size: 18px 18px; }
.how-grid { display: grid; justify-content: center; font-family: 'Fredoka', system-ui, sans-serif; font-weight: 600; line-height: 1; }
.how-c { position: relative; height: 1.3em; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; transition: opacity .2s; }
.how-off { visibility: hidden; }
.how-c.how-row-mk { height: 1.45em; font-size: .55em; align-items: flex-end; }
.how-m { color: #e8590c; font-weight: 700; }
.how-op { color: var(--pri-d); }
.how-c.how-row-bar, .how-c.how-bar { height: .5em; }
.how-c.how-bar::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: var(--ink); }
.how-c.how-row-head { height: 1.4em; }
.how-row-res.how-d { color: var(--pri-d); }
.how-lbl { font-size: .34em; font-weight: 600; color: var(--mute); text-align: center; line-height: 1.05; white-space: normal; height: 3.6em; padding: 0 1px; }
.how-row-num.how-d, .how-row-lbl { border-inline-end: 1px dashed #d5ccff; }
.how-x { color: var(--mute); }
.how-x::after { content: ''; position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: var(--bad); transform: rotate(-55deg); border-radius: 1px; }
.how-hi { background: #ffe58a; border-radius: 6px; box-shadow: 0 0 0 2px #ffd23f; }
.how-new { animation: how-pop .45s ease-out; color: var(--pri); }
.how-row-mk.how-new { color: #e8590c; }
@keyframes how-pop { from { transform: scale(0); opacity: 0 } 70% { transform: scale(1.3); opacity: 1 } }
.how-lines { display: flex; flex-direction: column; align-items: center; gap: .35em; font-family: 'Fredoka', system-ui, sans-serif; font-weight: 600; }
.how-line { direction: ltr; unicode-bidi: isolate; white-space: pre; max-width: 100%; }
.how-line.how-new { animation: how-pop .4s ease-out; color: var(--ink); }
.how-u { border-bottom: 3px solid var(--pri); padding-bottom: 1px; }
.how-em { color: var(--pri-d); font-weight: 700; background: #ffe58a; border-radius: 4px; padding: 0 1px; }
.how-st { text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 3px; color: var(--mute); }
.how-ans { direction: ltr; unicode-bidi: isolate; text-align: center; font-size: 22px; font-weight: 700; color: var(--ok); background: #ecfdf3; border-radius: 12px; padding: 6px 10px; }
.how-ans.how-long { font-size: 18px; }
.how-ans.how-new { animation: popin .5s; }
.how-say { position: relative; background: #f1edff; border-radius: 16px; padding: 10px 14px; font-size: 18px; line-height: 1.45; min-height: 3.2em; text-align: right; unicode-bidi: plaintext; }
.how-say::before { content: ''; position: absolute; top: -9px; right: 28px; border: 9px solid transparent; border-top: 0; border-bottom-color: #f1edff; }
.how-say.how-pop { animation: sayin .3s ease-out; }
.how-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.how-nav .how-next { min-width: 0; flex: 1; font-size: 19px; padding: 12px 16px; }
.how-end .how-next { background: linear-gradient(180deg, #34d399, #16a34a); box-shadow: 0 6px 0 #0f7a37; animation: pulse2 1.4s infinite; }
.how-cnt { font-size: 13px; color: var(--mute); min-width: 34px; text-align: center; direction: ltr; }
.how-skip { font-size: 15px; color: var(--mute); text-decoration: underline; padding: 8px 4px; }
