/* Žaismokas – styles. Soft palette, rounded shapes, tactile buttons, gentle motion. */

@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 1000; font-style: normal; font-display: swap;
  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;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 200 1000; font-style: normal; font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #FFF4E8;
  --ink: #3D3553;
  --ink-soft: #5E5675;
  --muted: #7A7290;
  --line: #EADFD3;
  --card-bg: #FFFFFF;
  --c-coral: #FF9B8C;
  --c-sun: #FFD27A;
  --c-mint: #8EDDBB;
  --c-sky: #8CCDF4;
  --c-lilac: #C4AEF0;
  --c-peach: #FFBE98;
  --c-green: #5CC48E;
  --c-green-d: #3EA673;
  --danger: #E0675A;
  --sky-top: #BFE6FF;
  --sea: #8ED3F2;
  --sea-d: #6EC1EA;

  --radius: 28px;
  --radius-sm: 18px;
  --press: 6px;
  --shadow: 0 10px 30px rgba(61, 53, 83, .10);
  --font: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --tap: clamp(80px, 11.5vmin, 96px);
  --bar: calc(var(--tap) + 20px + var(--pad-t, 12px));
  --gap: clamp(12px, 2.2vmin, 24px);
  --mascot-home: clamp(120px, 24vmin, 230px);
  --mascot-menu: clamp(130px, 28vmin, 260px);
  --mascot-small: clamp(90px, 15vmin, 140px);
  --mascot-find: clamp(110px, 22vmin, 200px);
  --mascot-big: clamp(140px, 30vmin, 260px);
  /* constant() = older iOS; env() = modern. max(12px, …) keeps a floor if inset is 0. */
  --safe-t: 0px;
  --safe-t: constant(safe-area-inset-top, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: 0px;
  --safe-b: constant(safe-area-inset-bottom, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: 0px;
  --safe-l: constant(safe-area-inset-left, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: 0px;
  --safe-r: constant(safe-area-inset-right, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --pad-t: max(12px, var(--safe-t));
  --pad-b: max(12px, var(--safe-b));
  --pad-l: max(var(--gap), var(--safe-l));
  --pad-r: max(var(--gap), var(--safe-r));
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
  font-size: 18px;
  line-height: 1.4;
}
input, textarea { user-select: text; -webkit-user-select: text; font: inherit; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 4px solid #7CC4F2; outline-offset: 3px; }
.icon { width: 1em; height: 1em; display: block; flex: none; }
.shape { width: 1em; height: 1em; display: block; }
.muted { color: var(--muted); }
.small { font-size: .88em; }
.spacer { width: var(--tap); flex: none; }
.noscript { padding: 2rem; text-align: center; font-size: 1.4rem; }

#app { position: fixed; inset: 0; overflow: hidden; background: linear-gradient(180deg, var(--sky-top) 0%, #E4F4FF 38%, var(--bg) 70%); }
#boot { position: fixed; inset: 0; display: grid; place-content: center; grid-auto-flow: column; gap: 12px; background: var(--bg); z-index: 5; }
.boot-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--c-coral); animation: bootb 1s ease-in-out infinite; }
.boot-dot:nth-child(2) { background: var(--c-sun); animation-delay: .15s; }
.boot-dot:nth-child(3) { background: var(--c-mint); animation-delay: .3s; }
@keyframes bootb { 50% { transform: translateY(-14px); } }

/* ---------- screens & transitions ---------- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: var(--pad-t) var(--pad-r) var(--pad-b) var(--pad-l);
  transition: opacity .26s ease, transform .32s cubic-bezier(.2, .9, .3, 1.2);
}
.screen-enter { opacity: 0; transform: translateY(14px) scale(.985); }
.screen-leave { opacity: 0; transform: scale(1.01); pointer-events: none; transition-duration: .22s; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); min-height: var(--tap); flex: none; position: relative; z-index: 3; }
.screen-title { margin: 0; font-size: clamp(1.4rem, 4vmin, 2.1rem); font-weight: 900; letter-spacing: .01em; display: flex; align-items: center; gap: .3em; text-align: center; color: var(--ink); }
.screen-title .icon { width: 1.1em; height: 1.1em; color: var(--ink-soft); }

/* ---------- tactile buttons ---------- */
.icon-btn {
  width: var(--tap); height: var(--tap); flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff; color: var(--ink);
  box-shadow: 0 var(--press) 0 #E3D6C8, var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
  font-size: calc(var(--tap) * .46);
}
.icon-btn.sm { --tap: 64px; font-size: 26px; box-shadow: 0 4px 0 #E3D6C8; }
.icon-btn.danger { color: var(--danger); }
.is-pressed { transform: translateY(var(--press)) scale(.98) !important; box-shadow: 0 0 0 transparent, var(--shadow) !important; }

.btn {
  min-height: 64px; padding: 0 26px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 800; font-size: 1.05rem;
  background: #fff; box-shadow: 0 5px 0 #E3D6C8;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn .icon { font-size: 1.4em; }
.btn.small { min-height: 52px; font-size: .95rem; padding: 0 18px; }
.btn-primary { background: var(--c-green); color: #fff; box-shadow: 0 5px 0 var(--c-green-d); }
.btn-soft { background: #EAF6FF; color: #2D6E99; box-shadow: 0 5px 0 #C9E5F7; }
.btn-ghost { background: #fff; color: var(--ink-soft); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 5px 0 #B94E43; }
.btn.is-pressed { transform: translateY(5px) !important; }

.chip {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: var(--tap); padding: 8px 22px 8px 8px; border-radius: 999px;
  background: #fff; box-shadow: 0 var(--press) 0 #E3D6C8, var(--shadow);
  font-weight: 800; font-size: clamp(1rem, 2.6vmin, 1.3rem); max-width: 42vw;
  transition: transform .12s ease, box-shadow .12s ease;
}
.chip-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- avatars ---------- */
.avatar {
  --sz: calc(var(--tap) - 16px);
  width: var(--sz); height: var(--sz); border-radius: 50%; flex: none;
  background: var(--av); position: relative; display: grid; place-items: center;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .08);
}
.avatar-emoji { font-size: calc(var(--sz) * .56); line-height: 1; }
.avatar-shape { position: absolute; right: -2px; bottom: -2px; width: calc(var(--sz) * .34); height: calc(var(--sz) * .34); border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--ink-soft); font-size: calc(var(--sz) * .2); box-shadow: 0 2px 4px rgba(0,0,0,.12); }
.avatar.xl { --sz: clamp(110px, 20vmin, 170px); }

/* ---------- mascot ---------- */
.mascot { width: var(--size); aspect-ratio: 210 / 190; position: relative; flex: none; cursor: pointer; }
.mascot-svg { width: 100%; height: 100%; overflow: visible; display: block; }
.mascot .m-body { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 3.6s ease-in-out infinite; }
.mascot .m-head { transform-box: view-box; transform-origin: 105px 120px; transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.mascot.who-taskis .m-head { transform-origin: 140px 130px; }
.mascot .m-eye-open { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.mascot .m-eye-happy, .mascot .m-eye-closed, .mascot .m-mouth-open { opacity: 0; }
/* Mouth stays a static smile always — m-mouth-open is never shown. */
.mascot .m-face { transform-box: fill-box; transform-origin: center; }
.mascot .m-arm { transform-box: fill-box; transform-origin: 50% 10%; }
.mascot .m-foot-l, .mascot .m-foot-r { transform-box: fill-box; transform-origin: center; }
.mascot .m-shadow { transform-box: fill-box; transform-origin: center; }
/* happy / correct answer: cheer hop + wave, smile stays, eyes squint */
.mascot.is-happy .m-eye-open { opacity: 0; }
.mascot.is-happy .m-eye-happy { opacity: 1; }
.mascot.is-happy .mascot-svg { animation: hop .55s cubic-bezier(.3, 1.6, .5, 1) 2; }
.mascot.is-happy .m-arm { animation: wave .3s ease-in-out 4 alternate; }
.mascot.is-happy .m-shadow { animation: shadowhop .55s ease 2; }
.mascot.is-thinking .m-head { transform: rotate(-9deg); }
.mascot.is-thinking .mascot-svg { animation: think 1.2s ease-in-out; }
.mascot.is-sleepy .m-eye-open { opacity: 0; animation: none; }
.mascot.is-sleepy .m-eye-closed { opacity: 1; }
.mascot.is-sleepy .m-head { transform: rotate(6deg) translateY(2px); }
.mascot .m-paws { opacity: 0; transform-box: view-box; transform-origin: 105px 120px; transform: translateY(26px) scale(.6); transition: opacity .2s, transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.mascot.who-taskis .m-paws { transform-origin: 160px 140px; }
.mascot.is-peekaboo .m-paws { opacity: 1; transform: none; }
.mascot.is-peekaboo .m-arm { opacity: 0; }
.mascot.is-peekaboo .m-eye-open { opacity: 0; animation: none; }
.mascot.is-peekaboo .m-eye-happy { opacity: 1; }
.mascot.is-peekaboo .m-head { transform: rotate(5deg) translateY(2px); }
/* talking: body motions only (no mouth morph). Motion class set by JS cycle. */
.mascot.is-talking.talk-hop .mascot-svg { animation: talk-hop .5s cubic-bezier(.3, 1.4, .5, 1) infinite; }
.mascot.is-talking.talk-hop .m-shadow { animation: shadowhop .5s ease infinite; }
.mascot.is-talking.talk-hop .m-body { animation: none; }
.mascot.is-talking.talk-nod .m-head { animation: talk-nod .55s ease-in-out infinite; }
.mascot.is-talking.talk-wave .m-arm { animation: talk-wave .4s ease-in-out infinite alternate; }
.mascot.is-talking.talk-stomp .m-body { animation: talk-stomp-bob .38s ease-in-out infinite; }
.mascot.is-talking.talk-stomp .m-foot-l { animation: talk-stomp-l .38s ease-in-out infinite; }
.mascot.is-talking.talk-stomp .m-foot-r { animation: talk-stomp-r .38s ease-in-out infinite; }
.mascot.is-talking.talk-stomp .m-shadow { animation: talk-stomp-shadow .38s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.018); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-10%); } }
@keyframes shadowhop { 55% { transform: scale(.7); opacity: .04; } }
@keyframes wave { from { transform: rotate(0); } to { transform: rotate(-40deg); } }
@keyframes think { 30% { transform: rotate(-4deg); } 70% { transform: rotate(3deg); } }
@keyframes talk-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-8%); } }
@keyframes talk-nod {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(8deg); }
  60% { transform: rotate(-4deg); }
}
@keyframes talk-wave { from { transform: rotate(0deg); } to { transform: rotate(-48deg); } }
@keyframes talk-stomp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px) scale(1.01); } }
@keyframes talk-stomp-l { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes talk-stomp-r { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(0); } }
@keyframes talk-stomp-shadow { 0%, 100% { transform: scale(1); opacity: .08; } 50% { transform: scale(.85); opacity: .05; } }

/* Playful praise reactions (v0.9.29 prototype). Transform/opacity only; no mouth animation.
   Wrong answers keep .is-thinking (gentle head tilt). .is-reacting beats talking motions. */
.mascot { overflow: visible; }
.mascot.is-reacting { z-index: 4; }
.mascot .m-fx {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  opacity: 0;
}
.mascot .m-star {
  position: absolute; left: 50%; top: 28%;
  width: calc(var(--size) * .13); height: calc(var(--size) * .13);
  margin-left: calc(var(--size) * -.065); margin-top: calc(var(--size) * -.065);
  color: #FFC24D;
  transform-origin: 50% 50%;
  opacity: 0;
  --a: 0deg;
}
.mascot .m-star:nth-child(1) { --a: 0deg; }
.mascot .m-star:nth-child(2) { --a: 90deg; }
.mascot .m-star:nth-child(3) { --a: 180deg; }
.mascot .m-star:nth-child(4) { --a: 270deg; }
.mascot .m-star .shape { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 0 rgba(61, 53, 83, .15)); }

/* common: joyful squint, no open mouth */
.mascot.is-kulverstukas .m-eye-open,
.mascot.is-nugara .m-eye-open,
.mascot.is-sukinys .m-eye-open,
.mascot.is-sokis .m-eye-open,
.mascot.is-zvaigzdutes .m-eye-open,
.mascot.is-mojave .m-eye-open,
.mascot.is-slaptukas .m-eye-open { opacity: 0; animation: none; }
.mascot.is-kulverstukas .m-eye-happy,
.mascot.is-nugara .m-eye-happy,
.mascot.is-sukinys .m-eye-happy,
.mascot.is-sokis .m-eye-happy,
.mascot.is-zvaigzdutes .m-eye-happy,
.mascot.is-mojave .m-eye-happy,
.mascot.is-slaptukas .m-eye-happy { opacity: 1; }
.mascot.is-reacting .m-head { transition: none; }

/* 1. Kūlverstukas — in-plane somersault with squash on takeoff and landing */
.mascot.is-reacting.is-kulverstukas .m-body {
  animation: kulverstukas 1.2s cubic-bezier(.3, 1.15, .5, 1) both;
  transform-origin: 50% 90%;
}
.mascot.is-reacting.is-kulverstukas .m-shadow { animation: kulverstukas-shadow 1.2s ease both; }
@keyframes kulverstukas {
  0% { transform: translateY(0) rotate(0deg) scale(1, 1); }
  12% { transform: translateY(6%) rotate(-18deg) scale(1.14, .82); }
  42% { transform: translateY(-92%) rotate(200deg) scale(.96, 1.08); }
  72% { transform: translateY(-18%) rotate(340deg) scale(1, 1); }
  86% { transform: translateY(6%) rotate(360deg) scale(1.14, .84); }
  100% { transform: translateY(0) rotate(360deg) scale(1, 1); }
}
@keyframes kulverstukas-shadow {
  0%, 100% { transform: scale(1); opacity: .08; }
  12%, 86% { transform: scale(1.15); opacity: .1; }
  42% { transform: scale(.4); opacity: .03; }
}

/* 2. Griuvimas ant nugaros — tiptoe, one-foot pirouette, tip onto the BACK
   (face / belly up) without sinking below the standing feet / shadow line.
   The fall pivots at the feet and is lifted in world space so the body rests
   ON the ground line. Taškis faces right, so the fall is counter-clockwise:
   spikes/back go to the ground, nose points up — never a nose-down landing. */
.mascot.is-reacting.is-nugara {
  --nugara-land: -92deg;
  --nugara-lift: -62%;
  --nugara-mid: -62%;
}
/* Taškis is drawn in profile facing right: a deeper roll and a larger lift
   keep spikes on the ground, the nose up, and the body on the standing line. */
.mascot.who-taskis.is-reacting.is-nugara {
  --nugara-land: -112deg;
  --nugara-lift: -122%;
  --nugara-mid: -88%;
}
.mascot.who-saule.is-reacting.is-nugara { --nugara-lift: -60%; --nugara-mid: -56%; }
.mascot.who-aidas.is-reacting.is-nugara { --nugara-lift: -66%; --nugara-mid: -58%; }
.mascot.who-ule.is-reacting.is-nugara { --nugara-lift: -51%; --nugara-mid: -44%; }
.mascot.who-bumba.is-reacting.is-nugara { --nugara-lift: -76%; --nugara-mid: -68%; }
.mascot.who-kvake.is-reacting.is-nugara { --nugara-lift: -58%; --nugara-mid: -52%; }
.mascot.is-reacting.is-nugara .m-body {
  animation: nugara 1.8s cubic-bezier(.32, .9, .4, 1) both;
  transform-origin: 62% 100%; /* right foot on the ground line */
}
.mascot.is-reacting.is-nugara .m-shadow { animation: nugara-shadow 1.8s ease both; }
.mascot.is-reacting.is-nugara .m-foot-l { animation: nugara-foot-l 1.8s ease both; }
.mascot.is-reacting.is-nugara .m-foot-r { animation: nugara-foot-r 1.8s ease both; }
@keyframes nugara {
  0%   { transform: translateY(0) rotate(0deg) scale(1, 1); }
  7%   { transform: translateY(0) rotate(0deg) scale(1.12, .84); }            /* squash */
  14%  { transform: translateY(-6%) rotate(-6deg) scale(.92, 1.2); }          /* tiptoe on the right foot */
  22%  { transform: translateY(-5%) rotate(-4deg) scale(.12, 1.2); }          /* pirouette, edge-on */
  30%  { transform: translateY(-5%) rotate(0deg) scale(-1, 1.16); }           /* mid-turn, facing away */
  38%  { transform: translateY(-5%) rotate(4deg) scale(-.12, 1.2); }          /* edge-on again */
  46%  { transform: translateY(-16%) rotate(-12deg) scale(.94, 1.14); }       /* finishes the turn, wobbles */
  /* Full lift already mid-fall: at ~70% of the land angle, sin(θ) is nearly 1. */
  56%  { transform: translateY(var(--nugara-mid)) rotate(calc(var(--nugara-land) * 0.7)) scale(1, 1); }
  66%  { transform: translateY(calc(var(--nugara-lift) - 8%)) rotate(var(--nugara-land)) scale(1.04, .94); } /* land + bounce */
  72%, 84% { transform: translateY(var(--nugara-lift)) rotate(var(--nugara-land)) scale(1, 1); } /* on the back, on the ground line */
  92%  { transform: translateY(calc(var(--nugara-lift) * 0.32)) rotate(-22deg) scale(.96, 1.06); }
  100% { transform: translateY(0) rotate(0deg) scale(1, 1); }
}
@keyframes nugara-shadow {
  0%, 7%, 92%, 100% { transform: scale(1) translateX(0); opacity: .08; }
  14%, 46% { transform: scale(.72, .88) translateX(6%); opacity: .05; }       /* tiptoe / spin */
  72%, 84% { transform: scale(1.4, .78) translateX(-30%); opacity: .1; }      /* under the lying body */
}
/* Left foot lifts during the tiptoe-turn; both feet kick in local +X (world up once on the back). */
@keyframes nugara-foot-l {
  0%, 7% { transform: none; }
  14%, 46% { transform: translate(-4%, -18%) rotate(-22deg); }
  56% { transform: none; }
  70% { transform: translate(16%, 2%) rotate(22deg); }
  77% { transform: translate(24%, -8%) rotate(40deg); }
  84% { transform: translate(12%, 6%) rotate(10deg); }
  92%, 100% { transform: none; }
}
@keyframes nugara-foot-r {
  0%, 56% { transform: none; }
  70% { transform: translate(14%, -4%) rotate(-22deg); }
  77% { transform: translate(8%, 8%) rotate(16deg); }
  84% { transform: translate(20%, -2%) rotate(-28deg); }
  92%, 100% { transform: none; }
}

/* 3. Šuoliukas su sukiniu — jump with a left-right spin (scaleX), squash and stretch */
.mascot.is-reacting.is-sukinys .m-body {
  animation: sukinys 1.2s cubic-bezier(.3, 1.15, .5, 1) both;
  transform-origin: 50% 90%;
}
.mascot.is-reacting.is-sukinys .m-shadow { animation: kulverstukas-shadow 1.2s ease both; }
@keyframes sukinys {
  0% { transform: translateY(0) scale(1, 1); }
  12% { transform: translateY(6%) scale(1.16, .8); }
  28% { transform: translateY(-78%) scale(.15, 1.08); }
  42% { transform: translateY(-90%) scale(-1, 1.05); }
  58% { transform: translateY(-62%) scale(-.15, 1.06); }
  74% { transform: translateY(-10%) scale(1, 1); }
  86% { transform: translateY(5%) scale(1.14, .86); }
  100% { transform: translateY(0) scale(1, 1); }
}

/* 4. Siūbavimas ir šokis — sway, wave, little steps */
.mascot.is-reacting.is-sokis .mascot-svg { animation: sokis-sway .35s ease-in-out 4 alternate both; transform-origin: 50% 88%; }
.mascot.is-reacting.is-sokis .m-arm { animation: sokis-wave .28s ease-in-out 5 alternate both; }
.mascot.is-reacting.is-sokis .m-foot-l { animation: talk-stomp-l .35s ease-in-out 4 both; }
.mascot.is-reacting.is-sokis .m-foot-r { animation: talk-stomp-r .35s ease-in-out 4 both; }
.mascot.is-reacting.is-sokis .m-head { animation: sokis-nod .35s ease-in-out 4 alternate both; }
.mascot.is-reacting.is-sokis .m-shadow { animation: talk-stomp-shadow .35s ease-in-out 4 both; }
.mascot.is-reacting.is-sokis .m-body { animation: none; }
@keyframes sokis-sway {
  from { transform: rotate(-9deg) translateX(-5%); }
  to { transform: rotate(9deg) translateX(5%); }
}
@keyframes sokis-wave { from { transform: rotate(8deg); } to { transform: rotate(-52deg); } }
@keyframes sokis-nod { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }

/* 5. Apsvaigimas su žvaigždutėmis — happy dizzy wobble + orbiting stars */
.mascot.is-reacting.is-zvaigzdutes .m-head { animation: dizzy-head .2s ease-in-out 7 alternate both; }
.mascot.is-reacting.is-zvaigzdutes .mascot-svg { animation: dizzy-sway 1.4s ease-in-out both; transform-origin: 50% 88%; }
.mascot.is-reacting.is-zvaigzdutes .m-body { animation: none; }
.mascot.is-zvaigzdutes .m-fx { opacity: 1; }
.mascot.is-zvaigzdutes .m-star { animation: star-twirl 1.4s ease-in-out both; }
@keyframes dizzy-head {
  from { transform: rotate(-14deg) translateX(-4px); }
  to { transform: rotate(14deg) translateX(4px); }
}
@keyframes dizzy-sway {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}
@keyframes star-twirl {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(-170%) rotate(calc(var(--a) * -1)) scale(.4); }
  18% { opacity: 1; transform: rotate(calc(var(--a) + 70deg)) translateY(-280%) rotate(calc((var(--a) + 70deg) * -1)) scale(1); }
  70% { opacity: 1; transform: rotate(calc(var(--a) + 230deg)) translateY(-300%) rotate(calc((var(--a) + 230deg) * -1)) scale(1.08); }
  100% { opacity: 0; transform: rotate(calc(var(--a) + 360deg)) translateY(-180%) rotate(calc((var(--a) + 360deg) * -1)) scale(.4); }
}

/* 6. Ausų ir rankų mojavimas — arm wave + head (ears are part of the head art) */
.mascot.is-reacting.is-mojave .mascot-svg { animation: hop .4s cubic-bezier(.3, 1.6, .5, 1) 2 both; }
.mascot.is-reacting.is-mojave .m-shadow { animation: shadowhop .4s ease 2 both; }
.mascot.is-reacting.is-mojave .m-arm { animation: mojave-arm .28s ease-in-out 4 alternate both; }
.mascot.is-reacting.is-mojave .m-head { animation: mojave-ears .28s ease-in-out 4 alternate both; }
.mascot.is-reacting.is-mojave .m-body { animation: none; }
@keyframes mojave-arm { from { transform: rotate(12deg); } to { transform: rotate(-58deg); } }
@keyframes mojave-ears { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }

/* 7. Pasislėpimas ir išlindimas — squash into the ground, then spring back */
.mascot.is-reacting.is-slaptukas .m-body {
  animation: slaptukas 1.4s cubic-bezier(.3, 1.2, .5, 1) both;
  transform-origin: 50% 100%;
}
.mascot.is-reacting.is-slaptukas .m-head { animation: slaptukas-head 1.4s cubic-bezier(.3, 1.2, .5, 1) both; }
.mascot.is-reacting.is-slaptukas .m-shadow { animation: slaptukas-shadow 1.4s ease both; }
.mascot.is-reacting.is-slaptukas .m-paws { animation: slaptukas-paws 1.4s ease both; }
.mascot.is-reacting.is-slaptukas .m-arm { animation: slaptukas-arm 1.4s ease both; }
@keyframes slaptukas {
  0% { transform: translateY(0) scale(1, 1); }
  28% { transform: translateY(4%) scale(1.12, .55); }
  40%, 52% { transform: translateY(6%) scale(1.2, .34); }
  72% { transform: translateY(-14%) scale(.94, 1.14); }
  86% { transform: translateY(4%) scale(1.08, .9); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes slaptukas-head {
  0%, 100% { transform: none; }
  28% { transform: translateY(4%); }
  40%, 52% { transform: translateY(10%) rotate(-6deg); }
  72% { transform: translateY(-6%) rotate(4deg); }
}
@keyframes slaptukas-shadow {
  0%, 100% { transform: scale(1); opacity: .08; }
  40%, 52% { transform: scale(.55, .7); opacity: .03; }
  72% { transform: scale(.75); opacity: .05; }
}
@keyframes slaptukas-paws {
  0%, 28%, 72%, 100% { opacity: 0; transform: translateY(26px) scale(.6); }
  40%, 52% { opacity: 1; transform: none; }
}
@keyframes slaptukas-arm {
  0%, 28%, 72%, 100% { opacity: 1; }
  40%, 52% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mascot.is-kulverstukas .mascot-svg,
  .mascot.is-kulverstukas .m-body,
  .mascot.is-nugara .mascot-svg,
  .mascot.is-nugara .m-body,
  .mascot.is-nugara .m-foot-l,
  .mascot.is-nugara .m-foot-r,
  .mascot.is-sukinys .mascot-svg,
  .mascot.is-sukinys .m-body,
  .mascot.is-sokis .mascot-svg,
  .mascot.is-sokis .m-arm,
  .mascot.is-sokis .m-foot-l,
  .mascot.is-sokis .m-foot-r,
  .mascot.is-sokis .m-head,
  .mascot.is-sokis .m-shadow,
  .mascot.is-zvaigzdutes .m-head,
  .mascot.is-zvaigzdutes .mascot-svg,
  .mascot.is-zvaigzdutes .m-star,
  .mascot.is-mojave .m-arm,
  .mascot.is-mojave .m-head,
  .mascot.is-mojave .mascot-svg,
  .mascot.is-mojave .m-shadow,
  .mascot.is-slaptukas .m-body,
  .mascot.is-slaptukas .m-shadow,
  .mascot.is-slaptukas .m-head,
  .mascot.is-slaptukas .m-paws,
  .mascot.is-slaptukas .m-arm,
  .mascot.is-kulverstukas .m-shadow,
  .mascot.is-nugara .m-shadow,
  .mascot.is-sukinys .m-shadow {
    animation: none !important;
    transform: none;
  }
  .mascot.is-zvaigzdutes .m-fx { opacity: 0; }
}

.bubble {
  position: absolute; left: 62%; bottom: 84%;
  min-width: 70px; min-height: 64px; padding: 10px 18px; border-radius: 26px;
  background: #fff; box-shadow: var(--shadow); display: grid; place-items: center;
  font-size: calc(var(--size) * .2); font-weight: 900; z-index: 2; white-space: nowrap;
}
.bubble::after { content: ''; position: absolute; left: 18px; bottom: -12px; border: 12px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bubble.pop { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
.bubble-zz { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .7em; }
.bubble-zz .icon { width: 1.5em; height: 1.5em; color: #C9D6E6; }
.bubble-star .icon { width: 1.3em; height: 1.3em; color: #FFC24D; }
.bubble-letter { display: inline-flex; align-items: center; gap: 8px; font-size: 1.6em; color: var(--ink); font-weight: 900; }
.bubble-letter .icon { width: .6em; height: .6em; color: var(--muted); }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- home ---------- */
.home { padding-bottom: 0; /* sea owns the bottom safe inset */ padding-top: var(--pad-t); padding-left: var(--pad-l); padding-right: var(--pad-r); }
.sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sun { position: absolute; right: 7vw; top: 9vh; width: 16vmin; height: 16vmin; border-radius: 50%; background: radial-gradient(circle, #FFE49A 0 52%, rgba(255, 228, 154, .35) 53% 70%, transparent 71%); animation: sunpulse 6s ease-in-out infinite; opacity: .9; }
@keyframes sunpulse { 50% { transform: scale(1.06); } }
.cloud { position: absolute; width: 20vmin; height: 7vmin; background: #fff; border-radius: 99px; opacity: .85; animation: drift 46s linear infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 9vmin; height: 9vmin; left: 3vmin; top: -4.5vmin; }
.cloud::after { width: 6.5vmin; height: 6.5vmin; left: 10vmin; top: -3vmin; }
.cloud.c1 { top: 18vh; left: -22vmin; }
.cloud.c2 { top: 7vh; left: -22vmin; transform: scale(.7); animation-duration: 64s; animation-delay: -30s; }
.cloud.c3 { top: 30vh; left: -22vmin; transform: scale(.55); animation-duration: 80s; animation-delay: -55s; opacity: .7; }
@keyframes drift { to { translate: calc(100vw + 44vmin) 0; } }

.brand { flex: 1; display: flex; justify-content: center; }
.brand-name { font-weight: 1000; font-size: clamp(1.6rem, 5vmin, 2.6rem); letter-spacing: .02em; color: #fff; text-shadow: 0 3px 0 #E98A7E, 0 6px 14px rgba(233, 138, 126, .35); -webkit-text-stroke: 1px rgba(233, 138, 126, .3); }
.parent-btn { color: var(--muted); font-size: calc(var(--tap) * .5); }

.home-body { flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--gap); position: relative; z-index: 2; min-height: 0; padding-bottom: calc(5vh + var(--safe-b)); }
.home-mascot { align-self: flex-end; margin-bottom: 1vh; }
.islands {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap);
  width: min(100%, 980px, calc((100vh - var(--bar) - 12vh) * 1.55));
}
.island {
  --acc: var(--c-coral); --acc-bg: #FFE9E4; --acc-d: #F0B7AC;
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 6px 10px 14px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), var(--acc-bg));
  box-shadow: 0 var(--press) 0 var(--acc-d), var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, filter .2s;
  animation: islandin .6s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 70ms);
  min-height: 0;
}
.island[data-island="sounds"] { --acc: var(--c-sky); --acc-bg: #E3F3FD; --acc-d: #B5DBF2; }
.island[data-island="colors"] { --acc: var(--c-lilac); --acc-bg: #EFE8FC; --acc-d: #CFC0EE; }
.island[data-island="numbers"] { --acc: var(--c-sun); --acc-bg: #FFF3D9; --acc-d: #EED29B; }
.island[data-island="shapes"] { --acc: var(--c-mint); --acc-bg: #E2F7EE; --acc-d: #B4E2CC; }
.island[data-island="memory"] { --acc: var(--c-peach); --acc-bg: #FFEDE2; --acc-d: #F0C7AE; }
.island-art { width: 100%; height: auto; max-height: 100%; display: block; }
.island.is-open .island-art { animation: bob 3.2s ease-in-out infinite; }
.island.is-open .isl-palm { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite; }
.island-title { font-weight: 900; font-size: clamp(.95rem, 2.5vmin, 1.35rem); padding: 4px 16px; border-radius: 999px; background: #fff; color: var(--ink); margin-top: -4px; white-space: nowrap; }
.island-play, .island-lock {
  position: absolute; top: 10px; right: 10px; width: clamp(40px, 6.5vmin, 56px); height: clamp(40px, 6.5vmin, 56px); border-radius: 50%;
  display: grid; place-items: center; font-size: clamp(22px, 3.6vmin, 32px);
}
.island-play { background: var(--c-green); color: #fff; box-shadow: 0 3px 0 var(--c-green-d); animation: pulse 1.8s ease-in-out infinite; }
.island-lock { background: #fff; color: #8E8AA8; box-shadow: 0 3px 0 #E3DCEF; }
.island.is-open { outline: 4px solid rgba(255, 255, 255, .9); }
.island.is-locked .island-art { filter: saturate(.55); opacity: .92; }
.island.is-locked .island-title { color: var(--muted); }
.island.wobble { animation: wobble .6s ease; }
.isl-z { animation: zz 2.4s ease-in-out infinite; }
.isl-z2 { animation-delay: .6s; }
@keyframes zz { 0%, 100% { opacity: .2; transform: translateY(4px); } 50% { opacity: 1; transform: translateY(-4px); } }
@keyframes islandin { from { opacity: 0; transform: translateY(24px) scale(.9); } }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes sway { 50% { transform: rotate(4deg); } }
@keyframes pulse { 50% { transform: scale(1.1); } }
@keyframes wobble { 20% { transform: rotate(-3deg); } 40% { transform: rotate(3deg); } 60% { transform: rotate(-2deg); } 80% { transform: rotate(1deg); } }

.sea { position: absolute; left: 0; right: 0; bottom: 0; height: calc(10vh + var(--safe-b)); background: linear-gradient(180deg, var(--sea), var(--sea-d)); z-index: 1; }
.wave { position: absolute; left: -50%; width: 200%; height: 36px; top: -18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 36'%3E%3Cpath d='M0 18 Q30 0 60 18 T120 18 V36 H0z' fill='%238ED3F2'/%3E%3C/svg%3E") repeat-x;
  background-size: 120px 36px; animation: wavemove 9s linear infinite; }
.wave.w2 { top: -8px; opacity: .6; animation-duration: 13s; animation-direction: reverse;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 36'%3E%3Cpath d='M0 18 Q30 4 60 18 T120 18 V36 H0z' fill='%23B9E5F8'/%3E%3C/svg%3E"); }
@keyframes wavemove { to { transform: translateX(120px); } }

@media (orientation: portrait) {
  .home-body { flex-direction: column-reverse; justify-content: center; }
  .home-mascot { align-self: center; margin: 0; }
  .islands { grid-template-columns: repeat(2, 1fr); width: min(100%, 680px, calc((100vh - var(--bar) - var(--mascot-home) - 16vh) * .74)); }
  .sun { top: auto; bottom: 18vh; right: -4vmin; }
  .home-mascot .bubble { left: 96%; bottom: 46%; }
  .home-mascot .bubble::after { left: -14px; bottom: 18px; border: 12px solid transparent; border-right-color: #fff; border-left: 0; }
}

/* ---------- who ---------- */
.who-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4vh; }
.who-list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.who-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 18px 14px; border-radius: var(--radius); background: #fff; box-shadow: 0 var(--press) 0 #E3D6C8, var(--shadow); transition: transform .14s; min-width: 150px; }
.who-card.is-active { outline: 4px solid var(--c-green); }
.who-card.chosen { transform: scale(1.08); }
.who-name { font-weight: 900; font-size: 1.2rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-check { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; background: var(--c-green); color: #fff; display: grid; place-items: center; font-size: 24px; }

/* ---------- gate ---------- */
.gate.screen, .rest-screen.screen {
  position: fixed; inset: 0; z-index: 130;
  /* Security screens must not fade/scale or let another screen shine through. */
  opacity: 1; transform: none; transition: none;
  background-color: #F1ECFA;
  background-image: linear-gradient(180deg, #F1ECFA, var(--bg));
}
.rest-screen.screen { display: grid; place-items: center; background: #1B2450; }
.rest-screen .rest-card { animation: none; box-shadow: none; }
.rest-screen .mascot { margin: 0 auto 18px; pointer-events: none; cursor: default; }
.rest-screen .sleep-parent-btn { margin: 24px auto 0; }
/* v0.9.25: time-up choices (guarded one-shot buttons, pop-up in the parent zone, toast) */
.rest-btn.is-busy, .timer-modal .btn.is-busy, .sleep-parent-btn.is-busy { opacity: .75; transform: scale(.97); }
.rest-btn:disabled, .timer-modal button:disabled, .sleep-parent-btn:disabled { cursor: default; }
.timer-modal { z-index: 140; }
.timer-modal-card { position: relative; text-align: center; padding: 28px 24px 24px; }
.timer-modal-card h2 { margin: 6px 0 4px; font-size: 1.5rem; }
.timer-modal-card > p.muted { font-weight: 600; margin-bottom: 18px; }
.timer-modal-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--sun, #FFE08A); }
.timer-modal-icon svg { width: 34px; height: 34px; }
.timer-modal-card .icon-btn.timer-modal-x { --tap: 52px; position: absolute; top: 10px; right: 10px; box-shadow: none; background: #F3F0F8; }
.timer-modal-card .timer-modal-x svg { width: 24px; height: 24px; }
.timer-modal-actions { display: grid; gap: 12px; }
.timer-modal-actions .btn { width: 100%; min-height: 64px; font-size: 1.2rem; justify-content: center; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); z-index: 300;
  background: #2E2A47; color: #fff; font-weight: 800; font-size: 1.15rem; padding: 14px 22px; border-radius: 999px;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; white-space: nowrap; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* v0.9.32: a waiting app update – small, calm chip; never covers a game */
.sw-update-prompt {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 360;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 5px 0 #E3D6C8, var(--shadow);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .sw-update-prompt { transition: none; }
}

.gate-card { margin: auto; width: min(100%, 460px); background: #fff; border-radius: 32px; padding: 22px 24px 26px; box-shadow: var(--shadow); text-align: center; overflow: auto; max-height: calc(100% - var(--bar)); }
.gate-card h1 { margin: 4px 0 2px; font-size: 1.5rem; }
.gate-card p { margin: 0 0 12px; }
.gate-lock { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: #EFE8FC; color: #7A62C9; display: grid; place-items: center; font-size: 36px; }
.gate-q { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: clamp(2rem, 6vmin, 2.8rem); font-weight: 900; margin: 6px 0 16px; }
.gate-q .op { color: var(--muted); }
.gate-ans { min-width: 2.2em; padding: 0 .2em; border-radius: 16px; background: #F4F0FA; color: var(--ink); }
.gate-ans.is-empty { color: #B9B1CC; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key { height: clamp(64px, 9vmin, 80px); border-radius: 22px; background: #F7F3EE; box-shadow: 0 5px 0 #E3D6C8; font-size: 1.8rem; font-weight: 900; display: grid; place-items: center; transition: transform .1s; }
.key-del { color: var(--muted); font-size: 2rem; }
.gate-card.shake { animation: shake .5s ease; }
.gate-card.ok { min-height: 300px; display: grid; place-items: center; }
.gate-success { display: grid; justify-items: center; gap: 14px; }
.gate-check { width: 104px; height: 104px; border-radius: 50%; background: #3DBE6B; color: #fff; font-size: 62px; font-weight: 900; line-height: 104px; text-align: center; box-shadow: 0 10px 24px rgba(61,190,107,.35); animation: gateBounce .55s cubic-bezier(.3,1.6,.5,1) both; }
.gate-ok-text { margin: 0; font-size: 1.6rem; font-weight: 900; color: #2E9A55; animation: gateFade .25s .05s ease both; }
@keyframes gateBounce { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 80% { transform: scale(.95); } 100% { transform: scale(1); } }
@keyframes gateFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gate-check, .gate-ok-text { animation: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }

/* ---------- parent zone ---------- */
.parent { background: #FBF7F2; user-select: text; -webkit-user-select: text; }
.parent-top { justify-content: space-between; }
.parent-top .btn { min-height: 64px; }
.parent-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 8px 0 40px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pcard { width: min(100%, 780px); background: #fff; border-radius: 26px; padding: 20px 22px; box-shadow: 0 2px 0 var(--line), var(--shadow); flex: none; }
.pcard h2 { margin: 0 0 6px; font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.pcard h2 .icon { width: 1.3em; height: 1.3em; color: #7A62C9; }
.pcard p { margin: 6px 0; }
.privacy { background: linear-gradient(180deg, #fff, #EEF9F3); }
.privacy h2 .icon { color: var(--c-green-d); }
.plist { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.prow { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 20px; background: #FBF7F2; }
.prow .avatar { --sz: 60px; }
.prow-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.prow-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pform { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 22px; background: #F4F9FE; border: 2px dashed #C9E5F7; }
.flabel { font-weight: 800; font-size: .95rem; margin-top: 6px; }
.input { min-height: 60px; border-radius: 16px; border: 2px solid var(--line); padding: 0 16px; font-size: 1.15rem; background: #fff; color: var(--ink); }
.input:focus { border-color: #7CC4F2; outline: none; }
.av-row { display: flex; flex-wrap: wrap; gap: 10px; }
.av-pick { padding: 5px; border-radius: 50%; border: 4px solid transparent; transition: transform .12s; }
.av-pick .avatar { --sz: 62px; }
.av-pick.is-on { border-color: var(--c-green); transform: scale(1.05); }
.seg { display: flex; gap: 10px; flex-wrap: wrap; }
.seg-btn { min-height: 60px; padding: 0 22px; border-radius: 999px; background: #fff; border: 3px solid var(--line); font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.seg-btn.is-on { border-color: var(--c-green); background: #EAF8F0; }
.seg-btn .icon { color: var(--c-green-d); font-size: 1.3em; }
.frow { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.frow.center { justify-content: center; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch { width: 104px; height: 60px; border-radius: 999px; background: #DCD5E5; position: relative; flex: none; transition: background .2s; }
.switch-knob { position: absolute; top: 5px; left: 5px; width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 26px; color: var(--muted); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.switch.is-on { background: var(--c-green); }
.switch.is-on .switch-knob { transform: translateX(44px); color: var(--c-green-d); }
.prog { padding: 14px 0; border-top: 2px solid #F3EDE6; }
.prog:first-of-type { border-top: 0; }
.prog-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prog-head .avatar { --sz: 48px; }
.stars { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.stars .icon { color: #F5B83D; }
.bar { height: 14px; border-radius: 99px; background: #F1ECE6; overflow: hidden; margin: 10px 0; }
.bar span { display: block; height: 100%; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, var(--c-mint), var(--c-green)); transition: width .6s; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-bottom: 10px; }
.lchip { position: relative; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; background: #F6F2ED; color: #B6ADA4; border: 2px solid transparent; }
.lchip.is-seen { background: #fff; color: var(--ink-soft); border-color: #CFC6BC; border-style: dashed; }
.lchip.is-learned { background: #E2F6EC; color: #23704A; border-color: var(--c-green); }
.lchip-ic { position: absolute; right: -4px; top: -4px; width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: var(--c-green); color: #fff; }
.lchip.mini { display: inline-grid; width: 26px; height: 26px; vertical-align: middle; border-radius: 8px; }
.legend { white-space: nowrap; margin-left: 8px; }
.modal { position: fixed; inset: 0; background: rgba(61, 53, 83, .35); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fadein .2s; }
.modal-card { background: #fff; border-radius: 26px; padding: 24px; max-width: 440px; width: 100%; box-shadow: var(--shadow); animation: pop .3s cubic-bezier(.3, 1.4, .5, 1); }
.modal-card p { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; }
@keyframes fadein { from { opacity: 0; } }

/* ---------- letters: menu ---------- */
.star-count { min-width: var(--tap); height: var(--tap); padding: 0 18px; border-radius: 999px; background: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 900; font-size: 1.5rem; box-shadow: var(--shadow); }
.star-count .icon { color: #F5B83D; font-size: 1.3em; }
.menu-body { flex: 1; display: flex; align-items: center; justify-content: center; gap: calc(var(--gap) * 2); min-height: 0; min-width: 0; width: 100%; max-width: 100%; overflow: hidden; }
.modes { display: flex; gap: calc(var(--gap) * 1.5); max-width: 100%; min-width: 0; flex-wrap: wrap; justify-content: center; }
.mode { touch-action: manipulation;
  position: relative; width: clamp(160px, 32vmin, 300px); max-width: min(42vw, 300px); aspect-ratio: 1; border-radius: 40px;
  display: grid; place-items: center; transition: transform .14s, box-shadow .14s;
  animation: islandin .6s cubic-bezier(.3, 1.4, .5, 1) both;
  flex: 0 1 auto; min-width: 0;
}
.mode.explore { background: linear-gradient(160deg, #FFE1D9, #FFC4B8); box-shadow: 0 8px 0 #EDA294, var(--shadow); }
.mode.find { background: linear-gradient(160deg, #DDF0FD, #B4DDF8); box-shadow: 0 8px 0 #8FC3E6, var(--shadow); animation-delay: .08s; }
.mode-art { position: relative; width: 70%; height: 70%; overflow: hidden; isolation: isolate; }
.mini-card { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 22%; display: grid; place-items: center; font-weight: 1000; font-size: clamp(2rem, 7vmin, 4rem); color: var(--ink); box-shadow: 0 5px 0 rgba(0, 0, 0, .08); overflow: hidden; min-height: 0; }
.mini-card.t1 { background: var(--c-sun); left: 2%; top: 8%; transform: rotate(-10deg); }
.mini-card.t2 { background: #fff; left: 30%; top: 0; transform: rotate(4deg); z-index: 1; }
.mini-card.t3 { background: var(--c-mint); left: 54%; top: 14%; transform: rotate(12deg); }
.mini-card.t4 { background: #fff; right: 4%; top: 6%; transform: rotate(8deg); }
.mode-ear { position: absolute; left: 4%; top: 10%; width: 50%; aspect-ratio: 1; border-radius: 50%; background: #fff; color: #3F8FCF; display: grid; place-items: center; font-size: clamp(3rem, 9vmin, 5rem); box-shadow: 0 5px 0 rgba(0,0,0,.08); animation: listen 1.8s ease-in-out infinite; }
.mode-ic { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 46%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.7); color: var(--ink-soft); display: grid; place-items: center; font-size: clamp(2.4rem, 7vmin, 4rem); }
.mode.explore .mode-ic { animation: tapme 1.6s ease-in-out infinite; }
.mode-badge { position: absolute; left: 14px; top: 14px; width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 30px; color: var(--ink-soft); }
.mode-go { position: absolute; right: 14px; bottom: 14px; width: 60px; height: 60px; border-radius: 50%; background: var(--c-green); color: #fff; display: grid; place-items: center; font-size: 34px; box-shadow: 0 4px 0 var(--c-green-d); animation: pulse 1.8s ease-in-out infinite; }
@keyframes listen { 50% { transform: scale(1.07) rotate(-4deg); } }
@keyframes tapme { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10%); } }
@media (orientation: portrait) {
  .menu-body { flex-direction: column; }
  .modes { flex-direction: row; }
}
@media (orientation: portrait) and (max-width: 560px) {
  .modes { flex-direction: column; }
  .mode { width: clamp(180px, 30vh, 260px); }
  .menu-body { gap: var(--gap); }
}

/* ---------- letters: tiles & cards ---------- */
.lt { font-weight: 1000; line-height: 1; color: var(--ink); position: relative; z-index: 1; }
.lt-badge { position: absolute; top: 9%; right: 9%; width: 18%; aspect-ratio: 1; color: rgba(255, 255, 255, .85); }
.lt-badge .shape { width: 100%; height: 100%; }

.explore-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 2px 24px; min-height: 0; display: flex; }
.lgrid-big { margin: auto; display: grid; grid-template-columns: repeat(8, 1fr); gap: clamp(10px, 1.6vmin, 16px); width: min(100%, 1100px, calc((100vh - var(--bar) - 60px) * 2.02)); }
.ltile {
  position: relative; aspect-ratio: 1; border-radius: 26%; background: var(--card);
  display: grid; place-items: center; container-type: inline-size;
  box-shadow: 0 5px 0 rgba(61, 53, 83, .14);
  transition: transform .12s, box-shadow .12s;
  animation: islandin .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 18ms);
}
.ltile .lt { font-size: 60cqi; }
.ltile-star { position: absolute; left: 6%; bottom: 6%; width: 26%; aspect-ratio: 1; color: #F5B83D; filter: drop-shadow(0 1px 0 #fff); }
.ltile-star .icon { width: 100%; height: 100%; }
@media (orientation: portrait) { .lgrid-big { grid-template-columns: repeat(6, 1fr); width: min(100%, 760px); } }
@media (max-width: 560px) { .lgrid-big { grid-template-columns: repeat(4, 1fr); } }

.lcard-overlay { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(61, 53, 83, 0); transition: background .25s; }
.lcard-overlay.is-open { background: rgba(61, 53, 83, .38); }
.lcard {
  position: relative; width: min(100%, 980px); max-height: 100%;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--gap);
  padding: clamp(20px, 4vmin, 40px) clamp(14px, 2.5vmin, 28px); border-radius: 40px;
  background: linear-gradient(180deg, #fff, #FFF8F1); box-shadow: 0 20px 60px rgba(61, 53, 83, .25);
  transform: scale(.85); opacity: 0; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), opacity .2s;
}
.lcard-overlay.is-open .lcard { transform: scale(1); opacity: 1; }
.lcard-close { position: absolute; top: -14px; right: -6px; z-index: 3; }
.lcard-main { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 4vmin, 48px); }
.big-letter {
  position: relative; width: clamp(180px, 38vmin, 320px); aspect-ratio: 1; border-radius: 26%;
  background: var(--card); container-type: inline-size; display: grid; place-items: center;
  box-shadow: 0 10px 0 rgba(61, 53, 83, .14);
}
.big-letter .lt { font-size: 64cqi; }
.big-letter.boing { animation: boing .6s cubic-bezier(.3, 1.6, .5, 1); }
.pic {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 18px; border-radius: 32px; background: #fff; box-shadow: 0 6px 0 #EFE4D8;
  min-width: clamp(150px, 26vmin, 240px);
}
.pic-emoji { font-size: clamp(5rem, 18vmin, 9rem); line-height: 1.1; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.pic.boing .pic-emoji { animation: boing .6s cubic-bezier(.3, 1.6, .5, 1); }
.word { font-size: clamp(1.3rem, 4vmin, 2.1rem); font-weight: 800; color: var(--ink-soft); }
.word mark { background: var(--card, var(--c-sun)); color: var(--ink); border-radius: 8px; padding: 0 3px; font-weight: 1000; }
.lcard .nav { z-index: 2; }
.lcard-mascot { position: absolute; left: 14px; bottom: 8px; pointer-events: auto; --mascot-small: clamp(70px, 11vmin, 104px); }
@keyframes boing { 0% { transform: scale(1); } 30% { transform: scale(1.14, .9); } 55% { transform: scale(.94, 1.08); } 100% { transform: scale(1); } }
@media (orientation: portrait) {
  .lcard { grid-template-columns: 1fr 1fr; grid-template-areas: 'main main' 'prev next'; padding-bottom: 28px; }
  .lcard-main { grid-area: main; flex-direction: column; }
  .lcard .prev { grid-area: prev; justify-self: start; margin-left: 30%; }
  .lcard .next { grid-area: next; justify-self: end; }
  .lcard-mascot { left: 4px; bottom: -6px; }
  .lcard .prev { margin-left: 0; justify-self: center; }
  .lcard .next { justify-self: center; }
  .lcard-mascot { display: none; }
}

/* sound waves + visual cue (shown when audio is unavailable) */
.waves { position: absolute; right: -6%; top: 50%; width: 22%; height: 40%; transform: translateY(-50%); pointer-events: none; opacity: 0; }
.waves i { position: absolute; inset: 0; border: 5px solid #7CC4F2; border-left-color: transparent; border-bottom-color: transparent; border-radius: 50%; transform: rotate(45deg) scale(.4); }
.cue .waves, .is-talking .waves { opacity: 1; }
.cue .waves i, .is-talking .waves i { animation: wavecue 1.1s ease-out infinite; }
.cue .waves i:nth-child(2), .is-talking .waves i:nth-child(2) { animation-delay: .2s; }
.cue .waves i:nth-child(3), .is-talking .waves i:nth-child(3) { animation-delay: .4s; }
.cue { animation: cuepulse .7s ease 2; }
@keyframes wavecue { from { transform: rotate(45deg) scale(.3); opacity: 1; } to { transform: rotate(45deg) scale(1.2); opacity: 0; } }
@keyframes cuepulse { 50% { transform: scale(1.06); filter: brightness(1.05); } }

/* ---------- letters: find ---------- */
.round-dots { display: flex; gap: clamp(6px, 1.4vmin, 14px); padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, .8); }
.rdot { width: clamp(30px, 5.5vmin, 46px); aspect-ratio: 1; color: #E5DDD3; transition: transform .3s; }
.rdot .icon { width: 100%; height: 100%; }
.rdot.is-now { color: #F9E2AE; animation: pulse 1.6s ease-in-out infinite; }
.rdot.is-done { color: #F5B83D; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.find-body { flex: 1; display: flex; align-items: center; justify-content: space-evenly; gap: var(--gap); min-height: 0; }
.find-prompt { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: none; }
.find-mascot { position: relative; }
.listen {
  position: relative; width: clamp(96px, 16vmin, 140px); aspect-ratio: 1; border-radius: 50%;
  background: #fff; color: #3F8FCF; display: grid; place-items: center; font-size: clamp(3rem, 9vmin, 4.6rem);
  box-shadow: 0 7px 0 #C9E5F7, var(--shadow); transition: transform .12s, box-shadow .12s;
}
.listen .waves { right: -26%; width: 40%; height: 60%; }
.listen.is-talking { animation: listen 1s ease-in-out infinite; }
.options { display: grid; grid-template-columns: repeat(3, auto); gap: clamp(14px, 3vmin, 32px); }
.options.n4 { grid-template-columns: repeat(2, auto); }
.opt {
  --sz: min(26vw, 36vh, 230px);
  position: relative; width: var(--sz); aspect-ratio: 1; border-radius: 26%; background: var(--card);
  container-type: inline-size; display: grid; place-items: center;
  box-shadow: 0 8px 0 rgba(61, 53, 83, .15); transition: transform .14s, box-shadow .14s, opacity .3s, filter .3s;
  animation: islandin .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 80ms);
}
.options.n4 .opt { --sz: min(21vw, 27vh, 190px); }
.opt .lt { font-size: 62cqi; }
.opt.is-dim { opacity: .45; filter: saturate(.4); }
.opt.wiggle { animation: wiggle .5s ease; }
.opt.hint { animation: hint 1.2s ease-in-out infinite; }
.opt.is-right { animation: right .7s cubic-bezier(.3, 1.6, .5, 1) forwards; z-index: 2; outline: 6px solid #fff; box-shadow: 0 0 0 12px rgba(92, 196, 142, .45), 0 8px 0 rgba(61, 53, 83, .15); }
.options.solved .opt:not(.is-right) { opacity: .25; transform: scale(.9); }
@keyframes wiggle { 20% { transform: rotate(-7deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(2deg); } }
@keyframes hint { 50% { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(255, 210, 122, .7), 0 8px 0 rgba(61, 53, 83, .15); } }
@keyframes right { 40% { transform: scale(1.18) rotate(-3deg); } 100% { transform: scale(1.1); } }
@media (orientation: portrait) {
  .find-body { flex-direction: column; justify-content: center; gap: 4vh; }
  .find-prompt { flex-direction: row; }
  .opt { --sz: min(40vw, 24vh, 240px); }
  .options { grid-template-columns: repeat(2, auto); }
  .options.n3 .opt:nth-child(3) { grid-column: span 2; justify-self: center; }
  .options.n4 .opt { --sz: min(38vw, 22vh, 230px); }
}

.celebrate { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(255, 244, 232, .7); animation: fadein .3s; padding: 16px; }
.celebrate-card { display: flex; flex-direction: column; align-items: center; gap: 2vh; padding: 28px 36px; border-radius: 44px; background: #fff; box-shadow: 0 20px 60px rgba(61, 53, 83, .2); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.trophy { display: flex; gap: 8px; }
.tstar { width: clamp(44px, 9vmin, 76px); aspect-ratio: 1; color: #F5B83D; animation: starin .6s cubic-bezier(.3, 1.8, .5, 1) both; animation-delay: calc(.2s + var(--i) * .12s); }
.tstar:nth-child(odd) { margin-top: 14px; }
.tstar .icon { width: 100%; height: 100%; filter: drop-shadow(0 4px 0 #E59E1E); }
@keyframes starin { from { transform: scale(0) rotate(-120deg); opacity: 0; } }
.round-btn { width: clamp(96px, 15vmin, 124px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(3rem, 8vmin, 4rem); transition: transform .12s, box-shadow .12s; }
.round-btn.again { background: var(--c-green); color: #fff; box-shadow: 0 7px 0 var(--c-green-d); animation: pulse 1.8s ease-in-out infinite; }
.round-btn.home { background: #fff; color: var(--ink); box-shadow: 0 7px 0 #E3D6C8, var(--shadow); }

/* ---------- fx ---------- */
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1000; overflow: hidden; }
.fx-p { position: absolute; width: var(--s); height: var(--s); transform: translate(-50%, -50%); animation: burst 1.1s cubic-bezier(.15, .8, .3, 1) var(--delay) both; }
.fx-p .shape { width: 100%; height: 100%; filter: drop-shadow(0 2px 0 rgba(0,0,0,.08)); }
@keyframes burst { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--rot)); opacity: 0; } }
.fx-c { position: absolute; top: -6vh; width: var(--s); height: var(--s); animation: fall var(--dur) ease-in var(--delay) both; }
.fx-c .shape { width: 100%; height: 100%; }
@keyframes fall { to { transform: translate(var(--sway), 115vh) rotate(var(--rot)); } }

/* small phones */
@media (max-width: 560px) and (orientation: portrait) {
  :root { --tap: 76px; }
  .brand-name { font-size: 1.6rem; }
  .chip { padding-right: 14px; max-width: 46vw; }
  .islands { gap: 12px; }
  .island { padding: 4px 6px 10px; border-radius: 24px; }
  .lcard { border-radius: 30px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  :root { --tap: 72px; }
  .home-mascot { display: none; }
}

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

/* very narrow phones: avatar-only profile chip so the header never overflows */
@media (max-width: 400px) {
  :root { --tap: 68px; --gap: 8px; }
  .chip.who .chip-label { display: none; }
  .chip.who { padding-right: 4px; }
  .brand-name { font-size: 1.25rem; letter-spacing: 0; }
  .topbar { gap: 6px; }
  .top-left { gap: 6px; }
  .star-count { padding: 0 10px; font-size: 1.2rem; }
}

/* ---------- colours island ("Spalvų sala") ---------- */
.cblob { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; }
.cblob-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 5px 0 rgba(61, 53, 83, .12)); }
.cmark { position: absolute; left: 50%; top: 52%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%); color: var(--ink); filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .15)); }
.cmark .shape { width: 100%; height: 100%; display: block; }
.cpot { position: relative; display: block; width: 100%; aspect-ratio: 100 / 110; }
.cpot-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 5px 0 rgba(61, 53, 83, .12)); }
.cpot .cmark { top: 66%; width: 30%; }

/* menu with three modes */
.mode.paint { background: linear-gradient(160deg, #E2F7EC, #BDEBD3); box-shadow: 0 8px 0 #8FD3B0, var(--shadow); animation-delay: .16s; }
.modes.n3 .mode { width: clamp(170px, 27vmin, 270px); border-radius: 36px; }
.modes.n3 .mode-badge { width: 46px; height: 46px; font-size: 26px; left: 12px; top: 12px; }
.modes.n3 .mode-go { width: 52px; height: 52px; font-size: 30px; right: 12px; bottom: 12px; }
.c-art .cblob { position: absolute; width: 50%; }
.c-art .cblob.b1 { left: 0; top: 6%; transform: rotate(-12deg); }
.c-art .cblob.b2 { left: 26%; top: -4%; z-index: 1; }
.c-art .cblob.b3 { left: 52%; top: 10%; transform: rotate(14deg); }
.c-art .cblob.b4 { right: 2%; top: 4%; width: 46%; transform: rotate(8deg); }
.c-art .cpot { position: absolute; width: 44%; top: 0; }
.c-art .cpot:nth-child(1) { left: 4%; transform: rotate(-8deg); }
.c-art .cpot:nth-child(2) { right: 4%; top: 8%; transform: rotate(9deg); }
.mode.paint .mode-ic { animation: tapme 1.6s ease-in-out infinite; animation-delay: .5s; }
@media (orientation: portrait) and (max-width: 560px) {
  .colors-menu .menu-body { gap: 10px; }
  .modes.n3 { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 14px; }
  .modes.n3 .mode { width: min(42vw, 21vh); border-radius: 30px; }
  .modes.n3 .mode:nth-child(3) { grid-column: span 2; justify-self: center; }
  .modes.n3 .mode-badge { width: 38px; height: 38px; font-size: 22px; left: 8px; top: 8px; }
  .modes.n3 .mode-go { width: 44px; height: 44px; font-size: 26px; right: 8px; bottom: 8px; }
  .colors-menu { --mascot-menu: clamp(96px, 15vh, 140px); }
}

/* explore */
.cgrid { margin: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2.6vmin, 28px); width: min(100%, 760px, calc((100vh - var(--bar) - 70px) * 1.5)); }
.cgrid.many { grid-template-columns: repeat(4, 1fr); width: min(100%, 860px, calc((100vh - var(--bar) - 70px) * 1.33)); }
.ctile {
  position: relative; aspect-ratio: 1; border-radius: 26%; background: #fff; display: grid; place-items: center; padding: 12%;
  box-shadow: 0 6px 0 rgba(61, 53, 83, .12); transition: transform .12s, box-shadow .12s;
  animation: islandin .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 40ms);
}
@media (orientation: portrait) { .cgrid { grid-template-columns: repeat(2, 1fr); width: min(100%, 560px); } .cgrid.many { grid-template-columns: repeat(3, 1fr); width: min(100%, 640px); } }
.big-blob { position: relative; width: clamp(180px, 38vmin, 320px); aspect-ratio: 1; border-radius: 26%; background: #fff; display: grid; place-items: center; padding: 6%; box-shadow: 0 10px 0 rgba(61, 53, 83, .10); }
.big-blob.boing { animation: boing .6s cubic-bezier(.3, 1.6, .5, 1); }
.ccard { background: linear-gradient(180deg, #fff, #FFF8F1); }
.ccard .word { text-transform: none; }

/* find */
.copt { background: #fff; padding: 9%; }
.copt .cblob { width: 100%; }
.bubble-color { display: inline-flex; align-items: center; gap: 8px; font-size: 1.6em; }
.bubble-color .icon { width: .6em; height: .6em; color: var(--muted); }
.bubble-color .cblob { width: 2.1em; }
.bubble-colors { display: inline-flex; gap: 4px; }
.bubble-colors .cblob { width: 2.2em; }

/* paint ("Spalvų dažyklė") */
.paint-body { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(16px, 4vmin, 48px); min-height: 0; }
.paint-stage { display: flex; align-items: center; gap: clamp(10px, 2.5vmin, 28px); }
.paint-side { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.paint-mascot { position: relative; --mascot-find: clamp(100px, 17vmin, 150px); }
.listen.small { width: clamp(84px, 12vmin, 112px); font-size: clamp(2.6rem, 7vmin, 3.6rem); }
.cpic {
  --paint: var(--c-sun);
  position: relative; width: min(56vh, 44vw, 480px); aspect-ratio: 1; border-radius: 44px; background: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 0 #EFE4D8, var(--shadow); transition: transform .14s, box-shadow .3s;
}
.cpic-svg { width: 86%; height: 86%; display: block; overflow: visible; }
.cpic-stack {
  position: relative; width: 86%; height: 86%;
  touch-action: none; pointer-events: none;
}
.cpic-stack .cpic-blank-svg,
.cpic-stack .cpic-paint,
.cpic-stack .cpic-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; overflow: visible; pointer-events: none;
}
.cpic-stack .cpic-paint { z-index: 1; }
.cpic-stack .cpic-svg { z-index: 2; }
.cpic { touch-action: none; -webkit-user-select: none; user-select: none; }
.cpic.is-ready { animation: ready 1.3s ease-in-out infinite; }
@keyframes ready { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--paint) 55%, #fff), 0 10px 0 #EFE4D8, var(--shadow); transform: scale(1.02); } }
.cpic-hand { position: absolute; right: 6%; bottom: 4%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--paint); color: #fff; display: grid; place-items: center; font-size: clamp(2rem, 6vmin, 3.4rem); box-shadow: 0 5px 0 rgba(0, 0, 0, .12); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.cpic.is-ready .cpic-hand { opacity: 1; transform: scale(1); animation: handtap 1.1s ease-in-out infinite .3s; }
.cpic-hand { color: var(--paint-ink, #fff); }
@keyframes handtap { 50% { transform: translate(-6%, -8%) scale(1.05); } }
.cpic.nudge { animation: wiggle .5s ease; }
.cpic.is-done { animation: boing .6s cubic-bezier(.3, 1.6, .5, 1); }
.pots { display: grid; grid-template-columns: 1fr; gap: clamp(8px, 2vmin, 20px); }
.pots.n4 { grid-template-columns: repeat(2, 1fr); }
.potbtn {
  --sz: min(19vh, 15vw, 150px);
  position: relative; width: var(--sz); padding: 10px 14px 12px; border-radius: 30px; background: rgba(255, 255, 255, .75);
  box-shadow: 0 6px 0 rgba(61, 53, 83, .10); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), opacity .3s, filter .3s, box-shadow .2s;
  animation: islandin .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 80ms);
}
.pots.n3 .potbtn { --sz: min(23vh, 15vw, 160px); }
.potbtn.is-dim { opacity: .45; filter: saturate(.4); }
.potbtn.wiggle { animation: wiggle .5s ease; }
.potbtn.bounce { animation: right .5s cubic-bezier(.3, 1.6, .5, 1); }
.potbtn.hint { animation: hint 1.2s ease-in-out infinite; }
.potbtn.is-picked { transform: rotate(-4deg) scale(1.05); background: #fff; box-shadow: 0 0 0 6px #fff, 0 0 0 12px rgba(92, 196, 142, .55), 0 10px 0 rgba(61, 53, 83, .12); animation: none; }
.pots.picked .potbtn:not(.is-picked) { opacity: .35; transform: scale(.92); }
@media (orientation: portrait) {
  .paint-body { flex-direction: column; gap: 3vh; }
  .paint-stage { flex-direction: column; gap: 1.6vh; }
  .paint-side { flex-direction: row; }
  .cpic { width: min(86vw, 44vh, 520px); }
  .pots, .pots.n4 { grid-template-columns: repeat(var(--n, 3), auto); }
  .pots.n4 { --n: 4; }
  .potbtn, .pots.n3 .potbtn { --sz: min(21vw, 13vh, 150px); padding: 8px 10px 10px; border-radius: 24px; }
}

/* parent zone: colours */
.cprog { margin: 4px 0 12px; padding-top: 10px; border-top: 2px dashed var(--line); }
.cprog-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.cgrid-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; }
.cchip { position: relative; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 6px; border-radius: 12px; background: #F6F2ED; color: #9C938A; font-weight: 800; border: 2px solid transparent; }
.cchip-sw { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .12); }
.cchip-sw .shape { width: 60%; height: 60%; }
.cchip:not(.is-seen):not(.is-learned) .cchip-sw { opacity: .55; }
.cchip.is-seen { background: #fff; color: var(--ink-soft); border-color: #CFC6BC; border-style: dashed; }
.cchip.is-learned { background: #E2F6EC; color: #23704A; border-color: var(--c-green); }
@media (orientation: portrait) and (max-width: 560px) {
  .paint-side { gap: 44px; }
  .cpic { width: min(80vw, 38vh); border-radius: 36px; }
  .potbtn, .pots.n3 .potbtn { --sz: min(26vw, 14vh, 130px); }
  .pots.n4 { grid-template-columns: repeat(2, auto); }
}
@media (orientation: portrait) and (min-width: 561px) { .cpic { width: min(80vw, 48vh, 560px); } }
.paint-mascot .mascot { width: clamp(100px, 17vmin, 150px); }

/* ---------- numbers island ("Skaičių sala") ---------- */
.numeral {
  display: block; font-weight: 1000; line-height: 1; letter-spacing: -.04em; color: var(--num, var(--ink));
  font-variant-numeric: lining-nums; text-shadow: 0 .045em 0 color-mix(in srgb, var(--num, #888) 55%, #3D3553);
  position: relative; z-index: 1;
}
.ndots { display: inline-flex; gap: calc(var(--die, 64px) * .14); align-items: center; }
.ndie { width: var(--die, 64px); aspect-ratio: 1; padding: 10%; border-radius: 24%; background: #fff; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 6%; box-shadow: 0 4px 0 rgba(61, 53, 83, .10), inset 0 0 0 3px color-mix(in srgb, var(--num) 25%, #fff); }
.ndie i { border-radius: 50%; background: var(--num); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }

/* trays of countable things */
.ntray { position: relative; width: 100%; aspect-ratio: 3 / 2; border-radius: clamp(28px, 5vmin, 44px); background: radial-gradient(120% 90% at 50% 0%, #fff 0%, #FFF9F0 70%, #FFF2E2 100%); box-shadow: 0 10px 0 #EFE4D8, var(--shadow); transition: box-shadow .4s; }
.ntray.all-counted { box-shadow: 0 0 0 8px rgba(92, 196, 142, .35), 0 10px 0 #EFE4D8, var(--shadow); }
.nthing {
  position: absolute; aspect-ratio: 1; translate: -50% -50%; rotate: var(--r, 0deg); padding: 0; border-radius: 50%;
  container-type: inline-size; transition: scale .25s cubic-bezier(.3, 1.6, .5, 1), opacity .3s, translate .5s cubic-bezier(.3, 1.2, .5, 1);
  animation: nthingin .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 55ms);
}
.nthing::before { content: ''; position: absolute; inset: -12%; border-radius: 50%; background: rgba(92, 196, 142, .18); scale: .4; opacity: 0; transition: scale .3s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; }
.nthing-svg { position: relative; width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 0 rgba(61, 53, 83, .14)); }
.nbadge { position: absolute; right: -14%; top: -14%; z-index: 2; width: 46%; aspect-ratio: 1; border-radius: 50%; background: var(--c-green); color: #fff; font-weight: 1000; font-size: 30cqi; line-height: 1; display: grid; place-items: center; box-shadow: 0 3px 0 var(--c-green-d); scale: 0; transition: scale .3s cubic-bezier(.3, 1.6, .5, 1); }
.nthing.is-counted::before { scale: 1; opacity: 1; }
.nthing.is-counted .nbadge { scale: 1; }
.nthing.is-counted .nthing-svg { animation: boing .5s cubic-bezier(.3, 1.6, .5, 1); }
.nthing.is-hidden { opacity: 0; scale: .2; animation: none; }
.nthing.wiggle, .nthing.nudge { animation: wiggle .5s ease; }
.nthing.nudge { animation-iteration-count: 2; }
.nthing.eaten { opacity: 0; scale: .2; translate: -260% -60%; }
.nthing.roll-in { animation: rollin .6s cubic-bezier(.3, 1.3, .5, 1) both; }
@keyframes nthingin { from { scale: 0; opacity: 0; } }
@keyframes rollin { from { translate: 200% -50%; rotate: 200deg; opacity: 0; } }

/* menu with four modes (2 × 2) */
.modes.n4 { display: grid; grid-template-columns: repeat(2, auto); gap: clamp(12px, 2.4vmin, 24px); }
.modes.n4 .mode { width: min(28vh, 25vw, 250px); border-radius: 34px; }
.modes.n4 .mode-badge { width: 44px; height: 44px; font-size: 25px; left: 10px; top: 10px; }
.modes.n4 .mode-go { width: 50px; height: 50px; font-size: 28px; right: 10px; bottom: 10px; }
.mode.count { background: linear-gradient(160deg, #FFF3D1, #FFE09A); box-shadow: 0 8px 0 #EEC36A, var(--shadow); animation-delay: .08s; }
.modes.n4 .mode.find { animation-delay: .16s; }
.mode.feed { background: linear-gradient(160deg, #E2F7EC, #BDEBD3); box-shadow: 0 8px 0 #8FD3B0, var(--shadow); animation-delay: .24s; }
.mode.feed .mode-badge { color: #FF7A9A; }
.n-art .mini-num { position: absolute; width: 42%; aspect-ratio: 1; border-radius: 24%; background: #fff; display: grid; place-items: center; container-type: inline-size; box-shadow: 0 5px 0 rgba(0, 0, 0, .08); }
.n-art .mini-num .numeral { font-size: 70cqi; }
.n-art .m1 { left: 0; top: 8%; transform: rotate(-10deg); }
.n-art .m2 { left: 29%; top: -2%; z-index: 1; }
.n-art .m3 { right: 0; top: 10%; transform: rotate(10deg); }
.n-art .m4 { right: 2%; top: 4%; width: 46%; transform: rotate(8deg); }
.n-art .mini-thing { position: absolute; width: 36%; aspect-ratio: 1; }
.n-art .mini-thing svg { width: 100%; height: 100%; display: block; }
.n-art .t1 { left: 2%; top: 6%; transform: rotate(-8deg); }
.n-art .t2 { left: 32%; top: -2%; }
.n-art .t3 { right: 2%; top: 10%; transform: rotate(10deg); }
.n-art .mode-ic.q { font-weight: 1000; font-size: clamp(2.6rem, 8vmin, 4.4rem); color: #C98A12; animation: tapme 1.6s ease-in-out infinite; }
.n-art .mode-ic.heart { color: #FF7A9A; animation: tapme 1.6s ease-in-out infinite .4s; }
.n-art .mini-basket { position: absolute; left: 10%; right: 10%; top: 22%; height: 48%; border-radius: 12% 12% 46% 46%; background: repeating-linear-gradient(90deg, #E2B271 0 10%, #D29A55 10% 20%); box-shadow: inset 0 6px 0 #B97E3B, 0 4px 0 rgba(0, 0, 0, .08); }
.n-art .mini-basket .mini-thing { width: 36%; top: -22%; }
.n-art .mini-basket .a1 { left: 4%; transform: rotate(-12deg); }
.n-art .mini-basket .a2 { left: 32%; top: -30%; }
.n-art .mini-basket .a3 { right: 4%; transform: rotate(12deg); }
.bubble-num { display: inline-block; min-width: 1.3em; text-align: center; font-size: 1.9em; font-weight: 1000; line-height: 1; color: var(--ink); }
.bubble-dots { display: inline-flex; --die: 2.4em; }
.bubble-dots .ndots { --die: 2.2em; }
.bubble-q { display: inline-flex; align-items: center; gap: 4px; font-size: 1.7em; font-weight: 1000; color: var(--ink); }
.bubble-thing { width: 1.5em; height: 1.5em; display: inline-block; }
.bubble-thing svg { width: 100%; height: 100%; display: block; }
.bubble-nums { display: inline-flex; gap: 6px; font-size: 1.8em; }
@media (orientation: portrait) {
  .modes.n4 .mode { width: min(36vw, 24vh, 280px); }
}
@media (orientation: portrait) and (max-width: 560px) {
  .numbers-menu .menu-body { gap: 10px; }
  .modes.n4 { gap: 14px; }
  .modes.n4 .mode { width: min(42vw, 21vh); border-radius: 30px; }
  .modes.n4 .mode:nth-child(3) { grid-column: auto; }
  .modes.n4 .mode-badge { width: 38px; height: 38px; font-size: 22px; left: 8px; top: 8px; }
  .modes.n4 .mode-go { width: 44px; height: 44px; font-size: 26px; right: 8px; bottom: 8px; }
}

/* explore ("Pažink") */
.ngrid { --tw: min(17vw, 30vh, 190px); --g: clamp(14px, 2.6vmin, 26px); margin: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--g); max-width: calc(var(--tw) * 5 + var(--g) * 4); }
.ngrid.many { --tw: min(15vw, 27vh, 170px); }
.ntile {
  position: relative; width: var(--tw); aspect-ratio: 1; border-radius: 26%; background: #fff; display: grid; place-items: center;
  container-type: inline-size; box-shadow: 0 6px 0 color-mix(in srgb, var(--num) 30%, #EFE4D8), var(--shadow);
  transition: transform .12s, box-shadow .12s; animation: islandin .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 40ms);
}
.ntile .numeral { font-size: 66cqi; }
.ncard { background: linear-gradient(180deg, #fff, #FFF8F1); }
.ncard-main { align-items: center; }
.ncard-left { display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2.4vmin, 24px); --die: clamp(64px, 13vmin, 112px); }
.big-num { position: relative; width: clamp(150px, 30vmin, 250px); aspect-ratio: 1; border-radius: 26%; background: #fff; display: grid; place-items: center; container-type: inline-size; box-shadow: 0 10px 0 color-mix(in srgb, var(--num) 30%, #EFE4D8); }
.big-num .numeral { font-size: 70cqi; }
.big-num.boing { animation: boing .6s cubic-bezier(.3, 1.6, .5, 1); }
.big-num .waves { right: -14%; }
.nstage { display: block; width: min(46vw, 470px, calc((100vh - var(--bar) - 120px) * 1.5)); padding: 0; border-radius: clamp(28px, 5vmin, 44px); }
@media (orientation: portrait) {
  .ngrid { --tw: min(26vw, 19vh, 200px); max-width: calc(var(--tw) * 3 + var(--g) * 2); }
  .ngrid.many { --tw: min(20vw, 14vh, 170px); max-width: calc(var(--tw) * 4 + var(--g) * 3); }
  .ncard-left { flex-direction: row; gap: clamp(16px, 4vw, 36px); }
  .ncard-left .ndots { flex-direction: column; }
  .ncard-left .ndots:has(.ndie + .ndie) { flex-direction: row; }
  .nstage { width: min(82vw, 560px, calc((100vh - 520px) * 1.5)); min-width: min(76vw, 300px); }
}
@media (orientation: portrait) and (max-width: 560px) {
  .ngrid.many { --tw: min(19vw, 13vh, 120px); }
  .big-num { width: min(38vw, 170px); }
  .ncard-left { --die: min(16vw, 66px); }
  .ncard-left .ndots:has(.ndie + .ndie) { flex-direction: column; }
  .nstage { width: 74vw; }
}

/* count ("Kiek čia yra?") + find */
.count-body { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vmin, 40px); min-height: 0; }
.count-main { display: flex; align-items: center; gap: clamp(14px, 3vmin, 36px); }
.count-main .ntray { width: min(52vw, 600px, calc((100vh - var(--bar) - 60px) * 1.5)); }
.numbers-count { --mascot-find: clamp(100px, 17vmin, 160px); }
.nopts { grid-template-columns: 1fr; }
.nopts.n4 { grid-template-columns: repeat(2, auto); }
.nopt { background: #fff; box-shadow: 0 8px 0 color-mix(in srgb, var(--num) 30%, #EFE4D8); }
.nopt .numeral { font-size: 66cqi; }
.numbers-count .nopt { --sz: min(20vh, 13vw, 150px); }
.numbers-count .nopts.n4 .nopt { --sz: min(19vh, 11vw, 140px); }
.nopts.is-ready .nopt:not(.is-dim) { animation: hint 1.2s ease-in-out 1; }
.numbers-find .nopts { grid-template-columns: repeat(3, auto); }
.numbers-find .nopts.n4 { grid-template-columns: repeat(4, auto); }
.numbers-find .nopts.n4 .nopt { --sz: min(19vw, 30vh, 190px); }
@media (orientation: portrait) {
  .count-body { flex-direction: column; gap: 2.4vh; }
  .count-prompt { flex-direction: row; }
  .count-main { flex-direction: column; gap: 3vh; }
  .count-main .ntray { width: min(92vw, 640px, calc((100vh - var(--bar) - 44vh) * 1.5)); }
  .nopts, .nopts.n4 { grid-template-columns: repeat(var(--n, 3), auto); }
  .nopts.n4 { --n: 4; }
  .nopts.n3 .opt:nth-child(3) { grid-column: auto; }
  .numbers-count .nopt { --sz: min(26vw, 15vh, 180px); }
  .numbers-count .nopts.n4 .nopt { --sz: min(21vw, 14vh, 160px); }
  .numbers-find .nopts { grid-template-columns: repeat(2, auto); }
  .numbers-find .nopts.n3 .opt:nth-child(3) { grid-column: span 2; }
  .numbers-find .nopts.n4 { grid-template-columns: repeat(2, auto); }
  .numbers-find .nopts.n4 .nopt { --sz: min(38vw, 22vh, 230px); }
}
@media (orientation: portrait) and (max-width: 560px) {
  .numbers-count { --mascot-find: clamp(90px, 12vh, 130px); }
  .count-main .ntray { width: 92vw; }
}

/* feed ("Pamaitink Ežiuką") */
.numbers-feed { --mascot-feed: clamp(120px, 22vmin, 210px); --a: min(10.5vh, 8.4vw, 92px); }
.feed-body { flex: 1; display: grid; grid-template-columns: auto auto auto; grid-template-areas: 'hog basket tree'; align-items: center; justify-content: center; gap: clamp(14px, 3.2vmin, 44px); min-height: 0; }
.feed-hog { grid-area: hog; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.feed-mascot { position: relative; }
.feed-basket { grid-area: basket; display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2.4vmin, 24px); }
.feed-tree { grid-area: tree; }
.ftree { position: relative; display: grid; grid-template-columns: repeat(var(--cols, 4), var(--a)); gap: calc(var(--a) * .22); padding: calc(var(--a) * .42) calc(var(--a) * .38) calc(var(--a) * .5); border-radius: 46% 46% 38% 38% / 40% 40% 30% 30%; background: radial-gradient(120% 100% at 40% 20%, #C8F0D4, #8FD8A6 70%, #78C990); box-shadow: inset 0 -8px 0 rgba(62, 166, 115, .35), 0 10px 0 rgba(61, 53, 83, .08); }
.ftree.n6, .ftree.n5 { --cols: 3; }
.ftree.n7, .ftree.n8 { --cols: 4; }
.ftree.n9, .ftree.n10, .ftree.n11, .ftree.n12 { --cols: 4; }
.feed-tree { position: relative; padding-bottom: calc(var(--a) * .5); }
.feed-tree::after { content: ''; position: absolute; left: 50%; bottom: 0; width: calc(var(--a) * .7); height: calc(var(--a) * .9); translate: -50% 0; z-index: -1; border-radius: 0 0 14px 14px; background: linear-gradient(90deg, #B97E3B, #D29A55 60%, #B97E3B); }
.feed-tree { isolation: isolate; }
.fslot { width: var(--a); aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .28); }
.fapple { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border-radius: 50%; container-type: inline-size; transition: transform .14s, opacity .35s, scale .35s; animation: islandin .45s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 40ms); }
.fapple .nthing-svg { filter: drop-shadow(0 3px 0 rgba(61, 53, 83, .18)); }
.fapple.land { animation: boing .45s cubic-bezier(.3, 1.6, .5, 1); }
.fapple.nudge { animation: wiggle .5s ease 2; }
.fapple.eaten { opacity: 0; scale: .1; }
.fbasket { position: relative; width: calc(var(--a) * 4.9); min-height: calc(var(--a) * 2.2); padding: calc(var(--a) * .25) calc(var(--a) * .2) calc(var(--a) * .35); border-radius: 18px 18px 48% 48% / 18px 18px 40% 40%; background: repeating-linear-gradient(90deg, #E8BC7E 0 18px, #D9A35F 18px 36px); box-shadow: inset 0 10px 0 #B97E3B, inset 0 -6px 0 rgba(0, 0, 0, .08), 0 8px 0 rgba(61, 53, 83, .10); }
.fbasket::before { content: ''; position: absolute; left: 12%; right: 12%; top: -34%; height: 50%; border: 8px solid #B97E3B; border-bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; pointer-events: none; }
.fbasket-in { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-end; gap: calc(var(--a) * .06); min-height: calc(var(--a) * 1.6); }
.fbasket-in .fapple { width: calc(var(--a) * .84); animation: none; }
.fbasket-in .fapple.land { animation: boing .45s cubic-bezier(.3, 1.6, .5, 1); }
.fapple .nbadge { scale: 0; }
.fbasket-in .fapple .nbadge { scale: 1; }
.fgive { width: clamp(90px, 14vmin, 120px); aspect-ratio: 1; border-radius: 50%; background: var(--c-green); color: #fff; display: grid; place-items: center; font-size: clamp(3rem, 8vmin, 4rem); box-shadow: 0 7px 0 var(--c-green-d); transition: transform .12s, box-shadow .12s, opacity .3s, filter .3s; animation: pulse 1.8s ease-in-out infinite; }
.fgive.is-off { opacity: .35; filter: grayscale(.6); animation: none; }
@media (orientation: portrait) {
  .numbers-feed { --a: min(13vw, 8vh, 96px); }
  .feed-body { grid-template-columns: auto auto; grid-template-areas: 'hog tree' 'basket basket'; gap: 3vh 4vw; align-content: center; }
  .fbasket { margin-top: calc(var(--a) * .7); }
}
@media (orientation: portrait) and (max-width: 560px) {
  .numbers-feed { --mascot-feed: clamp(96px, 13vh, 130px); --a: min(14vw, 7.4vh, 70px); }
  .feed-body { grid-template-columns: auto; grid-template-areas: 'hog' 'tree' 'basket'; gap: 2.2vh; }
  .feed-hog { flex-direction: row; }
}

/* parent zone: numbers */
.nchip { justify-content: center; padding: 0; font-size: 1.4rem; font-weight: 1000; }
.ngrid-chips { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }

/* ---------- numbers: layout fixes (v0.5.0) ---------- */
/* Pažink card: the close button sits inside the card and the card is only as wide as its content */
.ncard { width: auto; max-width: min(100%, 900px); }
.ncard .lcard-close { top: 12px; right: 12px; }
.numbers-explore .nstage { width: min(40vw, 440px, calc((100vh - var(--bar) - 140px) * 1.5)); }
@media (orientation: portrait) {
  .ncard { width: min(100%, 640px); padding-top: clamp(26px, 4vmin, 40px); }
  /* the numeral is the centre; the dice face goes to the left, so nothing collides with ✕ on the right */
  .ncard-left { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; }
  .ncard-left .big-num { grid-column: 2; grid-row: 1; }
  .ncard-left .ndots { grid-column: 1; grid-row: 1; justify-self: end; }
  .numbers-explore .nstage { width: min(82vw, 560px, calc((100vh - 520px) * 1.5)); }
  .numbers-explore .nstage .ntray { aspect-ratio: 300 / 170; }
  /* the hedgehog's bubble grows to the left, away from the ear button next to it */
  :is(.numbers-count, .numbers-find, .shapes-find, .shapes-puzzle) .find-prompt .bubble { left: auto; right: 30%; }
  :is(.numbers-count, .numbers-find, .shapes-find, .shapes-puzzle) .find-prompt .bubble::after { left: auto; right: 18px; }
}
@media (orientation: portrait) and (max-width: 560px) {
  .ncard { width: 100%; padding-left: 12px; padding-right: 12px; }
  .ncard-main { gap: 14px; }
  .ncard-left { column-gap: 12px; }
  .numbers-explore .nstage { width: min(80vw, 360px); }
  .numbers-count .count-body { gap: 3vh; }
}

/* ---------- shapes island ("Formų sala") ---------- */
.shape-svg { display: block; width: 100%; height: auto; overflow: visible; }
.mode.puzzle { background: linear-gradient(160deg, #E2F7EC, #BDEBD3); box-shadow: 0 8px 0 #8FD3B0, var(--shadow); animation-delay: .16s; }
.s-art .mini-shape { position: absolute; width: 40%; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .08)); }
.s-art .m1 { left: 0; top: 10%; transform: rotate(-10deg); }
.s-art .m2 { left: 30%; top: -4%; z-index: 1; }
.s-art .m3 { right: 0; top: 12%; width: 36%; transform: rotate(10deg); }
.s-art .m4 { right: 0; top: 6%; width: 46%; transform: rotate(8deg); }
.s-art .mini-house { position: absolute; left: 4%; top: -4%; width: 62%; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .08)); }
.s-art .m5 { right: 4%; top: 18%; width: 15%; transform: rotate(14deg); animation: tapme2 1.6s ease-in-out infinite; }
.mode.puzzle .mode-ic { animation: tapme 1.6s ease-in-out infinite; animation-delay: .5s; }
@keyframes tapme2 { 50% { translate: 0 -10%; } }
.title-shapes { display: inline-flex; gap: 6px; vertical-align: middle; }
.title-shapes .shape-svg { width: 1.15em; }
.bubble-shape { display: inline-block; width: 2.3em; }
.bubble-shapes { display: inline-flex; gap: 6px; }
.bubble-shapes .shape-svg { width: 2em; }

/* explore */
.sgrid { --tw: min(19vw, 32vh, 210px); --g: clamp(14px, 2.6vmin, 26px); margin: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--g); max-width: calc(var(--tw) * 4 + var(--g) * 3); }
.sgrid.many { --tw: min(17vw, 28vh, 190px); }
.stile {
  position: relative; width: var(--tw); aspect-ratio: 1; border-radius: 26%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--shape) 30%, #EFE4D8), var(--shadow);
  transition: transform .12s, box-shadow .12s; animation: islandin .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 50ms);
}
.stile .shape-svg { width: 72%; }
.scard-main { align-items: center; }
.big-shape { position: relative; width: clamp(150px, 30vmin, 250px); aspect-ratio: 1; border-radius: 26%; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 0 color-mix(in srgb, var(--shape) 30%, #EFE4D8); }
.big-shape .shape-svg { width: 76%; }
.big-shape.boing { animation: boing .6s cubic-bezier(.3, 1.6, .5, 1); }
.big-shape .waves { right: -14%; }
.sstage { position: relative; display: grid; place-items: center; width: min(36vw, 400px, calc((100vh - var(--bar) - 140px) * 1.25)); aspect-ratio: 5 / 4; padding: 0; border-radius: clamp(28px, 5vmin, 44px);
  background: radial-gradient(120% 90% at 50% 0%, #fff 0%, #FFF9F0 70%, #FFF2E2 100%); box-shadow: 0 10px 0 #EFE4D8, var(--shadow); overflow: hidden; }
.sghost, .sexample { position: absolute; inset: 0; display: grid; place-items: center; }
.sghost .shape-svg { width: 58%; transition: opacity .5s, scale .6s cubic-bezier(.3, 1.4, .5, 1), filter .5s; }
.sexample { flex-direction: column; align-content: center; gap: 4px; opacity: 0; scale: .2; transition: opacity .35s .15s, scale .55s .15s cubic-bezier(.3, 1.6, .5, 1); }
.sexample .pic-emoji { font-size: clamp(4.4rem, 15vmin, 8rem); }
.sstage.is-morph .sghost .shape-svg { opacity: .22; scale: 1.25; filter: saturate(.6); }
.sstage.is-morph .sexample { opacity: 1; scale: 1; }
@media (orientation: portrait) {
  .sgrid { --tw: min(28vw, 19vh, 210px); max-width: calc(var(--tw) * 2 + var(--g)); }
  .sgrid.many { --tw: min(26vw, 15vh, 190px); max-width: calc(var(--tw) * 3 + var(--g) * 2); }
  .scard { width: min(100%, 640px); padding-top: clamp(26px, 4vmin, 40px); }
  .sstage { width: min(76vw, 480px, calc((100vh - 560px) * 1.25)); min-width: min(70vw, 280px); }
}
@media (orientation: portrait) and (max-width: 560px) {
  .scard { width: 100%; padding-left: 12px; padding-right: 12px; }
  .big-shape { width: min(40vw, 170px); }
  .sstage { width: min(76vw, 340px); }
  .sgrid.many { --tw: min(27vw, 14vh, 130px); }
}

/* find ("Surask formą") */
.sopt { background: #fff; box-shadow: 0 8px 0 #EFE4D8; }
.sopt-in { display: grid; place-items: center; width: calc(var(--s, 1) * 80%); rotate: var(--rot, 0deg); }
.shapes-find .sopts { grid-template-columns: repeat(3, auto); }
.shapes-find .sopts.n4 { grid-template-columns: repeat(4, auto); }
.shapes-find .sopts.n4 .sopt { --sz: min(19vw, 30vh, 190px); }
@media (orientation: portrait) {
  .shapes-find .sopts { grid-template-columns: repeat(2, auto); }
  .shapes-find .sopts.n3 .opt:nth-child(3) { grid-column: span 2; justify-self: center; }
  .shapes-find .sopts.n4 { grid-template-columns: repeat(2, auto); }
  .shapes-find .sopts.n4 .sopt { --sz: min(38vw, 22vh, 230px); }
}

/* puzzle ("Formų dėlionė") */
.shapes-puzzle { --board: min(calc(100vh - var(--bar) - 48px), 44vw, 600px); --ps: .8; --tray: min(31vw, 420px); }
.pz-body { flex: 1; display: flex; align-items: center; justify-content: space-evenly; gap: clamp(12px, 2.4vmin, 32px); min-height: 0; }
.pz-prompt { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: none; }
.pz-board { position: relative; flex: none; width: var(--board); aspect-ratio: 1; border-radius: clamp(28px, 5vmin, 44px);
  background: radial-gradient(120% 90% at 50% 0%, #fff 0%, #FFF9F0 70%, #FFF2E2 100%); box-shadow: 0 10px 0 #EFE4D8, var(--shadow); transition: box-shadow .4s; }
.pz-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.pz-board.is-done { box-shadow: 0 0 0 10px rgba(92, 196, 142, .35), 0 10px 0 #EFE4D8, var(--shadow); }
.pz-board.is-done .pz-art { animation: boing .7s cubic-bezier(.3, 1.6, .5, 1); }
.pz-hole { position: absolute; padding: 0; border-radius: 18%; background: transparent; transition: background .2s, box-shadow .2s; }
.pz-hole.is-filled { pointer-events: none; }
.pz-hole.is-over { background: rgba(92, 196, 142, .22); box-shadow: 0 0 0 5px rgba(92, 196, 142, .55); }
.pz-hole.is-near { background: rgba(255, 255, 255, .28); box-shadow: 0 0 0 4px rgba(255, 255, 255, .75); }
.pz-board.is-choosing .pz-hole:not(.is-filled) { animation: holepulse 1.3s ease-in-out infinite; }
.pz-hole.hint { animation: holehint 1.1s ease-in-out infinite !important; }
.pz-hole.nope { animation: wiggle .5s ease; background: rgba(255, 138, 101, .18); }
.pz-hole.peek { animation: cuepulse .6s ease; background: rgba(124, 196, 242, .22); }
@keyframes holepulse { 50% { background: rgba(124, 196, 242, .2); box-shadow: 0 0 0 4px rgba(124, 196, 242, .45); } }
@keyframes holehint { 50% { background: rgba(255, 210, 122, .35); box-shadow: 0 0 0 8px rgba(255, 210, 122, .8); } }
.pz-fill { transform-box: fill-box; transform-origin: 50% 50%; animation: snapin .45s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes snapin { 0% { transform: scale(1.18); } 55% { transform: scale(.94); } 100% { transform: scale(1); } }
.pz-tray { flex: none; width: var(--tray); display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; gap: clamp(10px, 2vmin, 20px); }
.pz-piece {
  position: relative; display: grid; place-items: center; padding: 8px; min-width: 70px; min-height: 70px;
  width: max(70px, min(calc(var(--board) * var(--fw) * var(--ps) + 18px), var(--tray), calc(var(--board) * .4 + 18px)));
  border-radius: 22px; background: #fff; box-shadow: 0 6px 0 #EFE4D8, var(--shadow);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  animation: islandin .5s cubic-bezier(.3, 1.4, .5, 1) backwards; animation-delay: calc(var(--i) * 70ms);
}
.pz-piece .shape-svg { width: min(calc(var(--board) * var(--fw) * var(--ps)), calc(var(--tray) - 40px), calc(var(--board) * .4)); max-width: none; pointer-events: none; }
.pz-piece.is-picked { box-shadow: 0 0 0 6px var(--c-green), 0 6px 0 #EFE4D8; scale: 1.06; }
.pz-piece.is-dragging, .pz-piece.is-snapping { z-index: 60; background: transparent; box-shadow: none; cursor: grabbing; }
.pz-piece.is-dragging.is-pressed, .pz-piece.is-snapping.is-pressed { transform: none !important; box-shadow: none !important; }
.pz-piece.is-dragging .shape-svg { filter: drop-shadow(0 10px 8px rgba(61, 53, 83, .25)); }
.pz-piece.is-returning { transition: translate .25s ease-out, scale .25s ease-out; }
.pz-piece.is-snapping { transition: translate .22s ease-out, scale .22s ease-out; }
.pz-piece.is-placed { visibility: hidden; }
.pz-piece.wiggle { animation: wiggle .5s ease; }
@media (orientation: portrait) {
  .shapes-puzzle { --board: min(86vw, 50vh, 640px); --ps: .7; }
  .pz-body { flex-direction: column; justify-content: center; gap: 2vh; }
  .pz-prompt { flex-direction: row; }
  .shapes-puzzle { --tray: min(96vw, 760px); }
}
@media (orientation: portrait) and (max-width: 560px) {
  .shapes-puzzle { --board: min(90vw, 44vh); --ps: .62; --mascot-find: clamp(80px, 10vh, 110px); }
  .shapes-puzzle .listen { width: 84px; font-size: 2.8rem; }
  .shapes-find { --mascot-find: clamp(90px, 12vh, 130px); }
  .pz-tray { gap: 10px; }
  .pz-piece { min-width: 62px; min-height: 62px; width: max(62px, min(calc(var(--board) * var(--fw) * var(--ps) + 14px), var(--tray), calc(var(--board) * .4 + 14px))); padding: 6px; border-radius: 18px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .shapes-puzzle { --mascot-find: 84px; --ps: .7; }
  .shapes-puzzle .listen { width: 78px; font-size: 2.6rem; }
}

/* parent zone: shapes */
.schip-sw { background: #fff; border-radius: 9px; }
.schip-sw .shape-svg { width: 78%; }

/* ---------- memory island ("Atminties sala") ---------- */
.mode.pairs { background: linear-gradient(160deg, #FFE8DA, #FFCDB0); box-shadow: 0 8px 0 #EEAE8A, var(--shadow); }
.mode.missing { background: linear-gradient(160deg, #EEE6FD, #D6C6F6); box-shadow: 0 8px 0 #B6A0E6, var(--shadow); animation-delay: .08s; }
.mode.melody { background: linear-gradient(160deg, #DDF0FD, #B4DDF8); box-shadow: 0 8px 0 #8FC3E6, var(--shadow); animation-delay: .16s; }
.mem-art .mini-card {
  width: 42%; background: #fff; overflow: hidden; isolation: isolate; min-height: 0;
}
.mem-art .mc1 { left: 0; top: 10%; transform: rotate(-10deg); }
.mem-art .mc2 { left: 29%; top: -2%; z-index: 1; transform: rotate(3deg); }
.mem-art .mc3 { right: 0; top: 12%; transform: rotate(11deg); animation: tapme2 1.8s ease-in-out infinite; }
.mini-card.is-back { background: linear-gradient(160deg, #C9B4F5, #A98BEA); }
.mini-card.is-back .mback-svg { width: 52%; }
.mc-emoji { font-size: clamp(1.9rem, 6.4vmin, 3.6rem); line-height: 1; }
.mini-blanket { position: absolute; left: -2%; right: -2%; top: 2%; display: flex; align-items: center; justify-content: center; gap: 5%; padding: 10% 6%; border-radius: 24%;
  background: repeating-conic-gradient(#FFD0C7 0 25%, #fff 0 50%) 0 0 / 22px 22px; box-shadow: 0 5px 0 rgba(0, 0, 0, .08); }
.mini-blanket .mc-emoji { font-size: clamp(1.6rem, 5.4vmin, 3rem); }
.mini-gap { width: 1.25em; aspect-ratio: 1; border-radius: 26%; border: 3px dashed rgba(61, 53, 83, .4); display: grid; place-items: center; font-size: clamp(1.4rem, 4.6vmin, 2.6rem); font-weight: 1000; color: rgba(61, 53, 83, .5); background: rgba(255, 255, 255, .6); animation: pulse 1.6s ease-in-out infinite; }
.mini-pad { position: absolute; width: 36%; aspect-ratio: 1; border-radius: 30%; background: var(--pc); box-shadow: 0 5px 0 var(--pd); display: grid; place-items: center; }
.mini-pad .shape-svg { width: 52%; }
.mini-pad.mp1 { left: 0; top: 10%; transform: rotate(-8deg); }
.mini-pad.mp2 { left: 32%; top: -2%; z-index: 1; animation: padlit 1.8s ease-in-out infinite; }
.mini-pad.mp3 { right: 0; top: 12%; transform: rotate(8deg); }
@keyframes padlit { 0%, 30%, 100% { filter: none; scale: 1; } 15% { filter: brightness(1.2); scale: 1.08; } }
.mem-art .mode-ic { bottom: 0; width: 40%; }
.mode.missing .mode-ic { animation: tapme 1.6s ease-in-out infinite; }

/* pairs ("Porų žaidimas") */
.memory-pairs { --mascot-mem: clamp(100px, 17vmin, 170px); }
.mem-body { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(16px, 3.4vmin, 44px); min-height: 0; }
.mem-side { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mem-grid {
  --g: clamp(8px, 1.6vmin, 16px);
  --cs: min(calc((100vw - var(--mascot-mem) - 130px - (var(--cols) - 1) * var(--g)) / var(--cols)), calc((100vh - var(--bar) - 50px - (var(--rows) - 1) * var(--g)) / var(--rows)), 200px);
  display: grid; grid-template-columns: repeat(var(--cols), var(--cs)); grid-auto-rows: var(--cs); gap: var(--g);
}
.mcard { position: relative; width: var(--cs); height: var(--cs); padding: 0; border-radius: 22%; background: transparent; perspective: 900px;
  animation: islandin .45s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 40ms); }
.mcard-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, 1.25, .5, 1); }
.mcard:is(.is-open, .is-matched, .is-peek) .mcard-in { transform: rotateY(180deg); }
.mcard-back, .mcard-front { position: absolute; inset: 0; border-radius: 22%; display: grid; place-items: center; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mcard-back {
  background:
    radial-gradient(circle, rgba(255, 255, 255, .32) 0 8%, transparent 9%) 0 0 / 25% 25%,
    radial-gradient(circle, rgba(255, 255, 255, .18) 0 5%, transparent 6%) 12.5% 12.5% / 25% 25%,
    linear-gradient(160deg, #C9B4F5, #A68AE8);
  box-shadow: inset 0 0 0 clamp(4px, .8vmin, 7px) rgba(255, 255, 255, .6), inset 0 -8px 0 rgba(61, 53, 83, .12);
}
.mback-svg { width: 44%; filter: drop-shadow(0 3px 0 rgba(61, 53, 83, .15)); }
.mcard-front { transform: rotateY(180deg); background: #fff; container-type: inline-size; box-shadow: inset 0 0 0 4px #F1E8DE, inset 0 -8px 0 #F3ECE4; }
.mcard.is-matched .mcard-front { box-shadow: inset 0 0 0 clamp(5px, 1vmin, 8px) var(--c-green), inset 0 -8px 0 #DDF2E6; }
.mcard.is-matched { animation: matchpop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.mcard.hint { animation: hint 1.2s ease-in-out 2; }
@keyframes matchpop { 40% { transform: scale(1.1); } 100% { transform: scale(1); } }
.mf { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.mf-emoji { font-size: 60cqi; line-height: 1; }
.mf-color .cblob { width: 72%; }
.mf-num { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqi; }
.mf-num .numeral { font-size: 46cqi; }
.mf-num .ndots { --die: 34cqi; }
.mf-num .ndie { padding: 8%; }
.mf-letter { background: var(--lbg); }
.mf-letter .lt { font-size: 60cqi; }
.mf-shape .shape-svg { width: 72%; }
@media (orientation: portrait) {
  .memory-pairs { --mascot-mem: clamp(80px, 11vh, 140px); }
  .mem-body { flex-direction: column; justify-content: center; }
  .mem-side { flex-direction: row; }
  .mem-grid { --cs: min(calc((100vw - 50px - (var(--cols) - 1) * var(--g)) / var(--cols)), calc((100vh - var(--bar) - var(--mascot-mem) - 90px - (var(--rows) - 1) * var(--g)) / var(--rows)), 210px); }
}

/* "Kas dingo?" */
.memory-missing { --mascot-mem: clamp(110px, 19vmin, 180px); }
.km-body { flex: 1; display: flex; align-items: center; justify-content: space-evenly; gap: var(--gap); min-height: 0; }
.km-side { flex: none; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.km-ready { position: relative; padding: 4px; border-radius: 50%; background: transparent; }
.km-ready::before { content: ''; position: absolute; inset: -6%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 122, .6), rgba(255, 210, 122, 0) 68%); opacity: 0; transition: opacity .3s; z-index: -1; }
.km-ready.is-ready::before { opacity: 1; animation: pulse 1.6s ease-in-out infinite; }
.km-tap { position: absolute; right: -6%; bottom: 2%; width: 40%; aspect-ratio: 1; border-radius: 50%; background: #fff; color: var(--ink-soft); display: grid; place-items: center; font-size: calc(var(--mascot-mem) * .22); box-shadow: 0 5px 0 rgba(61, 53, 83, .12); opacity: 0; scale: .4; transition: opacity .25s, scale .35s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.km-ready.is-ready .km-tap { opacity: 1; scale: 1; animation: bob 1.4s ease-in-out infinite; }
.km-main { display: flex; flex-direction: column; align-items: center; gap: clamp(16px, 4vh, 40px); }
.km-stage { position: relative; padding: clamp(14px, 2.4vmin, 26px); border-radius: clamp(28px, 4.6vmin, 42px);
  background: repeating-conic-gradient(#FFD9D2 0 25%, #FFF8F4 0 50%) 0 0 / clamp(40px, 6vmin, 60px) clamp(40px, 6vmin, 60px);
  box-shadow: 0 10px 0 #EDB9AE, var(--shadow); }
.km-blanket { --t: min(calc((100vw - var(--mascot-mem) - 240px) / var(--n)), 26vh, 160px); display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(10px, 2vmin, 22px); }
.km-slot { position: relative; width: var(--t); aspect-ratio: 1; border-radius: 24%; background: #fff; display: grid; place-items: center; container-type: inline-size;
  box-shadow: 0 6px 0 rgba(61, 53, 83, .12); animation: islandin .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 320ms); }
.km-emoji { font-size: 64cqi; line-height: 1; }
.km-slot.is-gone { background: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 4px rgba(61, 53, 83, .22); animation: none; }
.km-slot.is-gone::after { content: ''; position: absolute; inset: 6%; border-radius: 20%; border: 4px dashed rgba(61, 53, 83, .3); }
.km-q { font-size: 52cqi; font-weight: 1000; color: rgba(61, 53, 83, .4); line-height: 1; }
.km-slot.hint { animation: hint 1.2s ease-in-out infinite; }
.km-slot.is-back { animation: right .7s cubic-bezier(.3, 1.6, .5, 1) both; box-shadow: 0 0 0 8px rgba(92, 196, 142, .45), 0 6px 0 rgba(61, 53, 83, .12); }
.km-cover { position: absolute; inset: -8px; border-radius: clamp(32px, 5vmin, 48px); display: grid; place-items: center; pointer-events: none;
  background: linear-gradient(170deg, #FFFFFF, #EAF4FF); box-shadow: 0 10px 30px rgba(61, 53, 83, .12);
  opacity: 0; transform: translateX(-70%) scale(.85) rotate(-4deg); transition: opacity .35s, transform .6s cubic-bezier(.3, 1.2, .5, 1); }
.km-cover.is-on { opacity: 1; transform: none; }
.km-cloud { width: min(40%, 200px); color: #CFE3F7; animation: bob 1.4s ease-in-out infinite; }
.km-cloud .shape { width: 100%; height: auto; display: block; }
.km-opts { --osz: min(18vw, 25vh, 180px); min-height: var(--osz); }
.km-opts .opt { --sz: var(--osz); background: #fff; }
.km-opts.n4 { grid-template-columns: repeat(4, auto); }
.km-opt .km-emoji { font-size: 62cqi; }
.bubble-q { font-size: 2em; font-weight: 1000; color: var(--ink); line-height: 1; }
@media (orientation: portrait) {
  .memory-missing { --mascot-mem: clamp(84px, 11vh, 140px); }
  .km-body { flex-direction: column; justify-content: center; gap: 3vh; }
  .km-side { flex-direction: row; }
  .km-blanket { --t: min(calc((100vw - 130px) / 3), 15vh, 170px); max-width: calc(var(--t) * 3 + clamp(10px, 2vmin, 22px) * 2); }
  .km-blanket.n4 { max-width: calc(var(--t) * 2 + clamp(10px, 2vmin, 22px)); }
  .km-opts { --osz: min(34vw, 16vh, 200px); }
  .km-opts.n4 { grid-template-columns: repeat(2, auto); }
}
@media (orientation: portrait) and (min-width: 700px) {
  .km-opts.n4 { grid-template-columns: repeat(4, auto); }
  .km-opts { --osz: min(21vw, 16vh, 200px); grid-template-columns: repeat(3, auto); }
  .km-opts.n3 .opt:nth-child(3) { grid-column: auto; }
}

/* "Pakartok melodiją" */
.memory-melody { --mascot-mem: clamp(110px, 20vmin, 190px); }
.mel-body { flex: 1; display: flex; align-items: center; justify-content: space-evenly; gap: var(--gap); min-height: 0; }
.mel-side { flex: none; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mpads { --p: min(24vw, 46vh, 250px); display: grid; grid-template-columns: repeat(3, var(--p)); gap: clamp(16px, 3vmin, 34px); }
.mpads.n4 { --p: min(26vw, calc((100vh - var(--bar) - 110px) / 2), 230px); grid-template-columns: repeat(2, var(--p)); }
.mpad { width: var(--p); aspect-ratio: 1; padding: 0; border-radius: 30%; background: var(--pc); display: grid; place-items: center;
  box-shadow: 0 10px 0 var(--pd), var(--shadow); filter: saturate(.85) brightness(.96); transition: transform .12s, filter .15s, box-shadow .15s;
  animation: islandin .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.mpad:nth-child(2) { animation-delay: .08s; } .mpad:nth-child(3) { animation-delay: .16s; } .mpad:nth-child(4) { animation-delay: .24s; }
.mpad-shape { width: 44%; display: grid; }
.mpad-shape .shape-svg { filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .14)); }
.mpad.is-lit { filter: brightness(1.15) saturate(1.15); transform: scale(1.07); box-shadow: 0 0 0 10px color-mix(in srgb, var(--pc) 35%, #fff), 0 0 46px 14px color-mix(in srgb, var(--pc) 55%, transparent), 0 10px 0 var(--pd); }
.mpad.wiggle { animation: wiggle .5s ease; }
.mpads.solved .mpad { animation: boing .6s cubic-bezier(.3, 1.6, .5, 1); }
.memory-melody[data-phase="listen"] .mpad:not(.is-lit) { filter: saturate(.7) brightness(.95); }
/* v0.9.40 easy level: 2 big pads, a soft glow on the next right pad after a slip, turtle / rabbit switch */
.mpads.n2 { --p: min(30vw, 52vh, 270px); grid-template-columns: repeat(2, var(--p)); }
.memory-melody[data-level="easy"] .mpad.is-lit { transition-duration: .25s; }
.mpad.is-hint { animation: melhint 1.3s ease-in-out infinite; }
@keyframes melhint { 0%, 100% { box-shadow: 0 10px 0 var(--pd), var(--shadow); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--pc) 30%, #fff), 0 0 30px 8px color-mix(in srgb, var(--pc) 45%, transparent), 0 10px 0 var(--pd); } }
.mel-speed { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .75); box-shadow: var(--shadow); }
.mel-lv { width: 52px; height: 52px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: transparent; opacity: .5; transition: background .15s, opacity .15s, transform .12s; }
.mel-lv.is-on { background: #FFE58A; opacity: 1; box-shadow: 0 3px 0 #E3B92C; }
.mel-lv-ic { font-size: 30px; line-height: 1; }
@media (orientation: portrait) {
  .memory-melody { --mascot-mem: clamp(84px, 11vh, 140px); }
  .mel-body { flex-direction: column; justify-content: center; gap: 4vh; }
  .mel-side { flex-direction: row; }
  .mpads, .mpads.n4 { --p: min(40vw, 25vh, 280px); grid-template-columns: repeat(2, var(--p)); }
  .mpads.n3 .mpad:nth-child(3) { grid-column: span 2; justify-self: center; }
  .mpads.n2 { --p: min(42vw, 30vh, 280px); }
  .mel-lv { width: 46px; height: 46px; } .mel-lv-ic { font-size: 26px; }
}

/* parent zone: memory */
.mgrid-chips { gap: 8px; }
.gprog .mgrid-chips { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); margin-top: 8px; }
.mchip { height: auto; min-height: 44px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 6px 12px; color: var(--ink); background: #F6F2ED; }
.mchip .muted { font-size: .78rem; font-weight: 800; }
.mchip strong { font-size: .95rem; }

/* ---------- Garsų sala ---------- */
/* menu */
.mode.letter { background: linear-gradient(160deg, #FFF3D1, #FFE09A); box-shadow: 0 8px 0 #EEC36A, var(--shadow); animation-delay: .24s; }
.gs-art .mini-card { width: 46%; background: #fff; container-type: inline-size; }
.gs-art .mc-emoji { font-size: 66cqi; line-height: 1; }
.gs-art .mini-card.t3 { left: auto; right: 0; top: 46%; transform: rotate(10deg); }
.gs-art .mini-card.t4 { right: auto; left: 30%; top: 58%; width: 36%; transform: rotate(-6deg); }
.gs-art .mode-ear { left: 0; top: 0; width: 56%; }
.gs-art .gs-letter { font-size: clamp(2.2rem, 8vmin, 4.4rem); background: var(--c-sun); color: var(--ink); }

/* "Pažink" grid */
.ggrid { --tw: min(15vw, 19vh, 168px); --g: clamp(12px, 2.4vmin, 24px); margin: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--g); width: calc(var(--tw) * 4 + var(--g) * 3); max-width: 100%; align-content: center; padding-bottom: 8px; }
.gtile {
  position: relative; width: var(--tw); aspect-ratio: 1; border-radius: 26%; background: #fff; display: grid; place-items: center;
  container-type: inline-size; box-shadow: 0 6px 0 #C9E5F7, var(--shadow);
  transition: transform .12s, box-shadow .12s; animation: islandin .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 35ms);
}
.gtile.world { background: #EEF7FE; box-shadow: 0 6px 0 #B9DCF4, var(--shadow); }
.gtile:active { transform: translateY(4px); box-shadow: 0 2px 0 #C9E5F7; }
.gs-emoji { font-size: 62cqi; line-height: 1; }
.gtile.boing .gs-emoji { display: inline-block; animation: boing .6s cubic-bezier(.3, 1.6, .5, 1); }
.gtile.is-playing { outline: 5px solid #7CC4F2; outline-offset: 3px; }
.gtile .waves { right: 2%; top: 22%; width: 22%; height: 34%; }
.gtile.is-playing .waves { opacity: 1; }
.gtile.is-playing .waves i { animation: wavecue 1.1s ease-out infinite; }
.gtile.is-playing .waves i:nth-child(2) { animation-delay: .2s; }
.gtile.is-playing .waves i:nth-child(3) { animation-delay: .4s; }
.gl-mascot { position: absolute; left: 12px; bottom: 6px; pointer-events: none; --mascot-small: clamp(70px, 11vmin, 110px); }
@media (orientation: portrait) {
  .ggrid { --tw: min(19.5vw, 15vh, 180px); }
  .gl-mascot { display: none; }
}

/* "Kas taip skamba?" */
.sounds-guess, .sounds-start { --mascot-gs: clamp(100px, 17vmin, 170px); }
.gs-body, .ws-body { flex: 1; display: flex; align-items: center; justify-content: space-evenly; gap: var(--gap); min-height: 0; }
.gs-side, .ws-side { flex: none; display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2vh, 20px); }
.gs-play {
  position: relative; width: clamp(110px, 20vmin, 190px); aspect-ratio: 1; border-radius: 50%; background: #fff; color: #3F8FCF;
  display: grid; place-items: center; font-size: clamp(3.4rem, 11vmin, 6rem);
  box-shadow: 0 8px 0 #C9E5F7, 0 0 0 10px rgba(124, 196, 242, .25), var(--shadow); transition: transform .12s, box-shadow .12s;
}
.gs-play:active { transform: translateY(5px); box-shadow: 0 3px 0 #C9E5F7, 0 0 0 10px rgba(124, 196, 242, .25); }
.gs-play .waves { right: -30%; width: 42%; height: 62%; }
.gs-play.is-talking { animation: listen 1s ease-in-out infinite; }
.gs-opts { --osz: min(22vw, 34vh, 220px); }
.gs-opts .opt, .ws-opts .opt { --sz: var(--osz); background: #fff; }
.gs-opts.n4 { --osz: min(19vw, 30vh, 200px); grid-template-columns: repeat(4, auto); }
.gs-opt .gs-emoji, .ws-opt .ws-emoji { font-size: 64cqi; line-height: 1; }

/* "Kuo prasideda žodis?" */
.ws-main { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 4vh, 36px); }
.ws-lead {
  position: relative; width: min(20vw, 30vh, 210px); aspect-ratio: 1; border-radius: 28%; background: #FFF6DC; display: grid; place-items: center;
  container-type: inline-size; box-shadow: 0 8px 0 #EED9A0, 0 0 0 8px rgba(255, 210, 122, .35), var(--shadow); transition: transform .12s;
}
.ws-lead.boing { animation: boing .6s cubic-bezier(.3, 1.6, .5, 1); }
.ws-lead.is-talking { animation: listen 1s ease-in-out infinite; }
.ws-lead.is-matched { box-shadow: 0 8px 0 #EED9A0, 0 0 0 12px rgba(92, 196, 142, .45); }
.ws-emoji { font-size: 64cqi; line-height: 1; }
.ws-ear { position: absolute; right: -9%; bottom: -9%; width: 34%; aspect-ratio: 1; border-radius: 50%; background: #fff; color: #3F8FCF; display: grid; place-items: center; font-size: 20cqi; box-shadow: 0 4px 0 #C9E5F7; }
.ws-lead .waves { right: -26%; top: 30%; width: 26%; height: 40%; }
.ws-opts { --osz: min(20vw, 30vh, 210px); }
.ws-opts.n2 { --osz: min(24vw, 32vh, 230px); grid-template-columns: repeat(2, auto); }
.ws-opt.is-saying { transform: scale(1.07); box-shadow: 0 0 0 8px rgba(124, 196, 242, .55), 0 8px 0 rgba(61, 53, 83, .15); }
.ws-letters .opt { background: var(--card); }
.ws-tile .lt { font-size: 62cqi; }
@media (orientation: portrait) {
  .sounds-guess, .sounds-start { --mascot-gs: clamp(84px, 12vh, 150px); }
  .gs-body, .ws-body { flex-direction: column; justify-content: center; gap: 4vh; }
  .gs-side { flex-direction: row; gap: 6vw; }
  .gs-opts { --osz: min(40vw, 24vh, 250px); grid-template-columns: repeat(2, auto); }
  .gs-opts.n4 { --osz: min(38vw, 22vh, 240px); grid-template-columns: repeat(2, auto); }
  .gs-opts.n3 .opt:nth-child(3) { grid-column: span 2; justify-self: center; }
  .ws-body { gap: 2.5vh; }
  .ws-lead { width: min(40vw, 22vh, 250px); }
  .ws-opts { --osz: min(29vw, 22vh, 230px); grid-template-columns: repeat(3, auto); }
  .ws-opts.n2 { --osz: min(38vw, 24vh, 250px); }
  .ws-opts.n3 .opt:nth-child(3) { grid-column: auto; }
}
/* parent zone: sounds */
.gchip-emoji { font-size: 1.15rem; line-height: 1; }
.credits { margin-top: 10px; font-size: .9rem; }
.credits summary { cursor: pointer; font-weight: 800; color: var(--ink-soft); }
.credits-list { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.credits-list a { color: #3F8FCF; font-weight: 800; word-break: break-word; }

/* "Kas dingo?" on a tall tablet: use the space (bigger things, mascot and options) */
@media (orientation: portrait) and (min-width: 700px) {
  .memory-missing { --mascot-mem: clamp(120px, 16vh, 190px); }
  .km-body { gap: 4.5vh; }
  .km-blanket { --t: min(calc((100vw - 150px) / 3), 19vh, 210px); }
  .km-opts { --osz: min(26vw, 19vh, 220px); }
  .km-opts.n4 { --osz: min(21vw, 17vh, 200px); }
}

/* ---------- install as app (v0.7.1) ---------- */
.top-right { display: flex; align-items: center; gap: 14px; flex: none; }
.install-mini { --tap: 56px; font-size: 24px; color: var(--muted); opacity: .85; }
.install-btn { min-height: 76px; font-size: 1.15rem; padding: 0 30px; margin-top: 6px; }
.install-ok { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--c-green-d); }
.install-ok .icon { font-size: 1.4em; }
.install-card { max-width: 520px; max-height: calc(100dvh - 40px); overflow-y: auto; }
.install-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.install-head h2 { margin: 0; font-size: clamp(1.2rem, 3.2vmin, 1.5rem); font-weight: 900; line-height: 1.2; }
.install-logo { width: 72px; height: 72px; border-radius: 18px; flex: none; box-shadow: 0 4px 0 #E3D6C8; }
.isteps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.istep { display: flex; align-items: center; gap: 12px; background: #F7F1FF; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 1.05rem; line-height: 1.3; }
.istep-n { width: 34px; height: 34px; border-radius: 50%; background: var(--c-lilac); color: #fff; font-weight: 900; display: grid; place-items: center; flex: none; }
.istep-ico { width: 48px; height: 48px; border-radius: 14px; background: #fff; color: #2F7CF6; display: grid; place-items: center; flex: none; font-size: 30px; box-shadow: 0 3px 0 #E6DCF5; }
.istep-ico .icon { width: 1em; height: 1em; }
.install-text { font-size: 1.05rem; font-weight: 700; line-height: 1.4; }
.install-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.install-actions .btn { min-height: 68px; }

/* ---------- start chooser (v0.8.0 / v0.9.8: never overflow horizontally) ---------- */
.top-left { display: flex; align-items: center; gap: 14px; flex: none; min-width: 0; }
.start-btn { font-size: calc(var(--tap) * .5); }
.start-body {
  flex: 1; min-height: 0; min-width: 0; width: 100%; max-width: 100%;
  display: flex; align-items: center; justify-content: center; flex-wrap: nowrap;
  gap: clamp(8px, 1.6vw, calc(var(--gap) * 1.5));
  position: relative; z-index: 2;
  padding-bottom: calc(4vh + var(--safe-b));
  box-sizing: border-box;
}
.start-card {
  --acc-bg: #E3F3FD; --acc-d: #B5DBF2;
  /* Fit two cards + gap + mascot inside the padded screen at any landscape width. */
  --start-side: calc(var(--mascot-small) + clamp(24px, 4vw, 64px));
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  flex: 0 1 auto; min-width: 0;
  width: min(36vw, 56vh, 420px, calc((100% - var(--start-side)) / 2));
  max-width: 100%;
  aspect-ratio: 1 / 1.02; padding: 14px 14px 18px; border-radius: 40px;
  background: linear-gradient(180deg, #fff, var(--acc-bg));
  box-shadow: 0 9px 0 var(--acc-d), var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease;
  animation: islandin .6s cubic-bezier(.3, 1.4, .5, 1) both;
}
.start-card.sc-draw { --acc-bg: #FFEFE0; --acc-d: #F3C9A4; animation-delay: 90ms; }
.start-card.is-pressed { transform: translateY(9px) scale(.98) !important; box-shadow: 0 0 0 transparent, var(--shadow) !important; }
.start-pic { flex: 1; width: 100%; min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.start-art { width: 100%; height: 100%; max-height: 100%; animation: bob 3.4s ease-in-out infinite; }
.start-stack { position: relative; width: 100%; height: 100%; min-width: 0; }
.start-stack .island-art { position: absolute; width: 62%; height: auto; max-width: 100%; }
.start-stack .island-art:nth-child(1) { left: 0; top: 6%; animation: bob 3.2s ease-in-out infinite; }
.start-stack .island-art:nth-child(2) { right: 0; top: 0; width: 52%; animation: bob 3.6s ease-in-out -1s infinite; }
.start-stack .island-art:nth-child(3) { left: 20%; bottom: 0; animation: bob 3s ease-in-out -2s infinite; }
.start-label { font-weight: 900; font-size: clamp(1.05rem, 2.8vmin, 1.5rem); color: var(--ink-soft); }
.start-go { position: absolute; right: 16px; bottom: 14px; width: clamp(40px, 7vmin, 54px); height: clamp(40px, 7vmin, 54px); border-radius: 50%; background: var(--c-green); color: #fff; display: grid; place-items: center; font-size: clamp(22px, 4vmin, 30px); box-shadow: 0 4px 0 var(--c-green-d); }
.start-mascot { align-self: flex-end; flex: none; min-width: 0; }
@media (orientation: portrait) {
  .start-body { flex-direction: column; gap: var(--gap); flex-wrap: nowrap; }
  .start-card { width: min(70vw, 34vh, 440px); --start-side: 0px; }
  .start-mascot { position: absolute; left: 0; bottom: calc(2vh + var(--safe-b)); }
}
@media (orientation: portrait) and (max-width: 560px) { .start-card { width: min(78vw, 33vh); } .start-mascot { display: none; } }
/* Hide mascot earlier in short/narrow landscape so both cards stay fully visible. */
@media (orientation: landscape) and (max-height: 640px),
       (orientation: landscape) and (max-width: 1100px) {
  .start-mascot { display: none; }
  .start-card { --start-side: clamp(16px, 3vw, 40px); width: min(38vw, 58vh, 420px, calc((100% - var(--start-side)) / 2)); }
}
@media (orientation: landscape) and (max-width: 700px) {
  .start-body { flex-wrap: wrap; gap: var(--gap); }
  .start-card { width: min(46vw, 70vh, 360px); }
}

/* ---------- Piešimas (drawing, v0.8.0) ---------- */
.draw {
  --db: clamp(58px, 8.8vmin, 80px); --dg: 6px;
  display: grid; gap: var(--dg);
  grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr;
  grid-template-areas: "tools paper pal" "opts paper acts";
  background: #FFF4E8;
  padding: var(--pad-t) max(8px, var(--safe-r)) var(--pad-b) max(8px, var(--safe-l));
  touch-action: none; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.d-tools { grid-area: tools; display: flex; flex-direction: column; gap: var(--dg); }
.d-opts { grid-area: opts; display: grid; grid-auto-flow: row; grid-template-columns: var(--db); gap: var(--dg); align-self: start; }
.d-opts:has(.d-stamp), .d-opts:has(.d-mopt) { grid-template-columns: repeat(2, var(--db)); margin-right: calc(-1 * var(--db) - var(--dg)); position: relative; z-index: 3; }
.d-pal { grid-area: pal; display: grid; grid-template-columns: repeat(2, var(--db)); gap: var(--dg); align-content: start; }
.d-acts { grid-area: acts; display: grid; grid-template-columns: repeat(2, var(--db)); gap: var(--dg); align-content: end; }
.d-paper-wrap { grid-area: paper; position: relative; min-width: 0; min-height: 0; border-radius: 26px; overflow: hidden; background: #fff; box-shadow: 0 0 0 4px #F1E4D6, var(--shadow); }
.d-paper { position: absolute; inset: 0; touch-action: none; }
.d-canvas, .d-outline { position: absolute; left: 0; top: 0; display: block; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.d-outline { pointer-events: none; }
.draw[data-tool="eraser"] .d-canvas { cursor: cell; }
.draw .d-canvas { cursor: crosshair; }

.d-btn {
  width: var(--db); height: var(--db); flex: none; border-radius: 22px;
  display: grid; place-items: center; background: #fff; color: var(--ink);
  font-size: calc(var(--db) * .5);
  box-shadow: 0 4px 0 #E3D6C8;
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.d-btn .icon, .d-btn .rainbow-ic { width: 1em; height: 1em; display: block; }
.d-btn.is-pressed { transform: translateY(4px) scale(.97) !important; box-shadow: 0 0 0 transparent !important; }
.d-home { border-radius: 50%; color: var(--ink-soft); }
.d-tool.is-on { background: #FFE8A3; box-shadow: 0 4px 0 #E9C25A, 0 0 0 4px #FFC845 inset; transform: scale(1.04); }
.d-tool .rainbow-ic { width: 1.15em; height: 1.15em; }
.d-magic-ic, .d-btn .magic-ic { width: 1.1em; height: 1.1em; display: block; }
.d-mopt .magic-ic { width: .95em; height: .95em; }
.d-btn .bucket-ic { width: 1.2em; height: 1.2em; display: block; }
.bucket-ic .paint { fill: var(--c, #2F5BEA); }
.d-stamp-ic, .d-stamp-ic svg, .stamp-ic { width: 1em; height: 1em; display: block; }
.d-stamp .stamp-ic { width: .9em; height: .9em; }
.d-opt.is-on { box-shadow: 0 4px 0 #9BC6E6, 0 0 0 4px #5AA9E6 inset; background: #EAF6FF; }
.d-dot { width: var(--d); height: var(--d); border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(61, 53, 83, .18); }
.d-dot.is-rainbow { background: conic-gradient(#FF3B30, #FFD60A, #22B04B, #38BDF8, #8B5CF6, #FF3B30); }
.d-swatch {
  width: var(--db); height: var(--db); border-radius: 50%; background: var(--c);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .18), inset 0 -5px 0 rgba(0, 0, 0, .12);
  transition: transform .14s cubic-bezier(.3, 1.5, .5, 1);
  position: relative;
}
.d-swatch.is-on { transform: scale(1.12); box-shadow: 0 0 0 5px #fff, 0 0 0 9px var(--c), 0 6px 10px rgba(0, 0, 0, .2); z-index: 1; }
.d-swatch.is-on::after { content: ''; position: absolute; inset: 34%; border-radius: 50%; background: rgba(255, 255, 255, .85); }
.d-swatch.is-pressed { transform: scale(.94) !important; }
.d-act.is-off { opacity: .4; }
.d-save.is-saved { background: #DFF7E9; color: var(--c-green-d); }
.d-btn.wobble { animation: wobble .6s ease; }

/* clear: two-step confirm */
.d-clear-wrap { position: relative; }
.d-confirm { position: absolute; z-index: 6; display: flex; gap: 10px; padding: 10px; border-radius: 30px; background: #fff; box-shadow: var(--shadow), 0 0 0 4px #FFD2CC;
  right: calc(100% + 10px); top: 50%; transform: translateY(-50%) scale(.6); opacity: 0; pointer-events: none; transition: transform .2s cubic-bezier(.3, 1.5, .5, 1), opacity .15s; }
.is-confirm .d-confirm { transform: translateY(-50%) scale(1); opacity: 1; pointer-events: auto; }
.d-yes { width: calc(var(--db) * 1.3); height: calc(var(--db) * 1.3); border-radius: 50%; background: var(--c-green); color: #fff; box-shadow: 0 5px 0 var(--c-green-d); animation: pulse 1s ease-in-out infinite; }
.d-no { border-radius: 50%; color: var(--muted); align-self: center; }
.is-confirm .d-clear { background: #FFE3DF; color: var(--danger); }
@keyframes pulse { 50% { box-shadow: 0 5px 0 var(--c-green-d), 0 0 0 10px rgba(34, 176, 75, .25); } }
.d-wipe { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(100deg, transparent 0 30%, rgba(255, 255, 255, .95) 45% 55%, transparent 70%); background-size: 300% 100%; }
.d-wipe.go { animation: dwipe .6s ease-in-out; }
@keyframes dwipe { 0% { opacity: 1; background-position: 100% 0; } 100% { opacity: 1; background-position: 0 0; } }

/* overlays: colouring pages + gallery */
.d-layer:empty { display: none; }
.d-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(61, 53, 83, .35); opacity: 0; transition: opacity .2s; touch-action: manipulation; }
.d-overlay.is-open { opacity: 1; }
.d-ov-card { position: relative; background: #FFF9F2; border-radius: 34px; padding: 26px; box-shadow: var(--shadow); max-width: min(94vw, 900px); max-height: calc(100dvh - 40px); overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.d-ov-close { position: absolute; right: 10px; top: 10px; border-radius: 50%; z-index: 2; }
.d-pagelist { --pc: 5; display: grid; grid-template-columns: repeat(var(--pc), minmax(0, 1fr)); gap: clamp(8px, 1.6vmin, 16px); padding-top: 50px; }
.d-page { width: min(14.5vw, 21vh, 160px); aspect-ratio: 1; border-radius: 24px; background: #fff; box-shadow: 0 5px 0 #E3D6C8; padding: 8px; transition: transform .12s; }
.d-page.is-pressed { transform: translateY(5px); box-shadow: none; }
.d-page .page-ic { width: 100%; height: 100%; display: block; }
.d-page.blank { background: #EAF6FF; }
.d-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 50px; min-width: min(70vw, 600px); }
.d-thumb { border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 4px 0 #E3D6C8; aspect-ratio: 4 / 3; }
.d-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.d-empty { grid-column: 1 / -1; display: grid; place-items: center; font-size: 80px; color: var(--line); padding: 30px; }
.d-empty span { font-size: 30px; }
.d-big { display: block; max-width: 86vw; max-height: calc(100dvh - 110px); border-radius: 20px; margin-top: 40px; box-shadow: 0 0 0 4px #F1E4D6; pointer-events: none; }

@media (orientation: portrait) {
  .draw { grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; grid-template-areas: "tools acts" "paper paper" "opts pal"; }
  .d-tools { flex-direction: row; }
  .d-acts { display: flex; justify-content: flex-end; align-content: initial; }
  .d-pal { grid-template-columns: repeat(6, var(--db)); justify-content: end; align-content: end; }
  .d-pagelist { --pc: 4; }
  .d-page { width: min(19vw, 16vh, 170px); }
  .d-confirm { right: auto; left: 50%; top: calc(100% + 10px); transform: translateX(-50%) scale(.6); }
  .is-confirm .d-confirm { transform: translateX(-50%) scale(1); }
  .d-acts > :last-child .d-confirm, .d-clear-wrap .d-confirm { left: auto; right: -40px; transform: scale(.6); }
  .is-confirm .d-clear-wrap .d-confirm { transform: scale(1); }
}
@media (orientation: portrait) and (min-width: 561px) {
  .draw { --db: min(clamp(58px, 8.8vmin, 80px), calc((100vw - 16px - 11 * var(--dg) - 12px) / 12)); }
  .d-tools, .d-acts { gap: var(--dg); }
  .draw { column-gap: 12px; grid-template-columns: minmax(0, 1fr) auto; }
  .d-tools, .d-opts { justify-self: start; }
  .d-acts, .d-pal { justify-self: end; }
  .d-opts { display: grid; grid-template-columns: repeat(3, var(--db)); align-self: end; }
}
@media (orientation: portrait) and (max-width: 560px) {
  .draw { --db: min(58px, calc((100vw - 16px - 6 * var(--dg)) / 7)); --dg: 5px;
    grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto auto; grid-template-areas: "tools" "acts" "paper" "opts" "pal"; }
  .d-tools, .d-acts { justify-content: space-between; }
  .d-opts, .d-opts:has(.d-stamp), .d-opts:has(.d-mopt) { display: flex; flex-direction: row; justify-content: center; align-self: auto; margin: 0; }
  .d-pal { justify-content: center; }
  .d-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-pagelist { --pc: 3; }
  .d-page { width: min(25vw, 15vh); border-radius: 18px; padding: 6px; }
  .d-clear-wrap .d-confirm { right: auto; left: -20px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .draw { --db: clamp(44px, 10.5vh, 56px); --dg: 4px; }
  .d-pal { grid-template-columns: repeat(3, var(--db)); }
  .d-page { width: min(14vw, 26vh); }
  .d-acts { grid-template-columns: repeat(3, var(--db)); }
}

/* ---------- parent zone: info sheet (v0.9.9) ---------- */
.info-btn { gap: 8px; }
.info-i { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; border: 2.5px solid currentColor; font: italic 900 .95em/1 Georgia, serif; color: #7A62C9; flex: none; }
.info-i.big { width: 44px; height: 44px; font-size: 1.4rem; background: #EFE8FC; border: none; }
.info-card { max-width: 460px; text-align: left; }
.info-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.info-head h2 { margin: 0; font-size: 1.35rem; flex: 1; }
.modal-card p.info-desc { font-weight: 600; font-size: 1rem; line-height: 1.45; margin: 0 0 14px; }
.info-links { display: grid; gap: 8px; margin-bottom: 14px; }
.info-link { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 16px; background: #F4F0FA; color: var(--ink); font-weight: 800; text-decoration: none; min-height: 48px; }
.info-link:hover, .info-link:focus-visible { background: #EAE2F8; }
.modal-card p.info-contact { font-size: 1rem; margin: 0 0 6px; overflow-wrap: anywhere; }
.info-contact a { color: #6A52B9; font-weight: 800; }
.modal-card p.info-ver { font-size: .9rem; margin: 0; font-weight: 700; }
@media (max-width: 560px) { .info-btn span:not(.info-i) { display: none; } }
.info-close { width: 48px; height: 48px; min-height: 48px; box-shadow: none; background: #F4F0FA; } .info-close .icon { width: 22px; height: 22px; }

/* v0.9.11: landscape – tools in 2 columns, so the 2-column stamp / magic options sit in the side column
   instead of covering the left edge of the paper (the paper is a little narrower, nothing overlaps it). */
@media (orientation: landscape) {
  .d-tools { display: grid; grid-template-columns: repeat(2, var(--db)); align-content: start; }
  .d-opts, .d-opts:has(.d-stamp), .d-opts:has(.d-mopt) { grid-template-columns: repeat(2, var(--db)); margin-right: 0; }
}

/* ---------- play-time rest overlay (v0.9.14) ---------- */
.rest-overlay {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  padding: max(16px, var(--safe-t)) max(16px, var(--safe-r)) max(16px, var(--safe-b)) max(16px, var(--safe-l));
  background: rgba(40, 48, 90, .45);
  opacity: 0; transition: opacity .25s ease;
  touch-action: manipulation;
}
.rest-overlay.is-open { opacity: 1; }
.rest-card {
  width: min(100%, 520px);
  background: linear-gradient(180deg, #1B2450 0%, #2A3A7A 55%, #3D4F9A 100%);
  color: #F7F3FF;
  border-radius: 32px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(20, 24, 60, .45);
  animation: pop .35s cubic-bezier(.3, 1.4, .5, 1);
}
.rest-art { position: relative; height: 140px; margin: 0 auto 8px; width: min(100%, 280px); }
.rest-moon {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%);
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFF6C8, #F0D66A 60%, #E0B84A);
  box-shadow: 0 0 0 10px rgba(255, 246, 200, .18), 0 12px 28px rgba(0,0,0,.25);
  display: grid; place-items: center;
  animation: restFloat 3.6s ease-in-out infinite;
}
.rest-moon-face { font-size: 54px; line-height: 1; filter: grayscale(.1); }
.rest-stars { position: absolute; inset: 0; pointer-events: none; }
.rest-star { position: absolute; color: #FFE9A8; font-size: 22px; opacity: .85; animation: restTwinkle 2.4s ease-in-out infinite; }
.rest-star.s1 { left: 8%; top: 18%; animation-delay: 0s; }
.rest-star.s2 { right: 10%; top: 12%; font-size: 16px; animation-delay: .4s; }
.rest-star.s3 { left: 18%; bottom: 10%; font-size: 18px; animation-delay: .9s; }
.rest-star.s4 { right: 16%; bottom: 18%; animation-delay: 1.3s; }
@keyframes restFloat { 50% { transform: translate(-50%, -52%); } }
@keyframes restTwinkle { 50% { opacity: .35; transform: scale(1.15); } }
.rest-title { margin: 6px 0 4px; font-size: clamp(1.6rem, 5vmin, 2.2rem); font-weight: 900; color: #FFF8E8; }
.rest-sub { margin: 0 0 18px; font-size: 1.1rem; color: #D7DFF8 !important; font-weight: 700; }
.rest-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.rest-btn { min-height: 72px; min-width: 150px; font-size: 1.15rem; border-radius: 22px; }
.rest-btn.btn-primary { background: #F0D66A; color: #2A2A20; box-shadow: 0 6px 0 #C9A83A; }
.rest-btn.btn-ghost { background: rgba(255,255,255,.12); color: #FFF8E8; border: 2px solid rgba(255,255,255,.28); }
.rest-hint { margin: 14px 0 0; color: #B8C3E8 !important; }
.timer-pcard h2 .icon { color: #5B6FCF; }
.timer-seg { margin: 10px 0 6px; }
.timer-seg .seg-btn { min-height: 64px; padding: 0 18px; font-size: 1.05rem; }
.timer-status { margin: 8px 0 0; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .rest-moon, .rest-star { animation: none; }
}

/* ---------- v0.9.15 phone-nav: islands never slide under the top bar ----------
   The grid is sized from the real space left in .home-body (container query units),
   so the bar (incl. safe-area-inset-top) always keeps its own room; 'safe' centring
   never lets an oversized grid overflow upwards. Older browsers keep the vh fallback. */
.home-body { container-type: size; align-items: safe center; justify-content: safe center; overflow: hidden; }
@supports (width: 1cqh) {
  /* tile ≈ 0.75·w (art) + ~44px (title pill + padding) → solve the grid width from the free height */
  .islands { width: min(100%, 980px, calc(200cqh - 190px)); }
  @media (orientation: portrait) {
    .islands { width: min(100%, 680px, calc((100cqh - var(--mascot-home) - 3 * var(--gap) - 140px) * .86 + var(--gap))); }
  }
  @media (orientation: portrait) and (max-height: 700px) {
    .home-mascot { display: none; }
    .islands { width: min(100%, 680px, calc((100cqh - 2 * var(--gap) - 140px) * .86 + var(--gap))); }
  }
}
.islands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (orientation: portrait) { .islands { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.island-title { max-width: 100%; }
@media (max-height: 520px) and (orientation: landscape) {
  .island { padding: 4px 6px 8px; }
  .island-title { font-size: .8rem; padding: 3px 7px; letter-spacing: -.01em; }
}

/* ---------- Rašyba (letters/write): trace a capital letter ---------- */
.mini-card.trace { background: #fff; color: transparent; -webkit-text-stroke: 3px var(--c-sun); }
.rasyba .ras-body { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(16px, 4vmin, 48px); min-height: 0; padding-bottom: var(--safe-b); }
.ras-side { display: flex; flex-direction: column; align-items: center; gap: 2vh; }
.ras-card {
  position: relative; width: clamp(84px, 17vmin, 170px); aspect-ratio: 1; border-radius: 26%; background: var(--card);
  container-type: inline-size; display: grid; place-items: center; box-shadow: 0 8px 0 rgba(61, 53, 83, .15);
}
.ras-card .lt { font-size: 62cqi; font-weight: 1000; line-height: 1; color: var(--ink); }
.ras-card .waves { right: -26%; top: 30%; width: 26%; height: 40%; }
.ras-card.is-talking { animation: listen 1s ease-in-out infinite; }
.ras-pad {
  position: relative; width: min(calc(100vh - var(--bar) - 8vh), 62vw, 760px); aspect-ratio: 1; flex: none;
  background: #fff; border-radius: clamp(24px, 5vmin, 44px); box-shadow: 0 10px 0 #EFE4D8, var(--shadow);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: box-shadow .25s;
}
.ras-pad.is-free { background: #FFFCF2; }
.ras-pad.is-solved { box-shadow: 0 10px 0 #EFE4D8, 0 0 0 12px rgba(92, 196, 142, .45); }
.ras-svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.ras-svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ras-svg .ghost { stroke: #EFE8F7; stroke-width: 11; }
.ras-svg .ghost.faint { opacity: .45; }
.ras-svg .now.faint { opacity: .45; }
.ras-svg .now { stroke: #A996D6; stroke-width: 2.4; stroke-dasharray: .1 4.4; }
.ras-svg .now.dot, .ras-svg .ghost.dot { stroke-width: 9; stroke-dasharray: none; }
.ras-svg .start { fill: var(--c-green); stroke: #fff; stroke-width: 1.2; }
.ras-svg .num { fill: #fff; font: 900 6.2px/1 system-ui, sans-serif; text-anchor: middle; pointer-events: none; }
.ras-svg .arrow { stroke: var(--c-green); stroke-width: 1.8; }
.ras-svg .done { stroke: var(--c-coral); stroke-width: 9; }
.ras-svg .done.dot { stroke-width: 10; }
.ras-svg .ink { stroke: #3D3553; stroke-width: 6; opacity: .85; transition: opacity .35s, stroke .2s; }
.ras-svg .ink.is-wrong { stroke: #F3A091; opacity: .35; }
.ras-svg .demo-line { stroke: var(--c-sky); stroke-width: 7; opacity: .85; }
.ras-svg .demo-hand { fill: #FFC61A; stroke: #fff; stroke-width: 1.4; }
@media (orientation: portrait) {
  .rasyba .ras-body { flex-direction: column; gap: 2.4vh; }
  .ras-side { flex-direction: row; gap: 6vw; }
  .ras-pad { width: min(92vw, 640px, calc(100vh - var(--bar) - var(--mascot-find) - 16vh)); }
}
.mode.write { background: linear-gradient(160deg, #FFF3D6, #FFE1A3); box-shadow: 0 8px 0 #EEC774, var(--shadow); animation-delay: .16s; }
.mode.write .mode-ic { animation: tapme 1.6s ease-in-out infinite; animation-delay: .5s; }
/* Rašyba lowercase: copybook lines + cursive glyph on the card */
.ras-svg .rl { stroke: #E9E0F4; stroke-width: .8; }
.ras-svg .rl.mid { stroke-dasharray: 2 2; }
.ras-svg .rl.asc, .ras-svg .rl.desc { stroke: #F3EEF9; stroke-dasharray: 1 2.5; }
.ras-pad.is-lower .ghost { stroke-width: 9; }
.ras-pad.is-cursive .ghost { stroke-width: 8; }
.ras-pad.is-cursive .done { stroke-width: 7; }
.ras-card .lt .ras-mini { width: 80cqi; height: 80cqi; display: block; }
.ras-mini path { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.ras-mini path.dot { stroke-width: 10; }

/* Skaičių sala: five modes (3 + 2 in landscape, 2 + 2 + 1 in portrait) */
.modes.n5 { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 2.4vmin, 22px); max-width: calc(3 * min(26vh, 22vw, 230px) + 2 * 22px); }
.modes.n5 .mode { width: min(26vh, 22vw, 230px); border-radius: 32px; }
.modes.n5 .mode-badge { width: 40px; height: 40px; font-size: 23px; left: 9px; top: 9px; }
.modes.n5 .mode-go { width: 46px; height: 46px; font-size: 26px; right: 9px; bottom: 9px; }
.modes.n5 .mode.find { animation-delay: .16s; }
.modes.n5 .mode.write { animation-delay: .32s; }
@media (orientation: portrait) {
  .modes.n5 { flex-direction: row; max-width: calc(2 * min(40vw, 18vh, 260px) + 16px); gap: 14px; }
  .modes.n5 .mode { width: min(40vw, 18vh, 260px); border-radius: 28px; }
  .modes.n5 .mode-badge { width: 36px; height: 36px; font-size: 21px; left: 8px; top: 8px; }
  .modes.n5 .mode-go { width: 42px; height: 42px; font-size: 24px; right: 8px; bottom: 8px; }
}
/* Skaičių rašyba: digit card + "that many apples" after tracing */
.numwrite .ras-card .lt { font-variant-numeric: lining-nums; }
.ras-count { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4%; padding: 10%; background: rgba(255, 255, 255, .82); border-radius: inherit; pointer-events: none; }
.ras-count .ras-thing { width: 26%; aspect-ratio: 1; animation: nthingin .35s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 90ms); }
.ras-count.many .ras-thing { width: 17%; }
.ras-count .ras-thing svg { width: 100%; height: 100%; display: block; }
@media (orientation: landscape) and (max-height: 500px) {
  .modes.n5 { gap: 12px; }
  .modes.n5 .mode { border-radius: 24px; }
  .modes.n5 .mode-badge { width: 28px; height: 28px; font-size: 16px; left: 6px; top: 6px; }
  .modes.n5 .mode-go { width: 32px; height: 32px; font-size: 18px; right: 6px; bottom: 6px; box-shadow: 0 3px 0 var(--c-green-d); }
}
/* v0.9.21: Kas naujo */
.ver-link { display: inline; padding: 0; min-height: 0; font: inherit; color: #6A52B9; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.upd-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 10px 16px; border-radius: 999px; background: #FFF1C9; color: #7A5300; font-weight: 800; font-size: 1rem; box-shadow: 0 3px 0 #F0D27A; }
.upd-badge .icon { width: 22px; height: 22px; }
.wn-card { max-width: 560px; max-height: calc(100dvh - 40px); display: flex; flex-direction: column; text-align: left; }
.wn-ico .icon { width: 26px; height: 26px; color: #6A52B9; }
.wn-list { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; padding-right: 4px; }
.wn-rel { padding: 14px 16px; border-radius: 18px; background: #F8F5FC; margin-bottom: 10px; }
.wn-rel.is-new { background: #EFE8FC; }
.wn-rel h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 6px; font-size: 1.15rem; }
.wn-v { color: #6A52B9; }
.wn-date { font-size: .95rem; font-weight: 700; color: var(--ink-soft); }
.wn-rel ul { margin: 0; padding-left: 1.2em; }
.wn-rel li { font-size: 1.05rem; line-height: 1.45; font-weight: 600; margin: 4px 0; }
/* v0.9.22: 22 sounds – more columns so "Pažink garsus" fits without scrolling */
@media (orientation: landscape) {
  .ggrid { --tw: min(12.5vw, 17.5vh, 150px); width: calc(var(--tw) * 6 + var(--g) * 5); }
}
@media (orientation: portrait) and (min-width: 600px) {
  .ggrid { --tw: min(16.5vw, 13vh, 170px); width: calc(var(--tw) * 5 + var(--g) * 4); }
}
@media (orientation: landscape) and (max-height: 500px) {
  .ggrid { --tw: min(9.2vw, 20vh, 110px); width: calc(var(--tw) * 8 + var(--g) * 7); }
}

/* ---------- v0.9.26: result modal, gate, rest and pop-ups that fit every screen (phone landscape first) ----------
   The end-of-round card, the parent gate, the time-up overlay and the sleep screen used fixed minimum sizes that add
   up to more than a landscape phone is tall (320-430 px). Sizes now come from the viewport height too (dvh, vh as
   fallback), buttons get an explicit width AND height (never rely on aspect-ratio alone), and on short landscape
   screens the cards switch to a side-by-side layout. Safe-area insets are respected on all sides. */
html { background-color: var(--bg); }
.celebrate { padding: max(12px, var(--safe-t)) max(12px, var(--safe-r)) max(12px, var(--safe-b)) max(12px, var(--safe-l)); }
.celebrate-card {
  --rb: min(clamp(96px, 15vmin, 124px), 22vh);
  --rb: min(clamp(96px, 15vmin, 124px), 22dvh);
  --ts: clamp(40px, 9vmin, 76px);
  --mascot-big: clamp(96px, min(max(30vmin, 140px), 30vh), 260px);
  --mascot-big: clamp(96px, min(max(30vmin, 140px), 30dvh), 260px);
  max-width: 100%; max-height: 100%; min-width: 0;
  gap: clamp(8px, 2vh, 20px);
  padding: clamp(14px, 3vh, 28px) clamp(18px, 4vmin, 36px);
  border-radius: clamp(28px, 6vmin, 44px);
}
.celebrate-card .tstar { width: var(--ts); height: var(--ts); flex: none; aspect-ratio: auto; }
.celebrate-card .trophy { gap: clamp(4px, 1.2vmin, 8px); flex: none; }
.celebrate-card > .mascot { height: calc(var(--size) * 190 / 210); }
.celebrate-card .frow { flex-wrap: nowrap; justify-content: center; align-items: center; gap: clamp(16px, 3vmin, 24px); margin: 0; flex: none; }
.round-btn { width: var(--rb, 96px); height: var(--rb, 96px); min-width: 0; aspect-ratio: auto; flex: none; padding: 0; font-size: calc(var(--rb, 96px) * .5); }
.round-btn .icon { width: 1em; height: 1em; }
/* the green button's glow stays inside the gap to its neighbour, so both buttons always read as the same size */
.round-btn.again { box-shadow: 0 7px 0 var(--c-green-d), 0 0 0 0 rgba(92, 196, 142, 0); animation: roundPulse 1.8s ease-in-out infinite; }
@keyframes roundPulse { 50% { box-shadow: 0 7px 0 var(--c-green-d), 0 0 0 calc(var(--rb, 96px) * .07) rgba(92, 196, 142, .3); } }
@media (prefers-reduced-motion: reduce) { .round-btn.again { animation: none; } }
@media (max-height: 520px) and (orientation: landscape) {
  :root { --pad-t: max(8px, var(--safe-t)); --pad-b: max(8px, var(--safe-b)); }
  .celebrate-card {
    --rb: clamp(68px, 26vh, 112px); --rb: clamp(68px, 26dvh, 112px);
    --ts: clamp(32px, min(11vmin, 14vh), 56px); --ts: clamp(32px, min(11vmin, 14dvh), 56px);
    --mascot-big: clamp(110px, 56vh, 230px); --mascot-big: clamp(110px, 56dvh, 230px);
    display: grid; grid-template-columns: auto auto; grid-template-areas: 'mascot stars' 'mascot btns';
    align-items: center; justify-items: center; column-gap: clamp(18px, 4vw, 40px); row-gap: clamp(10px, 4vh, 22px);
    padding: clamp(12px, 3.5vh, 24px) clamp(18px, 4vw, 36px);
  }
  .celebrate-card > .mascot { grid-area: mascot; }
  .celebrate-card .trophy { grid-area: stars; }
  .celebrate-card .tstar:nth-child(odd) { margin-top: 8px; }
  .celebrate-card .frow { grid-area: btns; }

  /* parent gate: question + title on the left, keypad on the right, no scrolling */
  .gate .topbar { position: absolute; top: max(8px, var(--safe-t)); left: var(--pad-l); min-height: 0; z-index: 4; }
  .gate .topbar .icon-btn { --tap: 56px; }
  .gate .topbar .spacer { display: none; }
  .gate-card {
    width: min(calc(100% - 152px), 640px); max-height: 100%; overflow: visible;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(4, auto); align-content: center; align-items: center; column-gap: 20px;
    padding: 14px 18px; border-radius: 28px;
  }
  .gate-card > :not(.numpad) { grid-column: 1; }
  .gate-card > .numpad { grid-column: 2; grid-row: 1 / span 4; gap: 8px; }
  .gate-card .gate-lock { width: 44px; height: 44px; font-size: 24px; }
  .gate-card h1 { font-size: 1.25rem; margin: 2px 0 0; }
  .gate-card p { font-size: .85rem; margin: 0; line-height: 1.25; }
  .gate-q { font-size: clamp(1.5rem, 8vh, 2.4rem); font-size: clamp(1.5rem, 8dvh, 2.4rem); gap: 8px; margin: 0; }
  .key { height: clamp(42px, calc((100vh - var(--pad-t) - var(--pad-b) - 28px - 24px) / 4 - 8px), 68px); height: clamp(42px, calc((100dvh - var(--pad-t) - var(--pad-b) - 28px - 24px) / 4 - 8px), 68px); border-radius: 18px; font-size: 1.5rem; }
  .gate-card.ok { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; min-height: 0; padding: 18px; }
  .gate-card.ok > .gate-success { grid-column: 1; gap: 8px; }
  .gate-check { width: 72px; height: 72px; font-size: 42px; line-height: 72px; }
  .gate-ok-text { font-size: 1.3rem; }

  /* time-up overlay + sleep screen: picture on the left, text and buttons on the right */
  .rest-card {
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(16px, 4vw, 32px); align-content: center; align-items: center;
    width: min(100%, 680px); max-height: 100%; padding: 16px 22px; border-radius: 28px;
  }
  .rest-card > :first-child { grid-column: 1; grid-row: 1 / span 5; }
  .rest-card > :not(:first-child) { grid-column: 2; }
  .rest-art { width: clamp(110px, 32vh, 150px); height: clamp(100px, 30vh, 130px); margin: 0; }
  .rest-moon { width: clamp(76px, 22vh, 96px); height: clamp(76px, 22vh, 96px); }
  .rest-moon-face { font-size: clamp(38px, 11vh, 48px); }
  .rest-title { margin: 0 0 2px; font-size: clamp(1.4rem, 5vmin, 1.8rem); }
  .rest-sub { margin: 0 0 12px; font-size: 1rem; }
  .rest-actions { gap: 10px; }
  .rest-btn { min-height: 60px; min-width: 128px; padding: 0 18px; font-size: 1.1rem; }
  .rest-hint { margin: 10px 0 0; }
  .rest-screen .rest-card { text-align: center; }
  .rest-screen .mascot { margin: 0; --size: clamp(110px, 44vh, 190px) !important; }
  .rest-screen .rest-card h1 { margin: 0 0 4px; font-size: clamp(1.5rem, 5.5vmin, 2.1rem); }
  .rest-screen .rest-card p { margin: 0; }
  .rest-screen .sleep-parent-btn { margin: 14px auto 0; min-height: 60px; }

  /* generic modals: always inside the screen, side-by-side where it helps */
  .timer-modal-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 20px; align-items: center; max-width: 640px; padding: 16px 64px 16px 22px; }
  .timer-modal-card > :not(.timer-modal-actions):not(.timer-modal-x) { grid-column: 1; }
  .timer-modal-card > .timer-modal-actions { grid-column: 2; grid-row: 1 / span 3; gap: 10px; }
  .timer-modal-card .timer-modal-icon { width: 48px; height: 48px; margin: 0; justify-self: start; }
  .timer-modal-card .timer-modal-icon svg { width: 26px; height: 26px; }
  .timer-modal-card h2 { font-size: 1.3rem; margin: 6px 0 2px; }
  .timer-modal-card > p.muted { margin: 0; }
  .timer-modal-card { text-align: left; }
  .timer-modal-actions .btn { min-height: 56px; height: auto; padding: 8px 14px; font-size: 1.05rem; line-height: 1.2; text-align: center; }
  .timer-modal-card .icon-btn.timer-modal-x { --tap: 44px; top: 8px; right: 8px; }
  .info-card { max-width: 660px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); column-gap: 22px; align-content: center; }
  .info-card > .info-head, .info-card > p { grid-column: 1; }
  .info-card > .info-links { grid-column: 2; grid-row: 1 / span 4; align-self: center; margin: 0; }
  .modal-card { padding: 16px 20px; }
  /* explore cards (letters / colours / shapes / numbers): close button never sits on the next arrow */
  .lcard .icon-btn.nav { --tap: 60px; }
  .lcard-close.icon-btn { --tap: 52px; top: -12px; right: -4px; }
}
.modal { padding: max(12px, var(--safe-t)) max(12px, var(--safe-r)) max(12px, var(--safe-b)) max(12px, var(--safe-l)); }
.modal > .modal-card { max-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }


/* Parent-facing opt-in for the full offline audio pack (v0.9.35) */
.offline-modal { z-index: 80; }
.offline-card {
  max-width: 440px;
  width: min(440px, 100%);
  text-align: center;
  padding: 28px 24px 22px;
  border-radius: 28px;
}
.offline-head { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.offline-ico {
  width: 76px; height: 76px; border-radius: 50%;
  background: #EAF6FF; color: #2D6E99;
  display: grid; place-items: center;
  box-shadow: 0 3px 0 #C9E5F7;
}
.offline-ico .icon { width: 40px; height: 40px; }
.offline-card h2 { font-size: 1.45rem; line-height: 1.25; margin: 6px 0 0; text-wrap: balance; }
.offline-size { font-size: 1.2rem; margin: 10px 0 18px; font-weight: 800; color: var(--ink-soft); }
.offline-size strong { color: var(--ink); }
.offline-actions { justify-content: center; margin-top: 4px; flex-wrap: nowrap; }
.offline-actions .btn { flex: 1 1 0; min-width: 0; min-height: 64px; font-size: 1.15rem; padding: 0 16px; }

.offline-pcard .offline-bar {
  height: 14px;
  background: #EEEAF8;
  border-radius: 99px;
  overflow: hidden;
  margin: 12px 0 8px;
}
.offline-pcard .offline-bar-fill {
  height: 100%;
  width: 0;
  background: var(--c-green);
  border-radius: inherit;
  transition: width .3s ease;
}
.offline-status { font-weight: 700; }
.offline-parent-actions { margin-top: 8px; }

@media (orientation: landscape) and (max-height: 500px) {
  .offline-card { padding: 16px 20px 14px; }
  .offline-ico { width: 56px; height: 56px; }
  .offline-ico .icon { width: 28px; height: 28px; }
  .offline-card h2 { font-size: 1.2rem; }
  .offline-size { margin: 6px 0 10px; font-size: 1.05rem; }
  .offline-actions .btn { min-height: 52px; font-size: 1.05rem; }
}

/* ---------- mascot life animations (preview; hook into games after approval) ----------
   Transform/opacity only. No mouth morph. Idle stays small so it cannot cover taps.
   .is-reacting already pauses talking motions; idle never uses .is-reacting. */
.mascot .m-life {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}
.mascot .m-life-dot,
.mascot .m-life-paint,
.mascot .m-life-shape,
.mascot .m-life-note,
.mascot .m-life-ring,
.mascot .m-life-z,
.mascot .m-life-burst {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
/* Busy (child is answering): quieter baseline breathe */
.mascot.is-idle-busy .m-body { animation-duration: 5.2s; }

/* Shared idle: look around */
.mascot.is-idle-look .m-head {
  animation: idle-look 2.2s cubic-bezier(.4, .15, .2, 1) both;
  transition: none;
}
@keyframes idle-look {
  0%, 100% { transform: rotate(0deg); }
  16% { transform: rotate(-12deg); }
  34% { transform: rotate(-11deg); }
  52% { transform: rotate(14deg); }
  70% { transform: rotate(12deg); }
  84% { transform: rotate(-3deg); }
}

/* Shared idle: weight shift */
.mascot.is-idle-shift .m-body { animation: idle-shift 1.6s cubic-bezier(.4, .2, .2, 1) both; }
.mascot.is-idle-shift .m-foot-l { animation: idle-shift-fl 1.6s ease both; }
.mascot.is-idle-shift .m-foot-r { animation: idle-shift-fr 1.6s ease both; }
.mascot.is-idle-shift .m-shadow { animation: idle-shift-shadow 1.6s ease both; }
@keyframes idle-shift {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  28% { transform: rotate(-3.2deg) translateX(-2%); }
  68% { transform: rotate(3.2deg) translateX(2%); }
}
@keyframes idle-shift-fl {
  0%, 100% { transform: none; }
  28% { transform: translateY(4%) rotate(-6deg); }
  68% { transform: translateY(-10%) rotate(8deg); }
}
@keyframes idle-shift-fr {
  0%, 100% { transform: none; }
  28% { transform: translateY(-10%) rotate(-8deg); }
  68% { transform: translateY(4%) rotate(6deg); }
}
@keyframes idle-shift-shadow {
  0%, 100% { transform: scale(1) translateX(0); opacity: .08; }
  28% { transform: scale(1.06, .9) translateX(-6%); opacity: .07; }
  68% { transform: scale(1.06, .9) translateX(6%); opacity: .07; }
}

/* Shared idle: scratch head */
.mascot.is-idle-scratch .m-arm { animation: idle-scratch-arm 1.8s cubic-bezier(.4, .2, .25, 1) both; }
.mascot.is-idle-scratch .m-head { animation: idle-scratch-head 1.8s ease both; transition: none; }
@keyframes idle-scratch-arm {
  0%, 100% { transform: rotate(0deg); }
  18% { transform: rotate(-108deg) translate(-8%, -12%); }
  28% { transform: rotate(-96deg) translate(-6%, -8%); }
  38% { transform: rotate(-112deg) translate(-8%, -12%); }
  48% { transform: rotate(-98deg) translate(-6%, -8%); }
  58% { transform: rotate(-110deg) translate(-8%, -12%); }
  78% { transform: rotate(-20deg); }
}
@keyframes idle-scratch-head {
  0%, 100% { transform: none; }
  22%, 60% { transform: rotate(-8deg) translate(2%, 2%); }
}

/* Taškis: count 1-2-3 dots */
.mascot .m-life-dot {
  width: 11%; aspect-ratio: 1; border-radius: 50%;
  background: #7EC8C4; box-shadow: 0 1px 0 rgba(61, 53, 83, .18);
  left: calc(58% + var(--i) * 10%);
  top: 22%;
}
.mascot.is-idle-count .m-arm { animation: idle-count-arm 2.4s cubic-bezier(.4, .15, .25, 1) both; }
.mascot.is-idle-count .m-head { animation: idle-count-head 2.4s ease both; transition: none; }
.mascot.is-idle-count .m-life-dot { animation: idle-count-dot 2.4s ease both; }
.mascot.is-idle-count .m-life-dot:nth-child(1) { animation-delay: 0s; }
.mascot.is-idle-count .m-life-dot:nth-child(2) { animation-delay: 0s; }
.mascot.is-idle-count .m-life-dot:nth-child(3) { animation-delay: 0s; }
@keyframes idle-count-arm {
  0%, 100% { transform: rotate(0deg); }
  12%, 84% { transform: rotate(-58deg) translate(-4%, -8%); }
}
@keyframes idle-count-head {
  0%, 100% { transform: none; }
  18%, 28% { transform: rotate(-6deg) translateY(2%); }
  38%, 48% { transform: rotate(0deg) translateY(0); }
  52%, 62% { transform: rotate(-6deg) translateY(2%); }
  72%, 82% { transform: rotate(4deg); }
}
@keyframes idle-count-dot {
  0%, 8% { opacity: 0; transform: scale(.3) translateY(20%); }
  /* staggered via keyframe times using --i */
  16% { opacity: calc(var(--i) == 1); }
}
/* Reliable stagger without CSS relational equals: per-child keyframes */
.mascot.is-idle-count .m-life-dot:nth-child(1) { animation-name: idle-count-dot-1; }
.mascot.is-idle-count .m-life-dot:nth-child(2) { animation-name: idle-count-dot-2; }
.mascot.is-idle-count .m-life-dot:nth-child(3) { animation-name: idle-count-dot-3; }
@keyframes idle-count-dot-1 {
  0%, 12% { opacity: 0; transform: scale(.4) translateY(16%); }
  20%, 78% { opacity: 1; transform: scale(1) translateY(0); }
  90%, 100% { opacity: 0; transform: scale(.6) translateY(-10%); }
}
@keyframes idle-count-dot-2 {
  0%, 32% { opacity: 0; transform: scale(.4) translateY(16%); }
  40%, 78% { opacity: 1; transform: scale(1) translateY(0); }
  90%, 100% { opacity: 0; transform: scale(.6) translateY(-10%); }
}
@keyframes idle-count-dot-3 {
  0%, 52% { opacity: 0; transform: scale(.4) translateY(16%); }
  60%, 78% { opacity: 1; transform: scale(1) translateY(0); }
  90%, 100% { opacity: 0; transform: scale(.6) translateY(-10%); }
}

/* Aidas: listen, head tilt + soft sound rings */
.mascot .m-life-ring {
  left: 68%; top: 18%;
  width: 18%; aspect-ratio: 1;
  border: 2px solid rgba(90, 140, 200, .55);
  border-radius: 50%;
}
.mascot .m-life-ring.r2 { left: 72%; top: 14%; }
.mascot.is-idle-listen .m-head { animation: idle-listen-head 2.2s cubic-bezier(.4, .2, .2, 1) both; transition: none; }
.mascot.is-idle-listen .m-life-ring.r1 { animation: idle-listen-ring 2.2s ease both; }
.mascot.is-idle-listen .m-life-ring.r2 { animation: idle-listen-ring 2.2s .28s ease both; }
@keyframes idle-listen-head {
  0%, 100% { transform: none; }
  18%, 72% { transform: rotate(-14deg) translate(2%, 1%); }
}
@keyframes idle-listen-ring {
  0% { opacity: 0; transform: scale(.4); }
  30% { opacity: .7; transform: scale(.85); }
  100% { opacity: 0; transform: scale(1.55); }
}

/* Saulė: play with colour dabs */
.mascot .m-life-paint {
  width: 12%; aspect-ratio: 1; border-radius: 50%;
  background: var(--c);
  left: calc(60% + var(--i) * 12%);
  top: calc(20% + var(--i) * 6%);
  box-shadow: 0 1px 0 rgba(61, 53, 83, .18);
}
.mascot.is-idle-paint .m-arm { animation: idle-paint-arm 2.4s cubic-bezier(.4, .2, .25, 1) both; }
.mascot.is-idle-paint .m-head { animation: idle-paint-head 2.4s ease both; transition: none; }
.mascot.is-idle-paint .m-life-paint:nth-child(4) { animation: idle-paint-blob 2.4s ease both; }
.mascot.is-idle-paint .m-life-paint:nth-child(5) { animation: idle-paint-blob 2.4s .28s ease both; }
.mascot.is-idle-paint .m-life-paint:nth-child(6) { animation: idle-paint-blob 2.4s .56s ease both; }
@keyframes idle-paint-arm {
  0%, 100% { transform: rotate(0deg); }
  16% { transform: rotate(-48deg) translate(-2%, -6%); }
  28% { transform: rotate(-18deg); }
  40% { transform: rotate(-54deg) translate(-2%, -6%); }
  52% { transform: rotate(-16deg); }
  64% { transform: rotate(-50deg) translate(-2%, -6%); }
  80% { transform: rotate(-8deg); }
}
@keyframes idle-paint-head {
  0%, 100% { transform: none; }
  20%, 70% { transform: rotate(8deg); }
}
@keyframes idle-paint-blob {
  0%, 8% { opacity: 0; transform: scale(.2); }
  22%, 78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.7) translateY(-16%); }
}

/* Ulė: inspect a triangle → square → circle */
.mascot .m-life-shape {
  left: 70%; top: 16%;
  width: 16%; aspect-ratio: 1;
}
.mascot .m-life-shape.is-tri {
  left: 66%;
  width: 0; height: 0; aspect-ratio: auto;
  border-left: calc(var(--size) * .07) solid transparent;
  border-right: calc(var(--size) * .07) solid transparent;
  border-bottom: calc(var(--size) * .12) solid #7A62C9;
}
.mascot .m-life-shape.is-sq {
  left: 72%; top: 14%;
  background: #3DBE6B; border-radius: 18%;
}
.mascot .m-life-shape.is-cir {
  left: 78%; top: 18%;
  background: #F5C542; border-radius: 50%;
}
.mascot.is-idle-shape .m-head { animation: idle-shape-head 2.4s cubic-bezier(.4, .2, .2, 1) both; transition: none; }
.mascot.is-idle-shape .m-life-shape.is-tri { animation: idle-shape-show 2.4s ease both; }
.mascot.is-idle-shape .m-life-shape.is-sq { animation: idle-shape-show 2.4s .55s ease both; }
.mascot.is-idle-shape .m-life-shape.is-cir { animation: idle-shape-show 2.4s 1.1s ease both; }
@keyframes idle-shape-head {
  0%, 100% { transform: none; }
  16%, 32% { transform: rotate(-10deg); }
  44%, 60% { transform: rotate(0deg) translateY(-2%); }
  70%, 86% { transform: rotate(10deg); }
}
@keyframes idle-shape-show {
  0%, 4% { opacity: 0; transform: scale(.3) translateY(10%); }
  18%, 30% { opacity: 1; transform: scale(1) translateY(0); }
  42%, 100% { opacity: 0; transform: scale(.7) translateY(-12%); }
}

/* Bumba: slow elephant sway + trunk-like arm */
.mascot.is-idle-sway .m-body { animation: idle-sway 2.6s cubic-bezier(.45, .15, .3, 1) both; }
.mascot.is-idle-sway .m-arm { animation: idle-sway-arm 2.6s ease-in-out both; }
.mascot.is-idle-sway .m-head { animation: idle-sway-head 2.6s ease-in-out both; transition: none; }
.mascot.is-idle-sway .m-shadow { animation: idle-sway-shadow 2.6s ease both; }
@keyframes idle-sway {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  30% { transform: rotate(-6deg) translateX(-4%); }
  70% { transform: rotate(6deg) translateX(4%); }
}
@keyframes idle-sway-arm {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(22deg); }
  70% { transform: rotate(-22deg); }
}
@keyframes idle-sway-head {
  0%, 100% { transform: none; }
  30% { transform: rotate(-5deg); }
  70% { transform: rotate(5deg); }
}
@keyframes idle-sway-shadow {
  0%, 100% { transform: scale(1) translateX(0); opacity: .08; }
  30% { transform: scale(1.08, .9) translateX(-8%); opacity: .07; }
  70% { transform: scale(1.08, .9) translateX(8%); opacity: .07; }
}

/* Kvakė: body puff + floating notes (body only — not a mouth morph) */
.mascot .m-life-note {
  left: 66%; top: 20%;
  font-weight: 900;
  font-size: calc(var(--size) * .2);
  line-height: 1;
  color: #3D8F5A;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}
.mascot .m-life-note.n2 { left: 78%; top: 16%; color: #5A7CC9; }
.mascot.is-idle-ribbit .m-body { animation: idle-ribbit 2s cubic-bezier(.34, 1.1, .4, 1) both; }
.mascot.is-idle-ribbit .m-head { animation: idle-ribbit-head 2s ease both; transition: none; }
.mascot.is-idle-ribbit .m-shadow { animation: idle-ribbit-shadow 2s ease both; }
.mascot.is-idle-ribbit .m-life-note.n1 { animation: idle-note 2s ease both; }
.mascot.is-idle-ribbit .m-life-note.n2 { animation: idle-note 2s .2s ease both; }
@keyframes idle-ribbit {
  0%, 100% { transform: scale(1, 1) translateY(0); }
  14% { transform: scale(1.14, .84) translateY(4%); }
  32% { transform: scale(.92, 1.12) translateY(-10%); }
  48% { transform: scale(1.08, .94) translateY(2%); }
  64% { transform: scale(.98, 1.04) translateY(-4%); }
  80% { transform: scale(1.04, .96) translateY(1%); }
}
@keyframes idle-ribbit-head {
  0%, 100% { transform: none; }
  14% { transform: translateY(4%); }
  32% { transform: translateY(-6%) rotate(-4deg); }
  64% { transform: translateY(-2%) rotate(3deg); }
}
@keyframes idle-ribbit-shadow {
  0%, 100% { transform: scale(1); opacity: .08; }
  14% { transform: scale(1.12, .88); opacity: .1; }
  32% { transform: scale(.82); opacity: .05; }
}
@keyframes idle-note {
  0%, 16% { opacity: 0; transform: translateY(10%) scale(.4); }
  36% { opacity: 1; transform: translateY(-20%) scale(1) rotate(-8deg); }
  100% { opacity: 0; transform: translateY(-80%) scale(.8) rotate(10deg); }
}

/* ----- task done: clear “taip!” hop, distinct from the random praise pool ----- */
.mascot.is-correct .m-eye-open { opacity: 0; animation: none; }
.mascot.is-correct .m-eye-happy { opacity: 1; }
.mascot.is-correct .m-body { animation: none; }
.mascot.is-reacting.is-correct .mascot-svg,
.mascot.is-reacting.is-correct .m-life { animation: correct-hop 1.2s cubic-bezier(.3, 1.15, .4, 1) both; }
.mascot.is-reacting.is-correct .m-arm { animation: correct-arm 1.2s cubic-bezier(.4, .2, .2, 1) both; }
.mascot.is-reacting.is-correct .m-head { animation: correct-head 1.2s ease both; transition: none; }
.mascot.is-reacting.is-correct .m-shadow { animation: correct-shadow 1.2s ease both; }
.mascot.is-correct .m-life-burst.is-spark {
  animation: correct-spark 1.2s ease both;
  --spark-x: calc((var(--i) - 1.5) * 28%);
  --spark-y: -54%;
}
@keyframes correct-hop {
  0% { transform: translateY(0) scale(1, 1); }
  10% { transform: translateY(5%) scale(1.12, .84); }
  32% { transform: translateY(-28%) scale(.92, 1.1); }
  48% { transform: translateY(-18%) scale(1, 1); }
  64% { transform: translateY(3%) scale(1.08, .9); }
  78% { transform: translateY(-8%) scale(.98, 1.04); }
  90% { transform: translateY(2%) scale(1.04, .96); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes correct-arm {
  0%, 100% { transform: rotate(0deg); }
  16%, 70% { transform: rotate(-56deg) translate(-2%, -8%); }
}
@keyframes correct-head {
  0%, 30% { transform: none; }
  48% { transform: rotate(-6deg); }
  64% { transform: rotate(8deg) translateY(3%); }
  80% { transform: rotate(-2deg); }
  100% { transform: none; }
}
@keyframes correct-shadow {
  0%, 100% { transform: scale(1); opacity: .08; }
  32% { transform: scale(.72); opacity: .04; }
  64% { transform: scale(1.1, .88); opacity: .09; }
}
@keyframes correct-spark {
  0%, 12% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0deg); }
  36% { opacity: 1; transform: translate(-50%, -50%) translate(calc(var(--size) * 0.01 * var(--i) * 18 - var(--size) * .28), calc(var(--size) * -0.42)) scale(1.15) rotate(20deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(calc(var(--size) * 0.01 * var(--i) * 18 - var(--size) * .28), calc(var(--size) * -0.58)) scale(.4) rotate(50deg); }
}

/* ----- level complete: smooth rise, hover flourish, star wreath, proud bow ----- */
.mascot.is-lygis .m-eye-open { opacity: 0; animation: none; }
.mascot.is-lygis .m-eye-happy { opacity: 1; }
.mascot.is-lygis .m-body { animation: none; }
.mascot.is-reacting.is-lygis .mascot-svg,
.mascot.is-reacting.is-lygis .m-life { animation: lygis 2.4s cubic-bezier(.32, .9, .35, 1) both; }
.mascot.is-reacting.is-lygis .m-arm { animation: lygis-arm 2.4s cubic-bezier(.4, .2, .2, 1) both; }
.mascot.is-reacting.is-lygis .m-head { animation: lygis-head 2.4s ease both; transition: none; }
.mascot.is-reacting.is-lygis .m-shadow { animation: lygis-shadow 2.4s ease both; }
.mascot.is-lygis .m-life-burst { animation: lygis-burst 2.4s ease both; }
.mascot .m-life-burst {
  left: 50%; top: 42%;
  width: 16%; aspect-ratio: 1;
  color: #F5C542;
  transform: translate(-50%, -50%);
}
.mascot .m-life-burst .shape { width: 100%; height: 100%; display: block; }
@keyframes lygis {
  0% { transform: translateY(0) rotate(0deg) scale(1, 1); }
  8% { transform: translateY(6%) rotate(0deg) scale(1.14, .82); }
  22% { transform: translateY(-48%) rotate(-7deg) scale(.9, 1.12); }
  38% { transform: translateY(-70%) rotate(8deg) scale(1.02, .98); }
  52% { transform: translateY(-62%) rotate(-5deg) scale(1.04, 1); }
  66% { transform: translateY(-10%) rotate(0deg) scale(.96, 1.06); }
  76% { transform: translateY(4%) rotate(0deg) scale(1.12, .86); }
  86% { transform: translateY(0) rotate(0deg) scale(1.03, .99); }
  92% { transform: translateY(2%) rotate(0deg) scale(1, 1); } /* tiny proud bow dip */
  100% { transform: translateY(0) rotate(0deg) scale(1, 1); }
}
@keyframes lygis-arm {
  0%, 8%, 100% { transform: rotate(0deg); }
  22%, 58% { transform: rotate(-62deg) translate(-4%, -10%); }
  76% { transform: rotate(-16deg); }
  90% { transform: rotate(0deg); }
}
@keyframes lygis-head {
  0%, 70% { transform: none; }
  22%, 36% { transform: rotate(-6deg); }
  50% { transform: rotate(5deg); }
  86% { transform: none; }
  92% { transform: rotate(8deg) translateY(4%); }
  100% { transform: none; }
}
@keyframes lygis-shadow {
  0%, 86%, 100% { transform: scale(1); opacity: .08; }
  8% { transform: scale(1.12, .88); opacity: .1; }
  22%, 52% { transform: scale(.62); opacity: .03; }
  76% { transform: scale(1.14, .86); opacity: .1; }
}
@keyframes lygis-burst {
  0%, 10% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(calc(var(--i) * 60deg)) translateY(0) scale(.2);
  }
  28% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(calc(var(--i) * 60deg)) translateY(calc(var(--size) * -0.46)) scale(1.08);
  }
  62% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(calc(var(--i) * 60deg + 40deg)) translateY(calc(var(--size) * -0.56)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(calc(var(--i) * 60deg + 70deg)) translateY(calc(var(--size) * -0.7)) scale(.35);
  }
}

/* ----- emotions ----- */
.mascot.is-surprised .m-eye-open {
  animation: surprised-eyes 1.1s cubic-bezier(.3, 1.1, .4, 1) both;
}
.mascot.is-surprised .m-body { animation: none; }
.mascot.is-reacting.is-surprised .mascot-svg { animation: surprised-hop 1.1s cubic-bezier(.3, 1.05, .4, 1) both; }
.mascot.is-reacting.is-surprised .m-head { animation: surprised-head 1.1s ease both; transition: none; }
.mascot.is-reacting.is-surprised .m-shadow { animation: surprised-shadow 1.1s ease both; }
@keyframes surprised-hop {
  0% { transform: translateY(0) scale(1, 1); }
  12% { transform: translateY(5%) scale(1.12, .84); }
  28% { transform: translateY(-16%) scale(.94, 1.1); }
  48%, 64% { transform: translateY(-7%) scale(1.04, .98); }
  82% { transform: translateY(3%) scale(1.06, .94); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes surprised-head {
  0% { transform: none; }
  16%, 64% { transform: rotate(-6deg) translateY(-4%); }
  100% { transform: none; }
}
@keyframes surprised-eyes {
  0% { transform: scale(1); }
  16%, 68% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
@keyframes surprised-shadow {
  0%, 100% { transform: scale(1); opacity: .08; }
  28% { transform: scale(.78); opacity: .05; }
}

.mascot.is-curious .m-body { animation: none; }
.mascot.is-reacting.is-curious .mascot-svg { animation: curious-lean 1.2s cubic-bezier(.4, .2, .2, 1) both; }
.mascot.is-reacting.is-curious .m-head { animation: curious-head 1.2s cubic-bezier(.4, .2, .2, 1) both; transition: none; }
@keyframes curious-lean {
  0%, 100% { transform: scale(1) translateY(0); }
  24%, 74% { transform: scale(1.05, 1.02) translate(2%, -3%); }
}
@keyframes curious-head {
  0%, 100% { transform: none; }
  24%, 74% { transform: rotate(-16deg) translate(2%, 2%); }
}

.mascot.is-encouraging .m-body { animation: none; }
.mascot.is-reacting.is-encouraging .mascot-svg { animation: encouraging-lean 1.5s cubic-bezier(.4, .2, .2, 1) both; }
.mascot.is-reacting.is-encouraging .m-head { animation: encouraging-nod 1.5s ease both; transition: none; }
.mascot.is-reacting.is-encouraging .m-arm { animation: encouraging-arm 1.5s cubic-bezier(.4, .2, .2, 1) both; }
@keyframes encouraging-lean {
  0%, 100% { transform: scale(1) translateY(0); }
  18%, 82% { transform: scale(1.07, 1.03) translateY(-4%); }
}
@keyframes encouraging-nod {
  0%, 100% { transform: none; }
  18% { transform: rotate(14deg) translateY(6%); }
  32% { transform: rotate(0deg); }
  48% { transform: rotate(14deg) translateY(6%); }
  64% { transform: rotate(-6deg); }
  80% { transform: none; }
}
@keyframes encouraging-arm {
  0%, 100% { transform: rotate(0deg); }
  22% { transform: rotate(-52deg) translate(-4%, -10%); }
  36% { transform: rotate(-12deg); }
  52% { transform: rotate(-56deg) translate(-4%, -10%); }
  72% { transform: rotate(-10deg); }
}

/* Sleepy Zzz (works for short react and the held long-idle pose) */
.mascot .m-life-z {
  left: 70%; top: 12%;
  font-weight: 1000;
  font-size: calc(var(--size) * .16);
  line-height: 1;
  color: #7A62C9;
}
.mascot .m-life-z.z2 { left: 80%; top: 4%; font-size: calc(var(--size) * .2); }
.mascot.is-sleepy .m-life-z.z1 { animation: idle-zzz 2.2s ease-in-out infinite; }
.mascot.is-sleepy .m-life-z.z2 { animation: idle-zzz 2.2s .35s ease-in-out infinite; }
@keyframes idle-zzz {
  0%, 100% { opacity: 0; transform: translateY(8%) scale(.6); }
  30% { opacity: .9; transform: translateY(-10%) scale(1); }
  100% { opacity: 0; transform: translateY(-70%) scale(.85) rotate(12deg); }
}

@media (prefers-reduced-motion: reduce) {
  .mascot.is-idle-look .m-head,
  .mascot.is-idle-shift .m-body,
  .mascot.is-idle-shift .m-foot-l,
  .mascot.is-idle-shift .m-foot-r,
  .mascot.is-idle-shift .m-shadow,
  .mascot.is-idle-scratch .m-arm,
  .mascot.is-idle-scratch .m-head,
  .mascot.is-idle-count .m-arm,
  .mascot.is-idle-count .m-head,
  .mascot.is-idle-count .m-life-dot,
  .mascot.is-idle-listen .m-head,
  .mascot.is-idle-listen .m-life-ring,
  .mascot.is-idle-paint .m-arm,
  .mascot.is-idle-paint .m-head,
  .mascot.is-idle-paint .m-life-paint,
  .mascot.is-idle-shape .m-head,
  .mascot.is-idle-shape .m-life-shape,
  .mascot.is-idle-sway .m-body,
  .mascot.is-idle-sway .m-arm,
  .mascot.is-idle-sway .m-head,
  .mascot.is-idle-sway .m-shadow,
  .mascot.is-idle-ribbit .m-body,
  .mascot.is-idle-ribbit .m-head,
  .mascot.is-idle-ribbit .m-shadow,
  .mascot.is-idle-ribbit .m-life-note,
  .mascot.is-correct .mascot-svg,
  .mascot.is-correct .m-arm,
  .mascot.is-correct .m-head,
  .mascot.is-correct .m-shadow,
  .mascot.is-correct .m-life-burst,
  .mascot.is-lygis .mascot-svg,
  .mascot.is-lygis .m-arm,
  .mascot.is-lygis .m-head,
  .mascot.is-lygis .m-shadow,
  .mascot.is-lygis .m-life-burst,
  .mascot.is-surprised .mascot-svg,
  .mascot.is-surprised .m-head,
  .mascot.is-surprised .m-shadow,
  .mascot.is-surprised .m-eye-open,
  .mascot.is-curious .mascot-svg,
  .mascot.is-curious .m-head,
  .mascot.is-encouraging .mascot-svg,
  .mascot.is-encouraging .m-head,
  .mascot.is-encouraging .m-arm,
  .mascot.is-sleepy .m-life-z {
    animation: none !important;
    transform: none;
  }
  .mascot.is-idle-count .m-life-dot,
  .mascot.is-idle-paint .m-life-paint,
  .mascot.is-idle-shape .m-life-shape,
  .mascot.is-idle-listen .m-life-ring,
  .mascot.is-idle-ribbit .m-life-note,
  .mascot.is-lygis .m-life-burst,
  .mascot.is-correct .m-life-burst,
  .mascot.is-sleepy .m-life-z { opacity: 0; }
}

/* ---------- start chooser: 3rd card "Augintinis" (v0.9.38) ---------- */
.start-card.sc-pet { --acc-bg: #F3E9FF; --acc-d: #D4C0EE; animation-delay: 180ms; }
.start-card.sc-pet .start-pic { overflow: visible; }
.start-pets { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-width: 0; }
.start-pets .mascot { width: 40%; margin: 0 -6%; animation: bob 3.2s ease-in-out infinite; cursor: inherit; }
.start-pets .mascot:nth-child(2) { width: 46%; z-index: 1; animation-delay: -.6s; }
.start-pets .mascot:nth-child(3) { animation-delay: -1.2s; }
.new-badge {
  position: absolute; top: -10px; left: 14px; z-index: 3;
  background: var(--c-coral); color: #fff; font-weight: 1000; font-size: clamp(.72rem, 1.9vmin, .95rem);
  letter-spacing: .06em; padding: 5px 12px; border-radius: 999px; line-height: 1.2;
  box-shadow: 0 4px 0 #E07B6E; transform: rotate(-6deg); pointer-events: none;
  animation: badge-pop 2.6s ease-in-out infinite;
}
@keyframes badge-pop { 0%, 80%, 100% { transform: rotate(-6deg) scale(1); } 88% { transform: rotate(-3deg) scale(1.1); } }
/* three cards: the pet card carries the friends, so the separate start mascot steps aside */
.start-body .start-mascot { display: none; }
@media (orientation: landscape) {
  .start-card { --start-side: 0px; width: min(30vw, 56vh, 380px, calc((100% - 2 * clamp(8px, 1.6vw, 36px)) / 3)); }
}
@media (orientation: landscape) and (max-width: 700px) {
  .start-body { flex-wrap: nowrap; }
  .start-card { width: min(31vw, 66vh, 300px); padding: 10px 10px 14px; border-radius: 30px; }
}
@media (orientation: portrait) {
  .start-body { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); justify-content: center; align-content: center; row-gap: calc(var(--gap) + 10px); }
  .start-card { width: min(43vw, 33vh, 380px); }
  .start-card.sc-pet { grid-column: 1 / -1; width: 100%; aspect-ratio: auto; height: min(30vh, 52vw, 380px); }
  .start-card.sc-pet .start-pets .mascot { width: 26%; }
  .start-card.sc-pet .start-pets .mascot:nth-child(2) { width: 30%; }
}
@media (orientation: portrait) and (max-width: 560px) {
  .start-card { width: min(45vw, 29vh); padding: 10px 8px 14px; border-radius: 30px; }
  .start-card .start-label { font-size: 1rem; padding-right: 26px; }
  .start-card .start-go { width: 36px; height: 36px; right: 8px; bottom: 10px; font-size: 20px; }
  .start-card.sc-pet .start-label { padding-right: 0; font-size: 1.15rem; }
  .start-card.sc-pet .start-go { width: 44px; height: 44px; }
}

/* ---------- Augintinis (v0.9.38) ---------- */
.pet { background: linear-gradient(180deg, #FFF4E8, #FFEFE0); }
.pet .topbar { gap: 10px; }
.pet-title { font-size: clamp(1.2rem, 3.6vmin, 1.9rem); flex: 1; justify-content: center; min-width: 0; }
.pet-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pet-head-name { font-weight: 1000; font-size: clamp(1.2rem, 3.8vmin, 2rem); color: var(--ink); white-space: nowrap; }
.pet-stars {
  display: inline-flex; align-items: center; gap: 6px; height: clamp(52px, 8vmin, 68px); padding: 0 18px; border-radius: 999px;
  background: #fff; box-shadow: 0 5px 0 #E3D6C8, var(--shadow); font-weight: 1000; font-size: clamp(1.2rem, 3.6vmin, 1.7rem); color: var(--ink);
}
.pet-stars .icon { color: #F5B935; font-size: 1.25em; }
.pet .wiggle { animation: wiggle .5s ease; }
.pet-look { cursor: pointer; }

/* pick a friend */
/* v0.9.39: never a scrollbar – 3 × 2 on wide screens, 2 × 3 in portrait, rows share the height; cards clip their own
   art (the drawing is sized by height and could be wider than a narrow card). On a tiny screen the grid may still
   scroll vertically by touch / wheel, with the scrollbar hidden. */
.pet-grid {
  flex: 1; min-height: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr);
  gap: clamp(10px, 1.8vmin, 20px); padding: 8px 8px 14px; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none;
  overscroll-behavior: contain;
}
.pet-grid::-webkit-scrollbar { display: none; width: 0; height: 0; }
@media (orientation: portrait) { .pet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pet-card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; min-width: 0;
  padding: 8px 6px 10px; border-radius: 30px; background: #fff; box-shadow: 0 7px 0 var(--acc-d, #E3D6C8), var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, outline-color .14s;
  outline: 5px solid transparent; outline-offset: -2px; overflow: hidden;
}
.pet-card.is-on { outline-color: var(--c-green); transform: scale(1.02); }
.pet-card-art { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; overflow: hidden; }
.pet-card-art .mascot { width: auto; height: 100%; max-width: 92%; max-height: clamp(70px, 22vh, 200px); }
/* v0.9.39: fit the drawing (≈ 210 × 190) inside its box both ways – never wider than the card */
@supports (container-type: size) {
  .pet-card-art { container-type: size; }
  .pet-card-art .mascot { height: auto; max-height: none; max-width: none; width: min(92cqw, 100cqh * 1.1, 230px); }
}
/* short landscape phones: the drawing left, the name beside it */
@media (orientation: landscape) and (max-height: 500px) {
  .pet-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr; column-gap: 6px; padding: 6px 8px; }
  .pet-card-art { grid-column: 1; grid-row: 1 / 5; height: 100%; }
  .pet-name { grid-column: 2; grid-row: 2; justify-self: start; }
  .pet-kind { grid-column: 2; grid-row: 3; justify-self: start; }
}
.pet-name { font-weight: 1000; font-size: clamp(1rem, 2.8vmin, 1.4rem); line-height: 1.1; }
.pet-kind { font-weight: 700; font-size: clamp(.78rem, 2vmin, 1rem); color: var(--muted); }
.pet-pick-foot { flex: none; display: flex; justify-content: center; padding-bottom: 4px; }
.pet-go {
  min-height: clamp(64px, 10vmin, 84px); min-width: min(420px, 80vw); font-size: clamp(1.2rem, 3.4vmin, 1.6rem); font-weight: 1000;
  background: #C9C3D4; color: #fff; box-shadow: 0 6px 0 #A8A2B4;
}
.pet-go .icon { font-size: 1.3em; }
.pet-go.is-ready { background: var(--c-green); box-shadow: 0 6px 0 var(--c-green-d); animation: pet-ready .5s cubic-bezier(.3, 1.6, .5, 1); }
.pet-go:disabled { cursor: default; }
@keyframes pet-ready { from { transform: scale(.94); } }

/* home */
.pet-home-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(12px, 2vmin, 24px); padding-bottom: 4px; }
.pet-stage {
  position: relative; min-height: 0; border-radius: 36px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 12px 12px 18px;
  background: linear-gradient(180deg, #BFE6FF 0 62%, #CDEFC0 62% 100%); box-shadow: inset 0 -10px 0 rgba(110, 190, 120, .25), var(--shadow);
}
.pet-stage .sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pet-home-mascot { position: relative; z-index: 1; flex: 1; min-height: 0; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.pet-home-mascot .mascot { --pet-w: min(92%, calc((100dvh - var(--bar) - 150px) * 1.05), 420px); width: var(--pet-w); --size: var(--pet-w); }
.pet-stage.stage-baby .pet-home-mascot .mascot { width: calc(var(--pet-w) * .92); }
.pet-stage.stage-mid .pet-home-mascot .mascot { width: calc(var(--pet-w) * .8); }
.pet-stage-chip { position: relative; z-index: 1; margin-top: 6px; background: #fff; border-radius: 999px; padding: 6px 18px; font-weight: 1000; font-size: clamp(.95rem, 2.4vmin, 1.2rem); box-shadow: 0 4px 0 #E3D6C8; color: var(--ink-soft); }
.pet-stage-chip.is-new { animation: pet-ready .6s cubic-bezier(.3, 1.6, .5, 1) 2; background: #FFF6D6; }
.pet-growth { position: relative; z-index: 1; width: min(70%, 260px); height: 14px; background: rgba(255, 255, 255, .8); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.pet-growth > span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--c-mint), var(--c-green)); border-radius: 99px; transition: width .5s; }
.pet-panel { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: clamp(6px, 1.2vmin, 12px); padding: 2px 4px 10px; }
.pet-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.4vmin, 14px); }
.pet-meter { background: #fff; border-radius: 22px; padding: 8px 10px 10px; box-shadow: 0 4px 0 #E3D6C8; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.pet-meter-ico { font-size: clamp(1.4rem, 3.6vmin, 2rem); line-height: 1; }
.pet-meter-name { font-weight: 800; font-size: clamp(.7rem, 1.8vmin, .9rem); color: var(--muted); line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pet-meter-track { width: 100%; height: 12px; background: #F0E6D8; border-radius: 99px; margin-top: 4px; overflow: hidden; }
.pet-meter-track > span { display: block; height: 100%; width: var(--w); border-radius: 99px; background: var(--fill, var(--c-mint)); transition: width .5s; }
.pet-meter.is-low .pet-meter-track > span { background: var(--danger); }
.pet-label { font-weight: 900; font-size: clamp(.85rem, 2vmin, 1.05rem); color: var(--ink-soft); margin: 2px 4px -2px; }
.pet-tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.4vmin, 14px); }
.pet-care { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.4vmin, 14px); }
.pet-tile {
  position: relative; min-height: clamp(64px, 10.5vmin, 96px); border-radius: 24px; background: #fff; padding: 8px 12px;
  display: flex; align-items: center; gap: 10px; text-align: left; min-width: 0;
  box-shadow: 0 6px 0 #E3D6C8; font-weight: 900; font-size: clamp(.9rem, 2.3vmin, 1.15rem); line-height: 1.15;
  transition: transform .12s ease, box-shadow .12s ease, opacity .2s;
}
@media (orientation: landscape) {
  .pet-tasks, .pet-care { flex: 1 1 auto; grid-auto-rows: minmax(clamp(64px, 10.5vmin, 96px), 1fr); }
  .pet-tasks { max-height: 260px; } .pet-care { max-height: 270px; }
}
.pet-tile-ico { font-size: clamp(1.7rem, 4.6vmin, 2.5rem); line-height: 1; flex: none; }
.pet-tile-label { min-width: 0; }
.pet-care-tile { flex-direction: column; justify-content: center; text-align: center; gap: 4px; font-size: clamp(.78rem, 2vmin, 1rem); padding: 8px 4px; }
.pet-tile.is-locked { opacity: .55; }
.pet-lock { position: absolute; top: 6px; right: 8px; color: var(--muted); font-size: 1.1rem; }
.pet-tasks.pet-nudge .pet-tile { animation: pet-nudge .7s ease 2; }
@keyframes pet-nudge { 50% { transform: translateY(-5px) scale(1.03); box-shadow: 0 6px 0 #E3D6C8, 0 0 0 6px rgba(255, 210, 122, .6); } }
/* portrait (phones, tablet portrait): one column; the friend gets what is left, the buttons always fit.
   Short / narrow screens get a compact panel, and the whole screen scrolls as a fallback (never cut off). */
@media (orientation: portrait) {
  .pet-home { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .pet-home-body { display: flex; flex-direction: column; flex: 1 0 auto; min-height: 0; }
  .pet-stage { flex: 1 1 0; min-height: clamp(150px, 22vh, 420px); max-height: 52vh; padding: 8px 10px 12px; border-radius: 30px; }
  .pet-home-mascot { flex: 1 1 0; min-height: 0; }
  .pet-home-mascot .mascot { --pet-w: min(64vw, 30vh, 380px); max-height: 100%; }
  .pet-panel { flex: none; overflow: visible; padding-bottom: 8px; }
}
@media (orientation: portrait) and (max-height: 900px), (orientation: portrait) and (max-width: 560px) {
  .pet-panel { gap: 7px; }
  .pet-meters { gap: 8px; }
  .pet-meter { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 5px; row-gap: 3px; align-items: center; padding: 7px 8px 9px; border-radius: 18px; text-align: left; }
  .pet-meter-ico { grid-row: 1 / 3; font-size: 1.3rem; }
  .pet-meter-name { font-size: .7rem; letter-spacing: -.01em; }
  .pet-meter-track { margin-top: 0; height: 10px; }
  .pet-label { margin: 1px 0 -3px; font-size: .8rem; }
  .pet-tasks, .pet-care { gap: 8px; }
  .pet-tile { min-height: 54px; padding: 6px 10px; border-radius: 20px; font-size: .95rem; }
  .pet-tile-ico { font-size: 1.7rem; }
  .pet-care-tile { min-height: 64px; font-size: .78rem; gap: 2px; padding: 6px 3px; }
  .pet-care-tile .pet-tile-ico { font-size: 1.55rem; }
  .pet-stage-chip { padding: 4px 14px; font-size: .95rem; margin-top: 2px; }
}
/* ≤ 400 px wide: smaller meter emoji + name so "Linksmumas" is never cut */
@media (orientation: portrait) and (max-width: 400px) {
  .pet-meters { gap: 6px; }
  .pet-meter { column-gap: 3px; padding: 7px 6px 9px; }
  .pet-meter-ico { font-size: 1.1rem; }
  .pet-meter-name { font-size: .64rem; letter-spacing: -.02em; }
}
@media (orientation: portrait) and (max-height: 700px) {
  .pet-stage { min-height: 140px; }
  .pet-tile { min-height: 50px; }
  .pet-care-tile { min-height: 58px; }
}

/* task screens */
.pet-task-wrap { flex: 1; min-height: 0; display: flex; align-items: center; gap: clamp(12px, 3vmin, 40px); }
.pet-prompt { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pet-prompt-mascot .mascot { width: clamp(100px, 22vmin, 200px); }
.pet-task-body { flex: 1; min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(14px, 3vmin, 30px); }
@media (orientation: portrait) {
  .pet-task-wrap { flex-direction: column; align-items: stretch; }
  .pet-prompt { flex-direction: row; justify-content: center; }
  .pet-prompt-mascot .mascot { width: clamp(90px, 16vh, 170px); }
}
.pet-apples { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 2vmin, 18px); max-width: min(100%, 560px); }
.pet-apple { width: clamp(60px, 13vmin, 110px); aspect-ratio: 1; animation: pet-in .35s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 70ms); }
.pet-apple .nthing-svg { width: 100%; height: 100%; }
@keyframes pet-in { from { opacity: 0; transform: scale(.6); } }
.pet-options.options.n4 .opt { --sz: min(17vw, 19vh, 150px); }
/* portrait: 2 × 2 answers, sized by width and height so they always fit (v0.9.39) */
@media (orientation: portrait) {
  .pet-options.options.nopts.n4 { grid-template-columns: repeat(2, auto); gap: clamp(12px, 3.5vw, 28px); }
  .pet-options.options.n4 .opt { --sz: min(36vw, 15vh, 170px); }
}
/* v0.9.39 Savaitės diena: week strip (one hidden day, or "po …" pair) + four spoken answer cards */
.pet-t-day .pet-task-body, .pet-t-time .pet-task-body { justify-content: center; gap: clamp(12px, 2.6vmin, 26px); }
.pet-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(4px, 1.1vmin, 10px); width: min(100%, 900px); }
.pet-week.is-after { display: flex; justify-content: center; align-items: center; gap: clamp(10px, 3vmin, 24px); }
.pet-wcard {
  min-width: 0; min-height: clamp(64px, 12vmin, 110px); border-radius: 18px; background: #fff; box-shadow: 0 5px 0 #E3D6C8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px;
  font-weight: 900; font-size: clamp(.72rem, 1.9vmin, 1.05rem); line-height: 1.1; text-align: center;
}
.pet-wcard-n { width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center; background: var(--c-sky); color: #fff; font-weight: 1000; font-size: 1.15em; }
.pet-wcard[data-wday="sestadienis"] .pet-wcard-n, .pet-wcard[data-wday="sekmadienis"] .pet-wcard-n { background: var(--c-coral); }
.pet-wcard-name { max-width: 100%; overflow-wrap: anywhere; }
.pet-wcard.is-q { background: #FFF4C2; box-shadow: 0 5px 0 #EAD58A, inset 0 0 0 3px #F2C94C; }
.pet-wcard-q { font-size: clamp(2rem, 6vmin, 3.2rem); font-weight: 1000; color: #D9A21B; animation: pet-hint 1.4s ease-in-out infinite; }
.pet-wcard.is-found { box-shadow: 0 5px 0 #E3D6C8, inset 0 0 0 4px var(--c-green); animation: pet-in .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.pet-week.is-after .pet-wcard { width: clamp(120px, 26vmin, 220px); min-height: clamp(96px, 20vmin, 170px); font-size: clamp(1rem, 2.8vmin, 1.4rem); }
.pet-week-arrow { font-size: clamp(2rem, 6vmin, 3.4rem); color: #C9A57E; }
.pet-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2vmin, 16px); width: min(100%, 640px); }
.pet-day {
  min-height: clamp(60px, 10vmin, 88px); border-radius: 22px; background: #fff; box-shadow: 0 6px 0 #E3D6C8; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; font-weight: 900; font-size: clamp(1rem, 2.6vmin, 1.3rem); text-align: left;
  transition: transform .12s ease, box-shadow .12s ease, opacity .2s ease;
}
.pet-day-say { flex: none; font-size: .85em; opacity: .7; }
.pet-day-name { min-width: 0; overflow-wrap: anywhere; }
.pet-day.is-dim, .pet-time.is-dim { opacity: .45; filter: saturate(.4); }
.pet-day.hint, .pet-time.hint { animation: hint 1.2s ease-in-out infinite; }
/* narrow portrait strip: 7 cards in a row, the number + a short name (Pr, An …); the full name is spoken on tap */
@media (orientation: portrait) and (max-width: 700px) {
  .pet-week:not(.is-after) .pet-wcard { min-height: 58px; border-radius: 14px; padding: 5px 0; }
  .pet-week:not(.is-after) .pet-wcard-name { display: none; }
  .pet-week:not(.is-after) .pet-wcard-ab { display: block; }
}
.pet-wcard-ab { display: none; font-size: .95em; }

/* v0.9.39 Paros metas: a scene picture + four spoken answers */
.pet-scene {
  width: min(100%, 620px, calc((100dvh - var(--bar) - 230px) * 1.6)); aspect-ratio: 16 / 10; border-radius: 26px; overflow: hidden;
  box-shadow: 0 6px 0 #E3D6C8; background: #fff; flex: none;
}
.pet-scene svg { display: block; width: 100%; height: 100%; }
.pet-times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vmin, 18px); width: min(100%, 820px); }
.pet-time { border-radius: 24px; background: #fff; box-shadow: 0 6px 0 #E3D6C8; overflow: hidden; padding-bottom: 8px; display: flex; flex-direction: column; min-width: 0; transition: transform .12s ease, box-shadow .12s ease, opacity .2s ease; }
.pet-time-art { height: clamp(50px, 11vmin, 110px); display: grid; place-items: center; font-size: clamp(1.8rem, 5.5vmin, 3.2rem); }
.pet-time.t-rytas .pet-time-art { background: linear-gradient(180deg, #FFD9A8, #FFE9B0); }
.pet-time.t-diena .pet-time-art { background: linear-gradient(180deg, #8CCDF4, #BFE6FF); }
.pet-time.t-vakaras .pet-time-art { background: linear-gradient(180deg, #FFA98C, #FFCBA4); }
.pet-time.t-naktis .pet-time-art { background: linear-gradient(180deg, #2E2848, #4A4170); }
.pet-time-name { text-align: center; font-weight: 900; font-size: clamp(1rem, 2.6vmin, 1.3rem); padding-top: 6px; }
@media (orientation: portrait) {
  .pet-times { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 520px); gap: 10px; }
  .pet-time { flex-direction: row; align-items: center; padding: 0; border-radius: 20px; }
  .pet-time-art { height: auto; align-self: stretch; width: clamp(54px, 15vw, 90px); min-height: 56px; font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .pet-time-name { flex: 1; padding: 0 6px; }
  .pet-scene { width: min(100%, 620px, calc((100dvh - var(--bar) - 330px) * 1.6)); }
  .pet-t-day .pet-prompt-mascot .mascot, .pet-t-time .pet-prompt-mascot .mascot { width: clamp(70px, 12vh, 150px); }
}
.pet-day.is-right, .pet-time.is-right { outline: 5px solid var(--c-green); box-shadow: 0 0 0 12px rgba(92, 196, 142, .35); }
.pet-body-frame { position: relative; aspect-ratio: 320 / 310; width: min(100%, calc((100dvh - var(--bar) - 30px) * 320 / 310), 560px); }
@media (orientation: portrait) { .pet-body-frame { width: min(92vw, calc((100dvh - var(--bar) - 230px) * 320 / 310), 560px); } }
.pet-body-frame .mascot { width: 100%; height: 100%; aspect-ratio: auto; --size: 100%; cursor: default; }
.pet-hit { position: absolute; border-radius: 50%; background: transparent; padding: 0; }
.pet-hit.is-hint { background: rgba(92, 196, 142, .32); box-shadow: 0 0 0 5px rgba(92, 196, 142, .55); animation: pet-hint 1.2s ease-in-out infinite; }
.pet-hit.is-right { background: rgba(255, 210, 122, .35); box-shadow: 0 0 0 5px rgba(255, 210, 122, .7); }
@keyframes pet-hint { 50% { transform: scale(1.08); } }

/* celebration overlay */
.pet-cele { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(255, 244, 232, .9); animation: pet-fade .25s ease both; }
@keyframes pet-fade { from { opacity: 0; } }
.pet-cele-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 26px 24px; border-radius: 36px; background: #fff; box-shadow: var(--shadow); max-width: 92vw; text-align: center; animation: pet-in .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.pet-cele-plus { display: flex; align-items: center; gap: 6px; font-weight: 1000; font-size: clamp(1.8rem, 6vmin, 2.8rem); color: #E5A93A; }
.pet-cele-plus .icon { color: #F5B935; font-size: 1.2em; }
.pet-cele-mascot { order: -1; }
.pet-cele-mascot .mascot { width: clamp(150px, 34vmin, 280px); }
.pet-cele-title { margin: 0; font-size: clamp(1.8rem, 5vmin, 2.6rem); font-weight: 1000; }
.pet-cele-text { margin: 0; font-weight: 800; font-size: clamp(1.05rem, 2.8vmin, 1.4rem); }
.pet-walk-done .pet-go { margin-top: 6px; }

/* care animations */
.pet-care-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; }
.pet-care-mascot .mascot { width: min(64vw, calc((100dvh - var(--bar) - 140px) * 1.05), 440px); }
.pet-done { opacity: .001; pointer-events: none; transition: opacity .3s; }
.pet-done.is-ready { opacity: 1; pointer-events: auto; }
.pet-fly { position: absolute; z-index: 5; pointer-events: none; font-size: clamp(48px, 10vmin, 84px); line-height: 1; }
.pet-fly.fly-feed { left: 14%; bottom: 8%; animation: pet-feed 1.1s cubic-bezier(.3, .9, .4, 1) both; }
@keyframes pet-feed { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(calc(36vw - 50%), -28vh) scale(.35); opacity: 0; } }
.pet-fly.fly-brush { left: 30%; top: 30%; animation: pet-brush 2.4s ease-in-out both; }
@keyframes pet-brush { 0% { transform: translate(0, 0) rotate(-20deg); opacity: 1; } 25% { transform: translate(18vmin, 4vmin) rotate(20deg); } 50% { transform: translate(4vmin, 10vmin) rotate(-15deg); } 75% { transform: translate(24vmin, 14vmin) rotate(25deg); opacity: 1; } 100% { transform: translate(12vmin, 6vmin) rotate(0); opacity: 0; } }
.pet-fly.fly-ball { left: 12%; bottom: 6%; animation: pet-ball 2.2s cubic-bezier(.4, .1, .5, 1) both; }
@keyframes pet-ball { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(18vw, -22vh) rotate(180deg); } 50% { transform: translate(36vw, 0) rotate(360deg); } 75% { transform: translate(54vw, -14vh) rotate(540deg); } 100% { transform: translate(64vw, 0) rotate(720deg); } }
.pet-bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.pet-bubbles span { position: absolute; left: var(--x); bottom: 30%; width: var(--s); height: var(--s); border-radius: 50%; background: rgba(140, 205, 244, .45); border: 3px solid rgba(255, 255, 255, .85); animation: pet-bub 2.2s ease-in infinite; animation-delay: calc(var(--i) * 140ms); }
@keyframes pet-bub { from { transform: translateY(40px) scale(.6); opacity: .9; } to { transform: translateY(-26vh) scale(1.2); opacity: 0; } }
.pet-care-screen.is-night { background: linear-gradient(180deg, #3D3553, #5E5675); }
.pet-care-screen.is-night .pet-title { color: #fff; }
.pet-zzz { position: absolute; left: 58%; top: 16%; pointer-events: none; }
.pet-zzz span { position: absolute; font-weight: 1000; color: var(--c-lilac); font-size: clamp(22px, 5vmin, 40px); animation: pet-z 2.2s ease-in infinite; }
.pet-zzz span:nth-child(2) { left: 1.2em; top: .6em; animation-delay: .5s; font-size: clamp(28px, 6.5vmin, 52px); }
.pet-zzz span:nth-child(3) { left: 2.6em; top: 1.4em; animation-delay: 1s; }
@keyframes pet-z { from { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(-14vh); opacity: 0; } }
.mascot.pet-asleep .m-body { animation-duration: 5s; }

/* walk (treat meadow) */
.pet-walk { background: linear-gradient(180deg, #BFE6FF 0 22%, #9BE08A 22%); }
.pet-walk-score { display: inline-flex; align-items: center; gap: 8px; height: clamp(52px, 8vmin, 68px); padding: 0 20px; border-radius: 999px; background: #fff; box-shadow: 0 5px 0 #E3D6C8; font-weight: 1000; font-size: clamp(1.3rem, 3.8vmin, 1.8rem); }
.pet-track { flex: 1; min-height: 0; display: flex; justify-content: center; }
.pet-field {
  position: relative; height: 100%; width: min(100%, 760px); border-radius: 32px; overflow: hidden; touch-action: none;
  background: linear-gradient(180deg, #8EDD7A, #6BC86A); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .25);
}
.pet-lane-lines { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); pointer-events: none; }
.pet-lane-lines span { border-right: 3px dashed rgba(255, 255, 255, .45); }
.pet-lane-lines span:last-child { border: 0; }
.pet-flower { position: absolute; font-size: clamp(18px, 3.6vmin, 30px); pointer-events: none; opacity: .9; }
.pet-flower.f1 { left: 4%; top: 18%; } .pet-flower.f2 { right: 6%; top: 34%; } .pet-flower.f3 { left: 3%; top: 60%; } .pet-flower.f4 { right: 4%; top: 76%; }
.pet-treat { position: absolute; z-index: 2; width: 60px; height: 60px; margin-left: -30px; display: grid; place-items: center; font-size: clamp(34px, 6.5vmin, 48px); pointer-events: none; filter: drop-shadow(0 4px 0 rgba(61, 53, 83, .12)); }
.pet-runner { position: absolute; z-index: 3; bottom: 10px; width: clamp(100px, 20vmin, 170px); transform: translateX(-50%); transition: left .16s ease; pointer-events: none; }
.pet-runner.is-hidden { visibility: hidden; }
.pet-runner .mascot { width: 100%; }
.mascot.pet-running .mascot-svg { animation: pet-runbob .28s ease-in-out infinite; }
.mascot.pet-running .m-foot-l { transform-box: fill-box; transform-origin: center; animation: pet-stepL .28s ease-in-out infinite; }
.mascot.pet-running .m-foot-r { transform-box: fill-box; transform-origin: center; animation: pet-stepR .28s ease-in-out infinite; }
.mascot.pet-running .m-eye-open { opacity: 0; animation: none; }
.mascot.pet-running .m-eye-happy { opacity: 1; }
@keyframes pet-runbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8%); } }
@keyframes pet-stepL { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-6px) rotate(8deg); } }
@keyframes pet-stepR { 0%, 100% { transform: translateY(-6px) rotate(8deg); } 50% { transform: translateY(0) rotate(-8deg); } }
.pet-lanes { position: absolute; inset: 0; z-index: 4; display: grid; grid-template-columns: repeat(3, 1fr); }
.pet-lanes button { min-height: 100%; }
.pet-pop { position: absolute; z-index: 6; transform: translateX(-50%); font-weight: 1000; color: #fff; text-shadow: 0 2px 0 #E5A93A; font-size: 1.4rem; pointer-events: none; animation: pet-popup .5s ease-out forwards; }
@keyframes pet-popup { to { transform: translate(-50%, -32px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pet-fly, .pet-bubbles span, .pet-zzz span, .new-badge, .start-pets .mascot { animation: none !important; }
}

/* ---------- v0.9.40 Augintinis ---------- */
/* home: two big buttons (Užduotys / Apdovanojimai) that open pop-up sheets */
.pet-bigs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.8vmin, 16px); }
.pet-big { position: relative; min-height: clamp(92px, 15vmin, 150px); border-radius: 28px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-weight: 1000; font-size: clamp(1rem, 2.6vmin, 1.3rem); line-height: 1.1; text-align: center; min-width: 0; transition: transform .12s ease, box-shadow .12s ease; }
.pet-big.tasks { background: linear-gradient(160deg, #FFF3C4, #FFDF7E); box-shadow: 0 7px 0 #E3B92C, var(--shadow); }
.pet-big.care { background: linear-gradient(160deg, #FFE3EC, #FFC0D3); box-shadow: 0 7px 0 #E38FAA, var(--shadow); }
.pet-big.is-locked { filter: saturate(.55); }
.pet-big-ico { font-size: clamp(2.2rem, 6.5vmin, 3.4rem); line-height: 1; }
.pet-big-label { min-width: 0; overflow-wrap: anywhere; }
.pet-big-star { position: absolute; top: 8px; right: 10px; display: flex; align-items: center; gap: 2px; font-size: .85rem; color: #B98300; }
.pet-big-star .icon { color: #F5B935; }
.pet-big-n { position: absolute; top: 8px; right: 12px; min-width: 1.8em; height: 1.8em; border-radius: 99px; display: grid; place-items: center; background: #fff; color: #C2577A; font-size: .9rem; }
.pet-big.pet-nudge { animation: pet-nudge .7s ease 2; }
@media (orientation: landscape) { .pet-bigs { flex: 1 1 auto; max-height: 480px; } .pet-big { min-height: 0; } }
.pet-sheet { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(61, 53, 83, .35); animation: pet-fade .2s ease both; }
.pet-sheet-card { width: min(100%, 720px); max-height: 100%; overflow-y: auto; scrollbar-width: none; border-radius: 32px; background: #FFF8EE; box-shadow: var(--shadow); padding: 14px 16px 20px;
  display: flex; flex-direction: column; gap: 12px; animation: pet-in .3s cubic-bezier(.3, 1.6, .5, 1) both; }
.pet-sheet-card::-webkit-scrollbar { display: none; }
.pet-sheet-head { display: flex; align-items: center; gap: 10px; }
.pet-sheet-ico { font-size: 2rem; line-height: 1; }
.pet-sheet-title { margin: 0; flex: 1; font-size: clamp(1.2rem, 3.4vmin, 1.6rem); font-weight: 1000; }
.pet-sheet .pet-stars { flex: none; }
.pet-sheet-grid.pet-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(clamp(70px, 11vmin, 100px), auto); max-height: none; }
.pet-sheet-grid.pet-care { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(clamp(78px, 12vmin, 110px), auto); max-height: none; }
@media (orientation: landscape) and (min-width: 900px) { .pet-sheet-grid.pet-tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (orientation: landscape) and (max-height: 500px) {
  .pet-sheet-card { padding: 10px 12px 12px; gap: 8px; }
  .pet-sheet-grid.pet-tasks, .pet-sheet-grid.pet-care { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(56px, auto); }
}

/* Skaičiuok: a + b apples */
.pet-sum { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2.4vmin, 22px); max-width: 100%; }
.pet-sum .pet-apples { max-width: none; flex-wrap: wrap; gap: clamp(4px, 1.2vmin, 10px); justify-content: center; }
.pet-sum .pet-apples.n4, .pet-sum .pet-apples.n5 { display: grid; grid-template-columns: repeat(3, auto); }
.pet-sum .pet-apples.n4 { grid-template-columns: repeat(2, auto); }
.pet-sum .pet-apple { width: clamp(40px, 9vmin, 84px); }
.pet-sum-a, .pet-sum-b { padding: 8px; border-radius: 22px; background: rgba(255, 255, 255, .7); }
.pet-plus { font-size: clamp(2.2rem, 7vmin, 3.6rem); font-weight: 1000; color: #E8505B; line-height: 1; }
@media (orientation: portrait) and (max-width: 560px) {
  .pet-sum .pet-apple { width: clamp(44px, 14vw, 66px); }
  .pet-sum .pet-apples.n4 .pet-apple, .pet-sum .pet-apples.n5 .pet-apple { width: clamp(34px, 10vw, 50px); }
  .pet-sum-a, .pet-sum-b { padding: 6px; }
  .pet-day { gap: 7px; padding: 0 7px; font-size: clamp(.8rem, 3.6vw, 1.05rem); letter-spacing: -.01em; }
  .pet-day-n { font-size: 1.35em; }
  .pet-day-name { overflow-wrap: normal; word-break: normal; hyphens: none; }
}

/* Savaitės diena: big numbers (Monday = 1) */
.pet-day { justify-content: flex-start; }
.pet-day-n { flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center; background: var(--c-sky); color: #fff; font-weight: 1000; font-size: 1.6em; }
.pet-day[data-day="sestadienis"] .pet-day-n, .pet-day[data-day="sekmadienis"] .pet-day-n { background: var(--c-coral); }
.pet-wcard-n { font-size: 1.45em; }
.pet-week.is-after .pet-wcard-n { font-size: 1.9em; }

/* Metų laikai: calendar sheet, season pictures, ✓ / ✗ */
.pet-s-season .pet-task-body, .pet-t-clock .pet-task-body { justify-content: center; gap: clamp(12px, 2.6vmin, 26px); }
.pet-season-q { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vmin, 26px); }
.pet-cal { width: clamp(108px, 22vmin, 180px); aspect-ratio: .9; border-radius: 22px; background: #fff; box-shadow: 0 6px 0 #E3D6C8; overflow: hidden; padding: 0 0 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; font-weight: 1000; }
.pet-cal-top { align-self: stretch; height: 24%; background: #E8505B; display: flex; justify-content: space-around; align-items: center; }
.pet-cal-top i { width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.pet-cal-n { font-size: clamp(2.4rem, 8vmin, 4.4rem); line-height: 1.1; color: #3D3553; }
.pet-cal-name { font-size: clamp(.85rem, 2.3vmin, 1.15rem); color: var(--ink-soft); }
.pet-season-eq { font-size: clamp(2rem, 6vmin, 3.2rem); font-weight: 1000; color: #D9A21B; }
.pet-season-pic { width: clamp(108px, 22vmin, 180px); aspect-ratio: 1; border-radius: 26px; overflow: hidden; box-shadow: 0 6px 0 #E3D6C8; }
.pet-season-pic svg, .pet-season-art svg { display: block; width: 100%; height: 100%; }
.pet-yesno { display: flex; gap: clamp(18px, 6vmin, 48px); justify-content: center; }
.pet-yn { width: clamp(104px, 20vmin, 170px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 1000; font-size: clamp(3rem, 10vmin, 5.4rem); line-height: 1;
  transition: transform .12s ease, opacity .2s ease; }
.pet-yn.yn-taip { background: var(--c-green, #3FBF7F); box-shadow: 0 8px 0 #2B9A62; }
.pet-yn.yn-ne { background: #FF6B6B; box-shadow: 0 8px 0 #D94848; }
.pet-seasons, .pet-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vmin, 18px); width: min(100%, 820px); }
.pet-season, .pet-act { border-radius: 24px; background: #fff; box-shadow: 0 6px 0 #E3D6C8; overflow: hidden; padding-bottom: 8px; display: flex; flex-direction: column; min-width: 0;
  transition: transform .12s ease, box-shadow .12s ease, opacity .2s ease; }
.pet-season-art { display: block; aspect-ratio: 1.25; }
.pet-season-art svg { height: 100%; }
.pet-season-name, .pet-act-name { text-align: center; font-weight: 900; font-size: clamp(1rem, 2.6vmin, 1.3rem); padding-top: 6px; }
.pet-act-art { display: grid; place-items: center; height: clamp(64px, 13vmin, 120px); font-size: clamp(2.2rem, 7vmin, 3.8rem); background: linear-gradient(180deg, #FFF3DA, #FFE6B8); }
.pet-yn.is-dim, .pet-season.is-dim, .pet-act.is-dim { opacity: .45; filter: saturate(.4); }
.pet-yn.hint, .pet-season.hint, .pet-act.hint { animation: hint 1.2s ease-in-out infinite; }
.pet-yn.is-right, .pet-season.is-right, .pet-act.is-right { outline: 5px solid var(--c-green); box-shadow: 0 0 0 12px rgba(92, 196, 142, .35); }
/* Ką darom?: clock + sky window */
.pet-clock { display: flex; align-items: center; gap: clamp(10px, 3vmin, 24px); }
.pet-clock-face { width: clamp(130px, 28vmin, 230px); aspect-ratio: 1; filter: drop-shadow(0 6px 0 #E3D6C8); }
.pet-clock-face svg { display: block; width: 100%; height: 100%; }
.pet-clock-svg text { font-family: inherit; }
.pet-clock-sky { width: clamp(64px, 13vmin, 110px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(2rem, 6.5vmin, 3.6rem); box-shadow: 0 5px 0 #E3D6C8; }
.pet-clock-sky.t-rytas { background: linear-gradient(180deg, #FFD9A8, #FFE9B0); }
.pet-clock-sky.t-diena { background: linear-gradient(180deg, #8CCDF4, #BFE6FF); }
.pet-clock-sky.t-vakaras { background: linear-gradient(180deg, #FFA98C, #FFCBA4); }
.pet-clock-sky.t-naktis { background: linear-gradient(180deg, #2E2848, #4A4170); }
@media (orientation: portrait) {
  .pet-seasons, .pet-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 520px); gap: 10px; }
  .pet-season-art { aspect-ratio: 1.6; }
  .pet-act-art { height: clamp(54px, 9vh, 96px); }
  .pet-cal, .pet-season-pic { width: min(30vw, 17vh, 180px); }
  .pet-yn { width: min(32vw, 17vh, 170px); }
  .pet-clock-face { width: min(46vw, 24vh, 260px); }
}
@media (orientation: portrait) and (max-height: 700px) {
  .pet-season-name, .pet-act-name { font-size: .95rem; padding-top: 3px; }
  .pet-season-art { aspect-ratio: 2; }
  .pet-act-art { height: 50px; font-size: 2rem; }
}

/* ===================== v0.9.41 – Augintinis: inline activities (large screens), list screens (phones), care animations ===================== */
/* large screens: every activity right on the home screen, compact tiles in two labelled sections */
.pet-home[data-layout="large"] .pet-panel { gap: clamp(8px, 1.4vmin, 12px); overflow-y: auto; }
.pet-sec { background: rgba(255, 255, 255, .55); border-radius: 26px; padding: clamp(8px, 1.3vmin, 12px); display: flex; flex-direction: column; gap: clamp(6px, 1vmin, 10px); min-height: 0; }
.pet-sec.sec-tasks { background: linear-gradient(160deg, rgba(255, 243, 196, .9), rgba(255, 223, 126, .55)); }
.pet-sec.sec-care { background: linear-gradient(160deg, rgba(255, 227, 236, .9), rgba(255, 192, 211, .55)); }
.pet-sec-head { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.pet-sec-ico { font-size: clamp(1.3rem, 3vmin, 1.7rem); line-height: 1; }
.pet-sec-title { margin: 0; font-size: clamp(1rem, 2.4vmin, 1.3rem); font-weight: 1000; color: var(--ink-soft); flex: 1; min-width: 0; }
.pet-sec-hint { display: flex; align-items: center; gap: 2px; font-weight: 900; font-size: .9rem; color: #B98300; }
.pet-sec-hint .icon { color: #F5B935; }
.sec-care .pet-sec-hint { color: #C2577A; }
.pet-inline-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(clamp(52px, 8.6vmin, 84px), 1fr); gap: clamp(6px, 1.1vmin, 10px); max-height: none; flex: 1 1 auto; }
.pet-inline-grid .pet-tile { min-height: 0; border-radius: 20px; padding: 6px 8px; gap: 6px; font-size: clamp(.78rem, 1.9vmin, 1rem); box-shadow: 0 5px 0 #E3D6C8; }
.pet-inline-grid .pet-tile-ico { font-size: clamp(1.4rem, 4.2vmin, 2.4rem); }
.pet-inline-grid.pet-care .pet-tile { flex-direction: row; text-align: left; justify-content: flex-start; padding: 6px 8px; }
.pet-inline-grid .pet-tile-label { overflow-wrap: anywhere; }
.pet-inline-grid.pet-nudge .pet-tile { animation: pet-nudge .7s ease 2; }
@media (orientation: landscape) {
  .pet-home[data-layout="large"] .pet-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); }
  .pet-home[data-layout="large"] .pet-inline-grid { max-height: none; }
}
@media (orientation: portrait) {
  .pet-home[data-layout="large"] .pet-stage { flex: 1 1 0; max-height: none; min-height: 260px; }
  .pet-home[data-layout="large"] .pet-panel { flex: none; }
  .pet-home[data-layout="large"] .pet-inline-grid { grid-auto-rows: minmax(clamp(64px, 7.5vh, 96px), auto); }
}

/* phones: full Užduotys / Apdovanojimai screens with a big back button */
.pet-list { display: flex; flex-direction: column; gap: clamp(10px, 2vmin, 16px); }
.pet-list-top { gap: 10px; }
.pet-back-big { flex: none; display: flex; align-items: center; gap: 2px; height: 72px; padding: 0 10px 0 12px; border-radius: 99px; background: #fff; box-shadow: 0 5px 0 #E3D6C8; font-size: 30px; color: var(--ink-soft); }
.pet-back-big:active { transform: translateY(3px); box-shadow: 0 2px 0 #E3D6C8; }
.pet-back-buddy { width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; }
.pet-back-buddy .mascot { width: 54px; --size: 54px; pointer-events: none; }
.pet-list-ico { font-size: 1.2em; margin-right: 6px; }
.pet-list .pet-title { display: flex; align-items: center; }
.pet-list-grid { flex: 1 1 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(96px, 1fr); gap: clamp(10px, 2.4vmin, 16px); max-height: none; min-height: 0; padding-bottom: 8px; }
.pet-list-grid .pet-tile { min-height: 0; flex-direction: column; justify-content: center; text-align: center; gap: 6px; border-radius: 28px; font-size: clamp(1rem, 4.4vw, 1.3rem); padding: 8px; }
.pet-list-grid .pet-tile-ico { font-size: clamp(2.4rem, 11vw, 3.6rem); }
.pet-list-tasks .pet-list-grid .pet-tile { background: linear-gradient(160deg, #FFFDF3, #FFF1C2); box-shadow: 0 6px 0 #E3C76A; }
.pet-list-rewards .pet-list-grid .pet-tile { background: linear-gradient(160deg, #FFFBFC, #FFE1EA); box-shadow: 0 6px 0 #E8A8BD; }
.pet-list-grid .pet-lock { top: 10px; right: 12px; }
.pet-to-tasks { flex: none; min-height: 84px; flex-direction: row; gap: 12px; margin-bottom: 8px; }
.pet-to-tasks .pet-big-star { position: static; }
@media (orientation: landscape) {
  .pet-list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(70px, 1fr); }
  .pet-list-grid .pet-tile-ico { font-size: clamp(2rem, 9vh, 3.2rem); }
  .pet-list-grid .pet-tile { font-size: clamp(.95rem, 4vh, 1.2rem); }
  .pet-back-big { height: 60px; }
  .pet-to-tasks { min-height: 64px; }
}
@media (orientation: portrait) and (max-height: 700px) {
  .pet-back-big { height: 62px; }
  .pet-back-buddy { width: 46px; height: 46px; }
  .pet-back-buddy .mascot { width: 44px; --size: 44px; }
  .pet-list-grid { grid-auto-rows: minmax(80px, 1fr); }
  .pet-to-tasks { min-height: 70px; }
}
.pet-meter.is-up .pet-meter-track > span { transition: width 1.1s cubic-bezier(.3, 1.3, .5, 1); }
.pet-meter.is-up { animation: pet-ready .6s cubic-bezier(.3, 1.6, .5, 1); }

/* care screen: animated meter + animation layers */
.pet-care-screen .pet-top { gap: 10px; }
.ca-meter { flex: none; display: flex; align-items: center; gap: 6px; width: clamp(130px, 32vw, 240px); background: #fff; border-radius: 99px; padding: 6px 12px; box-shadow: 0 4px 0 #E3D6C8; position: relative; }
.ca-meter-ico { font-size: 1.5rem; line-height: 1; }
.ca-meter-track { flex: 1; height: 14px; background: #F0E6D8; border-radius: 99px; overflow: hidden; }
.ca-meter-fill { display: block; height: 100%; border-radius: 99px; background: var(--c-mint); }
.ca-meter-plus { position: absolute; right: 6px; top: -14px; font-weight: 1000; font-size: 1rem; color: var(--c-green-d, #2E8B57); opacity: 0; transition: opacity .3s, transform .4s cubic-bezier(.3, 1.6, .5, 1); transform: translateY(6px); }
.ca-meter.is-up .ca-meter-plus { opacity: 1; transform: none; }
.pet-care-stage { cursor: pointer; }
.pet-care-mascot { position: relative; z-index: 2; will-change: transform; }
.ca-fx { position: absolute; pointer-events: none; line-height: 1; transform: translate(-50%, -50%); will-change: transform, opacity; user-select: none; }
.ca-crumb { color: #B9824A; font-weight: 1000; }
.ca-bubble { border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .95) 0 18%, rgba(160, 215, 248, .45) 22%); border: 2px solid rgba(255, 255, 255, .9); }
.ca-foamblob { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 45%, #EAF6FF 70%); box-shadow: 0 2px 0 rgba(0, 0, 0, .06); }
.ca-drop { width: .7em; height: .95em; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: #7CC8F2; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08); }
.ca-fly { color: transparent; }
.ca-tub, .ca-shine, .ca-night, .ca-blanket { transform: none; }
.ca-tub { border-radius: 16px 16px 30% 30% / 16px 16px 34% 34%; background: linear-gradient(180deg, #fff 0 16%, #F4F8FB 16% 100%); border: 4px solid #fff; box-shadow: 0 8px 0 #CFE3EF, 0 10px 24px rgba(60, 90, 120, .18); }
.ca-tub-water { position: absolute; left: 0; right: 0; top: 16%; bottom: 0; border-radius: 0 0 29% 29% / 0 0 40% 40%; background: linear-gradient(180deg, #A8DDF7, #6FBFEE); }
.ca-tub-shine { position: absolute; left: 8%; top: 34%; width: 10%; height: 38%; border-radius: 99px; background: rgba(255, 255, 255, .45); }
.ca-tub-foot { position: absolute; bottom: -9%; width: 12%; height: 14%; border-radius: 0 0 50% 50%; background: #E6EEF4; box-shadow: 0 3px 0 #C9D9E4; z-index: -1; }
.ca-tub-foot.l { left: 16%; } .ca-tub-foot.r { right: 16%; }
.ca-duck { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .12)); }
.ca-tub-foam { position: absolute; left: 0; right: 0; top: 0; height: 40%; }
.ca-tub-foam > span { position: absolute; top: -26%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 35%, #fff 0 52%, #E4F3FD 80%); }
.ca-shine { overflow: hidden; border-radius: 45%; mix-blend-mode: soft-light; z-index: 8; }
.ca-shine > span { position: absolute; top: -10%; bottom: -10%; left: 0; width: 38%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent); }
.ca-night { inset: 0; z-index: 1; border-radius: 30px; background: radial-gradient(circle at 70% 20%, rgba(88, 78, 140, .55), transparent 60%), linear-gradient(180deg, rgba(28, 24, 58, .9), rgba(52, 44, 92, .75)); }
.ca-blanket { border-radius: 42% 42% 16% 16% / 34% 34% 12% 12%; background: repeating-linear-gradient(45deg, #9C8CD9 0 16px, #B3A6E6 16px 32px); border-top: 6px dashed rgba(255, 255, 255, .7); box-shadow: 0 6px 0 #7E6FBE; }
.ca-moon { filter: drop-shadow(0 0 12px rgba(255, 236, 160, .7)); }
.ca-star { color: #FFE9A8; }
.ca-z { font-weight: 1000; color: #E9E2FF; text-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.pet-care-screen.is-night .ca-meter { background: rgba(255, 255, 255, .92); }
@media (orientation: portrait) { .pet-care-mascot .mascot { width: min(84vw, 50dvh, 460px); } }
@media (orientation: portrait) and (max-width: 400px) { .pet-list-ico { display: none; } }
