/* ============================================================ tokens */
:root {
  --ink: #1d2b53;
  --ink-soft: #46527a;
  --paper: #fff8ec;
  --card: #ffffff;
  --sky: #bde7ff;
  --sky-deep: #6ec6ff;
  --sun: #ffc93c;
  --sun-deep: #d9a21b;
  --grass: #7bd389;
  --grass-deep: #2e7d32;
  --coral: #ff8a65;
  --berry: #7c4dff;
  --shadow: 0 5px 0 rgba(29, 43, 83, 0.16);
  --radius: 24px;
  --tap: 64px;
  --font: ui-rounded, 'SF Pro Rounded', 'Segoe UI Rounded', 'Arial Rounded MT Bold', 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --font-ar: 'Segoe UI', 'Noto Naskh Arabic', 'Geeza Pro', Tahoma, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  font-family: var(--font);
  font-size: 20px;
  color: var(--ink);
  background: var(--paper);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
:lang(ar) {
  font-family: var(--font-ar);
}
#app {
  min-height: 100dvh;
  display: flex;
  width: 100%;
  overflow-x: hidden;
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
}
:focus-visible {
  outline: 4px solid var(--berry);
  outline-offset: 3px;
}
.icon {
  width: 30px;
  height: 30px;
  flex: none;
}
[dir='rtl'] .flip {
  transform: scaleX(-1);
}

/* ============================================================ screens */
.screen {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--sky) 0%, #e6f6ff 45%, var(--paper) 100%);
  animation: screen-in 0.25s ease-out both;
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.spacer {
  flex: 1;
}
.screen-title {
  margin: 4px 16px 20px;
  font-size: clamp(28px, 5vw, 40px);
  text-align: center;
  font-weight: 900;
}
.lead {
  font-size: 24px;
  text-align: center;
  margin: 8px 16px 24px;
}
.empty,
.note {
  text-align: center;
  color: var(--ink-soft);
}
.note {
  font-size: 17px;
  margin: 8px 0 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 24px;
}

/* ============================================================ buttons */
.btn {
  min-height: var(--tap);
  padding: 0 28px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 22px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:active:not(:disabled),
.btn-icon:active,
.chip:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(29, 43, 83, 0.16);
}
.btn-primary {
  background: var(--sun);
  box-shadow: 0 5px 0 var(--sun-deep);
}
.btn:disabled {
  opacity: 0.5;
}
.btn-icon {
  width: var(--tap);
  height: var(--tap);
  flex: none;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  transition: transform 0.08s;
}
.chip {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 8px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-weight: 800;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 20px;
}

/* ============================================================ library + players */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 0 16px 32px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}
.book-card,
.profile-card {
  min-height: 200px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 8px 0 rgba(29, 43, 83, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  transition: transform 0.12s;
}
.book-card:active,
.profile-card:active {
  transform: translateY(5px) scale(0.98);
}
.book-cover {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: var(--accent);
  display: grid;
  place-items: center;
}
.book-cover .icon {
  width: 52px;
  height: 52px;
}
.book-title {
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}
.book-meta {
  color: var(--ink-soft);
  font-weight: 700;
}
.profile-name {
  font-size: 24px;
  font-weight: 900;
}
.add-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 4px dashed #9aa7cc;
  display: grid;
  place-items: center;
}
.add-circle .icon {
  width: 44px;
  height: 44px;
}
.text-input {
  font: inherit;
  font-size: 26px;
  width: 100%;
  min-height: var(--tap);
  border-radius: 18px;
  border: 3px solid #c9d2ea;
  padding: 0 18px;
  color: var(--ink);
  user-select: text;
  -webkit-user-select: text;
}
.text-input:focus {
  border-color: var(--berry);
  outline: none;
}
.swatches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 18px 0 4px;
}
.swatch {
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  border: 5px solid #fff;
  box-shadow: 0 0 0 2px #c9d2ea;
}
.swatch.is-on {
  box-shadow: 0 0 0 5px var(--ink);
}

/* ============================================================ overlays */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(29, 43, 83, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
  animation: fade-in 0.2s ease-out;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
.overlay-card {
  background: var(--paper);
  border-radius: 32px;
  padding: 24px;
  width: min(920px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: pop-in 0.25s ease-out;
}
.form-card {
  width: min(520px, 100%);
}
.overlay-title {
  margin: 8px 0 16px;
  font-size: 28px;
  text-align: center;
}

/* ============================================================ map */
.map-path {
  padding: 0 16px 48px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}
.unit-title {
  background: var(--card);
  border-radius: 999px;
  padding: 10px 24px;
  text-align: center;
  font-size: 24px;
  box-shadow: var(--shadow);
  margin: 8px 0 20px;
}
.lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.lesson-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 200px;
}
.lesson-node:nth-child(4n + 1) {
  margin-inline-start: 10%;
}
.lesson-node:nth-child(4n + 2) {
  margin-inline-start: calc(50% - 100px);
}
.lesson-node:nth-child(4n + 3) {
  margin-inline-start: calc(90% - 200px);
}
.lesson-node:nth-child(4n) {
  margin-inline-start: calc(50% - 100px);
}
.lesson-btn {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 8px 0 rgba(29, 43, 83, 0.16);
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 900;
  transition: transform 0.1s;
}
.lesson-btn:active {
  transform: translateY(5px);
}
.is-done .lesson-btn {
  background: #d9f5e0;
}
.is-next .lesson-btn {
  background: var(--sun);
  box-shadow: 0 8px 0 var(--sun-deep), 0 0 0 0 rgba(255, 201, 60, 0.6);
  animation: next-pulse 1.8s ease-in-out infinite;
}
@keyframes next-pulse {
  50% {
    box-shadow: 0 8px 0 var(--sun-deep), 0 0 0 16px rgba(255, 201, 60, 0);
  }
}
.lesson-name {
  font-weight: 800;
  text-align: center;
  font-size: 20px;
}
.next-badge {
  position: absolute;
  top: -8px;
  inset-inline-end: 34px;
  background: var(--berry);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}
.map-guide {
  position: absolute;
  top: 10px;
  inset-inline-start: -64px;
  pointer-events: none;
}
.stars {
  display: inline-flex;
  gap: 2px;
}
.star {
  color: #d5dbeb;
}
.star .icon {
  width: 26px;
  height: 26px;
}
.star.is-on {
  color: var(--sun);
}
.stars.is-small .icon {
  width: 20px;
  height: 20px;
}

/* ============================================================ settings / parents */
.panel {
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 20px 24px 28px;
  margin: 0 16px 20px;
  max-width: 760px;
  width: calc(100% - 32px);
  align-self: center;
}
.panel h2 {
  font-size: 22px;
  margin: 18px 0 10px;
}
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.seg {
  min-height: var(--tap);
  min-width: 120px;
  padding: 0 22px;
  border-radius: 999px;
  background: #eef2fb;
  font-weight: 800;
  font-size: 21px;
}
.seg.is-on {
  background: var(--sun);
  box-shadow: 0 4px 0 var(--sun-deep);
}
.hold-btn {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 8px 0 rgba(29, 43, 83, 0.16);
  display: grid;
  place-items: center;
  align-self: center;
}
.hold-btn .icon {
  width: 56px;
  height: 56px;
}
.hold-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(var(--berry) var(--p, 0%), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 64px, #000 65px);
  mask: radial-gradient(circle, transparent 64px, #000 65px);
}
.hold-btn.is-holding .hold-ring {
  animation: hold-fill 3s linear forwards;
}
@property --p {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}
@keyframes hold-fill {
  to {
    --p: 100%;
  }
}
.child-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.child-head h2 {
  margin: 0;
  font-size: 28px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.kpi {
  background: #f3f6fd;
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
}
.kpi-v {
  font-size: 26px;
  font-weight: 900;
}
.kpi-l {
  font-size: 16px;
  color: var(--ink-soft);
}
.report {
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
}
.report th,
.report td {
  text-align: start;
  padding: 8px 6px;
  border-bottom: 1px solid #e6eaf5;
}
.objectives {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.obj {
  background: #f3f6fd;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 18px;
  border-inline-start: 6px solid #c9d2ea;
}
.obj.is-mastered {
  border-color: var(--grass-deep);
}
.obj.is-practicing {
  border-color: var(--sun-deep);
}
.obj-status {
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 700;
}

/* ============================================================ lesson screen */
.lesson-screen {
  height: 100dvh;
  overflow: hidden;
  position: relative;
}
.topbar-mid {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lesson-title {
  font-weight: 900;
  font-size: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.step-dots {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
}
.step-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 2px #c9d2ea;
  transition: all 0.25s;
}
.step-dot.is-done {
  background: var(--grass);
  box-shadow: none;
}
.step-dot.is-now {
  width: auto;
  height: auto;
  padding: 3px 14px;
  background: var(--sun);
  box-shadow: none;
  font-size: 16px;
  font-weight: 800;
}
.step-dot:not(.is-now) .step-label {
  display: none;
}
.item-pips {
  display: flex;
  gap: 6px;
  min-width: var(--tap);
  justify-content: flex-end;
}
.pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 2px #c9d2ea;
}
.pip.is-now {
  background: var(--sun);
  box-shadow: none;
  transform: scale(1.25);
}
.pip.is-done,
.pip.is-on {
  background: var(--grass);
  box-shadow: none;
}
.stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.step-banner {
  margin: auto;
  background: var(--card);
  padding: 22px 48px;
  border-radius: 999px;
  font-size: clamp(34px, 7vw, 56px);
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(29, 43, 83, 0.14);
  animation: banner-in 0.35s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
@keyframes banner-in {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}

/* hero dock + speech */
.hero-dock {
  position: absolute;
  inset-inline-start: 10px;
  bottom: 8px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
  z-index: 20;
}
.say {
  background: var(--card);
  border-radius: 22px;
  padding: 12px 18px;
  font-size: 22px;
  font-weight: 800;
  max-width: min(58vw, 440px);
  margin-bottom: 70px;
  box-shadow: 0 6px 16px rgba(29, 43, 83, 0.18);
  position: relative;
}
.say::before {
  content: '';
  position: absolute;
  bottom: 14px;
  inset-inline-start: -10px;
  border: 10px solid transparent;
  border-inline-end-color: var(--card);
  border-inline-start: 0;
}
.pop-in {
  animation: pop-in 0.25s cubic-bezier(0.3, 1.5, 0.5, 1);
}
@keyframes pop-in {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
}

/* ============================================================ hero */
.hero {
  --hero: #ffb23f;
  display: inline-block;
  width: 110px;
  aspect-ratio: 120 / 140;
  flex: none;
}
.hero-xs {
  width: 44px;
}
.hero-sm {
  width: 72px;
}
.hero-lg {
  width: 170px;
}
.hero svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}
.h-body,
.h-arm rect,
.h-leg rect {
  fill: var(--hero);
}
.h-body {
  stroke: rgba(29, 43, 83, 0.22);
  stroke-width: 2;
}
.h-belly {
  fill: #fff;
  opacity: 0.35;
}
.h-shadow {
  fill: rgba(29, 43, 83, 0.14);
}
.h-stem {
  stroke: #3fa35b;
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
}
.h-leaf {
  fill: #7bd389;
}
.h-eye {
  fill: #fff;
}
.h-pupils circle {
  fill: var(--ink);
}
.h-pupils {
  transition: transform 0.25s;
}
.h-glint {
  fill: #fff;
}
.h-eyes-happy path,
.h-mouth {
  stroke: var(--ink);
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.h-m-open {
  fill: #c2185b;
}
.h-m-o {
  fill: var(--ink);
  stroke: none;
}
.h-cheek {
  fill: #ff9aa2;
  opacity: 0.65;
}
.h-eyes-happy,
.h-m-open,
.h-m-o {
  display: none;
}
.hero[data-mood='happy'] .h-eyes-open,
.hero[data-mood='cheer'] .h-eyes-open,
.hero[data-mood='happy'] .h-m-smile,
.hero[data-mood='cheer'] .h-m-smile,
.hero[data-mood='oops'] .h-m-smile,
.hero[data-mood='think'] .h-m-smile {
  display: none;
}
.hero[data-mood='happy'] .h-eyes-happy,
.hero[data-mood='cheer'] .h-eyes-happy,
.hero[data-mood='happy'] .h-m-open,
.hero[data-mood='cheer'] .h-m-open,
.hero[data-mood='oops'] .h-m-o,
.hero[data-mood='think'] .h-m-o {
  display: inline;
}
.hero[data-mood='think'] .h-pupils {
  transform: translate(2px, -4px);
}
.hero[data-mood='oops'] .h-pupils {
  transform: translate(0, 3px);
}
.h-all {
  transform-box: view-box;
  transform-origin: 60px 130px;
  animation: breathe 2.6s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    transform: scale(1.02, 0.98);
  }
}
.h-arm,
.h-leg {
  transform-box: fill-box;
  transition: transform 0.25s;
}
.h-arm-l {
  transform-origin: 100% 50%;
}
.h-arm-r {
  transform-origin: 0 50%;
}
.h-leg {
  transform-origin: 50% 0;
}
.hero[data-mood='cheer'] .h-arm-l {
  transform: rotate(55deg);
}
.hero[data-mood='cheer'] .h-arm-r {
  transform: rotate(-55deg);
}
.hero[data-mood='point'] .h-arm-r {
  transform: rotate(-30deg);
}
.hero.anim-hop svg {
  animation: hop 0.5s ease-out;
}
.hero.anim-jump svg {
  animation: jump 0.8s ease-out;
}
.hero.anim-wobble svg {
  animation: wobble 0.5s ease-in-out;
}
.hero.anim-nudge svg {
  animation: nudge 0.6s ease-in-out 2;
}
.hero.is-running .h-leg-l {
  animation: leg 0.28s ease-in-out infinite alternate;
}
.hero.is-running .h-leg-r {
  animation: leg 0.28s ease-in-out infinite alternate-reverse;
}
.hero.is-running .h-all {
  animation: bob 0.28s ease-in-out infinite alternate;
}
@keyframes hop {
  35% {
    transform: translateY(-12%);
  }
}
@keyframes jump {
  30% {
    transform: translateY(-22%) rotate(-6deg);
  }
  60% {
    transform: translateY(0) rotate(4deg);
  }
}
@keyframes wobble {
  25% {
    transform: rotate(-7deg);
  }
  75% {
    transform: rotate(6deg);
  }
}
@keyframes nudge {
  50% {
    transform: translateX(6px);
  }
}
@keyframes leg {
  from {
    transform: rotate(-22deg);
  }
  to {
    transform: rotate(22deg);
  }
}
@keyframes bob {
  to {
    transform: translateY(-3px);
  }
}

/* ============================================================ labels */
.lbl {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.1;
}
.lbl-text {
  font-weight: 900;
}
.lbl.is-big {
  font-size: clamp(30px, 6vw, 48px);
}
.lbl-img {
  width: 56px;
  height: 56px;
  display: block;
}
.lbl-img > * {
  width: 100%;
  height: 100%;
}
.asset-img {
  object-fit: contain;
}
.dots {
  display: grid;
  grid-template-columns: repeat(5, 9px);
  gap: 3px;
}
.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--berry);
}

/* ============================================================ mechanics: shared */
.mech {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 16px 12px;
}
.mech-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
.mech-prompt {
  background: var(--card);
  border-radius: 24px;
  padding: 10px 28px;
  box-shadow: var(--shadow);
}
/* Only the prompt pops in: the speaker button keeps its full touch size from the first frame. */
.mech-prompt > .lbl {
  animation: pop-in 0.3s ease-out;
}
.mech-sub {
  font-weight: 800;
  color: var(--ink-soft);
  font-size: 19px;
  text-align: center;
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-7px);
  }
  40%,
  80% {
    transform: translateX(7px);
  }
}

/* ============================================================ catch */
.catch-meter {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.catch-meter .pip {
  width: 22px;
  height: 22px;
}
.catch-sky {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, #8fd3ff, #d6f0ff);
  min-height: 240px;
}
.cloud {
  position: absolute;
  width: 140px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  animation: drift 26s linear infinite;
}
.cloud::before {
  content: '';
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: inherit;
  top: -30px;
  left: 30px;
}
.cloud.c1 {
  top: 18%;
  left: -150px;
}
.cloud.c2 {
  top: 55%;
  left: -150px;
  animation-delay: -13s;
  transform: scale(0.7);
}
@keyframes drift {
  to {
    left: 110%;
  }
}
.bubble {
  position: absolute;
  top: 0;
  width: 96px;
  height: 96px;
  will-change: transform;
  z-index: 2;
}
.bubble-in {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: radial-gradient(circle at 32% 28%, #fff 0 10%, #eaf7ff 11%, #b9e4ff 68%, #8acfff);
  border: 4px solid #fff;
  box-shadow: 0 6px 14px rgba(29, 43, 83, 0.18);
}
.bubble.is-pop .bubble-in {
  animation: pop 0.35s ease-out forwards;
}
.bubble.is-wobble .bubble-in {
  animation: shake 0.4s ease-in-out;
}
.bubble.is-leave .bubble-in {
  transition: opacity 0.25s;
  opacity: 0;
}
@keyframes pop {
  to {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ============================================================ build */
.mech-build {
  justify-content: center;
}
.build-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 18px auto 26px;
}
.slot {
  min-width: 88px;
  height: 104px;
  padding: 0 10px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 44px;
}
.slot.is-fixed {
  background: var(--card);
  box-shadow: var(--shadow);
}
.slot.is-blank {
  border: 4px dashed #9aa7cc;
  background: rgba(255, 255, 255, 0.6);
}
.slot.is-next {
  border-color: var(--berry);
  animation: slot-breathe 1.2s ease-in-out infinite;
}
.slot.is-filled {
  border-style: solid;
  border-color: var(--grass-deep);
  background: #e9f9ee;
  animation: none;
}
.slot.is-filled .lbl {
  animation: pop-in 0.25s 0.15s both;
}
@keyframes slot-breathe {
  50% {
    transform: scale(1.05);
  }
}
.build-row.is-done .slot {
  animation: hop-small 0.4s ease-out;
}
@keyframes hop-small {
  40% {
    transform: translateY(-10px);
  }
}
.build-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 8px 8px 110px;
}
.piece {
  min-width: 100px;
  height: 100px;
  padding: 0 12px;
  border-radius: 24px;
  background: var(--sun);
  box-shadow: 0 7px 0 var(--sun-deep);
  font-size: 42px;
  display: grid;
  place-items: center;
  transition: transform 0.08s;
}
.piece:active:not(:disabled) {
  transform: translateY(5px);
  box-shadow: 0 2px 0 var(--sun-deep);
}
.piece.is-used {
  visibility: hidden;
}
.piece.is-shake {
  animation: shake 0.4s ease-in-out;
}
.flyer {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  margin: 0;
  transition: transform 0.26s cubic-bezier(0.3, 1.3, 0.5, 1);
}

/* ============================================================ runner */
.runner-road {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--grass);
  min-height: 280px;
}
.road {
  position: absolute;
  inset: 0 8%;
  background-color: #8c95b5;
  background-image: repeating-linear-gradient(180deg, transparent 0 40px, rgba(255, 255, 255, 0.12) 40px 80px);
  background-size: 100% 80px;
  animation: road-move 0.6s linear infinite;
}
@keyframes road-move {
  to {
    background-position: 0 80px;
  }
}
.gates,
.lanes {
  position: absolute;
  inset-inline: 8%;
  display: flex;
}
.gates {
  top: 0;
  pointer-events: none;
  will-change: transform;
  z-index: 2;
}
.lanes {
  top: 0;
  bottom: 0;
  z-index: 3;
}
.lane {
  flex: 1;
  min-width: 60px;
  border-inline-start: 5px dashed rgba(255, 255, 255, 0.55);
}
.lane:first-child {
  border-inline-start: 0;
}
.lane:active {
  background: rgba(255, 255, 255, 0.12);
}
.gate {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 8px 6px;
}
.gate-in {
  width: min(170px, 92%);
  min-height: 104px;
  border-radius: 26px 26px 10px 10px;
  background: var(--card);
  border: 6px solid var(--berry);
  display: grid;
  place-items: center;
  font-size: 38px;
  box-shadow: 0 6px 0 rgba(29, 43, 83, 0.2);
}
.gate.is-pass .gate-in {
  border-color: var(--grass-deep);
  background: #e9f9ee;
  animation: hop-small 0.4s ease-out;
}
.gate.is-dim .gate-in {
  opacity: 0.45;
}
.gate.is-bump .gate-in {
  animation: shake 0.45s ease-in-out;
}
.runner-road.is-through .gates {
  transition: opacity 0.4s;
  opacity: 0;
}
.runner-hero {
  position: absolute;
  bottom: 8px;
  width: calc(84% / var(--lanes));
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: inset-inline-start 0.16s ease-out;
  z-index: 4;
}
.runner-hero.is-bump {
  animation: bump 0.45s ease-out;
}
@keyframes bump {
  30% {
    transform: translateY(14px);
  }
}

/* ============================================================ explain */
.explain {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 16px 120px;
  width: 100%;
}
.explain.is-compact {
  padding: 0;
}
.ex-visual {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.ex-groups {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.ex-group {
  display: grid;
  grid-template-columns: repeat(3, 58px);
  gap: 8px;
  padding: 14px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.ex-obj {
  width: 58px;
  height: 58px;
  position: relative;
  animation: pop-in 0.35s both;
  animation-delay: calc(var(--n) * 120ms);
}
.ex-obj > svg,
.ex-obj > img {
  width: 100%;
  height: 100%;
}
.ex-group.is-result {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s, transform 0.3s;
}
.ex-group.is-result.is-shown {
  opacity: 1;
  transform: none;
}
.ex-num {
  position: absolute;
  top: -8px;
  inset-inline-end: -6px;
  min-width: 26px;
  height: 26px;
  border-radius: 13px;
  background: var(--berry);
  color: #fff;
  font-size: 16px;
  display: grid;
  place-items: center;
  opacity: 0;
}
.is-shown .ex-num {
  animation: pop-in 0.3s both;
  animation-delay: calc(0.3s + var(--n) * 350ms);
  opacity: 1;
}
.ex-op {
  font-size: 56px;
  font-weight: 900;
  color: var(--berry);
}
.ex-bigtext {
  font-size: clamp(56px, 12vw, 110px);
  font-weight: 900;
  animation: banner-in 0.4s both;
}
.ex-image > * {
  width: 180px;
  height: 180px;
}
.ex-caption {
  margin: 0;
  font-size: clamp(22px, 3.6vw, 30px);
  line-height: 1.7;
  max-width: 820px;
  text-align: center;
  background: var(--card);
  padding: 14px 24px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.w {
  color: #6a7394;
  padding: 0 3px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.w.is-on {
  background: var(--sun);
  color: var(--ink);
}
.w.is-done {
  color: var(--ink);
}
.ex-dots {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.ex-dots li {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c9d2ea;
}
.ex-dots li.is-on {
  background: var(--berry);
}
.ex-controls {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.ex-continue.is-ready {
  animation: next-pulse 1.8s ease-in-out infinite;
}

/* ============================================================ complete */
.complete-screen {
  align-items: center;
  justify-content: center;
}
.complete-card {
  background: var(--card);
  border-radius: 36px;
  padding: 28px 24px;
  margin: 16px;
  width: min(640px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 0 rgba(29, 43, 83, 0.14);
}
.complete-card h1 {
  margin: 12px 0 4px;
  font-size: 38px;
}
.stars-big {
  display: flex;
  gap: 12px;
  margin: 14px 0;
}
.big-star {
  color: #e2e7f3;
}
.big-star .icon {
  width: 78px;
  height: 78px;
}
.big-star.is-on {
  color: var(--sun);
  animation: star-in 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes star-in {
  from {
    transform: scale(0.2) rotate(-40deg);
  }
}

/* ============================================================ effects */
.fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
}
.confetti {
  position: absolute;
  width: 12px;
  height: 18px;
  border-radius: 3px;
  animation: confetti 1.2s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}
@keyframes confetti {
  60% {
    transform: translate(var(--dx), var(--dy)) rotate(var(--r));
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), calc(var(--dy) + 160px)) rotate(var(--r));
    opacity: 0;
  }
}
.spark {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  animation: spark 0.6s ease-out forwards;
}
@keyframes spark {
  to {
    transform: translate(var(--dx), var(--dy)) scale(0.3);
    opacity: 0;
  }
}

/* ============================================================ phones */
@media (max-width: 600px) {
  body {
    font-size: 18px;
  }
  .hero-dock .hero {
    width: 80px;
  }
  .say {
    font-size: 19px;
    margin-bottom: 50px;
  }
  .bubble {
    width: 84px;
    height: 84px;
  }
  .bubble-in {
    font-size: 30px;
  }
  .piece {
    min-width: 84px;
    height: 84px;
    font-size: 36px;
  }
  .slot {
    min-width: 70px;
    height: 88px;
    font-size: 36px;
  }
  .ex-group {
    grid-template-columns: repeat(3, 42px);
    padding: 10px;
  }
  .ex-obj {
    width: 42px;
    height: 42px;
  }
  .lesson-node:nth-child(n) {
    margin-inline-start: calc(50% - 100px);
  }
  .map-guide {
    inset-inline-start: -40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================ word labels (long text, e.g. Arabic terms) */
.lbl.is-long .lbl-text {
  font-size: 0.7em;
  line-height: 1.25;
}
.lbl.is-xlong .lbl-text {
  font-size: 0.52em;
  line-height: 1.3;
  text-align: center;
}
.lbl.is-big.is-long .lbl-text {
  font-size: 0.78em;
}
.lbl.is-big.is-xlong .lbl-text {
  font-size: 0.62em;
}
.bubble {
  width: auto;
  height: auto;
}
.bubble-in {
  min-width: 96px;
  min-height: 96px;
  max-width: 230px;
  width: auto;
  height: auto;
  padding: 8px 18px;
  border-radius: 999px;
}
.piece {
  height: auto;
  min-height: 100px;
  max-width: 300px;
  padding: 8px 18px;
}
.slot {
  height: auto;
  min-height: 104px;
  padding: 8px 14px;
}
.gate-in {
  width: min(200px, 94%);
  padding: 6px 8px;
  text-align: center;
}
.ex-bigtext.is-long {
  font-size: clamp(36px, 7vw, 64px);
  text-align: center;
  line-height: 1.3;
}
:lang(ar) .lbl-text,
:lang(ar).ex-caption,
:lang(ar).say {
  line-height: 1.6;
}

/* ============================================================ prompt card: speaker button */
.mech-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}
.mech-prompt > .lbl {
  min-width: 0;
}
.btn-speak {
  width: 60px;
  height: 60px;
  margin-inline-end: -14px;
  background: #e6f6ff;
  box-shadow: 0 3px 0 rgba(29, 43, 83, 0.14);
}
.btn-speak .icon {
  width: 28px;
  height: 28px;
}
.btn-speak.is-playing {
  background: var(--sun);
  animation: slot-breathe 1s ease-in-out infinite;
}

/* ============================================================ scene mechanics: shared (rooms, maze, forest, fishing) */
.mech-rooms,
.mech-maze,
.mech-forest,
.mech-fishing {
  padding-bottom: 84px; /* keeps the hero dock off the play area */
}
.walker {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  pointer-events: none;
  transform-origin: 50% 100%;
  visibility: hidden;
}
.walker.is-placed {
  visibility: visible;
}
.walker.is-through {
  opacity: 0;
}
.walker.is-bump .hero {
  animation: wobble 0.5s ease-in-out;
}
.scene-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 12px;
  z-index: 5;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  font-size: 17px;
  font-weight: 900;
}
.esc-text {
  position: relative;
  z-index: 1;
  padding: 8px 26px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 900;
  text-align: center;
  animation: banner-in 0.35s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
.esc-hero {
  position: relative;
  z-index: 1;
}
.esc-hero .hero {
  width: 96px;
}

/* ============================================================ rooms (escape rooms) */
.rooms-scene {
  --wall: #ffe3b3;
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-radius: 28px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 34px, transparent 34px 68px), var(--wall);
  box-shadow: inset 0 0 0 6px rgba(29, 43, 83, 0.08);
}
.rooms-floor {
  position: absolute;
  inset: auto 0 0;
  height: 20%;
  background: repeating-linear-gradient(90deg, #c98b55 0 62px, #b37440 62px 65px);
  border-top: 7px solid #9c6135;
}
.rooms-lamp {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 26px;
  background: #8a6d4a;
}
.rooms-lamp::after {
  content: '';
  position: absolute;
  top: 24px;
  left: -20px;
  width: 44px;
  height: 22px;
  border-radius: 22px 22px 4px 4px;
  background: #ffcf5c;
  box-shadow: 0 10px 30px 10px rgba(255, 214, 102, 0.45);
}
.rooms-frame {
  position: absolute;
  top: 14px;
  inset-inline-end: 16px;
  width: 54px;
  height: 40px;
  border: 5px solid #b37440;
  border-radius: 6px;
  background: linear-gradient(#bde7ff 58%, #7bd389 58%);
}
.rooms-doors {
  position: absolute;
  inset: 62px 3% 20%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 3vw, 40px);
}
.door {
  position: relative;
  flex: 0 1 180px;
  min-width: 90px;
  height: min(100%, 330px);
  padding: 8px 8px 0;
  border-radius: 16px 16px 0 0;
  background: #5b3a22;
  perspective: 800px;
  font-size: 30px;
}
.door-glow,
.door-leaf {
  position: absolute;
  inset: 8px 8px 0;
  border-radius: 8px 8px 0 0;
}
.door-glow {
  background: radial-gradient(circle at 50% 70%, #fffbe0, #ffe27a 55%, #ffb300);
  opacity: 0;
  transition: opacity 0.3s;
}
.door-spill {
  position: absolute;
  top: 100%;
  left: -12%;
  right: -12%;
  height: 56px;
  background: linear-gradient(rgba(255, 228, 110, 0.85), rgba(255, 228, 110, 0));
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.door-leaf {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 16%;
  background: linear-gradient(90deg, #dc9a5e, #c47e43);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.08);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.3, 0.8, 0.4, 1), filter 0.3s;
}
.door-leaf::after {
  content: '';
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 7%;
  height: 22%;
  border-radius: 6px;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.12);
}
.door-plaque {
  position: relative;
  z-index: 1;
  width: 90%;
  min-height: 64px;
  padding: 6px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 4px solid #e2b04a;
  background: #fff8ec;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
  overflow-wrap: anywhere;
}
.door-knob {
  position: absolute;
  right: 11%;
  top: 60%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffd24a;
  box-shadow: 0 2px 0 #b8860b;
}
.door-lock {
  position: absolute;
  left: 50%;
  top: 64%;
  z-index: 2;
  width: 32px;
  height: 25px;
  margin-left: -16px;
  border-radius: 6px;
  background: #8e9bc2;
  box-shadow: 0 3px 0 #66739b;
  opacity: 0;
  transform: scale(0.3);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.door-lock::before {
  content: '';
  position: absolute;
  left: 6px;
  top: -15px;
  width: 20px;
  height: 18px;
  border: 5px solid #66739b;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.door:active .door-leaf {
  filter: brightness(1.06);
}
.door.is-open .door-leaf {
  transform: rotateY(78deg);
}
.door.is-open .door-glow,
.door.is-open .door-spill {
  opacity: 1;
}
.door.is-locked .door-leaf {
  filter: saturate(0.45) brightness(0.82);
}
.door.is-locked .door-lock {
  opacity: 1;
  transform: scale(1);
}
.door.is-rattle .door-leaf {
  animation: rattle 0.45s ease-in-out;
}
.rooms-doors.is-swap .door {
  animation: pop-in 0.3s ease-out;
}
@keyframes rattle {
  20%,
  60% {
    transform: translateX(-4px) rotate(-1deg);
  }
  40%,
  80% {
    transform: translateX(4px) rotate(1deg);
  }
}
.rooms-escape {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #8fd3ff, #d6f0ff 62%);
  animation: screen-in 0.3s ease-out both;
}
.esc-sun {
  position: absolute;
  top: 12%;
  inset-inline-end: 12%;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 12px rgba(255, 201, 60, 0.35), 0 0 0 26px rgba(255, 201, 60, 0.16);
  animation: slot-breathe 1.6s ease-in-out infinite;
}
.esc-hill {
  position: absolute;
  inset: auto -10% 0;
  height: 42%;
  border-radius: 50% 50% 0 0 / 40% 40% 0 0;
  background: #5cbf6d;
}

/* ============================================================ maze */
.maze-field {
  --sand: #f3dc9c;
  --lane: 62px;
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border-radius: 28px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.09) 0 5px, transparent 6px) 0 0 / 26px 26px,
    radial-gradient(circle, rgba(0, 0, 0, 0.09) 0 5px, transparent 6px) 13px 13px / 26px 26px,
    #3f9a4a;
  box-shadow: inset 0 0 0 8px #2f7d3a;
}
.maze-trunk,
.maze-cross,
.branch-path {
  position: absolute;
  background: var(--sand);
}
.maze-trunk {
  left: 50%;
  bottom: 0;
  width: var(--lane);
  height: calc(22% + var(--lane) / 2);
  margin-left: calc(var(--lane) / -2);
}
.maze-cross {
  bottom: calc(22% - var(--lane) / 2);
  left: calc(3% + 94% / var(--n) / 2 - var(--lane) / 2);
  right: calc(3% + 94% / var(--n) / 2 - var(--lane) / 2);
  height: var(--lane);
  border-radius: 12px;
}
.maze-branches {
  position: absolute;
  inset: 0 3% 22%;
  display: flex;
}
.maze-branch {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px 0;
}
.branch-path {
  left: 50%;
  top: 0;
  bottom: calc(var(--lane) / -2);
  width: var(--lane);
  margin-left: calc(var(--lane) / -2);
  background: linear-gradient(180deg, rgba(47, 125, 58, 0.55), var(--sand) 40px);
}
.maze-sign {
  position: relative;
  z-index: 1;
  order: 0;
  min-width: 80px;
  max-width: 96%;
  min-height: 64px;
  padding: 6px 10px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 5px solid #8a5a2b;
  background: #fff8ec;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  font-size: 30px;
  overflow-wrap: anywhere;
}
.maze-post {
  position: relative;
  order: 1;
  width: 10px;
  height: 16px;
  background: #8a5a2b;
}
.branch-wall {
  position: relative;
  z-index: 1;
  order: 2;
  width: min(96%, 130px);
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 4px 6px;
  border-radius: 16px;
  background: radial-gradient(circle at 30% 40%, #2f7d3a 0 10px, transparent 11px) 0 0 / 22px 22px, #25692f;
  color: #fff;
  font-size: 16px;
  text-align: center;
  visibility: hidden;
}
.branch-block {
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 74px;
  height: 18px;
  margin-left: -37px;
  border-radius: 6px;
  background: repeating-linear-gradient(135deg, #ff8a65 0 12px, #fff 12px 24px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
  display: none;
}
.maze-branch.is-blocked .branch-block {
  display: block;
}
.maze-branch.is-blocked .maze-sign {
  opacity: 0.55;
}
.maze-branch.is-deadend .branch-wall {
  visibility: visible;
  animation: pop-in 0.25s ease-out;
}
.maze-branch.is-right .maze-sign {
  border-color: var(--grass-deep);
  background: #e9f9ee;
}
.maze-branch:active .maze-sign {
  transform: translateY(3px);
}
.maze-branches.is-swap .maze-sign {
  animation: pop-in 0.3s ease-out;
}
.maze-map {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}
.map-node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c9d2ea;
}
.map-node.is-done {
  background: var(--grass-deep);
}
.map-node.is-now {
  background: var(--sun);
  transform: scale(1.4);
}
.map-chest {
  width: 18px;
  height: 13px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(90deg, #8a4a1a 0 42%, #ffc93c 42% 58%, #8a4a1a 58%);
}
.maze-exit {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: radial-gradient(circle at 50% 42%, rgba(255, 240, 170, 0.97), rgba(63, 154, 74, 0.94) 72%);
  animation: screen-in 0.3s ease-out both;
}
.chest {
  position: relative;
  width: 116px;
  height: 86px;
}
.chest-box {
  position: absolute;
  inset: auto 0 0;
  height: 52px;
  border-radius: 8px;
  border: 5px solid #5e3310;
  background: linear-gradient(90deg, #b86b2b 0 44%, #ffc93c 44% 56%, #b86b2b 56%);
}
.chest-lid {
  position: absolute;
  inset: 4px 0 auto;
  height: 36px;
  border-radius: 40px 40px 6px 6px;
  border: 5px solid #5e3310;
  background: #c77a35;
  transform-origin: 0 100%;
  animation: lid-open 0.5s 0.15s ease-out both;
}
.chest-glow {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 6px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(#fff6b0, #ffc93c 60%, rgba(255, 201, 60, 0) 72%);
  animation: pop-in 0.5s 0.3s ease-out both;
}
@keyframes lid-open {
  to {
    transform: translateY(-10px) rotate(-24deg);
  }
}

/* ============================================================ forest */
.forest-scene {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 300px;
  border-radius: 28px;
  background: linear-gradient(180deg, #d4f3da, #effbef 60%);
}
.forest-scene::before {
  content: '';
  position: absolute;
  inset: -30px 0 auto;
  height: 76px;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 100%, #3f9a4a 0 38px, transparent 39px) 0 0 / 78px 76px repeat-x,
    radial-gradient(circle at 50% 100%, #54b061 0 34px, transparent 35px) 39px -10px / 78px 76px repeat-x;
}
.forest-back {
  position: absolute;
  inset: 22% 0 18%;
  opacity: 0.55;
  background:
    radial-gradient(ellipse at 50% 100%, #6cc47a 0 60%, transparent 61%) 0 100% / 150px 70% repeat-x,
    radial-gradient(ellipse at 50% 100%, #8fd49a 0 60%, transparent 61%) 75px 100% / 150px 90% repeat-x;
}
.forest-trunk {
  position: absolute;
  bottom: 16%;
  width: 24px;
  height: 84%;
  border-radius: 10px;
  background: #8a5a2b;
  opacity: 0.8;
}
.forest-trunk.t1 {
  left: 6%;
}
.forest-trunk.t2 {
  left: 49%;
}
.forest-trunk.t3 {
  right: 6%;
}
.forest-ground {
  position: absolute;
  inset: auto 0 0;
  height: 18%;
  background: #86cc79;
  border-top: 6px solid #6cb65f;
}
.forest-cards {
  position: absolute;
  inset: 34px 3% 18%;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  align-content: space-evenly;
  gap: 6px 10px;
}
.leaf-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  transform-origin: 50% 0;
}
.vine {
  width: 4px;
  height: calc(14px + var(--drop, 0px));
  border-radius: 2px;
  background: #4f8a3a;
}
.leaf-card {
  position: relative;
  min-width: 84px;
  max-width: 100%;
  min-height: 72px;
  padding: 8px 14px 22px;
  display: grid;
  place-items: center;
  border-radius: 16px 16px 22px 22px;
  border: 4px solid #d9a21b;
  background: #fff3c4;
  box-shadow: 0 5px 0 rgba(29, 43, 83, 0.18);
  font-size: 30px;
  overflow-wrap: anywhere;
}
.leaf-card .lbl {
  position: relative;
  z-index: 1;
}
.bush,
.leaves {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.bush {
  bottom: -22px;
  width: 58px;
  height: 36px;
  background:
    radial-gradient(circle at 26% 62%, #3f9a4a 0 15px, transparent 16px),
    radial-gradient(circle at 58% 42%, #4fae5a 0 17px, transparent 18px),
    radial-gradient(circle at 86% 68%, #3f9a4a 0 12px, transparent 13px);
}
.bush.is-start {
  inset-inline-start: -20px;
}
.bush.is-end {
  inset-inline-end: -20px;
}
.cover-mid .bush {
  width: 70px;
  height: 42px;
  bottom: -24px;
}
.cover-high .bush {
  width: 84px;
  height: 50px;
  bottom: -28px;
}
@media (min-width: 700px) {
  .leaf-card {
    min-width: 120px;
    min-height: 86px;
    font-size: 36px;
  }
  .fish-body {
    font-size: 34px;
  }
}
.leaves {
  top: -14px;
  width: 58px;
  height: 34px;
  background:
    radial-gradient(ellipse at 30% 50%, #3f9a4a 0 14px, transparent 15px),
    radial-gradient(ellipse at 70% 40%, #54b061 0 15px, transparent 16px);
}
.leaves.is-start {
  inset-inline-start: -16px;
}
.leaves.is-end {
  inset-inline-end: -16px;
}
.forest-scene.is-sway .leaf-slot {
  animation: sway 3.2s ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}
@keyframes sway {
  from {
    transform: rotate(-2.2deg);
  }
  to {
    transform: rotate(2.2deg);
  }
}
.leaf-card.is-shake {
  animation: shake 0.4s ease-in-out;
}
.leaf-slot.is-rustle .bush,
.leaf-slot.is-rustle .leaves {
  animation: rustle 0.45s ease-in-out;
}
@keyframes rustle {
  25% {
    transform: rotate(-9deg) translateY(-2px);
  }
  75% {
    transform: rotate(8deg);
  }
}
.leaf-slot.is-picked .leaf-card {
  visibility: hidden;
}
.basket {
  position: absolute;
  bottom: 3%;
  inset-inline-end: 4%;
  z-index: 4;
  width: 104px;
  height: 70px;
  display: grid;
  place-items: center;
}
.basket::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 20px;
  right: 20px;
  height: 40px;
  border: 5px solid #8a5a2b;
  border-bottom: 0;
  border-radius: 40px 40px 0 0;
}
.basket-body {
  position: absolute;
  inset: 12px 0 0;
  border-radius: 10px 10px 30px 30px;
  border: 4px solid #8a5a2b;
  background: repeating-linear-gradient(90deg, #d0935b 0 10px, #b7773f 10px 12px);
}
.basket-count {
  position: relative;
  margin-top: 16px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--card);
  font-size: 18px;
}
.basket.is-catch,
.bucket.is-catch {
  animation: hop-small 0.4s ease-out;
}

/* ============================================================ fishing */
.pond {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 300px;
  border-radius: 28px;
}
.pond-bank {
  position: relative;
  z-index: 3;
  flex: none;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 14px;
  background: linear-gradient(180deg, #a6e394, #6cc15f);
  box-shadow: 0 4px 0 #58a94c;
}
.bucket {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bucket-body {
  width: 56px;
  height: 50px;
  border-radius: 4px;
  background: linear-gradient(90deg, #7c8fb5, #c3cfea 45%, #7c8fb5);
  clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%);
}
.bucket-pips {
  display: flex;
  gap: 6px;
}
.bucket-pips .pip {
  width: 20px;
  height: 20px;
}
.pond-water {
  position: relative;
  flex: 1;
  background: linear-gradient(180deg, #5cbcf2, #3196d6 65%, #2a7cc0);
}
.ripple {
  position: absolute;
  width: 120px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  animation: ripple 4s ease-out infinite;
  pointer-events: none;
}
.ripple.r1 {
  top: 28%;
  left: 18%;
}
.ripple.r2 {
  top: 68%;
  left: 62%;
  animation-delay: -2s;
}
@keyframes ripple {
  from {
    transform: scale(0.4);
    opacity: 1;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}
.reeds {
  position: absolute;
  bottom: 0;
  inset-inline-end: 3%;
  width: 60px;
  height: 70px;
  pointer-events: none;
  background:
    linear-gradient(#3f8f3a, #3f8f3a) 10px 20px / 5px 50px no-repeat,
    linear-gradient(#4aa244, #4aa244) 26px 6px / 5px 64px no-repeat,
    linear-gradient(#3f8f3a, #3f8f3a) 42px 26px / 5px 44px no-repeat;
}
.fish {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  direction: ltr;
  will-change: transform;
}
.fish.to-left {
  flex-direction: row-reverse;
}
.fish-tail {
  width: 0;
  height: 0;
  margin-right: -8px;
  border-block: 22px solid transparent;
  border-left: 32px solid var(--fish);
}
.fish.to-left .fish-tail {
  margin: 0 0 0 -8px;
  border-left: 0;
  border-right: 32px solid var(--fish);
}
.fish-body {
  position: relative;
  min-width: 108px;
  max-width: 230px;
  min-height: 66px;
  padding: 6px 30px 6px 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fish);
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.18);
  font-size: 30px;
}
.fish.to-left .fish-body {
  padding: 6px 18px 6px 30px;
}
.fish-body .lbl {
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}
.fish-eye {
  position: absolute;
  top: 26%;
  right: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset -3px 0 0 3px var(--ink);
}
.fish.to-left .fish-eye {
  right: auto;
  left: 9px;
  box-shadow: inset 3px 0 0 3px var(--ink);
}
.fish.is-wiggle .fish-body {
  animation: shake 0.4s ease-in-out;
}
.fish.is-hooked {
  z-index: 4;
  transition: transform 0.26s ease-out;
}
.fish.is-in {
  opacity: 0.3;
  transition: transform 0.34s ease-in, opacity 0.34s;
}
.fish.is-leave {
  opacity: 0;
  transition: opacity 0.4s;
}
.reel-line {
  position: absolute;
  top: 0;
  z-index: 3;
  width: 3px;
  margin-left: -1.5px;
  background: rgba(255, 255, 255, 0.95);
  transition: height 0.26s ease-out;
  pointer-events: none;
}
.splash {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.9);
  animation: splash 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes splash {
  to {
    transform: scale(5);
    opacity: 0;
  }
}

/* ============================================================ scene mechanics: phones */
@media (max-width: 600px) {
  .mech-rooms,
  .mech-maze,
  .mech-forest,
  .mech-fishing {
    padding-bottom: 64px;
  }
  .door,
  .maze-sign,
  .leaf-card,
  .fish-body {
    font-size: 26px;
  }
  .door {
    min-width: 0;
    padding: 6px 6px 0;
  }
  .door-glow,
  .door-leaf {
    inset: 6px 6px 0;
  }
  .door-plaque {
    width: 96%;
    padding: 4px 2px;
    border-width: 3px;
  }
  .maze-field {
    --lane: 52px;
  }
  .leaf-card {
    min-width: 76px;
    padding: 6px 8px 14px;
  }
  .fish-body {
    min-width: 96px;
    max-width: 190px;
  }
  .scene-badge {
    font-size: 15px;
  }
  .rooms-frame {
    display: none;
  }
}

/* ============================================================ Quran font (sacred items) */
@font-face {
  font-family: 'Amiri Quran';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/amiri-quran-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Amiri Quran';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/amiri-quran-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
.lbl.sacred,
.ex-bigtext.sacred {
  font-family: 'Amiri Quran', var(--font-ar);
  font-weight: 400;
  font-synthesis: none;
}
.lbl.sacred .lbl-text {
  font-weight: 400;
  font-size: 1.12em;
  line-height: 2;
}
.lbl.sacred.is-long .lbl-text {
  font-size: 0.86em;
  line-height: 1.9;
}
.lbl.sacred.is-xlong .lbl-text {
  font-size: 0.7em;
  line-height: 1.9;
}
.lbl.is-big.sacred.is-long .lbl-text {
  font-size: 0.92em;
}
.lbl.is-big.sacred.is-xlong .lbl-text {
  font-size: 0.76em;
}
.ex-bigtext.sacred {
  font-size: clamp(40px, 8vw, 72px);
  line-height: 2;
  text-align: center;
}

/* ============================================================ template sentence under the prompt (non-build mechanics) */
.mech-template {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  max-width: 100%;
  padding: 4px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 26px;
}
.mech-template .lbl {
  max-width: 100%;
}
.mech-template .lbl .lbl-text,
.mech-template .lbl.is-long .lbl-text,
.mech-template .lbl.is-xlong .lbl-text {
  font-size: 1em;
  line-height: 1.5;
  text-align: center;
}
.mech-template .lbl.sacred .lbl-text,
.mech-template .lbl.sacred.is-long .lbl-text,
.mech-template .lbl.sacred.is-xlong .lbl-text {
  font-size: 1.1em;
  line-height: 1.9;
}
.tpl-blank {
  min-width: 60px;
  padding: 0 12px;
  border-radius: 12px;
  border: 3px dashed var(--berry);
  background: #f1ebff;
  color: var(--berry);
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
  animation: slot-breathe 1.4s ease-in-out infinite;
}
@media (max-width: 600px) {
  .mech-template {
    font-size: 21px;
    padding: 2px 12px;
  }
}

/* ============================================================ gentle wrong choice (sacred / calm items) */
.door.is-dimmed .door-leaf {
  filter: saturate(0.7) brightness(0.92);
  opacity: 0.6;
}
.maze-branch.is-dimmed .maze-sign {
  opacity: 0.5;
}

/* ============================================================ grades (home) + courses */
.grade-num {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  box-shadow: inset 0 -6px 0 rgba(29, 43, 83, 0.14);
  font-size: 52px;
  font-weight: 900;
}
.grade-chip,
.kind-badge {
  border-radius: 999px;
  font-weight: 900;
}
.grade-chip {
  padding: 8px 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 20px;
}
.kind-badge {
  padding: 2px 12px;
  background: var(--accent);
  font-size: 15px;
}

/* ============================================================ math mechanics: shared (hop, balance, train, blocks) */
.mech-hop,
.mech-balance,
.mech-train,
.mech-blocks {
  padding-bottom: 84px; /* keeps the hero dock off the play area */
}
.piece.is-dimmed {
  opacity: 0.5;
  filter: saturate(0.7);
}
@keyframes land {
  0% {
    transform: scale(1.12, 0.84);
  }
  60% {
    transform: scale(0.96, 1.05);
  }
}
@keyframes pad-bob {
  50% {
    transform: translateY(-6px);
  }
}
@keyframes dim-flash {
  50% {
    opacity: 0.55;
  }
}

/* ============================================================ hop (frog on the number line) */
.hop-pond {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: center;
  padding: 64px 12px 30px;
  border-radius: 28px;
  background: radial-gradient(ellipse at 25% 15%, rgba(255, 255, 255, 0.35), transparent 45%), linear-gradient(180deg, #86d6ec 0%, #4fb0d4 100%);
  box-shadow: inset 0 0 0 6px rgba(29, 43, 83, 0.08);
}
.hop-reeds {
  position: absolute;
  inset: auto 0 0;
  height: 22px;
  background: linear-gradient(180deg, #7bd389, #3fa35b);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hop-ripple {
  position: absolute;
  width: 90px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: ripple 3.2s ease-out infinite;
}
.hop-ripple.r1 {
  top: 22%;
  inset-inline-end: 18%;
}
.hop-ripple.r2 {
  bottom: 18%;
  inset-inline-start: 30%;
  animation-delay: 1.6s;
}
.hop-trail {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 5;
  display: flex;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}
.trail-pad {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c9d2ea;
}
.trail-pad.is-done {
  background: #45a84a;
}
.trail-pad.is-now {
  background: var(--sun);
  box-shadow: 0 0 0 3px rgba(255, 201, 60, 0.45);
}
.hop-line {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.hop-line::before {
  content: '';
  position: absolute;
  inset-inline: 30px;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.6);
}
.hop-line:not(.is-units) {
  flex-wrap: wrap;
  row-gap: 22px;
}
.hop-cell {
  position: relative;
  flex: var(--g, 1) 1 0;
  min-width: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.hop-cell.is-start {
  flex: 0 0 auto;
  min-width: 0;
}
.hop-stones {
  flex: 1;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  min-width: 0;
}
.hop-stone {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #dfe5f5;
  box-shadow: 0 2px 0 #8a94b8;
}
.hop-stone.is-quiet {
  visibility: hidden;
}
.hop-pad {
  position: relative;
  min-width: 76px;
  min-height: 76px;
  max-width: 160px;
  padding: 10px 12px;
  display: grid;
  place-items: center;
  font-size: 30px;
  transition: transform 0.25s, opacity 0.25s, filter 0.25s;
}
.hop-leaf {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #9be495, #45a84a 72%);
  box-shadow: 0 5px 0 #2f7d36;
  -webkit-mask: conic-gradient(from 20deg, transparent 0 26deg, #000 0);
  mask: conic-gradient(from 20deg, transparent 0 26deg, #000 0);
}
.hop-face {
  position: relative;
  z-index: 1;
  min-width: 46px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 0 rgba(29, 43, 83, 0.18);
  text-align: center;
}
.hop-pad.is-start {
  min-width: 64px;
  min-height: 64px;
  font-size: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #b5e8a8, #5cae52 72%);
  box-shadow: 0 5px 0 #2f7d36;
}
.hop-start-num {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  width: 44px;
  margin-left: -22px;
  padding: 0 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  text-align: center;
}
.hop-pad:active:not(.is-start) {
  transform: translateY(3px);
}
.hop-pad.is-sunk {
  transform: translateY(8px) scale(0.94);
  opacity: 0.55;
  filter: saturate(0.6);
}
.hop-pad.is-right .hop-face {
  background: #e9f9ee;
  box-shadow: 0 0 0 4px var(--grass-deep);
}
.hop-line.is-bob .hop-pad:not(.is-start):not(.is-sunk) {
  animation: pad-bob 2.4s ease-in-out infinite var(--bob, 0s);
}
.frog {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  width: 66px;
  pointer-events: none;
  visibility: hidden;
}
.frog.is-placed {
  visibility: visible;
}
.frog-body {
  display: block;
  transform-origin: 50% 95%;
}
.frog-svg {
  display: block;
  width: 100%;
}
.frog.is-land .frog-body {
  animation: land 0.25s ease-out;
}
.frog.is-happy .frog-body {
  animation: hop-small 0.4s ease-out 2;
}
.hop-count {
  position: absolute;
  bottom: 100%;
  left: calc(50% - 24px);
  width: 48px;
  padding: 2px 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}
.hop-count.is-pop {
  animation: pop-in 0.2s ease-out;
}

/* ============================================================ balance (the scale) */
.bal-scene {
  --tilt: 0deg;
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 760px;
  align-self: center;
  min-height: 280px;
  max-height: 400px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff6df, #ffe3b3);
  box-shadow: inset 0 0 0 6px rgba(29, 43, 83, 0.08);
}
.bal-post {
  position: absolute;
  left: 50%;
  top: 66px;
  bottom: 24px;
  width: 14px;
  margin-left: -7px;
  border-radius: 7px;
  background: linear-gradient(90deg, #a1887f, #795548);
}
.bal-base {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 130px;
  height: 18px;
  margin-left: -65px;
  border-radius: 14px 14px 6px 6px;
  background: #795548;
}
.bal-beam {
  position: absolute;
  z-index: 2;
  top: 60px;
  left: 22%;
  right: 22%;
  height: 12px;
  border-radius: 6px;
  background: #6d4c41;
  transform: rotate(var(--tilt));
  transition: transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.bal-pivot {
  position: absolute;
  left: 50%;
  top: -6px;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 2px 0 var(--sun-deep);
}
.bal-scene.is-rock .bal-beam {
  animation: rock 0.6s ease-in-out;
}
@keyframes rock {
  25% {
    transform: rotate(calc(var(--tilt) + 7deg));
  }
  60% {
    transform: rotate(calc(var(--tilt) - 5deg));
  }
}
.bal-pan {
  position: absolute;
  z-index: 3;
  top: 66px;
  width: 42%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(var(--dy, 0px));
  transition: transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.bal-pan.is-q {
  inset-inline-start: 1%;
}
.bal-pan.is-a {
  inset-inline-end: 1%;
}
.bal-strings {
  width: 76%;
  height: 44px;
  background:
    linear-gradient(to top left, transparent calc(50% - 2px), #8a6d4a calc(50% - 2px) calc(50% + 1px), transparent calc(50% + 1px)) left / 50% 100% no-repeat,
    linear-gradient(to top right, transparent calc(50% - 2px), #8a6d4a calc(50% - 2px) calc(50% + 1px), transparent calc(50% + 1px)) right / 50% 100% no-repeat;
}
.bal-load {
  width: 100%;
  min-height: 72px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 4px 8px;
  padding: 4px 6px;
  font-size: 30px;
}
.bal-pan.is-q .bal-load > .lbl {
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
}
.bal-dish {
  width: 100%;
  height: 16px;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: #b0bec5;
  box-shadow: inset 0 4px 0 #90a4ae;
  transition: background 0.3s;
}
.bal-scene.is-level .bal-dish {
  background: #a5d6a7;
  box-shadow: inset 0 4px 0 #66bb6a;
}
.bal-slot {
  min-width: 76px;
  min-height: 66px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 4px dashed #9aa7cc;
  background: rgba(255, 255, 255, 0.6);
}
.bal-slot.is-filled {
  border-color: transparent;
  background: none;
}
.bal-caption {
  position: absolute;
  z-index: 5;
  top: 8px;
  left: 50%;
  translate: -50% 0;
  padding: 4px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
  animation: pop-in 0.2s ease-out;
}
.bal-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 14px 8px 4px;
}
.weight {
  position: relative;
  min-width: 96px;
  min-height: 86px;
  padding: 20px 6px 8px;
  display: grid;
  place-items: center;
  font-size: 32px;
  transition: transform 0.08s, opacity 0.2s;
}
.weight-ring {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 32px;
  height: 22px;
  margin-left: -16px;
  border: 6px solid #6b7aa8;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}
.weight-body {
  position: relative;
  min-width: 84px;
  min-height: 60px;
  max-width: 180px;
  padding: 4px 12px;
  display: grid;
  place-items: center;
  border-radius: 14px 14px 22px 22px;
  background: linear-gradient(180deg, #eef1fa, #c3cce6);
  box-shadow: 0 6px 0 #8a94b8;
}
.weight:active:not(:disabled) {
  transform: translateY(4px);
}
.weight.is-out {
  visibility: hidden;
}
.weight.is-tried .weight-body {
  filter: saturate(0.6);
  opacity: 0.75;
}
.weight.is-dimmed {
  opacity: 0.5;
}
.weight.is-back {
  animation: pop-in 0.3s ease-out;
}
.weight.is-on-pan {
  min-width: 0;
  min-height: 0;
  padding-top: 16px;
  font-size: inherit;
}
.weight.is-on-pan .weight-body {
  min-width: 64px;
  min-height: 50px;
}

/* ============================================================ train (number train) */
.train-scene {
  position: relative;
  flex: 1;
  min-height: 270px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 12px;
  padding: 18px 10px 12px;
  border-radius: 28px;
  background: linear-gradient(180deg, #bde7ff 0%, #e6f6ff 52%, #b5e3a1 52%, #93d27e 100%);
  box-shadow: inset 0 0 0 6px rgba(29, 43, 83, 0.08);
}
.train-hill {
  position: absolute;
  bottom: 47.5%;
  inset-inline-end: -8%;
  width: 55%;
  height: 26%;
  border-radius: 50% 50% 0 0;
  background: #b5e3a1;
}
.train-cloud {
  position: absolute;
  top: 16px;
  inset-inline-start: 16%;
  width: 70px;
  height: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 26px -10px 0 -2px #fff, 52px 0 0 -3px #fff;
  opacity: 0.9;
}
.train-track {
  position: relative;
  z-index: 1;
}
.train {
  --way: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 12px 8px;
}
.train[dir='rtl'] {
  --way: -1;
}
.train.is-arrive {
  animation: train-in 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes train-in {
  from {
    transform: translateX(calc(var(--way) * -110vw));
  }
}
.train.is-couple {
  animation: couple 0.3s ease-out;
}
@keyframes couple {
  40% {
    transform: translateX(calc(var(--way) * 6px));
  }
}
.train.is-depart {
  transform: translateX(calc(var(--way) * 120vw));
  transition: transform 0.7s ease-in;
}
.wagon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 12px;
}
.train > .wagon::after,
.train > .loco::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -6px;
  right: -6px;
  height: 6px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #8d6e63 0 10px, #6d4c41 10px 13px);
}
.train > * + *::before {
  content: '';
  position: absolute;
  bottom: 30px;
  inset-inline-end: 100%;
  width: 10px;
  height: 5px;
  background: #46527a;
}
.wagon-body {
  min-width: 72px;
  min-height: 64px;
  max-width: 200px;
  padding: 6px 10px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff8ec;
  box-shadow: inset 0 0 0 5px var(--car, #ff8a65), 0 4px 0 rgba(29, 43, 83, 0.18);
  font-size: 32px;
}
.wagon-wheels {
  display: flex;
  gap: 24px;
  margin-top: -6px;
}
.wagon-wheels i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c9d2ea;
  box-shadow: inset 0 0 0 5px #46527a;
}
.wagon.is-gap .wagon-body {
  background: rgba(255, 255, 255, 0.55);
  box-shadow: none;
  border: 4px dashed #9aa7cc;
}
.wagon.is-gap .wagon-wheels i {
  opacity: 0.4;
}
.wagon.is-next .wagon-body {
  border-color: var(--berry);
  animation: slot-breathe 1.2s ease-in-out infinite;
}
.wagon.is-coupled .wagon-body {
  animation: pop-in 0.25s ease-out;
}
.loco {
  position: relative;
  width: 112px;
  padding-bottom: 12px;
}
.loco-svg {
  display: block;
  width: 100%;
}
.train[dir='rtl'] .loco-svg {
  transform: scaleX(-1);
}
.loco-smoke i {
  position: absolute;
  bottom: 84px;
  inset-inline-start: 66%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
}
.loco.is-toot .loco-smoke i {
  animation: puff 0.9s ease-out forwards;
}
.loco.is-toot .loco-smoke i:nth-child(2) {
  animation-delay: 0.15s;
}
.loco.is-toot .loco-smoke i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes puff {
  0% {
    opacity: 0.95;
    transform: translate(0, 0) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--way, 1) * -16px), -44px) scale(1.8);
  }
}
.train-siding {
  position: relative;
  z-index: 1;
  padding: 12px 6px 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.4);
}
.train-yard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.wagon.is-loose {
  transition: transform 0.08s, opacity 0.2s;
}
.wagon.is-loose:active:not(:disabled) {
  transform: translateY(3px);
}
.wagon.is-loose.is-used {
  visibility: hidden;
}
.wagon.is-loose.is-tried .wagon-body {
  filter: saturate(0.55);
  opacity: 0.75;
}
.wagon.is-loose.is-dimmed {
  opacity: 0.5;
}
.wagon.is-loose.is-bump {
  animation: wagon-bump 0.5s ease-in-out;
}
@keyframes wagon-bump {
  30% {
    transform: translateY(-18px) rotate(-3deg);
  }
  55% {
    transform: translateY(-8px);
  }
  75% {
    transform: translateY(-2px) rotate(2deg);
  }
}
.train-yard.is-shunt .wagon {
  animation: pop-in 0.3s ease-out;
}

/* ============================================================ blocks (tens and ones) */
.blocks-board {
  flex: 1;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 28px;
  background: #fbf1dc;
  box-shadow: inset 0 0 0 6px rgba(29, 43, 83, 0.07);
}
.blocks-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.blocks-value {
  min-width: 96px;
  padding: 0 18px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 54px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}
.blocks-parts {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-soft);
}
.blocks-tray {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  min-width: min(100%, 260px);
  min-height: 176px;
  padding: 12px 18px;
  border-radius: 18px;
  background: #e8d3a9;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.06);
}
.blocks-tray.is-bundle {
  animation: hop-small 0.4s ease-out;
}
.blocks-tens {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-width: 18px;
}
.rod {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 18px;
  overflow: hidden;
  border-radius: 3px;
  background: #1f6fc4;
  box-shadow: 0 0 0 2px #1f6fc4;
}
.rod b {
  height: 14px;
  background: #4fa3ff;
}
.blocks-divider {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  background: rgba(29, 43, 83, 0.15);
}
.blocks-ones {
  display: grid;
  grid-template-rows: repeat(5, 18px);
  grid-auto-flow: column;
  grid-auto-columns: 18px;
  gap: 4px;
  min-width: 18px;
}
.cube {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: #ffc93c;
  box-shadow: inset 0 0 0 2px #b8860b;
}
.rod.is-new,
.cube.is-new {
  animation: pop-in 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.blocks-board.is-wobble {
  animation: shake 0.4s ease-in-out;
}
.blocks-board.is-dim-flash {
  animation: dim-flash 0.5s ease-in-out;
}
.blocks-board.is-right .rod,
.blocks-board.is-right .cube {
  filter: drop-shadow(0 0 6px #ffe27a) brightness(1.1);
}
.blocks-board.is-right .blocks-value {
  background: #e9f9ee;
  box-shadow: 0 0 0 4px var(--grass-deep);
}
.blocks-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 14px 4px 4px;
}
.blocks-pair {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}
.blocks-btn {
  min-width: 64px;
  min-height: 64px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 20px;
  font-weight: 900;
  transition: transform 0.08s, opacity 0.2s;
}
.blocks-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: none;
}
.blocks-sign {
  font-size: 24px;
  line-height: 1;
}
.blocks-btn.is-ten {
  background: #d6ebff;
}
.blocks-btn.is-one {
  background: #fff0c2;
}
.blocks-btn.is-minus {
  background: #eef2fb;
}
.blocks-btn:disabled {
  opacity: 0.4;
}
.blocks-btn.is-check {
  min-width: 120px;
  background: var(--grass);
  box-shadow: 0 5px 0 var(--grass-deep);
}
.mini-rod {
  width: 10px;
  height: 28px;
  border-radius: 2px;
  background: repeating-linear-gradient(#4fa3ff 0 4px, #1f6fc4 4px 5px);
}
.mini-cube {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #ffc93c;
  box-shadow: inset 0 0 0 2px #b8860b;
}
.blocks-spot {
  min-width: 130px;
  min-height: 110px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 4px dashed #9aa7cc;
  background: rgba(255, 255, 255, 0.55);
}
.blocks-pile {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 16px 4px 4px;
}
.block-tile {
  --tile: #9b6bff;
  position: relative;
  min-width: 100px;
  min-height: 90px;
  padding: 18px 8px 8px;
  display: grid;
  place-items: center;
  font-size: 30px;
  transition: transform 0.08s, opacity 0.2s;
}
.block-top {
  position: absolute;
  top: 4px;
  left: 14px;
  right: 6px;
  height: 16px;
  border-radius: 4px 4px 0 0;
  background: var(--tile);
  opacity: 0.55;
  transform: skewX(-35deg);
}
.block-face {
  position: relative;
  min-width: 84px;
  min-height: 64px;
  max-width: 200px;
  padding: 4px 10px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 6px var(--tile), 0 5px 0 rgba(29, 43, 83, 0.2);
}
.block-tile:active:not(:disabled) {
  transform: translateY(3px);
}
.block-tile.is-tried .block-face {
  opacity: 0.7;
}
.block-tile.is-dimmed {
  opacity: 0.5;
}
.block-tile.is-used {
  visibility: hidden;
}
.block-tile.is-wobble {
  animation: shake 0.4s ease-in-out;
}
.block-tile.is-dim-flash {
  animation: dim-flash 0.5s ease-in-out;
}
.block-tile.is-placed {
  animation: pop-in 0.3s ease-out;
}

/* ============================================================ math mechanics: phones */
@media (max-width: 600px) {
  .mech-hop,
  .mech-balance,
  .mech-train,
  .mech-blocks {
    padding-bottom: 64px;
  }
  .hop-pond {
    padding: 58px 6px 30px;
  }
  .hop-cell {
    min-width: 64px;
  }
  .hop-pad {
    min-width: 64px;
    min-height: 64px;
    max-width: 120px;
    padding: 8px 6px;
    font-size: 24px;
  }
  .hop-pad.is-start {
    min-width: 50px;
    min-height: 50px;
    font-size: 18px;
  }
  .hop-face {
    min-width: 40px;
    padding: 2px 6px;
  }
  .frog {
    width: 54px;
  }
  .bal-load {
    font-size: 24px;
    padding: 4px 2px;
  }
  .bal-slot {
    min-width: 64px;
    min-height: 60px;
  }
  .weight {
    min-width: 80px;
    font-size: 26px;
  }
  .weight-body {
    min-width: 72px;
    max-width: 150px;
  }
  .wagon-body {
    min-width: 50px;
    min-height: 56px;
    padding: 4px 6px;
    font-size: 24px;
  }
  .wagon.is-loose .wagon-body {
    min-width: 64px;
  }
  .wagon-wheels {
    gap: 14px;
  }
  .wagon-wheels i {
    width: 14px;
    height: 14px;
    box-shadow: inset 0 0 0 4px #46527a;
  }
  .train {
    gap: 10px 6px;
  }
  .train > * + *::before {
    width: 6px;
    bottom: 26px;
  }
  .loco {
    width: 84px;
  }
  .loco-smoke i {
    bottom: 62px;
  }
  .blocks-value {
    font-size: 44px;
  }
  .blocks-btn {
    padding: 0 12px;
    font-size: 18px;
  }
  .block-tile {
    min-width: 84px;
    font-size: 24px;
  }
  .block-face {
    min-width: 72px;
  }
}

/* ============================================================ parent report */
.parents-screen .panel {
  max-width: 900px;
}
.report-tabs {
  justify-content: center;
  margin: 0 16px 16px;
}
.report-tabs .seg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.report-holder {
  display: flex;
  flex-direction: column;
}
.child-report {
  --lv: #8a94b8;
  --lv-bg: #eef2fb;
}
.child-report h3 {
  margin: 22px 0 10px;
  font-size: 21px;
}
.child-report .is-strong {
  --lv: #2e7d32;
  --lv-bg: #e3f5e6;
}
.child-report .is-developing {
  --lv: #9a5b00;
  --lv-bg: #fff0d1;
}
.child-report .is-support {
  --lv: #c62828;
  --lv-bg: #fde7e7;
}
.child-report .is-none {
  --lv: #8a94b8;
  --lv-bg: #eef2fb;
}
.report-tip {
  margin-top: 8px;
  padding: 4px 18px 14px;
  border-radius: 20px;
  border-inline-start: 6px solid var(--sun);
  background: #fff7e0;
}
.report-tip h3 {
  margin-top: 12px;
}
.tip-text {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 700;
}
.tip-text .goal-where {
  margin-top: 4px;
}
.report-tip .note {
  text-align: start;
}
.report-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0 20px;
}
.report-cols .note,
.report-mistakes .note {
  text-align: start;
}
.goals,
.mistakes,
.tree-goals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.goal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 16px;
  border-inline-start: 6px solid var(--lv);
  background: #f3f6fd;
}
.goal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.goal-text {
  font-size: 18px;
  font-weight: 700;
}
.state-pill,
.tree-acc {
  flex: none;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--lv-bg);
  color: var(--lv);
  font-size: 15px;
  font-weight: 900;
}
.goal-where {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}
.acc-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.acc-track {
  flex: 1;
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: #e3e8f4;
}
.acc-fill {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--lv);
}
.acc-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-soft);
  white-space: nowrap;
}
.mistake {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f3f6fd;
  font-size: 17px;
}
.mistake-n {
  flex: none;
  min-width: 46px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fde7e7;
  color: #c62828;
  font-weight: 900;
  text-align: center;
}
.week-chart {
  padding: 8px 14px 14px;
  border-radius: 18px;
  background: #f3f6fd;
}
.chart-cap {
  margin: 6px 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-soft);
}
.week-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.week-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.week-val {
  font-size: 15px;
  font-weight: 900;
}
.week-bar-wrap {
  width: 100%;
  max-width: 64px;
  height: 110px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 10px;
  background: #e3e8f4;
}
.week-bar {
  width: 100%;
  border-radius: 10px 10px 0 0;
  background: var(--lv);
}
.week-lbl {
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}
.min-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #e3e8f4;
}
.min-fill {
  display: block;
  height: 100%;
  background: #2f8fd8;
}
.report-tree details > summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  list-style: none;
  cursor: pointer;
}
.report-tree summary::-webkit-details-marker {
  display: none;
}
.report-tree summary::before {
  content: '';
  flex: none;
  width: 0;
  height: 0;
  border-block: 7px solid transparent;
  border-inline-start: 10px solid var(--ink-soft);
  transition: transform 0.2s;
}
.report-tree details[open] > summary::before {
  transform: rotate(90deg);
}
.tree-course {
  margin-bottom: 10px;
  border-radius: 16px;
  background: #f3f6fd;
}
.tree-course > summary {
  font-size: 19px;
}
.tree-unit {
  margin: 0 8px 8px;
  border-radius: 14px;
  background: var(--card);
}
.tree-lesson {
  margin: 0 8px 6px;
  border-radius: 12px;
  background: #f8faff;
}
.tree-title {
  flex: 1;
  min-width: 0;
  font-weight: 800;
}
.tree-goals {
  padding: 4px 14px 12px;
}
.tree-goals li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tree-lesson .note {
  text-align: start;
  padding: 0 14px 10px;
}
[dir='rtl'] .report-tree details[open] > summary::before {
  transform: rotate(-90deg);
}

/* ============================================================ wide built-in pictures (sequences, composites) */
.lbl-img:has(> .is-wide) {
  width: auto;
  height: 64px;
}
.lbl-img > .is-wide {
  width: auto;
  max-width: min(80vw, 420px);
}
.lbl.is-big .lbl-img:has(> .is-wide) {
  height: 96px;
}
.ex-image > .is-wide {
  width: min(86vw, 560px);
  height: auto;
  max-height: 260px;
}

/* ============================================================ adventure mechanics: shared (treasure, rescue, library) */
.mech-treasure,
.mech-rescue,
.mech-library {
  padding-bottom: 84px; /* keeps the hero dock off the play area */
}
@keyframes curl {
  35% {
    transform: perspective(300px) rotateX(38deg) scaleY(0.82);
  }
  70% {
    transform: perspective(300px) rotateX(-8deg);
  }
}
@keyframes jiggle {
  20%,
  60% {
    transform: rotate(-9deg);
  }
  40%,
  80% {
    transform: rotate(9deg);
  }
}
@keyframes wiggle {
  25% {
    transform: translateY(-12px) rotate(-4deg);
  }
  50% {
    transform: translateY(-6px) rotate(4deg);
  }
  75% {
    transform: translateY(-2px) rotate(-2deg);
  }
}

/* ============================================================ treasure (map) */
.tr-map {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 2 / 1;
  align-self: center;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 15%, rgba(160, 110, 50, 0.18), transparent 30%),
    radial-gradient(circle at 90% 85%, rgba(160, 110, 50, 0.2), transparent 32%),
    linear-gradient(135deg, #f7e2b5, #efd29a);
  box-shadow: inset 0 0 0 5px #d9b36c, inset 0 0 28px rgba(140, 90, 30, 0.35), var(--shadow);
}
.tr-island {
  position: absolute;
  inset: 16% 8% 12%;
  border-radius: 46% 54% 40% 60% / 55% 45% 55% 45%;
  background: rgba(123, 211, 137, 0.35);
  box-shadow: 0 0 0 10px rgba(110, 198, 255, 0.25);
}
.tr-compass {
  position: absolute;
  top: 10px;
  inset-inline-end: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #a0763a;
  background: conic-gradient(from -20deg, #e0483e 0 40deg, transparent 0 180deg, #46527a 180deg 220deg, transparent 0);
  opacity: 0.8;
}
.tr-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tr-seg {
  stroke: #a0763a;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 0.02 0.035;
}
.tr-seg.is-done {
  stroke: #8a4f00;
  stroke-width: 3;
  stroke-dasharray: none;
}
.tr-seg.is-next {
  stroke: #8a4f00;
  stroke-width: 3;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.tr-seg.is-next.is-drawn {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s ease-out;
}
.tr-stop {
  fill: #fff8ec;
  stroke: #a0763a;
  stroke-width: 2;
}
.tr-stop.is-done {
  fill: var(--sun);
  stroke: #8a4f00;
}
.tr-x {
  fill: none;
  stroke: #e0483e;
  stroke-width: 4;
  stroke-linecap: round;
}
.tr-pin {
  position: absolute;
  z-index: 3;
  width: 52px;
  transform: translate(-50%, -92%);
  transition: left 0.6s ease-in-out, top 0.6s ease-in-out;
  pointer-events: none;
}
.tr-pin .hero {
  width: 100%;
}
.tr-dig {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 246, 190, 0.96), rgba(239, 210, 154, 0.94) 70%);
  animation: screen-in 0.3s ease-out both;
}
.tr-gems i {
  position: absolute;
  top: 0;
  width: 16px;
  height: 16px;
  transform: rotate(45deg);
  border-radius: 3px;
  animation: pop-in 0.4s 0.4s ease-out both;
}
.tr-gems i:nth-child(1) {
  left: 22%;
  background: #e0483e;
}
.tr-gems i:nth-child(2) {
  left: 40%;
  top: -8px;
  background: #3f7be0;
}
.tr-gems i:nth-child(3) {
  left: 58%;
  background: #2e9d4a;
}
.tr-gems i:nth-child(4) {
  left: 72%;
  top: -4px;
  background: #9b6bff;
}
.tr-scrolls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 16px 4px 4px;
}
.tr-scrolls.is-swap .scroll {
  animation: pop-in 0.3s ease-out;
}
.scroll {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 100px;
  max-width: 220px;
  font-size: 30px;
  transform-origin: 50% 0;
  transition: transform 0.08s, opacity 0.2s;
}
.scroll-roll {
  height: 14px;
  margin: 0 -6px;
  border-radius: 8px;
  background: linear-gradient(180deg, #e8c889, #b98a45);
  box-shadow: 0 2px 0 #8a5a2b;
}
.scroll-paper {
  min-height: 66px;
  padding: 6px 12px;
  display: grid;
  place-items: center;
  background: #fbefd2;
  box-shadow: inset 6px 0 8px -6px rgba(140, 90, 30, 0.35), inset -6px 0 8px -6px rgba(140, 90, 30, 0.35);
}
.scroll:active:not(:disabled) {
  transform: translateY(3px);
}
.scroll.is-curl {
  animation: curl 0.55s ease-in-out;
}
.scroll.is-tried .scroll-paper {
  opacity: 0.6;
  transform: perspective(300px) rotateX(18deg);
}
.scroll.is-dimmed {
  opacity: 0.5;
}
.scroll.is-open .scroll-paper {
  background: #fff6c8;
  box-shadow: 0 0 0 4px var(--sun);
}

/* ============================================================ rescue (cage and keys) */
.rs-scene {
  position: relative;
  flex: 1;
  min-height: 250px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  background: linear-gradient(180deg, #cdeeff 0%, #eaf8ff 58%, #a8dd95 58%, #86cc70 100%);
  box-shadow: inset 0 0 0 6px rgba(29, 43, 83, 0.08);
}
.rs-sun {
  position: absolute;
  top: 16px;
  inset-inline-end: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 10px rgba(255, 201, 60, 0.3);
}
.rs-friends {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 2;
  display: flex;
  gap: 4px;
  padding: 4px 8px;
  min-height: 52px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}
.rs-friends:empty {
  display: none;
}
.rs-friend {
  width: 44px;
  height: 44px;
}
.rs-friend.is-new {
  animation: pop-in 0.3s ease-out;
}
.rs-friend svg,
.rs-animal svg {
  display: block;
  width: 100%;
  height: 100%;
}
.rs-cage {
  position: relative;
  width: 170px;
  height: 160px;
  margin-top: 30px;
  border-radius: 12px 12px 6px 6px;
  background: linear-gradient(180deg, #fbe7c0 0 70%, #efc97e 70%);
  box-shadow: inset 0 -12px 0 #8d6e63, 0 6px 0 rgba(29, 43, 83, 0.15);
  perspective: 600px;
}
.rs-roof {
  position: absolute;
  inset: -22px -12px auto;
  height: 26px;
  border-radius: 40px 40px 6px 6px;
  background: #a1887f;
  box-shadow: 0 4px 0 #6d4c41;
}
.rs-animal {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 10px;
  height: 118px;
  transition: transform 0.6s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.rs-animal.is-free {
  z-index: 4;
  transform: translate(calc(var(--way-x, 1) * 150px), -10px) scale(0.9);
  animation: hop-small 0.3s ease-out 2;
}
[dir='rtl'] .rs-animal.is-free {
  --way-x: -1;
}
.rs-door {
  position: absolute;
  inset: 0 0 12px;
  z-index: 3;
  border-radius: 12px 12px 0 0;
  background: repeating-linear-gradient(90deg, transparent 0 18px, #6b7aa8 18px 24px);
  box-shadow: inset 0 0 0 5px #6b7aa8;
  transform-origin: 0 50%;
  transition: transform 0.5s ease-out;
}
.rs-door.is-open {
  transform: rotateY(-100deg);
}
.rs-lock {
  position: absolute;
  left: 86%;
  top: 44%;
  width: 40px;
  height: 46px;
  margin-left: -20px;
}
.rs-shackle {
  position: absolute;
  left: 8px;
  top: 0;
  width: 24px;
  height: 24px;
  border: 6px solid #8a94b8;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  transition: transform 0.25s ease-out;
}
.rs-body {
  position: absolute;
  inset: 18px 0 0;
  border-radius: 8px;
  background: var(--sun);
  box-shadow: inset 0 -5px 0 var(--sun-deep);
}
.rs-body::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 8px;
  width: 6px;
  height: 12px;
  margin-left: -3px;
  border-radius: 3px;
  background: #5e3310;
}
.rs-lock.is-open .rs-shackle {
  transform: translateY(-10px);
}
.rs-lock.is-jiggle {
  animation: jiggle 0.45s ease-in-out;
}
.rs-ring {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 16px 4px 4px;
}
.rs-ring.is-swap .rs-key {
  animation: pop-in 0.3s ease-out;
}
.rs-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 92px;
  padding: 4px;
  transition: transform 0.08s, opacity 0.2s;
}
.key-tag {
  min-width: 84px;
  min-height: 58px;
  max-width: 190px;
  padding: 4px 12px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff8ec;
  box-shadow: inset 0 0 0 4px var(--key, #ffc93c), 0 4px 0 rgba(29, 43, 83, 0.16);
  font-size: 30px;
}
.key-metal {
  width: 30px;
  height: 56px;
  margin-top: -2px;
}
.key-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.rs-key:active:not(:disabled) {
  transform: translateY(3px);
}
.rs-key.is-away .key-metal {
  visibility: hidden;
}
.rs-key.is-tried .key-tag {
  opacity: 0.65;
  filter: saturate(0.5);
}
.rs-key.is-dimmed {
  opacity: 0.5;
}

/* ============================================================ library (bookshelves) */
.lib-room {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 10px;
  border-radius: 28px;
  background: linear-gradient(180deg, #efe3ff, #f8f1ff);
  box-shadow: inset 0 0 0 6px rgba(29, 43, 83, 0.07);
}
.lib-magic {
  position: relative;
  width: 150px;
  height: 84px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.lib-page {
  position: absolute;
  bottom: 0;
  width: 72px;
  height: 64px;
  background: #fffdf5;
  box-shadow: inset 0 -4px 0 #e4d6b8, 0 4px 0 #7c4dff;
}
.lib-page:first-child {
  left: 3px;
  border-radius: 14px 4px 4px 8px;
  transform: skewY(6deg);
}
.lib-page:nth-child(2) {
  right: 3px;
  border-radius: 4px 14px 8px 4px;
  transform: skewY(-6deg);
}
.lib-glow {
  position: absolute;
  inset: -10px 20px 30px;
  border-radius: 50%;
  background: radial-gradient(rgba(179, 136, 255, 0.55), transparent 70%);
  animation: slot-breathe 1.6s ease-in-out infinite;
}
.lib-count {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
  padding: 2px 14px;
  border-radius: 999px;
  background: var(--berry);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}
.lib-magic.is-catch .lib-page {
  animation: hop-small 0.35s ease-out;
}
.lib-magic.is-full .lib-glow {
  background: radial-gradient(rgba(255, 214, 90, 0.8), transparent 70%);
}
.lib-case {
  width: 100%;
  max-width: 760px;
  padding: 10px 10px 0;
  border-radius: 16px 16px 8px 8px;
  background: #8d5a34;
  box-shadow: inset 0 0 0 6px #6d4226;
}
.lib-shelf {
  min-height: 150px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  padding: 10px 6px 0;
  margin-bottom: 10px;
  border-bottom: 12px solid #c48a55;
  background: #5c3a1f;
  border-radius: 8px 8px 0 0;
}
.lib-shelf.is-swap .spine {
  animation: pop-in 0.3s ease-out;
}
.spine {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  min-width: 66px;
  max-width: 140px;
  min-height: calc(120px * var(--tall, 1));
  padding: 8px 4px;
  border-radius: 6px 6px 2px 2px;
  background: var(--spine, #3f7be0);
  box-shadow: inset -6px 0 0 rgba(0, 0, 0, 0.18), inset 4px 0 0 rgba(255, 255, 255, 0.18);
  font-size: 24px;
  transition: transform 0.12s, opacity 0.2s;
}
.spine-band {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 214, 90, 0.9);
}
.spine-label {
  margin: 6px 0;
  padding: 6px 4px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #fff8ec;
  overflow-wrap: anywhere;
}
.spine:active:not(:disabled) {
  transform: translateY(-6px);
}
.spine.is-used {
  visibility: hidden;
}
.spine.is-tried {
  filter: saturate(0.5);
  opacity: 0.7;
}
.spine.is-dimmed {
  opacity: 0.5;
}
.spine.is-wiggle {
  animation: wiggle 0.5s ease-in-out;
}

@media (max-width: 600px) {
  .mech-treasure,
  .mech-rescue,
  .mech-library {
    padding-bottom: 64px;
  }
  .tr-pin {
    width: 40px;
  }
  .scroll,
  .key-tag {
    font-size: 24px;
  }
  .scroll {
    min-width: 84px;
  }
  .rs-cage {
    width: 140px;
    height: 136px;
  }
  .rs-animal {
    height: 96px;
    left: 14px;
    right: 14px;
  }
  .rs-animal.is-free {
    transform: translate(calc(var(--way-x, 1) * 110px), -10px) scale(0.85);
  }
  .rs-key {
    min-width: 80px;
  }
  .key-tag {
    min-width: 72px;
  }
  .spine {
    min-width: 62px;
    font-size: 20px;
  }
  .lib-shelf {
    min-height: 130px;
    gap: 4px;
  }
}

/* ============================================================ listen items (prompt.listen) */
.mech-prompt.is-listen {
  flex-wrap: wrap;
  justify-content: center;
}
.btn-listen {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 8px 30px;
  border-radius: 999px;
  background: #e6f6ff;
  box-shadow: 0 4px 0 rgba(29, 43, 83, 0.18);
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
  transition: transform 0.08s;
}
.btn-listen:active {
  transform: translateY(3px);
}
.btn-listen .icon {
  width: 40px;
  height: 40px;
}
.btn-listen.is-playing {
  background: var(--sun);
  animation: slot-breathe 1s ease-in-out infinite;
}
.listen-text {
  animation: pop-in 0.3s ease-out;
}
.mech-prompt.has-said {
  flex-wrap: wrap;
  justify-content: center;
}
.listen-said {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 18px;
  border-radius: 999px;
  background: #e6f6ff;
  box-shadow: inset 0 0 0 3px #b9e2ff;
  animation: pop-in 0.3s ease-out;
}
.listen-said .icon {
  width: 30px;
  height: 30px;
  flex: none;
}

/* ============================================================ body pictures (img-body-*) */
.body-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: body-pulse 1.4s ease-in-out infinite;
}
@keyframes body-pulse {
  50% {
    transform: scale(1.14);
    opacity: 0.7;
  }
}

/* ============================================================ English mechanics: shared (spell, wordsearch, space, kitchen) */
.mech-spell,
.mech-wordsearch,
.mech-space,
.mech-kitchen {
  padding-bottom: 84px; /* keeps the hero dock off the play area */
}

/* ============================================================ spell (robot factory) */
.rb-factory {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 28px;
  background: repeating-linear-gradient(90deg, #e9eef8 0 38px, #dfe6f3 38px 41px);
  box-shadow: inset 0 0 0 6px rgba(29, 43, 83, 0.07);
}
.rb-robot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}
.rb-antenna {
  position: relative;
  width: 6px;
  height: 18px;
  background: #8a94b8;
}
.rb-bulb {
  position: absolute;
  top: -14px;
  left: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c9d0e2;
}
.rb-head {
  position: relative;
  width: 116px;
  height: 54px;
  border-radius: 18px 18px 12px 12px;
  background: #b9c4dc;
  box-shadow: inset 0 -6px 0 rgba(29, 43, 83, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding-bottom: 10px;
}
.rb-eye {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #46527a;
  box-shadow: inset 0 0 0 4px #e9eef8;
  transition: background 0.2s, box-shadow 0.2s;
}
.rb-mouth {
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 40px;
  height: 6px;
  margin-left: -20px;
  border-radius: 3px;
  background: #46527a;
}
.rb-body {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 4px;
  max-width: 100%;
}
.rb-arm {
  flex: none;
  width: 20px;
  height: 66px;
  margin-top: 12px;
  border-radius: 10px;
  background: #9aa7c4;
  transform-origin: 50% 8px;
}
.rb-panel {
  min-width: 170px;
  max-width: calc(100vw - 100px);
  padding: 10px;
  border-radius: 22px;
  background: #cdd6ea;
  box-shadow: inset 0 0 0 6px #9aa7c4;
  display: flex;
  justify-content: center;
  transition: box-shadow 0.3s;
}
.rb-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.rb-slot {
  min-width: 50px;
  height: 62px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #1d2b53;
  color: #fff;
  font-size: 34px;
  box-shadow: inset 0 0 0 3px #46527a;
}
.rb-slot.is-word {
  min-width: 70px;
  font-size: 26px;
}
.rb-slot.is-next {
  box-shadow: inset 0 0 0 4px var(--sun);
  animation: slot-breathe 1.4s ease-in-out infinite;
}
.rb-slot.is-filled {
  background: #2c4a8c;
}
.rb-slot.is-preset {
  background: #3d5a9a;
}
.rb-slot.is-click {
  animation: rb-click 0.3s ease-out;
}
.rb-whole {
  padding: 6px 18px;
  border-radius: 14px;
  background: #1d2b53;
  color: #fff;
  animation: pop-in 0.3s ease-out;
}
.rb-wheels {
  display: flex;
  gap: 44px;
  margin-top: 4px;
}
.rb-wheels i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #46527a;
  box-shadow: inset 0 0 0 8px #8a94b8;
}
.rb-robot.is-powered .rb-eye {
  background: #ffe066;
  box-shadow: 0 0 14px 4px rgba(255, 214, 90, 0.9), inset 0 0 0 4px #fff3b0;
}
.rb-robot.is-powered .rb-bulb {
  background: #ff5a5f;
  box-shadow: 0 0 12px 4px rgba(255, 90, 95, 0.7);
  animation: rb-blink 0.4s steps(2) 3;
}
.rb-robot.is-powered .rb-arm.is-end {
  animation: rb-wave 0.5s ease-in-out 2;
}
.rb-robot.is-powered .rb-panel {
  box-shadow: inset 0 0 0 6px #7bd389, 0 0 22px rgba(123, 211, 137, 0.8);
}
.rb-robot.is-powered .rb-mouth {
  height: 12px;
  border-radius: 0 0 12px 12px;
}
.rb-belt {
  position: relative;
  margin-top: 12px;
  padding: 14px 30px 26px;
  border-radius: 20px;
  background: #46527a;
}
.rb-track {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 9px;
  height: 10px;
  border-radius: 5px;
  background: repeating-linear-gradient(90deg, #1d2b53 0 14px, #8a94b8 14px 28px);
  animation: rb-belt 1.2s linear infinite;
}
.rb-roller {
  position: absolute;
  bottom: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8a94b8;
  box-shadow: inset 0 0 0 5px #1d2b53;
}
.rb-roller.is-a {
  left: 6px;
}
.rb-roller.is-b {
  right: 6px;
}
.rb-tiles {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.rb-tile {
  min-width: 64px;
  height: 70px;
  padding: 0 10px;
  border-radius: 14px;
  background: #fff8ec;
  box-shadow: 0 5px 0 #d9a21b, inset 0 0 0 3px #ffc93c;
  color: var(--ink);
  font-size: 34px;
  transition: transform 0.08s;
}
.rb-tile.is-word {
  min-width: 76px;
  font-size: 26px;
}
.rb-tile:active:not(:disabled) {
  transform: translateY(3px);
}
.rb-tile.is-used {
  visibility: hidden;
}
.rb-tile.is-bounce {
  animation: rb-bounce 0.5s ease-out;
}
.rb-tile.is-dimmed {
  opacity: 0.5;
}
@keyframes rb-belt {
  to {
    background-position: 28px 0;
  }
}
@keyframes rb-bounce {
  30% {
    transform: translateY(-26px) rotate(-6deg);
  }
  60% {
    transform: translateY(0);
  }
  80% {
    transform: translateY(-8px);
  }
}
@keyframes rb-wave {
  50% {
    transform: rotate(-150deg);
  }
}
@keyframes rb-blink {
  50% {
    opacity: 0.3;
  }
}
@keyframes rb-click {
  40% {
    transform: scale(1.15);
  }
}

/* ============================================================ wordsearch (word hunt) */
.ws-area {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.ws-board {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), var(--cell, 60px));
  gap: 6px;
  padding: 12px;
  border-radius: 24px;
  background: linear-gradient(135deg, #dff3ff, #efe3ff);
  box-shadow: inset 0 0 0 5px rgba(29, 43, 83, 0.08), var(--shadow);
}
.ws-cell {
  width: var(--cell, 60px);
  height: var(--cell, 60px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 0 rgba(29, 43, 83, 0.18);
  color: var(--ink);
  font-size: calc(var(--cell, 60px) * 0.5);
  font-weight: 900;
  line-height: 1;
  transition: background 0.15s, border-radius 0.2s, transform 0.08s;
}
.ws-cell:active {
  transform: scale(0.94);
}
.ws-cell.is-picked {
  background: var(--sun);
}
.ws-cell.is-found {
  background: var(--grass);
  color: #fff;
  border-radius: 14px;
}
.ws-cell.is-pop {
  animation: hop-small 0.3s ease-out;
}
.ws-cell.is-shake {
  animation: shake 0.4s;
}
.ws-cell.is-nudge {
  animation: rb-click 0.3s ease-out;
}
.ws-cell.is-decoy {
  animation: ws-decoy 0.8s ease-out;
}
.ws-cell.is-dimmed {
  opacity: 0.5;
}
@keyframes ws-decoy {
  30% {
    background: #ffd9cf;
    transform: scale(0.9);
  }
}
.ws-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 58px;
}
.ws-slot {
  width: 42px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 -4px 0 #d6def0;
  font-size: 30px;
  font-weight: 900;
}
.ws-slot.is-filled {
  background: #fff3c4;
  animation: pop-in 0.2s ease-out;
}
.ws-whole {
  padding: 4px 22px;
  border-radius: 16px;
  background: var(--grass);
  color: #fff;
  animation: pop-in 0.3s ease-out;
}

/* ============================================================ space (space explorer) */
.sx-space {
  position: relative;
  flex: 1 1 auto;
  min-height: 330px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 22%, rgba(110, 120, 255, 0.35), transparent 40%),
    radial-gradient(circle at 82% 72%, rgba(170, 90, 220, 0.35), transparent 45%),
    linear-gradient(180deg, #141b3d, #26306a);
}
.sx-stars i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.75;
}
.sx-space.is-twinkle .sx-stars i {
  animation: sx-twinkle 0.9s ease-in-out 2;
  animation-delay: var(--d, 0s);
}
@keyframes sx-twinkle {
  50% {
    transform: scale(2.6);
    opacity: 1;
    box-shadow: 0 0 8px #fff;
  }
}
.sx-planets {
  position: absolute;
  top: 58px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 10px;
}
.sx-orbit {
  display: flex;
}
.sx-orbit:nth-child(even) {
  margin-top: 36px;
}
.sx-space.is-orbit .sx-orbit {
  animation: sx-orbit 11s linear infinite;
  animation-delay: var(--phase, 0s);
}
.sx-space.is-busy .sx-orbit,
.sx-space.is-paused .sx-orbit {
  animation-play-state: paused;
}
@keyframes sx-orbit {
  from {
    transform: rotate(0deg) translateX(20px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(20px) rotate(-360deg);
  }
}
.sx-planet {
  position: relative;
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform 0.6s ease, opacity 0.6s;
}
.sx-ball {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.55) 0 8%, transparent 9%),
    radial-gradient(circle at 36% 36%, var(--c1), var(--c2));
  box-shadow: inset -12px -12px 0 rgba(0, 0, 0, 0.15), 0 0 24px rgba(255, 255, 255, 0.18);
}
.sx-planet.has-ring .sx-ball::after {
  content: '';
  position: absolute;
  left: -16%;
  right: -16%;
  top: 42%;
  height: 16%;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.55);
  transform: rotate(-14deg);
}
.sx-label {
  position: relative;
  z-index: 1;
  min-width: 64px;
  min-height: 60px;
  max-width: 150px;
  padding: 6px 10px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
  color: var(--ink);
  font-size: 30px;
}
.sx-flag {
  position: absolute;
  top: -36px;
  left: 50%;
  width: 4px;
  height: 40px;
  background: #fff;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s, opacity 0.3s;
}
.sx-flag::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0;
  width: 26px;
  height: 18px;
  background: var(--sun);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.sx-planet.is-landed .sx-flag {
  opacity: 1;
  transform: none;
}
.sx-planet.is-drift {
  transform: translate(22px, 34px) scale(0.78);
  opacity: 0.45;
}
.sx-planet.is-dimmed {
  opacity: 0.5;
}
.sx-planet.is-away {
  opacity: 0.2;
  transform: scale(0.7);
}
.sx-pad {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 120px;
  height: 16px;
  margin-left: -60px;
  border-radius: 12px 12px 0 0;
  background: #8a94b8;
}
.sx-rocket {
  position: absolute;
  bottom: 14px;
  left: 50%;
  z-index: 3;
  width: 56px;
  height: 94px;
  margin-left: -28px;
  pointer-events: none;
  transition: transform 0.65s cubic-bezier(0.45, 0.05, 0.3, 1);
}
.sx-rocket svg {
  display: block;
  width: 100%;
  height: 100%;
}
.sx-flame {
  fill: #ffc93c;
  opacity: 0;
  transform-origin: 30px 80px;
}
.sx-rocket.is-flying .sx-flame {
  opacity: 1;
  animation: sx-flame 0.15s linear infinite alternate;
}
@keyframes sx-flame {
  to {
    transform: scaleY(1.4);
  }
}
.sx-trail {
  position: absolute;
  bottom: 12px;
  inset-inline-end: 14px;
  display: flex;
  gap: 6px;
}
.sx-trail i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
.sx-trail i.is-now {
  box-shadow: inset 0 0 0 3px #fff;
}
.sx-trail i.is-done {
  background: var(--sun);
}
.sx-home {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  gap: 14px;
  animation: fade-in 0.3s ease-out;
}
.sx-home-ball {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 34%, #7bd389 0 18%, transparent 19%),
    radial-gradient(circle at 70% 62%, #7bd389 0 16%, transparent 17%),
    radial-gradient(circle at 40% 40%, #7fd0ff, #1f6fc4);
  box-shadow: 0 0 40px rgba(110, 198, 255, 0.6);
}
.sx-home-house {
  position: absolute;
  top: 26px;
  left: 50%;
  width: 34px;
  height: 30px;
  margin-left: -17px;
  background: #ff8a65;
  clip-path: polygon(50% 0, 100% 45%, 86% 45%, 86% 100%, 14% 100%, 14% 45%, 0 45%);
}

/* ============================================================ kitchen (cooking adventure) */
.kt-room {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 14px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff1dc 0 62%, #f2d7b0 62%);
  box-shadow: inset 0 0 0 6px rgba(29, 43, 83, 0.07);
}
.kt-shelves {
  flex: 1 1 60%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.kt-shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
  min-height: 110px;
  padding: 0 8px;
  border-bottom: 12px solid #b07a4a;
  border-radius: 0 0 6px 6px;
}
.kt-shelf.is-swap .kt-jar {
  animation: pop-in 0.3s ease-out;
}
.kt-jar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 84px;
  padding-bottom: 2px;
  transition: transform 0.12s, opacity 0.2s;
}
.kt-jar:active:not(:disabled) {
  transform: translateY(-5px);
}
.kt-lid {
  width: 70%;
  height: 14px;
  border-radius: 6px 6px 2px 2px;
  background: var(--lid, #e0483e);
}
.kt-glass {
  min-width: 84px;
  min-height: 84px;
  max-width: 150px;
  padding: 8px;
  display: grid;
  place-items: center;
  border-radius: 12px 12px 20px 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 4px rgba(110, 198, 255, 0.55), inset -8px 0 0 rgba(110, 198, 255, 0.18);
  color: var(--ink);
  font-size: 28px;
  overflow-wrap: anywhere;
}
.kt-jar.is-used {
  visibility: hidden;
}
.kt-jar.is-tried {
  opacity: 0.7;
  filter: saturate(0.5);
}
.kt-jar.is-dimmed {
  opacity: 0.5;
}
.kt-jar.is-hop {
  animation: kt-hop 0.55s ease-out;
}
@keyframes kt-hop {
  30% {
    transform: translateY(-34px) rotate(8deg);
  }
  60% {
    transform: translateY(0) rotate(-4deg);
  }
  80% {
    transform: translateY(-8px);
  }
}
.kt-stove {
  position: relative;
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.kt-pot {
  position: relative;
  width: 180px;
  height: 130px;
}
.kt-body {
  position: absolute;
  inset: 32px 0 0;
  border-radius: 12px 12px 60px 60px;
  background: linear-gradient(180deg, #8a94b8, #46527a);
  box-shadow: inset 0 8px 0 #c9d0e2;
}
.kt-pot.is-plop {
  animation: hop-small 0.35s ease-out;
}
.kt-count {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 2;
  transform: translateX(-50%);
  padding: 2px 14px;
  border-radius: 999px;
  background: var(--sun);
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}
.kt-bubbles,
.kt-steam {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 40px;
  z-index: 1;
}
.kt-bubbles i,
.kt-steam i {
  position: absolute;
  bottom: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffe7b0;
  opacity: 0;
}
.kt-steam i {
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.85);
}
.kt-bubbles i:nth-child(1) {
  left: 5%;
}
.kt-bubbles i:nth-child(2) {
  left: 25%;
  animation-delay: 0.2s;
}
.kt-bubbles i:nth-child(3) {
  left: 45%;
  animation-delay: 0.4s;
}
.kt-bubbles i:nth-child(4) {
  left: 65%;
  animation-delay: 0.1s;
}
.kt-bubbles i:nth-child(5) {
  left: 85%;
  animation-delay: 0.3s;
}
.kt-steam i:nth-child(1) {
  left: 15%;
  animation-delay: 0.1s;
}
.kt-steam i:nth-child(2) {
  left: 45%;
  animation-delay: 0.5s;
}
.kt-steam i:nth-child(3) {
  left: 75%;
  animation-delay: 0.3s;
}
.kt-stove.is-cooking .kt-bubbles i {
  animation: kt-bubble 0.8s ease-in infinite;
}
.kt-stove.is-cooking .kt-steam i {
  animation: kt-bubble 1.2s ease-out infinite;
}
@keyframes kt-bubble {
  0% {
    transform: translateY(24px) scale(0.4);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: translateY(-34px) scale(1.2);
    opacity: 0;
  }
}
.kt-fire {
  width: 150px;
  height: 16px;
  margin-top: 4px;
  border-radius: 8px;
  background: linear-gradient(90deg, #ff8a65, #ffc93c, #ff8a65);
}
.kt-dish {
  position: absolute;
  left: -40px;
  right: -40px;
  bottom: 160px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: pop-in 0.35s ease-out;
}
.kt-dish .esc-text {
  font-size: clamp(20px, 4vw, 28px);
}
.kt-plate {
  position: relative;
  width: 150px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 0 #c9d0e2, inset 0 0 0 6px #eef2fb;
}
.kt-plate i {
  position: absolute;
  bottom: 18px;
  left: 84px;
  width: 44px;
  height: 36px;
  border-radius: 50% 50% 40% 40%;
  background: #ff8a65;
}
.kt-plate i:nth-child(1) {
  left: 22px;
  background: #7bd389;
}
.kt-plate i:nth-child(2) {
  left: 53px;
  bottom: 22px;
  background: #ffc93c;
}

/* ============================================================ English mechanics: phones */
@media (max-width: 600px) {
  .mech-spell,
  .mech-wordsearch,
  .mech-space,
  .mech-kitchen {
    padding-bottom: 64px;
  }
  .btn-listen {
    font-size: 24px;
    padding: 8px 22px;
  }
  .rb-head {
    width: 96px;
    height: 46px;
  }
  .rb-arm {
    width: 14px;
    height: 50px;
  }
  .rb-panel {
    min-width: 140px;
    padding: 8px;
  }
  .rb-slot {
    min-width: 40px;
    height: 52px;
    font-size: 28px;
  }
  .rb-slot.is-word {
    min-width: 56px;
    font-size: 22px;
  }
  .rb-belt {
    padding: 12px 14px 24px;
  }
  .rb-tiles {
    gap: 8px;
  }
  .rb-tile {
    min-width: 60px;
    height: 64px;
    font-size: 30px;
  }
  .rb-tile.is-word {
    font-size: 22px;
  }
  .rb-wheels i {
    width: 24px;
    height: 24px;
  }
  .ws-board {
    padding: 8px;
  }
  .ws-slot {
    width: 34px;
    height: 44px;
    font-size: 24px;
  }
  .sx-planets {
    top: 52px;
    left: 4px;
    right: 4px;
    flex-wrap: wrap;
    gap: 14px 4px;
  }
  .sx-orbit {
    flex: 0 0 46%;
    justify-content: center;
  }
  .sx-orbit:nth-child(even) {
    margin-top: 0;
  }
  .sx-planet {
    width: 88px;
    height: 88px;
  }
  .sx-label {
    min-width: 60px;
    max-width: 96px;
    font-size: 24px;
    padding: 4px 6px;
  }
  .sx-home-ball {
    width: 110px;
    height: 110px;
  }
  .kt-room {
    flex-direction: column-reverse;
    padding: 10px;
    gap: 8px;
  }
  .kt-stove {
    flex: none;
  }
  .kt-pot {
    width: 140px;
    height: 100px;
  }
  .kt-body {
    inset: 24px 0 0;
  }
  .kt-dish {
    bottom: 40px;
  }
  .kt-jar,
  .kt-glass {
    min-width: 74px;
  }
  .kt-glass {
    min-height: 74px;
    font-size: 24px;
  }
  .kt-shelf {
    min-height: 96px;
    gap: 6px;
  }
}

/* ============================================================ English mechanics: roomy screens */
@media (min-width: 700px) and (min-height: 700px) {
  .rb-head {
    width: 140px;
    height: 64px;
  }
  .rb-arm {
    height: 80px;
  }
  .rb-slot {
    min-width: 62px;
    height: 76px;
    font-size: 42px;
  }
  .rb-slot.is-word {
    min-width: 86px;
    font-size: 30px;
  }
  .rb-wheels i {
    width: 36px;
    height: 36px;
  }
  .kt-jar,
  .kt-glass {
    min-width: 100px;
  }
  .kt-glass {
    min-height: 100px;
    font-size: 32px;
  }
  .kt-stove {
    justify-content: center;
  }
}

/* ============================================================ 0.6.0 QUESTION CARD (the parent's decisions, CLAUDE.md)
   One card at the top of every mechanic: ❓ tag, the prompt with 🔊, the template sentence, the 💡 hint line.
   It sits above the scene (sticky, own layer) so nothing in the game can cover it. */
:root {
  --q-edge: #5b3fd0; /* white text on it: 6.9:1 */
  --q-ink: #1d2b53; /* on white: 14:1 */
  --q-card: #ffffff;
  --q-soft: #f3efff;
}
.mech-head {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 6px 0 10px;
  flex: none;
}
.q-card {
  position: relative;
  width: min(100%, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 12px;
  border: 4px solid var(--q-edge);
  border-radius: 22px;
  background: var(--q-card);
  color: var(--q-ink);
  box-shadow: 0 6px 0 rgba(29, 43, 83, 0.2), 0 10px 22px rgba(29, 43, 83, 0.14);
}
.q-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 14px 2px 8px;
  border-radius: 999px;
  background: var(--q-edge);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.5;
}
.q-mark {
  font-size: 15px;
}
.q-card .mech-prompt,
.q-card .mech-prompt.is-listen,
.q-card .mech-prompt.has-said {
  width: 100%;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.q-card .mech-prompt > .lbl,
.q-card .listen-text > .lbl {
  flex: 0 1 auto;
  font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.4rem);
  color: var(--q-ink);
}
/* Words and sentences: ≈1.35–1.6 rem, always readable, wrapping inside the card. */
.q-card .lbl.is-big.is-long .lbl-text {
  font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2rem);
  line-height: 1.45;
  text-align: center;
}
.q-card .lbl.is-big.is-xlong .lbl-text {
  font-size: clamp(1.35rem, 1.05rem + 1.2vw, 1.6rem);
  line-height: 1.45;
  text-align: center;
}
.q-card :lang(ar) .lbl-text,
.q-card .lbl:lang(ar) .lbl-text {
  line-height: 1.75;
}
.q-card .lbl.is-big.sacred .lbl-text,
.q-card .lbl.is-big.sacred.is-long .lbl-text,
.q-card .lbl.is-big.sacred.is-xlong .lbl-text {
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 1.95rem);
  line-height: 2;
}
.q-card .btn-speak {
  flex: none;
  margin: 0;
  background: var(--q-soft);
  box-shadow: 0 3px 0 rgba(91, 63, 208, 0.35);
}
.q-card .mech-template {
  width: 100%;
  justify-content: center;
  padding: 2px 12px;
  border-radius: 14px;
  background: var(--q-soft);
  color: var(--q-ink);
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.6rem);
}
.q-card .listen-text {
  width: 100%;
  text-align: center;
}
.q-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 6px 12px;
  border-radius: 14px;
  background: #fff6d6;
  color: #3a2c00; /* on #fff6d6: 13:1 */
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.2rem);
  font-weight: 800;
  line-height: 1.45;
}
.q-tip-text {
  flex: 1;
  min-width: 0;
}
.q-tip-text:lang(ar) {
  line-height: 1.75;
}
.mech-head .mech-sub {
  font-size: clamp(15px, 0.85rem + 0.4vw, 18px);
  font-weight: 800;
  color: var(--ink-soft); /* on the paper: 7.5:1 */
  line-height: 1.3;
}

/* Attention on the QUESTION (1st miss, idle, a tap during the read-time) — never on an option. */
.q-card.is-attn {
  animation: q-attn 0.9s ease-in-out 2;
}
@keyframes q-attn {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 6px 0 rgba(29, 43, 83, 0.2), 0 10px 22px rgba(29, 43, 83, 0.14);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 6px 0 rgba(29, 43, 83, 0.2), 0 0 0 9px rgba(91, 63, 208, 0.25);
  }
}
.btn-speak.is-wiggle,
.btn-listen.is-wiggle {
  animation: q-wiggle 0.55s ease-in-out 2;
}
@keyframes q-wiggle {
  25% {
    transform: rotate(-12deg);
  }
  75% {
    transform: rotate(12deg);
  }
}

/* Read before answering: the options are visible but resting until the question has been read, then they
   come up to full colour (a soft «ready», no countdown). */
:where(.mech) > :where(:not(.mech-head)) {
  transition: opacity 0.4s ease;
}
:where(.mech[data-lock='read']) > :where(:not(.mech-head)) {
  opacity: 0.72;
}

/* Given clues are part of the question (printed, dashed), not a glow on an option. */
.rb-slot.is-preset,
.ws-slot.is-given {
  background: var(--q-soft);
  color: var(--q-ink);
  box-shadow: inset 0 0 0 3px var(--q-edge);
  outline: 2px dashed rgba(91, 63, 208, 0.45);
  outline-offset: 2px;
}

/* NARROW (4th miss on): one wrong option leaves the game in the spirit of each mechanic. */
.is-narrowed {
  pointer-events: none;
  cursor: default;
  transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
}
.is-narrowed-calm,
.leaf-slot.is-narrowed-calm {
  opacity: 0.35 !important;
  filter: saturate(0.5);
}
.door.is-boarded .door-leaf {
  filter: saturate(0.35) brightness(0.82);
}
.door.is-boarded .door-plaque {
  opacity: 0.45;
}
.door.is-boarded::after {
  content: '';
  position: absolute;
  inset: 34% -4% auto;
  height: 34%;
  z-index: 9;
  border-radius: 6px;
  background:
    linear-gradient(-9deg, transparent 0 20%, #9c6630 20% 40%, transparent 40% 60%, #85542a 60% 80%, transparent 80%);
  pointer-events: none;
}
.maze-branch.is-overgrown .maze-sign {
  opacity: 0.3;
  transform: scale(0.85);
  filter: grayscale(0.6);
}
.maze-branch.is-overgrown .branch-path {
  background: #3f8f46;
}
.piece.is-boxed {
  opacity: 0.25;
  transform: translateY(14px) scale(0.8);
}
.gate.is-closed .gate-in {
  opacity: 0.3;
  filter: grayscale(0.7);
}
.gate.is-closed {
  position: relative;
}
.gate.is-closed::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 44%;
  height: 16px;
  border-radius: 8px;
  background: repeating-linear-gradient(45deg, #e0483e 0 12px, #ffffff 12px 24px);
  box-shadow: 0 3px 0 rgba(29, 43, 83, 0.25);
}
.leaf-slot.is-fallen .leaf-card {
  opacity: 0.3;
  transform: translateY(28px) rotate(-10deg);
  transition: opacity 0.45s, transform 0.45s;
}
.hop-pad.is-gone,
.hop-line.is-bob .hop-pad.is-gone {
  animation: none;
  opacity: 0.25;
  transform: translateY(10px) scale(0.78);
  filter: saturate(0.3);
}
.weight.is-away {
  opacity: 0.25;
  transform: translateY(-12px) scale(0.75);
}
.wagon.is-depot {
  opacity: 0.25;
  transform: translateX(-26px) scale(0.85);
}
.block-tile.is-gone {
  opacity: 0.25;
  transform: translateY(12px) rotate(8deg) scale(0.85);
}
.scroll.is-gone {
  opacity: 0.25;
  transform: translateY(-14px) rotate(-10deg) scale(0.8);
}
.rs-key.is-gone {
  opacity: 0.25;
  transform: translateY(16px) rotate(20deg) scale(0.9);
}
.spine.is-shelved {
  opacity: 0.3;
  transform: translateY(6px) scale(0.9);
  filter: brightness(0.7);
}
.kt-jar.is-high {
  opacity: 0.3;
  transform: translateY(-18px) scale(0.8);
}
.sx-planet.is-gone {
  opacity: 0.18;
  transform: translate(-18px, -26px) scale(0.5);
}
.rb-tile.is-dropped {
  opacity: 0.2;
  transform: translateY(22px) scale(0.8);
}
.ws-cell.is-fog {
  opacity: 0.22;
  filter: grayscale(1);
}

@media (max-width: 600px) {
  .mech-head {
    margin: 4px 0 8px;
    gap: 4px;
  }
  .q-card {
    padding: 6px 10px 10px;
    border-width: 3px;
    border-radius: 18px;
    gap: 4px;
  }
  .q-tag {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .q-card.is-attn {
    animation: none;
    box-shadow: 0 6px 0 rgba(29, 43, 83, 0.2), 0 0 0 6px rgba(91, 63, 208, 0.25);
  }
}
