/* Learn English with Subbu — styles
   Bright, chunky, "3D toy" look built with CSS transforms, gradients and layered shadows. */

:root {
  --ink: #2B2D42;
  --ink-2: #5C607A;
  --sky-1: #7CD0FF;
  --sky-2: #D9F3FF;

  --blue-l: #8FD3FF;   --blue: #3FA7FF;   --blue-d: #1C7AD1;
  --pink-l: #FFA8C9;   --pink: #FF6FA3;   --pink-d: #D2467A;
  --purple-l: #BBA6FF; --purple: #8D6BFF; --purple-d: #6343D6;
  --green-l: #7FE6B5;  --green: #35C989;  --green-d: #1E9A63;
  --yellow-l: #FFE48A; --yellow: #FFC93C; --yellow-d: #D49A00;
  --orange-l: #FFC19A; --orange: #FF9548; --orange-d: #D66A1C;
  --red-l: #FF9C9C;    --red: #FF5E5E;    --red-d: #D23A3A;
  --teal-l: #7DE5E6;   --teal: #2EC4C6;   --teal-d: #169799;

  --edge: #C9D6EA;
  --font: 'Baloo 2', 'Trebuchet MS', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--sky-2);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior-y: none;
  touch-action: manipulation;
}
body.in-game { overflow: hidden; }
body.in-game .sky-sun { display: none; }
input, select, textarea { font: inherit; -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid var(--purple); outline-offset: 3px; }
[hidden], .hidden { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Colour helpers ---------- */
.c-blue   { --cl: var(--blue-l);   --c: var(--blue);   --cd: var(--blue-d); }
.c-pink   { --cl: var(--pink-l);   --c: var(--pink);   --cd: var(--pink-d); }
.c-purple { --cl: var(--purple-l); --c: var(--purple); --cd: var(--purple-d); }
.c-green  { --cl: var(--green-l);  --c: var(--green);  --cd: var(--green-d); }
.c-yellow { --cl: var(--yellow-l); --c: var(--yellow); --cd: var(--yellow-d); }
.c-orange { --cl: var(--orange-l); --c: var(--orange); --cd: var(--orange-d); }
.c-red    { --cl: var(--red-l);    --c: var(--red);    --cd: var(--red-d); }
.c-teal   { --cl: var(--teal-l);   --c: var(--teal);   --cd: var(--teal-d); }

/* ---------- Sky background ---------- */
#sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 62%, #F2FBFF 100%);
}
.sky-sun {
  position: absolute; top: calc(36px + var(--st)); right: 6%; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #FFF8C4 0%, #FFE066 45%, #FFC233 100%);
  box-shadow: 0 0 0 18px rgba(255, 224, 102, .25), 0 0 80px 30px rgba(255, 214, 80, .45);
  animation: sunPulse 6s ease-in-out infinite;
}
.sky-cloud, .bgc {
  position: absolute; left: 0; width: 160px; height: 52px; border-radius: 52px;
  background: linear-gradient(#fff 40%, #E6F4FF);
  box-shadow: 0 10px 0 rgba(150, 195, 235, .3);
  animation: drift linear infinite;
}
.sky-cloud::before, .sky-cloud::after, .bgc::before, .bgc::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.sky-cloud::before, .bgc::before { width: 70px; height: 70px; left: 22px; top: -34px; }
.sky-cloud::after, .bgc::after { width: 54px; height: 54px; left: 78px; top: -24px; }
.sky-cloud.c1 { top: 16%; --s: 1; animation-duration: 70s; animation-delay: -20s; }
.sky-cloud.c2 { top: 32%; --s: .6; opacity: .75; animation-duration: 110s; animation-delay: -70s; }
.sky-cloud.c3 { top: 7%; --s: .8; animation-duration: 90s; animation-delay: -45s; }
.sky-cloud.c4 { top: 48%; --s: 1.25; opacity: .9; animation-duration: 60s; animation-delay: -5s; }
.sky-hills { position: absolute; left: 0; bottom: 0; width: 100%; height: 22vh; min-height: 110px; }

/* ---------- Layout ---------- */
#app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; outline: none; }
.screen {
  max-width: 1100px; margin: 0 auto;
  padding: calc(14px + var(--st)) calc(16px + var(--sr)) calc(32px + var(--sb)) calc(16px + var(--sl));
  animation: screenIn .45s cubic-bezier(.2, .9, .3, 1.2) both;
}
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; font-weight: 700; font-size: 1.3rem; }
.boot img { width: 120px; margin: 0 auto; animation: bounce 2s ease-in-out infinite; }
.noscript { position: relative; z-index: 2; max-width: 460px; margin: 20vh auto; padding: 20px; background: #fff; border-radius: 20px; text-align: center; font-size: 1.2rem; }

/* ---------- 3D buttons ---------- */
.btn {
  --cl: var(--blue-l); --c: var(--blue); --cd: var(--blue-d);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 54px; padding: .45em 1.4em; border: 0; border-radius: 20px;
  font-weight: 800; font-size: 1.2rem; line-height: 1.05; color: #fff; letter-spacing: .01em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
  background: linear-gradient(180deg, var(--cl) 0%, var(--c) 60%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 var(--cd), 0 12px 18px rgba(25, 40, 90, .2);
  transition: transform .1s ease, box-shadow .1s ease, filter .2s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(5px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 1px 0 var(--cd), 0 4px 8px rgba(25, 40, 90, .2); }
.btn[disabled] { filter: grayscale(.85) opacity(.55); pointer-events: none; }
.btn.white { --cl: #fff; --c: #fff; --cd: var(--edge); color: var(--ink); text-shadow: none; }
.btn.small { min-height: 46px; font-size: 1.02rem; padding: .35em 1em; border-radius: 16px; }
.btn.big { min-height: 66px; font-size: 1.5rem; padding: .45em 1.9em; border-radius: 24px; }
.btn.c-blue   { --cl: var(--blue-l);   --c: var(--blue);   --cd: var(--blue-d); }
.btn.c-pink   { --cl: var(--pink-l);   --c: var(--pink);   --cd: var(--pink-d); }
.btn.c-purple { --cl: var(--purple-l); --c: var(--purple); --cd: var(--purple-d); }
.btn.c-green  { --cl: var(--green-l);  --c: var(--green);  --cd: var(--green-d); }
.btn.c-yellow { --cl: var(--yellow-l); --c: var(--yellow); --cd: var(--yellow-d); color: #6B4500; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.btn.c-orange { --cl: var(--orange-l); --c: var(--orange); --cd: var(--orange-d); }
.btn.c-red    { --cl: var(--red-l);    --c: var(--red);    --cd: var(--red-d); }
.link-btn { border: 0; background: none; font-weight: 700; font-size: 1.1rem; color: var(--ink-2); text-decoration: underline; padding: 8px; }

.icon-btn {
  flex: 0 0 auto; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 16px; background: #fff; color: var(--ink);
  font-size: 1.35rem; font-weight: 800; display: inline-grid; place-items: center;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .05), 0 5px 0 var(--edge), 0 10px 16px rgba(25, 40, 90, .15);
  transition: transform .1s, box-shadow .1s;
}
.icon-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge), 0 4px 8px rgba(25, 40, 90, .15); }
.icon-btn svg { width: 26px; height: 26px; }
.icon-btn[disabled] { opacity: .45; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 99px; padding: 6px 14px;
  font-weight: 800; font-size: 1.1rem; white-space: nowrap; box-shadow: 0 4px 0 var(--edge);
}
.chip.bump { animation: bump .45s cubic-bezier(.2, .9, .3, 1.8); }

.title-3d {
  font-weight: 800; color: #fff; letter-spacing: .5px;
  text-shadow: 0 2px 0 #6C7BFF, 0 4px 0 #5867EC, 0 6px 0 #4654D2, 0 12px 18px rgba(30, 40, 120, .35);
}

.panel {
  width: 100%; background: rgba(255, 255, 255, .95); border-radius: 30px; padding: 18px 20px 22px;
  box-shadow: 0 8px 0 rgba(43, 45, 66, .07), 0 24px 50px rgba(35, 52, 110, .16);
}

/* ---------- Welcome ---------- */
.welcome { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; max-width: 780px; }
.mascot { width: clamp(120px, 28vw, 180px); height: auto; filter: drop-shadow(0 14px 12px rgba(30, 40, 90, .25)); animation: bounce 2.8s ease-in-out infinite; }
.brand-title { margin: -6px 0 6px; font-size: clamp(2.3rem, 9vw, 3.8rem); line-height: 1; }
.brand-title span { display: block; font-size: .62em; color: #FFF3A6; margin-bottom: 4px; }
.field-label { font-weight: 800; font-size: 1.3rem; margin: 6px 0 12px; }
.name-input {
  width: 100%; max-width: 380px; font-size: 1.35rem; font-weight: 700; padding: 12px 18px; border-radius: 18px;
  border: 3px solid #DDE7F7; background: #F6FAFF; color: var(--ink); text-align: center; outline: none;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .04);
}
.name-input:focus { border-color: var(--purple); background: #fff; }
.avatars { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.avatar-btn {
  width: 60px; height: 60px; font-size: 34px; line-height: 1; border-radius: 50%; border: 0; background: #F1F6FF; padding: 0;
  font-family: var(--emoji); box-shadow: 0 5px 0 #D5E1F5; transition: transform .15s, box-shadow .15s;
}
.avatar-btn[aria-pressed="true"] { background: #FFF4C2; box-shadow: 0 5px 0 var(--yellow-d), 0 0 0 4px var(--yellow); transform: translateY(-4px) scale(1.08); }
.age-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; perspective: 900px; }
.age-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 10px 14px;
  border: 0; border-radius: 26px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .15);
  background: radial-gradient(120% 90% at 30% 10%, var(--cl) 0%, var(--c) 60%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35), 0 8px 0 var(--cd), 0 18px 24px rgba(25, 40, 90, .2);
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .2s, box-shadow .2s;
  animation: tileIn .5s cubic-bezier(.2, .9, .3, 1.3) backwards; animation-delay: calc(var(--i, 0) * 80ms);
}
.age-card[aria-pressed="true"] { box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35), 0 8px 0 var(--cd), 0 0 0 5px #fff, 0 0 0 10px var(--c), 0 18px 24px rgba(25, 40, 90, .25); transform: translateY(-4px) scale(1.03); }
.ag-emoji { font-size: 54px; font-family: var(--emoji); transform: translateZ(40px); filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .25)); animation: floaty 3s ease-in-out infinite; }
.ag-name { font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.ag-range { font-size: 1.05rem; font-weight: 800; white-space: nowrap; background: rgba(255, 255, 255, .25); border-radius: 99px; padding: 0 12px; }
.ag-tag { font-size: .95rem; font-weight: 600; opacity: .95; }
@media (max-width: 600px) {
  .age-cards { grid-template-columns: 1fr; gap: 14px; }
  .age-card {
    display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "e n r" "e t t";
    align-items: center; column-gap: 12px; row-gap: 0; text-align: left; padding: 12px 16px;
  }
  .ag-emoji { grid-area: e; font-size: 46px; }
  .ag-name { grid-area: n; white-space: nowrap; }
  .ag-range { grid-area: r; }
  .ag-tag { grid-area: t; }
}

/* ---------- Home ---------- */
.brand-bar { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.brand-bar img { width: 48px; height: 48px; filter: drop-shadow(0 6px 5px rgba(30, 40, 90, .25)); }
.brand-small { font-size: clamp(1.25rem, 4.6vw, 1.8rem); }
.home-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hello { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 210px; }
.hello .av {
  width: 60px; height: 60px; border: 0; padding: 0; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-size: 36px; font-family: var(--emoji); box-shadow: 0 5px 0 var(--edge), 0 10px 16px rgba(25, 40, 90, .15);
}
.hello h1 { margin: 0; font-size: clamp(1.4rem, 5vw, 2rem); line-height: 1.1; }
.hello p { margin: 0; color: var(--ink-2); font-weight: 700; }
.chips { display: flex; gap: 8px; align-items: center; }
.age-switch { display: flex; gap: 10px; margin: 16px 0 14px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.age-switch::-webkit-scrollbar { display: none; }
.age-pill {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; line-height: 1.1;
  border: 0; border-radius: 18px; padding: 7px 16px; font-weight: 800; font-size: 1.05rem; color: var(--ink);
  background: rgba(255, 255, 255, .78); box-shadow: 0 4px 0 rgba(0, 0, 0, .08); transition: transform .15s;
}
.age-pill small { font-size: .78rem; font-weight: 700; opacity: .8; }
.age-pill[aria-pressed="true"] { color: #fff; background: linear-gradient(var(--cl), var(--c)); box-shadow: 0 4px 0 var(--cd); text-shadow: 0 1px 0 rgba(0, 0, 0, .15); transform: translateY(-2px); }

.wotd-hero {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; width: 100%;
  padding: 18px 20px; border: 0; border-radius: 30px; color: #fff; text-align: left; overflow: hidden;
  background: linear-gradient(135deg, #FFB443 0%, #FF7A59 55%, #FF5E8A 100%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .3), 0 9px 0 #D24A6A, 0 22px 30px rgba(210, 74, 106, .3);
  transition: transform .15s, box-shadow .15s;
}
.wotd-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(circle at 85% 20%, #fff 0 3px, transparent 4px), radial-gradient(circle at 70% 75%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 92% 60%, #fff 0 2px, transparent 3px), radial-gradient(circle at 60% 15%, #fff 0 2px, transparent 3px);
}
.wotd-hero:active { transform: translateY(6px); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .3), 0 3px 0 #D24A6A, 0 8px 12px rgba(210, 74, 106, .3); }
.w-emoji {
  font-size: clamp(56px, 14vw, 86px); font-family: var(--emoji); width: clamp(88px, 22vw, 128px); aspect-ratio: 1; display: grid; place-items: center;
  background: rgba(255, 255, 255, .22); border-radius: 26px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .08), inset 0 4px 0 rgba(255, 255, 255, .25);
  animation: wobble3d 4.5s ease-in-out infinite;
}
.w-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.w-kicker { font-weight: 800; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; opacity: .95; }
.w-word { font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 800; line-height: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, .15); overflow-wrap: anywhere; }
.w-mean { font-weight: 600; font-size: 1.05rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.w-go { align-self: flex-start; margin-top: 8px; background: #fff; color: #E2546F; border-radius: 99px; padding: 4px 16px; font-weight: 800; text-shadow: none; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.wotd-hero.loading .w-word { animation: blink 1.2s ease-in-out infinite; }

.section-title { font-size: 1.6rem; font-weight: 800; margin: 26px 4px 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 20px; perspective: 1000px; }
@media (max-width: 420px) { .tiles { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
  min-height: 180px; padding: 14px 10px 16px; border: 0; border-radius: 28px; color: #fff; text-align: center;
  background: radial-gradient(120% 90% at 30% 10%, var(--cl) 0%, var(--c) 60%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35), inset 0 -6px 0 rgba(0, 0, 0, .07), 0 9px 0 var(--cd), 0 20px 26px rgba(25, 40, 90, .22);
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .2s ease, box-shadow .2s ease;
  animation: tileIn .5s cubic-bezier(.2, .9, .3, 1.3) backwards; animation-delay: calc(var(--i, 0) * 70ms);
}
.tile::after {
  content: ''; position: absolute; left: 10px; right: 10px; top: 6px; height: 42%; border-radius: 24px 24px 50% 50%; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, 0));
}
.tile:hover { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); }
.tile:active { transform: translateY(6px); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35), 0 3px 0 var(--cd), 0 8px 12px rgba(25, 40, 90, .2); }
.t-icon {
  margin-bottom: auto; padding-top: 6px; font-size: clamp(54px, 13vw, 74px); line-height: 1; font-family: var(--emoji);
  transform: translateZ(50px); filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .25));
  animation: floaty 3.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -400ms);
}
.t-name { font-size: clamp(1.15rem, 3.8vw, 1.4rem); font-weight: 800; line-height: 1.1; text-shadow: 0 2px 0 rgba(0, 0, 0, .15); transform: translateZ(25px); }
.t-desc { font-size: .95rem; font-weight: 600; line-height: 1.15; opacity: .95; transform: translateZ(15px); }
.tile.c-yellow { color: #6B4500; }
.tile.c-yellow .t-name { text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.tile.small { min-height: 140px; }
.tile.small .t-icon { font-size: clamp(46px, 11vw, 60px); }

.home-foot { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--ink-2); font-weight: 600; }
.home-foot p { margin: 0; background: rgba(255, 255, 255, .7); padding: 4px 14px; border-radius: 99px; }

/* ---------- Game shell ---------- */
.game { position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; animation: screenIn .35s ease both; }
.game-bar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--st)) calc(12px + var(--sr)) 8px calc(12px + var(--sl));
}
.game-title { flex: 1; margin: 0; min-width: 0; font-size: clamp(1.15rem, 4.2vw, 1.6rem); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-title span { font-family: var(--emoji); }
.progress { height: 12px; margin: 0 calc(14px + var(--sr)) 8px calc(14px + var(--sl)); border-radius: 99px; background: rgba(255, 255, 255, .7); overflow: hidden; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .08); }
.progress > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--green-l), var(--green)); transition: width .45s cubic-bezier(.3, 1.3, .5, 1); }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.scroll-stage {
  position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2.6vh, 24px);
  padding: 10px calc(14px + var(--sr)) calc(28px + var(--sb)) calc(14px + var(--sl));
}
.scroll-stage > * { flex-shrink: 0; }
.scroll-stage > :first-child { margin-top: auto; }
.scroll-stage > :last-child { margin-bottom: auto; }

.prompt {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 100%;
  padding: 8px 10px 8px 18px; background: #fff; border-radius: 24px; text-align: center;
  font-weight: 800; font-size: clamp(1.15rem, 4.2vw, 1.75rem); line-height: 1.15;
  box-shadow: 0 6px 0 rgba(43, 45, 66, .1), 0 14px 24px rgba(30, 40, 90, .14);
  animation: promptIn .45s cubic-bezier(.2, .9, .3, 1.3) both;
}
.prompt > span:not(.speak-btn) { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: .25em; }
.prompt .p-pic { font-size: 1.9em; line-height: 1; }
.prompt .hl { color: var(--purple-d); }
.prompt .p-sub { display: block; width: 100%; font-size: .62em; font-weight: 700; color: var(--ink-2); }
.prompt .big-letter { font-size: 1.9em; line-height: 1; color: var(--pink-d); text-shadow: 0 3px 0 var(--pink-l); }
.speak-btn {
  flex: 0 0 auto; width: 50px; height: 50px; border: 0; padding: 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 22px; font-family: var(--emoji);
  background: radial-gradient(circle at 35% 30%, #FFF3BF 0%, var(--yellow-l) 30%, var(--yellow) 75%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .06), 0 4px 0 var(--yellow-d), 0 8px 12px rgba(150, 100, 0, .2);
  transition: transform .1s;
}
.speak-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--yellow-d); }
.speak-btn.talking { animation: pulse .8s ease-in-out infinite; }
.speak-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; color: var(--ink-2); }

/* ---------- Pictures ---------- */
.pic { display: inline-grid; place-items: center; line-height: 1; }
.pic-emoji { font-family: var(--emoji); filter: drop-shadow(0 .06em .05em rgba(0, 0, 0, .25)); }
.pic-color {
  width: 1.1em; height: 1.1em; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .8) 0 9%, rgba(255, 255, 255, 0) 32%), var(--sw);
  box-shadow: inset -.08em -.12em .2em rgba(0, 0, 0, .28), 0 .08em .14em rgba(0, 0, 0, .22);
}
.pic-color.is-white { box-shadow: inset -.08em -.12em .2em rgba(0, 0, 0, .18), 0 0 0 .04em #D0D8E6, 0 .08em .14em rgba(0, 0, 0, .2); }
.pic-shape svg { width: 1.15em; height: 1.15em; overflow: visible; filter: drop-shadow(0 .06em .05em rgba(0, 0, 0, .25)); }
.pic-num { gap: .06em; }
.pic-num b { font-size: .9em; font-weight: 800; color: var(--purple); text-shadow: 0 .05em 0 var(--purple-d); }
.pic-num .dots { display: flex; flex-wrap: wrap; justify-content: center; gap: .05em; max-width: 1.2em; }
.pic-num .dots i { width: .14em; height: .14em; border-radius: 50%; background: var(--orange); }
.pic.huge { font-size: clamp(90px, 24vw, 150px); }
.pic.mid { font-size: clamp(64px, 16vw, 96px); }

/* ---------- Sky Pilot ---------- */
.pilot, .bpop {
  position: absolute; inset: 0; overflow: hidden; touch-action: none;
  background: linear-gradient(180deg, #5FBDFF 0%, #A9E1FF 55%, #E4F6FF 100%);
}
.p-sun {
  position: absolute; right: 7%; top: 16%; width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFF6B0, #FFD23F 60%, #FFB703);
  box-shadow: 0 0 60px 18px rgba(255, 210, 63, .45);
}
.p-layer { position: absolute; left: 0; bottom: 0; width: calc(100% + var(--tile)); background-repeat: repeat-x; background-position: 0 100%; pointer-events: none; animation: scrollX linear infinite; will-change: transform; }
.p-mountains {
  --tile: 800px; height: 40%; opacity: .9; animation-duration: 90s; background-size: 800px 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200 L0 120 L90 50 L170 110 L260 30 L360 120 L450 70 L540 130 L630 40 L720 110 L800 120 L800 200 Z' fill='%23B7D5F3'/%3E%3Cpath d='M260 30 L235 52 L252 48 L262 58 L275 46 L290 52 Z M630 40 L606 60 L622 56 L632 66 L645 54 L658 60 Z' fill='%23fff' opacity='.85'/%3E%3C/svg%3E");
}
.p-hills {
  --tile: 600px; height: 24%; animation-duration: 36s; background-size: 600px 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200 L0 110 Q75 40 150 100 T300 95 T450 90 T600 110 L600 200 Z' fill='%239BDB8E'/%3E%3C/svg%3E");
}
.p-hills2 {
  --tile: 500px; height: 14%; animation-duration: 18s; background-size: 500px 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200 L0 120 Q60 60 125 110 T250 100 T375 110 T500 120 L500 200 Z' fill='%236CC56A'/%3E%3Ccircle cx='90' cy='92' r='16' fill='%2349A84F'/%3E%3Crect x='87' y='100' width='6' height='18' fill='%23845C3C'/%3E%3Ccircle cx='330' cy='96' r='20' fill='%2349A84F'/%3E%3Crect x='326' y='106' width='7' height='20' fill='%23845C3C'/%3E%3C/svg%3E");
}
.p-bgclouds { position: absolute; inset: 0; pointer-events: none; }
.bgc { animation-name: driftLeft; }
.bgc { box-shadow: none; }
.bgc.b1 { top: 22%; --s: .35; opacity: .45; filter: blur(1.5px); animation-duration: 46s; animation-delay: -10s; }
.bgc.b2 { top: 42%; --s: .5; opacity: .5; filter: blur(1px); animation-duration: 30s; animation-delay: -22s; }
.bgc.b3 { top: 12%; --s: .4; opacity: .5; filter: blur(1.5px); animation-duration: 38s; animation-delay: -3s; }
.bgc.b4 { top: 62%; --s: .6; opacity: .55; filter: blur(1px); animation-duration: 20s; animation-delay: -12s; }
.p-field, .b-field { position: absolute; inset: 0; }
.p-top { position: absolute; top: 8px; left: 10px; right: 10px; z-index: 6; display: flex; justify-content: center; pointer-events: none; }
.p-top .prompt { pointer-events: auto; }
.p-hint {
  position: absolute; left: 50%; bottom: calc(10px + var(--sb)); z-index: 7; transform: translateX(-50%);
  background: rgba(43, 45, 66, .85); color: #fff; font-weight: 700; padding: 6px 16px; border-radius: 99px; white-space: nowrap;
  animation: hintBob 1.6s ease-in-out infinite; transition: opacity .4s; pointer-events: none;
}
.p-hint.hide { opacity: 0; }

.acloud {
  position: absolute; z-index: 3; width: var(--cw); height: calc(var(--cw) * .6); padding: 0; border: 0; background: none;
  animation: cloudIn .55s cubic-bezier(.2, .9, .3, 1.5) backwards; animation-delay: var(--d, 0s);
}
.acloud-in { position: absolute; inset: 0; display: block; animation: bob 3.2s ease-in-out infinite; animation-delay: var(--bd, 0s); transition: transform .2s, filter .2s; }
.acloud svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 12px 10px rgba(40, 90, 150, .25)); }
.cl-base { fill: #B9D3F0; }
.cl-body { fill: url(#g-cloud); transition: fill .2s; }
.cl-shine { fill: #fff; opacity: .7; }
.acloud .label {
  position: absolute; inset: 22% 9% 12%; display: grid; place-items: center; text-align: center;
  font-weight: 800; color: var(--ink); font-size: var(--fs, 1.4rem); line-height: 1; overflow-wrap: anywhere;
}
.acloud .label .pic { font-size: calc(var(--cw) * .34); }
.acloud.hover .acloud-in { transform: scale(1.12); filter: drop-shadow(0 0 16px #FFF59D) brightness(1.04); }
.acloud.win .acloud-in { animation: cloudWin .9s ease-out forwards; }
.acloud.win .cl-body { fill: url(#g-cloud-win); }
.acloud.miss .acloud-in { animation: shake .5s; }
.acloud.miss .cl-body { fill: #FFD6D6; }
.acloud.gone { opacity: .3; filter: grayscale(1); pointer-events: none; transition: opacity .3s; }
.acloud.leave { opacity: 0; transform: scale(.6); transition: opacity .4s, transform .4s; }

.plane {
  --pw: 120px;
  position: absolute; left: 0; top: 0; z-index: 5; width: var(--pw); height: calc(var(--pw) * .62);
  margin-left: calc(var(--pw) / -2); margin-top: calc(var(--pw) * -.31);
  touch-action: none; cursor: grab; will-change: transform; perspective: 500px;
}
.plane.drag { cursor: grabbing; }
.plane.flying { transition: transform .75s cubic-bezier(.45, .05, .3, 1); }
.plane-3d { width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .3s ease-out; }
.plane.drag .plane-3d { transition: transform .12s ease-out; }
.plane svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 16px 10px rgba(0, 40, 90, .28)); animation: planeBob 1.8s ease-in-out infinite; }
.plane.drag svg { animation: none; }
.plane .prop { transform-box: fill-box; transform-origin: center; animation: prop .14s linear infinite; }
.plane::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: calc(var(--pw) * 1.35); height: calc(var(--pw) * 1.35);
  transform: translate(-50%, -50%); border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .8);
  animation: ring 1.6s ease-out infinite; pointer-events: none;
}
.plane.drag::after, .plane.flying::after { display: none; }
.puff { position: absolute; z-index: 4; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; opacity: .9; pointer-events: none; animation: puff .9s ease-out forwards; }

/* ---------- Balloon Pop ---------- */
.b-count {
  position: absolute; left: calc(12px + var(--sl)); bottom: calc(12px + var(--sb)); z-index: 6;
  background: #fff; border-radius: 99px; padding: 6px 16px; font-weight: 800; font-size: 1.2rem; box-shadow: 0 4px 0 var(--edge);
}
.balloon {
  position: absolute; bottom: 0; z-index: 3; width: var(--bw); height: calc(var(--bw) * 1.8); margin-left: calc(var(--bw) / -2);
  padding: 0; border: 0; background: none; transform: translate3d(0, 100%, 0);
  animation: rise var(--dur) linear forwards; will-change: transform; touch-action: none;
}
.b-sway { position: absolute; inset: 0; display: block; transform-origin: 50% 100%; animation: sway var(--sw, 3s) ease-in-out infinite alternate; }
.b-body {
  position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--bw) * 1.18); display: grid; place-items: center;
  border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, .9) 0 7%, rgba(255, 255, 255, 0) 16%),
    radial-gradient(circle at 36% 34%, var(--cl), var(--c) 55%, var(--cd) 100%);
  box-shadow: inset -10px -14px 22px rgba(0, 0, 0, .16), 0 10px 18px rgba(25, 40, 90, .2);
}
.b-label { color: #fff; font-weight: 800; line-height: 1; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); padding: 0 6%; overflow-wrap: anywhere; }
.b-label .pic { font-size: calc(var(--bw) * .5); }
.balloon.c-yellow .b-label { color: #6B4500; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.b-knot { position: absolute; left: 50%; top: calc(var(--bw) * 1.15); width: 14px; height: 10px; margin-left: -7px; background: var(--cd); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.b-str { position: absolute; left: 50%; top: calc(var(--bw) * 1.23); width: 20px; height: calc(var(--bw) * .55); margin-left: -10px; }
.b-str svg { width: 100%; height: 100%; display: block; }
.balloon.popped .b-body { animation: popBody .25s ease-out forwards; }
.balloon.popped .b-knot, .balloon.popped .b-str { opacity: 0; }
.balloon.nope .b-body { animation: shake .45s; filter: saturate(.4); }
.balloon.fade { opacity: 0; transition: opacity .4s; pointer-events: none; }

/* ---------- Clue cards ---------- */
.clue-row { display: flex; align-items: center; justify-content: center; gap: 14px; max-width: 100%; }
.clue-card {
  background: #fff; border-radius: 28px; padding: 14px 20px; max-width: 620px;
  box-shadow: 0 8px 0 rgba(43, 45, 66, .08), 0 20px 30px rgba(35, 52, 110, .14); animation: promptIn .45s cubic-bezier(.2, .9, .3, 1.3) both;
}
.pic-clue { padding: 10px 26px; transform: perspective(600px) rotateX(6deg); }
.pic-clue .pic.huge { font-size: clamp(80px, 20vh, 140px); animation: floaty 3s ease-in-out infinite; }
.clue-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.clue-len { font-weight: 800; color: var(--ink-2); }
.clue-text { margin: 6px 0 0; font-size: clamp(1.1rem, 3.8vw, 1.45rem); font-weight: 700; line-height: 1.25; }
.pos-chip { display: inline-block; background: var(--purple); color: #fff; font-weight: 800; font-size: .9rem; border-radius: 99px; padding: 1px 12px; box-shadow: 0 3px 0 var(--purple-d); }
.ask { margin: 0; font-weight: 800; font-size: clamp(1.15rem, 4vw, 1.5rem); text-align: center; }
.example { margin: 0; font-size: 1.15rem; font-weight: 600; font-style: italic; color: var(--ink-2); text-align: center; max-width: 620px; }
.example b { font-style: normal; color: var(--purple-d); }

/* ---------- Jumble ---------- */
.jb { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.jb-slots, .jb-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
.jb-slot {
  width: var(--ts); height: calc(var(--ts) * 1.12); padding: 0; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .55); border: 3px dashed rgba(43, 45, 66, .2);
}
.jb-slot.filled { border-color: transparent; background: transparent; }
.jb-home { width: var(--ts); height: calc(var(--ts) * 1.12); border-radius: 14px; background: rgba(43, 45, 66, .06); }
.ltile {
  position: relative; width: var(--ts, 60px); height: var(--ts, 60px); padding: 0; border: 0; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; font-size: calc(var(--ts, 60px) * .56); line-height: 1; color: #7A4B00;
  background: linear-gradient(180deg, #FFF0B3 0%, #FFD24D 55%, #FFC233 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(0, 0, 0, .06), 0 6px 0 #D49A00, 0 11px 14px rgba(120, 80, 0, .25);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .6);
  transform: perspective(300px) rotateX(8deg); transition: transform .12s, box-shadow .12s, background .2s;
}
.ltile:active { transform: perspective(300px) rotateX(8deg) translateY(4px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), 0 2px 0 #D49A00, 0 4px 6px rgba(120, 80, 0, .25); }
.ltile.bad { background: linear-gradient(180deg, #FFD0D0, #FF8F8F); color: #8A1F1F; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 6px 0 var(--red-d), 0 11px 14px rgba(120, 0, 0, .2); }
.ltile.good { background: linear-gradient(180deg, #C9FFE3, #5FE0A2); color: #0E5B38; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 6px 0 var(--green-d), 0 11px 14px rgba(0, 90, 50, .2); animation: hop .5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: var(--d, 0s); }
.ltile.hinted::after { content: '💡'; position: absolute; top: -10px; right: -8px; font-size: 16px; font-family: var(--emoji); }
.jb-slots.shake { animation: shake .5s; }
.jb-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.jb-next { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.jb-next:empty { display: none; }

/* ---------- Missing letter ---------- */
.mword-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mtile {
  width: clamp(54px, 15vw, 80px); height: clamp(60px, 17vw, 90px); display: grid; place-items: center; border-radius: 16px;
  background: #fff; font-weight: 800; font-size: clamp(2rem, 9vw, 3.2rem); color: var(--ink);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .05), 0 6px 0 var(--edge), 0 12px 16px rgba(25, 40, 90, .14);
  transform: perspective(300px) rotateX(10deg);
}
.mtile.blank { background: #FFF4C2; border: 3px dashed var(--yellow-d); color: var(--yellow-d); animation: pulse 1.4s ease-in-out infinite; }
.mtile.good { background: linear-gradient(#C9FFE3, #7EEBB7); color: #0E5B38; box-shadow: 0 6px 0 var(--green-d); animation: hop .5s cubic-bezier(.3, 1.6, .5, 1); }
.mword-row.done .mtile { animation: hop .5s cubic-bezier(.3, 1.6, .5, 1); }
.bubbles { display: flex; gap: clamp(14px, 4vw, 30px); justify-content: center; flex-wrap: wrap; padding: 6px; }
.bubble {
  position: relative; width: clamp(80px, 22vw, 106px); aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%;
  font-weight: 800; font-size: clamp(2.4rem, 10vw, 3.2rem); color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .2);
  background: radial-gradient(circle at 32% 26%, #fff 0 8%, var(--cl) 26%, var(--c) 62%, var(--cd) 100%);
  box-shadow: inset -6px -10px 16px rgba(0, 0, 0, .15), 0 12px 18px rgba(25, 40, 90, .22);
  animation: bob 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.7s);
}
.bubble:active { transform: scale(.94); }
.bubble.wrong { animation: shake .45s; opacity: .35; filter: grayscale(1); }

/* ---------- Memory ---------- */
.memory-game { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 6px 12px calc(14px + var(--sb)); }
.mem-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 10px; }
.mem-info .chip { font-size: 1rem; }
.mem-grid { flex: 1; display: grid; grid-template-columns: repeat(var(--cols, 4), var(--cw, 100px)); gap: 10px; justify-content: center; align-content: center; perspective: 1000px; }
.mcard { width: var(--cw); height: calc(var(--cw) * 1.25); padding: 0; border: 0; background: none; perspective: 700px; animation: tileIn .45s cubic-bezier(.2, .9, .3, 1.3) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
.mcard-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3, 1.4, .5, 1); }
.mcard.flipped .mcard-in { transform: rotateY(180deg); }
.mface { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px; -webkit-backface-visibility: hidden; backface-visibility: hidden; padding: 6px; }
.mback {
  background: radial-gradient(circle at 30% 20%, var(--purple-l), var(--purple) 60%, var(--purple-d));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 6px 0 #4B2FB0, 0 12px 16px rgba(60, 30, 140, .25);
}
.mback .mq { font-size: calc(var(--cw) * .45); font-weight: 800; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.mback::before { content: ''; position: absolute; inset: 8px; border: 3px dashed rgba(255, 255, 255, .4); border-radius: 10px; }
.mfront { background: #fff; transform: rotateY(180deg); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .05), 0 6px 0 var(--edge), 0 12px 16px rgba(25, 40, 90, .15); }
.mfront .pic { font-size: calc(var(--cw) * .55); }
.mword { font-weight: 800; color: var(--ink); text-align: center; line-height: 1; font-size: min(calc(var(--cw) * .24), calc(var(--cw) * 1.5 / var(--len))); }
.mcard.matched .mfront { background: #E3FFF0; box-shadow: 0 0 0 4px var(--green), 0 6px 0 var(--green-d), 0 12px 16px rgba(0, 90, 50, .2); }
.mcard.matched .mcard-in { animation: matchPop .5s ease; }

/* ---------- Flash cards & Word of the Day ---------- */
.pick-title { margin: 4px 0 0; font-size: 1.5rem; text-align: center; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; width: 100%; max-width: 900px; perspective: 1000px; }
@media (max-width: 420px) { .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.deck-head { display: flex; align-items: center; gap: 10px; }
.deck-name { font-weight: 800; font-size: 1.3rem; }
.deck-stage { perspective: 1200px; width: 100%; display: flex; justify-content: center; }
.flipcard { width: min(100%, 440px); padding: 0; border: 0; background: none; display: block; touch-action: pan-y; }
.flip-in { display: grid; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); }
.flipcard.flipped .flip-in { transform: rotateY(180deg); }
.face {
  grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: clamp(240px, 42vh, 360px); padding: 22px 20px; border-radius: 32px; text-align: center;
  -webkit-backface-visibility: hidden; backface-visibility: hidden; background: #fff;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .04), 0 10px 0 var(--edge), 0 24px 36px rgba(35, 52, 110, .18);
}
.face.back { transform: rotateY(180deg); background: linear-gradient(160deg, #FFFDF3, #FFF3D1); }
.cw { font-size: clamp(2.2rem, 9vw, 3.4rem); font-weight: 800; line-height: 1.05; color: var(--purple-d); text-shadow: 0 3px 0 var(--purple-l); overflow-wrap: anywhere; }
.cw.small { font-size: clamp(1.6rem, 6vw, 2.2rem); }
.spell { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.spell i {
  font-style: normal; font-weight: 800; font-size: clamp(1.8rem, 7vw, 2.6rem); width: 1.4em; height: 1.4em; display: grid; place-items: center;
  border-radius: 12px; color: #7A4B00; background: linear-gradient(#FFF0B3, #FFC233); box-shadow: 0 4px 0 #D49A00;
  animation: hop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--i) * 90ms + 300ms);
}
.big-num { font-size: clamp(7rem, 30vw, 11rem); font-weight: 800; line-height: 1; color: var(--orange); text-shadow: 0 6px 0 var(--orange-d), 0 14px 20px rgba(0, 0, 0, .15); }
.big-letter-card { display: flex; align-items: baseline; gap: 12px; font-size: clamp(6rem, 26vw, 9rem); font-weight: 800; line-height: 1; color: var(--pink); text-shadow: 0 6px 0 var(--pink-d), 0 14px 20px rgba(0, 0, 0, .15); }
.big-letter-card small { font-size: .6em; color: var(--blue); text-shadow: 0 5px 0 var(--blue-d); }
.meaning { margin: 0; font-size: clamp(1.15rem, 4vw, 1.45rem); font-weight: 700; line-height: 1.3; }
.deck-tip { margin: -4px 0 0; font-weight: 700; color: var(--ink-2); }
.deck-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }

.wotd-screen .wotd-date { margin: 0; font-weight: 700; color: var(--ink-2); text-align: center; background: rgba(255, 255, 255, .7); padding: 2px 14px; border-radius: 99px; }
.wotd-card .face.front { background: linear-gradient(160deg, #FFFFFF, #EEF6FF); }
.kicker { font-weight: 800; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-d); }
.wotd-word { font-size: clamp(2.6rem, 11vw, 4.2rem); font-weight: 800; line-height: 1; color: var(--purple-d); text-shadow: 0 4px 0 var(--purple-l), 0 10px 18px rgba(99, 67, 214, .2); overflow-wrap: anywhere; }
.wotd-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.phon { font-weight: 700; color: var(--ink-2); font-size: 1.15rem; }
.flip-hint { font-weight: 700; color: var(--ink-2); font-size: .95rem; }
.syn { margin: 0; font-weight: 600; }
.tip { margin: 4px 0 0; background: #fff; padding: 8px 14px; border-radius: 16px; font-weight: 600; box-shadow: 0 3px 0 rgba(0, 0, 0, .06); }
.wotd-loading { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; font-weight: 700; font-size: 1.2rem; }
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 8px solid rgba(255, 255, 255, .7); border-top-color: var(--orange); animation: spin 1s linear infinite; }
.practice { max-width: 760px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.practice h2 { margin: 0; font-size: 1.5rem; }
.practice-msg { margin: 0; font-weight: 700; color: var(--green-d); }
.practice-msg:empty { display: none; }
.letter-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; --ts: clamp(56px, 16vw, 78px); }

/* ---------- Sentence builder ---------- */
.sb-head { display: flex; align-items: center; gap: 12px; justify-content: center; }
.sb-line {
  width: 100%; max-width: 760px; min-height: 76px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px; padding: 12px;
  background: rgba(255, 255, 255, .7); border: 3px dashed rgba(43, 45, 66, .2); border-radius: 22px;
}
.sb-line.empty::before { content: 'Tap the words below…'; color: var(--ink-2); font-weight: 700; }
.sb-line::after { content: attr(data-end); align-self: flex-end; margin-left: -4px; font-size: 2rem; font-weight: 800; line-height: 1; color: var(--ink); }
.sb-line.empty::after { content: none; }
.sb-line.shake { animation: shake .5s; }
.sb-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; }
.chip-home { display: inline-flex; min-width: 40px; min-height: 52px; border-radius: 16px; background: rgba(43, 45, 66, .06); }
.chip-word {
  min-height: 52px; padding: 6px 16px; border: 0; border-radius: 16px; font-weight: 800; font-size: clamp(1.1rem, 4vw, 1.35rem); color: var(--ink);
  background: linear-gradient(#fff, #F1F6FF); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .04), 0 5px 0 var(--edge), 0 10px 14px rgba(25, 40, 90, .14);
  transition: transform .1s, box-shadow .1s, background .2s;
}
.chip-word:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge); }
.chip-word.good { background: linear-gradient(#E3FFF0, #A8F0CB); box-shadow: 0 5px 0 var(--green-d); }
.chip-word.bad { background: linear-gradient(#FFE8E8, #FFB3B3); box-shadow: 0 5px 0 var(--red-d); }
.chip-word.hop { animation: hop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: var(--d, 0s); }

/* ---------- Super Seniors: Sky Ace (flight) ---------- */
.flight { position: absolute; inset: 0; overflow: hidden; background: #7CC4F5; touch-action: none; -webkit-user-select: none; user-select: none; }
.fl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fl-top { position: absolute; top: 8px; left: calc(8px + var(--sl)); right: 158px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.fl-q { max-width: 640px; background: rgba(255, 255, 255, .95); border-radius: 18px; padding: 6px 14px 8px; font-weight: 800; font-size: clamp(.95rem, 2.4vw, 1.2rem); line-height: 1.2; box-shadow: 0 5px 0 rgba(0, 0, 0, .1), 0 10px 20px rgba(0, 0, 0, .15); }
.fl-q small { display: block; font-size: .72em; color: var(--ink-2); letter-spacing: .03em; }
.fl-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-stats .chip { font-size: .92rem; padding: 3px 10px; box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.fl-side { position: absolute; top: 8px; right: calc(8px + var(--sr)); z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.fl-radar { width: 140px; height: 140px; border-radius: 50%; background: #0B3B66; box-shadow: 0 0 0 4px rgba(255, 255, 255, .85), 0 8px 18px rgba(0, 0, 0, .3); }
.fl-words { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; max-width: 160px; }
.fl-words span { background: rgba(30, 154, 99, .92); color: #fff; font-weight: 800; font-size: .82rem; border-radius: 99px; padding: 1px 10px; }
.fl-gauges { position: absolute; left: 50%; bottom: calc(10px + var(--sb)); transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 6px; }
.fl-g { min-width: 70px; padding: 3px 8px; border-radius: 14px; text-align: center; color: #fff; font-weight: 800; font-size: 1.15rem; line-height: 1.05; background: rgba(15, 25, 55, .72); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12); }
.fl-g small { display: block; font-size: .62rem; letter-spacing: .08em; opacity: .8; }
.fl-pausebtn { width: 46px; height: 46px; }
.fl-warn { position: absolute; left: 50%; top: 40%; z-index: 4; transform: translate(-50%, -50%); padding: 6px 18px; border-radius: 14px; background: rgba(214, 58, 58, .92); color: #fff; font-weight: 800; font-size: clamp(1.3rem, 4.5vw, 2.2rem); pointer-events: none; animation: blink .6s ease-in-out infinite; }
.fl-msg { position: absolute; left: 50%; top: 26%; z-index: 4; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: min(92%, 560px); }
.fl-msg span { background: rgba(255, 255, 255, .95); border-radius: 14px; padding: 5px 14px; font-weight: 800; font-size: clamp(.95rem, 2.6vw, 1.15rem); text-align: center; box-shadow: 0 5px 0 rgba(0, 0, 0, .12); animation: msgFade 2.3s ease forwards; }
.fl-crash { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: #fff; background: radial-gradient(circle, rgba(255, 120, 60, .55), rgba(60, 10, 10, .65)); padding: 16px; }
.fl-crash b { font-size: clamp(2.2rem, 8vw, 3.6rem); text-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.fl-crash span { font-size: clamp(1.1rem, 3.4vw, 1.5rem); font-weight: 800; }
.fl-crash small { font-weight: 700; opacity: .9; }
.fl-dir { position: absolute; left: 50%; top: calc(36% + 40px); z-index: 3; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 6px; border-radius: 99px; background: rgba(30, 154, 99, .92); color: #fff; font-weight: 800; pointer-events: none; }
.fl-arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--green-d); font-size: 1.2rem; transition: transform .15s; }
.fl-dir small { opacity: .9; }
.fl-stick {
  position: absolute; left: calc(14px + var(--sl)); bottom: calc(14px + var(--sb)); z-index: 3; width: 132px; height: 132px; border-radius: 50%; touch-action: none; cursor: grab;
  background: radial-gradient(circle, rgba(255, 255, 255, .28), rgba(255, 255, 255, .1) 70%); border: 3px solid rgba(255, 255, 255, .7); box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
}
.fl-stick::before, .fl-stick::after { content: ''; position: absolute; left: 50%; top: 50%; background: rgba(255, 255, 255, .45); transform: translate(-50%, -50%); border-radius: 2px; }
.fl-stick::before { width: 70%; height: 2px; }
.fl-stick::after { width: 2px; height: 70%; }
.fl-knob { position: absolute; left: 50%; top: 50%; z-index: 1; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #D5E3F5 60%, #9FB6D6); box-shadow: 0 6px 12px rgba(0, 0, 0, .3); transition: transform .08s; }
.fl-thr { position: absolute; right: calc(14px + var(--sr)); bottom: calc(14px + var(--sb)); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fl-thr .icon-btn { width: 50px; height: 40px; font-size: 1.5rem; }
.fl-thr small { color: #fff; font-weight: 800; font-size: .7rem; letter-spacing: .08em; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.fl-track { position: relative; width: 50px; height: 140px; overflow: hidden; border-radius: 14px; touch-action: none; cursor: ns-resize; background: rgba(15, 25, 55, .55); border: 3px solid rgba(255, 255, 255, .7); }
.fl-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, var(--green), var(--yellow) 70%, var(--orange)); }
.fl-help { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; overflow-y: auto; padding: 16px; background: rgba(15, 30, 70, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.fl-help .panel { max-width: 580px; }
.fl-help h2 { margin: 0 0 6px; }
.fl-help p { margin: 0 0 12px; font-weight: 600; line-height: 1.35; }
.fl-keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-bottom: 16px; font-weight: 600; line-height: 1.3; }
kbd { display: inline-block; min-width: 1.6em; padding: 0 .35em; border-radius: 6px; background: #EEF3FB; box-shadow: 0 2px 0 var(--edge); font-family: inherit; font-weight: 800; text-align: center; }
.fl-rotate { color: var(--purple-d); }
@media (max-width: 700px), (max-height: 520px) {
  .fl-top { right: 118px; }
  .fl-radar { width: 104px; height: 104px; }
  .fl-words span { font-size: .72rem; }
  .fl-stick { width: 112px; height: 112px; }
  .fl-knob { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .fl-track { height: 108px; width: 44px; }
  .fl-thr .icon-btn { width: 44px; height: 34px; }
  .fl-g { min-width: 54px; font-size: .95rem; }
  .fl-pausebtn { width: 40px; height: 40px; }
  .fl-gauges { bottom: calc(150px + var(--sb)); }
}
@media (min-width: 701px) and (min-height: 521px) { .fl-gauges { bottom: calc(14px + var(--sb)); } }
@media (max-height: 520px) and (orientation: landscape) { .fl-gauges { bottom: calc(8px + var(--sb)); } .fl-q { font-size: .9rem; } }

/* ---------- Super Seniors: Word Snake ---------- */
.snake-game { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 12px calc(12px + var(--sb)); }
.sn-top { position: relative; z-index: 2; width: 100%; max-width: 900px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sn-top .fl-q { min-height: 3.3em; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.sn-mid { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; padding: 8px 0 16px; }
.sn-board { width: 100%; max-width: 980px; height: 100%; display: flex; align-items: center; justify-content: center; touch-action: none; }
.sn-canvas { border-radius: 14px; box-shadow: 0 0 0 6px #6FBF5A, 0 10px 0 6px #4E9A3E, 0 24px 34px rgba(25, 60, 20, .35); }
.sn-msg { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: min(92%, 560px); display: flex; justify-content: center; pointer-events: none; }
.sn-msg span { background: rgba(255, 255, 255, .96); border-radius: 14px; padding: 6px 14px; font-weight: 800; text-align: center; box-shadow: 0 5px 0 rgba(0, 0, 0, .12); animation: promptIn .3s ease both; }
.sn-pad { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 48px); gap: 6px; }
.sn-pad .icon-btn { width: 56px; height: 48px; }
.sn-up { grid-column: 2; grid-row: 1; }
.sn-left { grid-column: 1; grid-row: 2; }
.sn-down { grid-column: 2; grid-row: 2; }
.sn-right { grid-column: 3; grid-row: 2; }
@media (hover: hover) and (pointer: fine) { .sn-pad { display: none; } }
.sn-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: rgba(15, 40, 30, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sn-overlay .panel { max-width: 520px; text-align: center; }
.sn-overlay h2 { margin: 0 0 6px; }
.sn-overlay p { font-weight: 600; line-height: 1.35; }
.sn-howto { color: var(--ink-2); }

/* ---------- Super Seniors: Hidden Words ---------- */
.ws-layout { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 18px; width: 100%; max-width: 1100px; }
.ws-board { perspective: 1000px; }
.ws-grid {
  --cs: 34px; display: grid; grid-template-columns: repeat(var(--n), var(--cs)); gap: 3px; padding: 10px; border-radius: 20px; touch-action: none;
  background: linear-gradient(160deg, #EAF2FF, #D6E4FA); box-shadow: 0 10px 0 #B4C6E4, 0 22px 30px rgba(35, 52, 110, .2); transform: rotateX(8deg); transform-origin: 50% 100%;
}
.ws-grid.shake { animation: shake .45s; }
.ws-cell {
  width: var(--cs); height: var(--cs); display: grid; place-items: center; border-radius: 9px; cursor: pointer;
  font-weight: 800; font-size: calc(var(--cs) * .55); color: var(--ink); background: #fff;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .06), 0 2px 0 #C9D6EA; transition: background .15s, transform .15s;
}
.ws-cell.sel { background: var(--yellow-l); transform: translateY(-2px) scale(1.06); box-shadow: 0 3px 0 var(--yellow-d); }
.ws-cell.found { background: var(--hue); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .2); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); animation: hop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: var(--d, 0s); }
.ws-cell.hint { animation: pulse .5s ease-in-out 4; box-shadow: 0 0 0 4px var(--orange); }
.ws-side { width: min(100%, 380px); padding: 14px 16px 16px; }
.ws-side-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ws-side-head b { flex: 1; font-size: 1.2rem; }
.ws-clues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ws-clue { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: start; padding: 8px 10px; border-radius: 14px; background: #F4F7FD; border-left: 6px solid var(--hue); font-weight: 600; line-height: 1.25; }
.ws-len { grid-row: span 2; min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--hue); color: #fff; font-weight: 800; }
.ws-word { color: var(--hue); font-size: 1.05rem; text-transform: capitalize; }
.ws-word:empty { display: none; }
.ws-clue.done { background: #EFFFF6; }
.ws-clue.done .ws-mean { opacity: .75; }

/* ---------- Explanation card ---------- */
.explain-modal { width: min(100%, 520px); text-align: left; }
.explain { display: flex; flex-direction: column; gap: 10px; }
.ex-kicker { font-weight: 800; color: var(--green-d); font-size: 1.05rem; }
.ex-word { display: flex; align-items: center; gap: 12px; font-size: clamp(2rem, 8vw, 2.8rem); font-weight: 800; line-height: 1; color: var(--purple-d); text-shadow: 0 3px 0 var(--purple-l); overflow-wrap: anywhere; }
.ex-word .pic { font-size: 1.1em; text-shadow: none; }
.ex-meta { display: flex; align-items: center; gap: 10px; }
.ex-mean { margin: 0; font-size: 1.2rem; font-weight: 800; line-height: 1.3; }
.ex-desc { margin: 0; font-weight: 600; line-height: 1.4; color: var(--ink-2); }
.ex-example { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 16px; background: #FFF8E1; border-left: 6px solid var(--yellow); font-style: italic; font-weight: 600; line-height: 1.35; }
.ex-example b { font-style: normal; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--yellow-d); }
.ex-rel { display: flex; flex-direction: column; gap: 4px; font-weight: 600; color: var(--ink-2); }
.ex-rel b { color: var(--ink); }
.explain-modal .modal-actions { justify-content: flex-end; }
.card-desc { margin: 0; font-weight: 600; color: var(--ink-2); line-height: 1.35; }
.card-syn { margin: 0; font-weight: 600; color: var(--ink-2); }

/* ---------- Modal, toast, star ---------- */
#modal-root .overlay {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px;
  background: rgba(30, 40, 80, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fadeIn .2s ease both;
}
.overlay.closing { animation: fadeOut .2s ease both; }
.modal {
  position: relative; width: min(100%, 460px); max-height: calc(100vh - 32px); overflow-y: auto;
  background: #fff; border-radius: 32px; padding: 24px 20px 22px; text-align: center;
  box-shadow: 0 10px 0 var(--edge), 0 30px 60px rgba(20, 30, 80, .35); animation: modalIn .45s cubic-bezier(.2, .9, .3, 1.4) both;
}
.modal-icon { font-size: 64px; line-height: 1; margin-top: -6px; font-family: var(--emoji); animation: bounce 2.4s ease-in-out infinite; pointer-events: none; }
.modal-title { margin: 6px 0 10px; font-size: 1.7rem; line-height: 1.15; }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #F0F4FB; font-size: 1.1rem; font-weight: 800; }
.modal-x:hover { background: #E2E9F5; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.stars-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.stars-row span { font-size: clamp(32px, 9vw, 44px); font-family: var(--emoji); animation: starPop .5s cubic-bezier(.2, .9, .3, 1.6) backwards; animation-delay: calc(var(--i) * 110ms + 200ms); }
.stars-row span.off { filter: grayscale(1) opacity(.3); }
.end-msg { font-size: 1.2rem; font-weight: 700; margin: 12px 0 0; }
.settings { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.set-row, .set-col { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 1.1rem; }
.set-col { flex-direction: column; align-items: stretch; gap: 6px; }
.set-col input[type="range"] { width: 100%; accent-color: var(--purple); }
.select { width: 100%; padding: 10px 12px; border-radius: 14px; border: 3px solid #DDE7F7; background: #F6FAFF; color: var(--ink); font-weight: 600; }
.set-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.set-note { margin: 0; font-size: .9rem; color: var(--ink-2); font-weight: 600; line-height: 1.35; }
.switch { position: relative; flex: 0 0 auto; width: 64px; height: 36px; border: 0; padding: 0; border-radius: 99px; background: #CBD5E6; transition: background .2s; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .12); }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .12); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(28px); }
.ios-steps { text-align: left; font-size: 1.15rem; font-weight: 600; line-height: 1.7; margin: 0; padding-left: 26px; }

#toast-root { position: fixed; left: 0; right: 0; bottom: calc(18px + var(--sb)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; padding: 10px 12px 10px 18px;
  background: var(--ink); color: #fff; border-radius: 18px; font-weight: 700; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.3) both;
}
.toast.out { animation: fadeOut .3s ease both; }
.fly-star { position: fixed; left: 0; top: 0; z-index: 120; font-size: 38px; font-family: var(--emoji); pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 110; pointer-events: none; }

/* ---------- Small / landscape phones ---------- */
@media (max-width: 480px) {
  .sky-sun { width: 76px; height: 76px; top: calc(96px + var(--st)); right: -14px; }
  .age-switch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; overflow: visible; }
  .age-pill { padding: 7px 4px; font-size: .92rem; border-radius: 16px; }
  .hello { min-width: 0; }
  .home-head .chips { width: 100%; justify-content: flex-start; }
  .home-head .chips .icon-btn { margin-left: auto; }
  .btn.big { font-size: 1.3rem; min-height: 60px; }
  .chip { font-size: 1rem; padding: 5px 11px; }
  .icon-btn { width: 46px; height: 46px; }
  .speak-btn { width: 46px; height: 46px; font-size: 20px; }
  .wotd-hero { grid-template-columns: auto 1fr; gap: 12px; padding: 14px; }
  .tile { min-height: 160px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .game-bar { padding-top: calc(4px + var(--st)); padding-bottom: 4px; }
  .icon-btn { width: 42px; height: 42px; }
  .progress { height: 8px; margin-bottom: 4px; }
  .prompt { font-size: 1.1rem; padding: 4px 8px 4px 14px; }
  .speak-btn { width: 40px; height: 40px; font-size: 18px; }
  .face { min-height: 200px; }
}

/* ---------- Animations ---------- */
@keyframes screenIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes tileIn { from { opacity: 0; transform: translateY(30px) scale(.85) rotateX(25deg); } to { opacity: 1; transform: none; } }
@keyframes promptIn { from { opacity: 0; transform: translateY(-14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateZ(50px) translateY(0); } 50% { transform: translateZ(50px) translateY(-8px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes wobble3d { 0%, 100% { transform: perspective(400px) rotateY(-14deg) rotateX(6deg); } 50% { transform: perspective(400px) rotateY(14deg) rotateX(-4deg); } }
@keyframes sunPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes drift { from { transform: translateX(-260px) scale(var(--s, 1)); } to { transform: translateX(calc(100vw + 60px)) scale(var(--s, 1)); } }
@keyframes driftLeft { from { transform: translateX(calc(100vw + 60px)) scale(var(--s, 1)); } to { transform: translateX(-260px) scale(var(--s, 1)); } }
@keyframes scrollX { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(calc(-1 * var(--tile)), 0, 0); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes planeBob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
@keyframes prop { 0% { transform: scaleY(1); } 50% { transform: scaleY(.12); } 100% { transform: scaleY(1); } }
@keyframes ring { 0% { transform: translate(-50%, -50%) scale(.7); opacity: .9; } 100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0; } }
@keyframes puff { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@keyframes cloudIn { from { opacity: 0; transform: scale(.3) translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes cloudWin { 0% { transform: scale(1); } 35% { transform: scale(1.3) rotate(-4deg); } 100% { transform: scale(1.6) translateY(-30px); opacity: 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px) rotate(-3deg); } 40% { transform: translateX(10px) rotate(3deg); } 60% { transform: translateX(-7px); } 80% { transform: translateX(7px); } }
@keyframes hintBob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-6px); } }
@keyframes rise { from { transform: translate3d(0, 100%, 0); } to { transform: translate3d(0, calc(-1 * var(--rise)), 0); } }
@keyframes sway { from { transform: rotate(-7deg) rotateY(-18deg); } to { transform: rotate(7deg) rotateY(18deg); } }
@keyframes popBody { 0% { transform: scale(1); opacity: 1; } 60% { transform: scale(1.35); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes hop { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-16px) scale(1.12); } 100% { transform: translateY(0) scale(1); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes matchPop { 0% { transform: rotateY(180deg) scale(1); } 50% { transform: rotateY(180deg) scale(1.12); } 100% { transform: rotateY(180deg) scale(1); } }
@keyframes starPop { from { transform: scale(0) rotate(-120deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: perspective(800px) rotateX(-30deg) scale(.8) translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .4; } }
@keyframes msgFade { 0% { opacity: 0; transform: translateY(10px) scale(.9); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }

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