/* Луми и друзья · 0.4
   Original interface stylesheet. Generated raster artwork: assets/hero-village.webp,
   assets/animal-friends.webp. Six equal 512 × 512 atlas cells, alpha preserved. */

/* Foundation */
:root {
  color-scheme: light;
  --ink: #433650;
  --muted: #746780;
  --primary: #7655b4;
  --primary-deep: #604297;
  --lavender: #eee7f8;
  --mint: #e4f3e8;
  --mint-ink: #39674d;
  --paper: #fffefa;
  --line: #e8e1ed;
  --shadow: 0 8px 30px rgb(77 52 102 / 6%);
  --shadow-hover: 0 14px 32px rgb(77 52 102 / 12%);
  --rail-width: 220px;
  --radius: 24px;
}
* { box-sizing: border-box; }
html { min-width: 280px; min-height: 100%; background: #faf8f4; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  font-family: "Nunito", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: radial-gradient(ellipse at 96% 0%, #eee8f8 0, transparent 43%), #faf8f4;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; }
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .55; }
button, .file-label { transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
button:active:not(:disabled) { transform: translateY(1px); }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #9d78d5;
  outline-offset: 4px;
}
h1[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 800; overflow-wrap: break-word; }
h1 { margin-bottom: 16px; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.16; letter-spacing: -.035em; }
h2 { margin-bottom: 10px; font-size: 24px; line-height: 1.25; letter-spacing: -.025em; }
h3 { margin-bottom: 10px; font-size: 18px; line-height: 1.35; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
a { color: var(--primary-deep); }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
strong { font-weight: 800; }
[hidden] { display: none !important; }
.icon { display: block; flex: 0 0 auto; width: 22px; height: 22px; }
.art, .reward-art, .learning-art, .shape-art, .mood-art, .puzzle-art, .coloring-art { display: block; width: 100%; height: auto; }
.friend-sprite {
  display: inline-block;
  flex: 0 0 auto;
  width: 160px;
  aspect-ratio: 1;
  background-image: url("./assets/animal-friends.webp");
  background-repeat: no-repeat;
  background-size: 300% 200%;
  background-position: var(--friend-x, 0%) var(--friend-y, 0%);
}
.primary, .secondary, .text-button, .file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 13px 22px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}
.primary { color: #fff; background: var(--primary); box-shadow: 0 5px 0 #614396, 0 8px 18px rgb(112 77 169 / 15%); }
.primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #614396; }
.secondary, .file-label { color: var(--primary-deep); background: #f0eaf9; border: 1px solid #e4d9f1; }
.text-button { min-height: 48px; padding: 10px 12px; color: var(--primary-deep); background: transparent; }
.icon-button, .listen-button {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  color: #756185;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffefa;
  box-shadow: 0 3px 10px rgb(78 55 92 / 3%);
}
.eyebrow { margin-bottom: 10px; color: #887199; font-size: 14px; font-weight: 800; letter-spacing: .11em; line-height: 1.5; text-transform: uppercase; }
.quiet-note, .level-note, .settings-footnote { color: var(--muted); font-size: 14px; line-height: 1.6; }
.quiet-note { margin-top: 14px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin-bottom: 12px; }
.page-heading > p:last-child:not(.eyebrow) { max-width: 690px; color: var(--muted); font-size: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 32px 0 18px; }
.section-title h2 { margin-bottom: 0; }
.section-title .eyebrow { margin-bottom: 5px; }
.section-title > span, .section-title p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.section-title > .text-button { flex: 0 0 auto; }
.back-link { margin: -7px 0 16px -10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }

/* Application frame */
.app-layout { min-height: 100vh; }
.rail {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--rail-width);
  padding: 24px 16px 20px;
  background: rgb(255 254 250 / 96%);
  border-right: 1px solid #eae4ef;
}
.brand { justify-content: flex-start; gap: 5px; width: 100%; min-height: 94px; margin-bottom: 28px; text-align: left; }
.brand > .friend-sprite { width: 76px; margin-left: -9px; }
.brand > span:last-child { display: flex; flex-direction: column; margin-left: -2px; }
.brand strong { color: #6c50a0; font-size: 40px; letter-spacing: -.07em; line-height: 1; }
.brand-dot { color: #e3b653; }
.brand small { margin-top: 6px; color: #96839f; font-size: 14px; font-weight: 700; letter-spacing: .12em; }
.rail nav { display: grid; gap: 8px; }
.nav-item { justify-content: flex-start; gap: 13px; width: 100%; min-height: 54px; padding: 12px 13px; color: #81718c; border: 1px solid transparent; border-radius: 16px; text-align: left; font-size: 14px; font-weight: 750; }
.nav-item .icon { width: 21px; height: 21px; }
.nav-item.active { color: #69499f; background: #eee8f8; border-color: #e7ddf2; }
.nav-item.active .icon { color: #8666bf; }
.nav-short { display: none; }
.rail-note { display: flex; flex-direction: column; align-items: center; gap: 11px; margin: auto 6px 20px; padding-top: 36px; color: #a192ad; text-align: center; }
.rail-note .icon { width: 25px; height: 25px; color: #b5a2c8; }
.rail-note p { font-size: 14px; line-height: 1.7; }
.parent-link { justify-content: flex-start; gap: 12px; padding: 12px 13px; color: #8b7b94; font-size: 14px; font-weight: 700; }
.version { margin: 15px 0 0; color: #ad9fb6; text-align: center; font-size: 14px; }
.page-wrap { min-width: 0; margin-left: var(--rail-width); }
.topbar { display: flex; align-items: center; gap: 12px; width: min(100%, 1292px); min-height: 92px; margin: 0 auto; padding: 18px 36px; }
.top-greeting { flex: 1; min-width: 0; color: #92849c; font-size: 14px; font-weight: 600; }
.age-pill { min-height: 48px; padding: 9px 15px; color: #80708e; background: #fffefa; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; font-weight: 750; white-space: nowrap; }
.stars-pill { min-height: 48px; padding: 8px 13px; color: #98702e; background: #fff4d7; border: 1px solid #f4e5be; border-radius: 14px; font-size: 14px; }
.stars-pill .icon { width: 20px; height: 20px; fill: #e9be57; stroke: #d6a540; }
.topbar .icon-button { width: 48px; height: 48px; min-height: 48px; flex-basis: 48px; border-radius: 14px; }
.mobile-parent, .mobile-nav { display: none; }
.page-content { width: min(100%, 1292px); min-width: 0; margin: 0 auto; padding: 8px 36px 40px; }
.page-footer { display: flex; justify-content: space-between; gap: 20px; width: min(100%, 1292px); margin: 10px auto 0; padding: 0 36px 25px; color: #aa9bb1; font-size: 14px; }
.page-footer span { white-space: nowrap; }

/* Home: the village and six friends */
.village-hero { position: relative; min-height: 414px; isolation: isolate; overflow: hidden; border: 1px solid #ece9dd; border-radius: 30px; background: #e6f1dd; box-shadow: var(--shadow); }
.hero-image { position: absolute; z-index: -3; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 63% 52%; }
.village-hero::after { position: absolute; z-index: -2; inset: 0; content: ""; background: linear-gradient(90deg, rgb(255 253 243 / 98%) 0%, rgb(255 253 243 / 93%) 28%, rgb(255 253 243 / 68%) 49%, rgb(255 253 243 / 8%) 75%); }
.hero-copy { position: relative; z-index: 2; width: 63%; max-width: 650px; padding: 36px 38px 32px; }
.story-label { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px; padding: 6px 10px; color: #73845d; background: rgb(244 247 226 / 90%); border: 1px solid #e4eacd; border-radius: 8px; font-size: 14px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.story-label i { width: 6px; height: 6px; background: #9bb479; border-radius: 50%; }
.hero-copy h1 { margin-bottom: 16px; font-size: clamp(29px, 2.7vw, 39px); line-height: 1.18; letter-spacing: -.045em; }
.hero-copy h1 em { color: #8a62b2; font-style: normal; }
.hero-copy > p { max-width: 350px; margin-bottom: 24px; color: #887b86; font-size: 14px; line-height: 1.7; }
.hero-button { min-height: 52px; padding-right: 22px; padding-left: 19px; }
.hero-button .icon { width: 18px; height: 18px; fill: currentColor; stroke-width: 0; }
.hero-detail { display: block; margin-top: 17px; color: #9a8c99; font-size: 14px; }
.hero-friend { position: absolute; z-index: 1; right: 22px; bottom: 16px; width: 310px; aspect-ratio: 1; filter: drop-shadow(0 15px 8px rgb(88 81 66 / 12%)); }
.hero-friend .friend-sprite { width: 100%; }
.hero-caption { position: absolute; right: 32px; bottom: 18px; z-index: 3; padding: 9px 14px; color: #7b668d; background: rgb(255 254 248 / 93%); border-radius: 14px 14px 14px 4px; box-shadow: 0 5px 15px rgb(76 62 85 / 7%); font-size: 14px; font-weight: 700; }
.friend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.friend-card { position: relative; display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 4px; min-height: 174px; padding: 17px 15px 17px 10px; overflow: visible; border: 1px solid var(--line); border-radius: 23px; background: #fffefa; box-shadow: 0 5px 20px rgb(76 50 96 / 3%); text-align: left; }
.friend-art-wrap { position: relative; display: block; width: 118px; aspect-ratio: 1; isolation: isolate; }
.friend-art-wrap::before { position: absolute; z-index: -1; inset: 12% 4% 5%; content: ""; border-radius: 45% 48% 43% 44%; background: var(--friend-color, #ede5f8); opacity: .8; transform: rotate(-5deg); }
.friend-art-wrap .friend-sprite { width: 100%; vertical-align: top; }
.friend-info { align-self: center; display: flex; flex-direction: column; gap: 1px; min-width: 0; padding-bottom: 16px; }
.friend-info > small { color: #a393ac; font-size: 14px; }
.friend-info > strong { margin-bottom: 5px; font-size: 23px; line-height: 1.2; letter-spacing: -.035em; }
.friend-info > span { max-width: 140px; color: #91819e; font-size: 14px; line-height: 1.5; }
.round-play { position: absolute; right: 13px; bottom: 12px; display: grid; place-items: center; width: 28px; height: 28px; color: #9b83b1; background: #f4eef8; border-radius: 50%; }
.round-play .icon { width: 12px; height: 12px; margin-left: 2px; fill: currentColor; stroke: none; }
.sparkle { position: absolute; z-index: 1; width: 6px; height: 6px; background: #cdb5e5; transform: rotate(45deg); border-radius: 2px; opacity: .8; }
.sparkle.s1 { top: 22%; left: 5%; }
.sparkle.s2 { top: 9%; right: 9%; width: 4px; height: 4px; background: #e7c772; }
.home-extras { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-top: 24px; }
.mix-card, .garden-preview { display: flex; align-items: center; gap: 16px; min-width: 0; min-height: 112px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: #f5f0fa; text-align: left; }
.mix-card > div { flex: 1; min-width: 0; }
.mix-card h2 { margin-bottom: 6px; font-size: 16px; }
.mix-card p { color: #95849f; font-size: 14px; line-height: 1.6; }
.mix-card .secondary { min-height: 48px; padding: 10px 13px; font-size: 14px; background: #fffefa; white-space: nowrap; }
.feature-icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; color: #a78bc4; background: #e8dcf4; border-radius: 15px; }
.feature-icon .icon { width: 25px; height: 25px; }
.garden-preview { gap: 14px; background: #eef3e8; border-color: #e3e9da; }
.garden-preview-art { position: relative; display: block; flex: 0 0 62px; width: 62px; height: 66px; }
.garden-preview-art .art { position: absolute; width: 48px; height: 58px; }
.garden-preview-art .art:last-child { width: 33px; height: 39px; right: 0; bottom: 0; }
.garden-preview > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.garden-preview strong { color: #70835f; font-size: 15px; }
.garden-preview small { color: #91a081; font-size: 14px; }
.garden-preview > .icon { color: #a3b78e; }
.together-note { margin: 24px 0 0; padding: 15px 20px; color: #92829d; border-left: 3px solid #e0d4eb; font-size: 14px; line-height: 1.7; }

/* Worlds and activities */
.world-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.world-card { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; min-height: 278px; padding: 24px 24px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fffefa; text-align: left; box-shadow: var(--shadow); }
.world-art { display: grid; place-items: center; width: 90px; height: 90px; margin-bottom: 21px; padding: 12px; border-radius: 29px; background: var(--world-bg, #eee7f8); transform: rotate(-4deg); }
.world-art .art { width: 100%; height: 100%; transform: rotate(4deg); }
.world-card-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.world-card-copy strong { font-size: 21px; line-height: 1.25; letter-spacing: -.02em; }
.world-card-copy > small { margin-top: 7px; margin-bottom: 18px; color: #9988a4; font-size: 14px; line-height: 1.5; }
.world-card-copy > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; color: var(--world-accent, #8265a9); font-size: 14px; font-weight: 800; }
.world-card-copy > span .icon { width: 18px; height: 18px; }
.friend-welcome { display: flex; align-items: center; gap: 20px; margin: -10px 0 28px; padding: 14px 25px; border: 1px solid var(--line); border-radius: 26px; background: #fffefa; }
.friend-welcome > .friend-sprite { width: 144px; }
.friend-welcome h2 { font-size: 22px; }
.friend-welcome p { color: var(--muted); font-size: 14px; }
.soft-banner { display: flex; align-items: center; gap: 20px; margin-top: 28px; padding: 24px; background: #f0ebf8; border: 1px solid #e6dff0; border-radius: 24px; }
.soft-banner > .icon { width: 32px; height: 32px; color: #a68ac9; }
.soft-banner > div { flex: 1; min-width: 0; }
.soft-banner p { margin-top: 6px; color: #8f7e9b; font-size: 14px; }
.soft-banner > button { flex: 0 0 auto; }
.world-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 35px 40px; border: 1px solid var(--line); border-radius: 30px; background: linear-gradient(115deg, #fffefa 25%, var(--world-bg, #eee7f8)); }
.world-heading > div { flex: 1; min-width: 0; }
.world-heading .page-heading { margin-bottom: 25px; }
.world-heading > .friend-sprite { width: 245px; }
.world-heading .level-note { display: block; margin-top: 20px; }
.activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.activity-card { position: relative; display: flex; align-items: center; gap: 18px; min-height: 116px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: #fffefa; box-shadow: 0 5px 20px rgb(76 50 96 / 3%); text-align: left; }
.activity-symbol { display: grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; padding: 9px; border-radius: 21px; }
.activity-card > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; }
.activity-card strong { font-size: 16px; line-height: 1.3; }
.activity-card small { color: #9886a2; font-size: 14px; line-height: 1.5; }
.activity-card > .icon { width: 18px; height: 18px; color: #b4a0c7; }
.activity-done { position: absolute; top: -6px; right: 16px; display: grid; place-items: center; width: 24px; height: 24px; color: #5b9574; background: #e8f6eb; border: 1px solid #cbe7d3; border-radius: 50%; }
.activity-done .icon { width: 15px; height: 15px; }

/* Stories */
.mission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.mission-card { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 27px; background: #fffefa; text-align: left; box-shadow: var(--shadow); }
.mission-picture { position: relative; display: flex; justify-content: center; min-height: 212px; background: var(--friend-color, #eee7f8); }
.mission-picture > .friend-sprite { width: 215px; margin-top: 6px; }
.mission-gift { position: absolute; right: 14px; bottom: 13px; width: 68px; height: 68px; padding: 8px; border: 5px solid rgb(255 255 255 / 65%); border-radius: 24px; background: #fffefa; box-shadow: 0 4px 14px rgb(77 52 102 / 7%); transform: rotate(9deg); }
.stamp { position: absolute; top: 13px; left: 13px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; color: #4c8161; border: 1px solid #c8e3ca; border-radius: 20px; background: #f2fff0; font-size: 14px; font-weight: 800; }
.stamp .icon { width: 13px; height: 13px; }
.mission-copy { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.mission-copy > small { margin-bottom: 8px; color: #a28aaf; font-size: 14px; }
.mission-copy h2 { font-size: 21px; line-height: 1.3; }
.mission-copy > p { flex: 1; margin-bottom: 22px; color: #94829e; font-size: 14px; line-height: 1.7; }
.mission-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid #f0eaf4; }
.mission-bottom > span:last-child { display: inline-flex; align-items: center; gap: 6px; color: #8a68b4; font-size: 14px; font-weight: 800; }
.mission-bottom > span:last-child .icon { width: 16px; height: 16px; }
.mission-dots { display: inline-flex; gap: 5px; }
.mission-dots i { display: grid; place-items: center; width: 24px; height: 24px; color: #ae9cbf; border-radius: 50%; background: #f0eaf6; font-size: 14px; font-weight: 800; font-style: normal; }
.mission-dots i.done { color: #62956f; background: #e7f3e8; }
.mission-dots .icon { width: 14px; height: 14px; }
.mission-intro { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 40px; max-width: 1000px; margin: 10px auto 20px; padding: 42px; border: 1px solid var(--line); border-radius: 30px; background: #fffefa; box-shadow: var(--shadow); }
.intro-character { position: relative; width: 100%; max-width: 340px; aspect-ratio: 1; isolation: isolate; }
.intro-character::before { position: absolute; z-index: -1; inset: 13% 3% 3%; content: ""; background: var(--friend-color, #eee7f8); border-radius: 44% 48% 40% 45%; transform: rotate(-8deg); }
.intro-character > .friend-sprite { width: 100%; }
.intro-character > span:last-child:not(.friend-sprite) { position: absolute; right: -5px; bottom: 0; display: block; width: 110px; height: 110px; padding: 15px; border: 7px solid #fffefa; border-radius: 34px; background: #faf4df; box-shadow: var(--shadow); transform: rotate(8deg); }
.intro-text { color: var(--muted); font-size: 15px; line-height: 1.8; }
.story-steps { display: grid; gap: 13px; margin: 25px 0 30px; padding: 0; list-style: none; }
.story-steps li { display: flex; align-items: center; gap: 12px; color: #7c6b89; font-size: 14px; }
.story-steps li > span { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; color: #9a7abd; background: #f0eaf8; border-radius: 50%; font-size: 14px; font-weight: 800; }
.story-steps li.done > span { color: #5a8b68; background: #e4f2e7; }
.story-steps .icon { width: 18px; height: 18px; }

/* Games: frame, samples, feedback */
.game-shell { position: relative; min-height: 100vh; min-height: 100dvh; padding-bottom: max(24px, env(safe-area-inset-bottom)); overflow: hidden; isolation: isolate; background: linear-gradient(180deg, var(--world-bg, #eee7f8), #faf8f4 240px); }
.game-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 19px; width: min(100%, 1000px); min-height: 100px; margin: 0 auto; padding: 20px 24px; }
.game-progress { flex: 1; min-width: 0; }
.game-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.game-progress strong { overflow: hidden; color: #7a658a; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.game-progress > div:first-child > span { color: #95849e; font-size: 14px; white-space: nowrap; }
.progress-track { height: 10px; overflow: hidden; border: 1px solid rgb(184 164 203 / 17%); border-radius: 12px; background: rgb(255 255 255 / 65%); }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b79bd5, #8e6db9); transition: width .4s ease; }
.game-star { display: inline-flex; align-items: center; gap: 7px; min-width: 57px; color: #b48b38; font-size: 18px; }
.game-star .icon { width: 25px; height: 25px; fill: #efcf79; stroke: #d2a650; }
.game-main { position: relative; z-index: 1; width: min(100%, 950px); margin: 9px auto 0; padding: 0 24px 24px; }
.game-kicker { margin-bottom: 13px; color: #9279a6; text-align: center; font-size: 14px; font-weight: 800; letter-spacing: .035em; }
.game-kicker span { color: #b0a0b9; font-weight: 500; }
.prompt-line { display: flex; align-items: center; justify-content: center; gap: 15px; max-width: 860px; margin: 0 auto 18px; }
.prompt-line h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.25; text-align: center; letter-spacing: -.035em; }
.listen-button { color: #9b7cba; background: #fffefa; }
.story-instruction { max-width: 730px; margin: 0 auto 20px; color: #8d7e97; text-align: center; font-size: 15px; line-height: 1.7; }
.display-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 13px; margin: 21px auto; }
.display-row:empty { display: none; }
.sample { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 148px; min-height: 132px; padding: 13px; border: 1px solid #e9e1ed; border-radius: 24px; background: #fffefa; box-shadow: 0 4px 15px rgb(76 50 96 / 3%); text-align: center; }
.visual { display: flex; align-items: center; justify-content: center; min-width: 0; width: 100%; }
.visual:empty { display: none; }
.visual > .art, .visual > .shape-art, .visual > .mood-art { width: 100%; height: 100%; object-fit: contain; }
.visual > .learning-art { width: 100%; max-height: 100%; }
.visual > .friend-sprite { width: min(100%, var(--sprite-size, 130px)); height: auto; aspect-ratio: 1; }
.baby-visual > .friend-sprite { transform: scale(.72); transform-origin: center 80%; }
.sample .visual { --sprite-size: 94px; height: 94px; }
.picture-label { display: block; max-width: 100%; font-size: 22px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.sample .picture-label { font-size: 18px; }
.sample.symbol-sample { min-height: 95px; }
.sample.symbol-sample .picture-label { font-size: 42px; letter-spacing: .03em; }
.compact-display .sample { width: 118px; min-height: 112px; padding: 9px; }
.compact-display .sample .visual { --sprite-size: 78px; height: 78px; }
.compact-display .sample .picture-label { font-size: 24px; }
.object-count { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; gap: 3px; width: 100%; height: 100%; }
.object-count > span { display: block; width: 30%; max-width: 48px; aspect-ratio: 1; }
.object-count.many { gap: 1px; }
.object-count.many > span { width: 18%; max-width: 31px; }
.zero { color: #9e86b3; font-size: 65px; font-weight: 800; }
.pattern-grid { display: grid; grid-template-columns: repeat(var(--pattern-size, 3), minmax(0, 1fr)); gap: 4px; width: min(100%, 148px); aspect-ratio: 1; padding: 5px; border: 1px solid #e8dfea; border-radius: 12px; background: #f3edf6; }
.pattern-grid i { min-width: 0; aspect-ratio: 1; border-radius: 4px; }
.shadow-figure { display: block; width: 100%; height: 100%; filter: brightness(0) saturate(0); opacity: .58; }
.shadow-figure .art { width: 100%; height: 100%; }
.task-area { margin: 24px auto 30px; }
.task-tip { max-width: 700px; margin: 0 auto 20px; color: #96879f; text-align: center; font-size: 14px; }
.task-submit { display: flex; width: fit-content; min-width: 156px; margin: 25px auto 0; }
.task-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.feedback { display: flex; align-items: center; gap: 17px; max-width: 800px; min-height: 115px; margin: 26px auto 0; padding: 12px 24px 12px 10px; border: 1px solid #e5dbee; border-radius: 25px; background: #f1ebf8; }
.feedback > .friend-sprite { width: 90px; margin: -6px 0; }
.feedback > div { flex: 1; min-width: 0; }
.feedback strong { display: block; margin-bottom: 5px; color: #82639d; font-size: 16px; line-height: 1.4; }
.feedback p { color: #9b88aa; font-size: 14px; line-height: 1.6; }
.feedback > .primary { flex: 0 0 auto; min-width: 115px; }
.feedback.success { border-color: #d3e6d2; background: #edf6e9; animation: soft-arrive .35s ease-out; }
.feedback.success strong { color: #6b8e5f; }
.feedback.success p { color: #8a9d7e; }
.game-tools { display: flex; align-items: center; justify-content: space-between; gap: 15px; max-width: 790px; margin: 12px auto 0; }
.game-tools .text-button { color: #a08cae; font-size: 14px; }
.game-tools > span { color: #b0a0b9; font-size: 14px; text-align: right; }
.game-decoration { position: absolute; z-index: -1; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, var(--world-bg, #eee7f8), transparent 68%); opacity: .6; pointer-events: none; }

/* Choice */
.answer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; width: 100%; max-width: 720px; margin: 0 auto; }
.answer-grid.answers-2 { max-width: 530px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.answer-grid.answers-4 { max-width: 610px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.answer-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 176px; padding: 20px; border: 2px solid #e8e0ec; border-radius: 25px; background: #fffefa; box-shadow: 0 5px 0 #eee7f1; }
.answer-card .visual { width: 100%; max-width: 180px; height: 130px; }
.answer-card .picture-label { font-size: 30px; }
.answer-card.correct { border-color: #9bc693; background: #f1faeb; box-shadow: 0 5px 0 #d4e8c9; }
.answer-card.correct:disabled { opacity: 1; }
.answer-check { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 29px; height: 29px; color: #fff; background: #8ebc79; border-radius: 50%; }
.answer-check .icon { width: 19px; height: 19px; }
.try-again { animation: gentle-nudge .38s ease-out; }

/* Collect */
.collect-caption { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; color: #8a718f; font-size: 16px; }
.collect-caption > .art { width: 45px; height: 45px; }
.collect-caption strong { color: #9d69b5; font-size: 22px; }
.collect-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 620px; margin: 0 auto; }
.collect-piece { position: relative; aspect-ratio: 1; min-height: 48px; padding: 12px; border: 2px solid #eee4ed; border-radius: 23px; background: #fffefa; box-shadow: 0 4px 0 #efe7ef; }
.collect-piece > .art { width: 100%; height: 100%; }
.collect-piece.selected { border-color: #ae91cc; background: #f0e6fa; box-shadow: 0 4px 0 #dbcbe9; }
.collect-piece > .icon { position: absolute; top: 5px; right: 5px; width: 21px; height: 21px; padding: 3px; color: #fff; border-radius: 50%; background: #a585c4; }
.collect-piece:disabled.selected { opacity: 1; }

/* Memory */
.memory-grid { display: grid; grid-template-columns: repeat(var(--memory-cols, 4), minmax(0, 1fr)); gap: 13px; width: 100%; max-width: 600px; margin: 0 auto; }
.memory-card { position: relative; display: block; aspect-ratio: 1; min-height: 48px; overflow: hidden; border: 2px solid #d9cbe9; border-radius: 22px; background: #fffefa; box-shadow: 0 4px 0 #ddd0eb; perspective: 600px; }
.memory-cover, .memory-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 17%; transition: opacity .2s ease, transform .35s ease; backface-visibility: hidden; }
.memory-cover { color: #b49bcf; background: radial-gradient(circle at 20% 20%, rgb(255 255 255 / 40%) 0 5%, transparent 6%), linear-gradient(135deg, #ece0f7, #e6d8f2); }
.memory-cover::before { position: absolute; inset: 9px; content: ""; border: 1px dashed rgb(167 140 191 / 38%); border-radius: 14px; }
.memory-cover .icon { width: 43%; height: 43%; max-width: 52px; max-height: 52px; stroke-width: 1.4; }
.memory-face { opacity: 0; transform: rotateY(-180deg); }
.memory-face .art { width: 100%; height: 100%; }
.memory-card.open .memory-cover { opacity: 0; transform: rotateY(180deg); }
.memory-card.open .memory-face { opacity: 1; transform: rotateY(0); }
.memory-card.matched { border-color: #b0cba5; background: #f4faef; box-shadow: 0 4px 0 #dcebd4; }
.memory-card.matched:disabled { opacity: 1; }

/* Ordering */
.order-slots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 13px; max-width: 850px; margin: 0 auto 24px; }
.order-slot { position: relative; display: flex; flex-direction: column; gap: 7px; min-height: 168px; padding: 30px 12px 12px; border: 2px dashed #d7c7e6; border-radius: 23px; background: #f4edf9; }
.order-slot:disabled { opacity: 1; }
.order-slot.filled { border-style: solid; background: #fffefa; box-shadow: 0 4px 0 #e8dcf1; }
.slot-number { position: absolute; top: 8px; left: 9px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #a182b9; background: #ece3f5; font-size: 14px; font-weight: 800; }
.slot-placeholder { color: #c3afd5; font-size: 24px; letter-spacing: .16em; }
.order-slot .visual { height: 98px; }
.order-slot .picture-label { font-size: 14px; line-height: 1.35; }
.order-pieces { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; min-height: 70px; }
.order-piece { display: flex; flex-direction: column; gap: 6px; width: 160px; min-height: 145px; padding: 13px; border: 2px solid #e7deec; border-radius: 23px; background: #fffefa; box-shadow: 0 4px 0 #eee6f2; }
.order-piece .visual { height: 100px; }
.order-piece .picture-label { font-size: 14px; line-height: 1.35; }

/* Sorting */
.sort-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; min-height: 118px; margin-bottom: 26px; }
.sort-piece { display: flex; flex-direction: column; gap: 5px; width: 108px; min-height: 112px; padding: 11px; border: 2px solid #e9dfed; border-radius: 21px; background: #fffefa; box-shadow: 0 4px 0 #ece4f0; }
.sort-piece .visual { --sprite-size: 76px; height: 76px; }
.sort-piece .picture-label { font-size: 14px; }
.sort-piece.selected { border-color: #a386c4; background: #f1e8fa; box-shadow: 0 4px 0 #d7c4e8, 0 0 0 4px #f2eaf9; transform: translateY(-3px); }
.sort-buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 19px; max-width: 790px; margin: 0 auto; }
.sort-bucket { display: flex; flex-direction: column; justify-content: flex-start; gap: 15px; min-height: 204px; padding: 17px; border: 2px dashed #d8c5df; border-radius: 25px; background: #f6f0ec; box-shadow: 0 5px 0 #eae1de; }
.sort-bucket.ready { border-color: #ac89ca; background: #fff7e7; }
.bucket-label { display: flex; align-items: center; gap: 10px; width: 100%; }
.bucket-label > .visual { --sprite-size: 58px; flex: 0 0 58px; width: 58px; height: 58px; }
.bucket-label > strong { flex: 1; font-size: 14px; line-height: 1.35; text-align: left; }
.bucket-inside { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 72px; padding-top: 10px; border-top: 1px solid #e7dcd5; }
.bucket-inside > span { display: block; width: 48px; height: 48px; }
.bucket-inside .visual { --sprite-size: 48px; width: 100%; height: 100%; }
.bucket-inside .picture-label { display: none; }
.sort-bucket:disabled { opacity: 1; }
.all-sorted { align-self: center; padding: 20px; color: #7c9868; background: #edf5e8; border: 1px solid #dce9d3; border-radius: 20px; text-align: center; font-size: 15px; }

/* Find the difference */
.difference-boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 850px; margin: 0 auto; }
.difference-boards > div { padding: 16px; border: 1px solid #e3d9eb; border-radius: 25px; background: #f5eff9; }
.difference-boards > div:last-child { background: #f8f3e9; border-color: #ece2cf; }
.difference-boards > div > small { display: block; margin-bottom: 12px; color: #9b84ad; text-align: center; font-size: 14px; font-weight: 800; }
.difference-grid { display: grid; grid-template-columns: repeat(var(--diff-cols, 3), minmax(0, 1fr)); gap: 7px; }
.difference-grid > span, .difference-grid > button { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; aspect-ratio: 1; min-height: 48px; padding: 8px; border: 2px solid transparent; border-radius: 15px; background: #fffefa; }
.difference-grid .visual { height: 100%; }
.difference-grid .picture-label { font-size: 14px; }
.difference-grid.interactive > button { border-color: #eaddc8; box-shadow: 0 3px 0 #e5d8c5; }
.difference-grid > button.correct { opacity: 1; border-color: #9ebc8e; background: #edf7e5; box-shadow: 0 3px 0 #c8dcb9; }

/* Maze */
.maze-board { display: grid; grid-template-columns: repeat(var(--maze-size, 4), minmax(0, 1fr)); gap: 7px; width: min(100%, 480px); margin: 0 auto; padding: 13px; border: 1px solid #dce8d0; border-radius: 28px; background: #e5eedb; box-shadow: 0 8px 0 #d3e0c7; }
.maze-cell { position: relative; aspect-ratio: 1; min-height: 48px; overflow: visible; padding: 0; border: 2px solid transparent; border-radius: 16px; background: #faf5e8; }
.maze-cell.wall { background: #cbdcb8; border-color: #bfd1aa; }
.maze-cell.wall:disabled { opacity: 1; }
.maze-cell.wall > .art { width: 75%; height: 75%; opacity: .58; }
.maze-cell.path > i { width: 8px; height: 8px; background: #d5c9ac; border-radius: 50%; }
.maze-cell.visited { background: #f8e8c0; border-color: #e6cc8c; }
.maze-cell.visited > i { background: #cfb169; }
.maze-cell.current { background: #f4e5fc; border-color: #bba2d1; }
.maze-cell .friend-sprite { width: 110%; height: auto; position: absolute; top: -9%; left: -5%; pointer-events: none; }
.maze-cell > .icon { width: 44%; height: 44%; color: #d0a94e; fill: #f0d27a; }
.maze-cell:disabled { opacity: 1; }

/* Mosaic */
.mosaic-layout { display: grid; grid-template-columns: minmax(130px, .65fr) minmax(0, 1fr); align-items: center; gap: 30px; max-width: 700px; margin: 0 auto; }
.mosaic-reference { width: 100%; max-width: 230px; margin: 0 auto; }
.mosaic-reference > small, .mosaic-label { display: block; margin-bottom: 12px; color: #9f8bab; text-align: center; font-size: 14px; line-height: 1.5; }
.mosaic-reference > .puzzle-art { overflow: hidden; border: 7px solid #fffefa; border-radius: 22px; box-shadow: var(--shadow); }
.mosaic-board { display: grid; grid-template-columns: repeat(var(--puzzle-size, 3), minmax(0, 1fr)); gap: 5px; width: 100%; padding: 7px; border: 1px solid #d6c5e4; border-radius: 21px; background: #dfd1ed; box-shadow: 0 6px 0 #d0bde1; }
.puzzle-piece { display: block; aspect-ratio: 1; min-height: 48px; padding: 0; overflow: hidden; border: 0; border-radius: 7px; background: #fffefa; outline-offset: 1px; }
.puzzle-piece .puzzle-art { width: 100%; height: 100%; }
.puzzle-piece.selected { z-index: 1; outline: 4px solid #8e64ba; box-shadow: 0 0 0 6px #fff5c0; transform: scale(.94); }
.puzzle-piece:disabled { opacity: 1; }

/* Rhythm */
.music-card { max-width: 660px; margin: 0 auto; padding: 30px; border: 1px solid var(--line); border-radius: 28px; background: #fffefa; box-shadow: var(--shadow); text-align: center; }
.music-card > p:first-child { color: #9884a3; font-size: 14px; }
.music-card > .secondary { margin-bottom: 8px; }
.melody-progress { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 19px 0 24px; }
.melody-progress i { display: grid; place-items: center; width: 25px; height: 25px; color: #bdabcc; border: 1px solid #e5daee; border-radius: 50%; background: #f5effa; font-style: normal; font-size: 20px; }
.melody-progress i.done { color: #6c9b7d; border-color: #cce2d1; background: #eaf7ee; }
.melody-progress .icon { width: 15px; height: 15px; }
.note-pads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.note-pad { display: flex; flex-direction: column; gap: 16px; min-height: 140px; padding: 22px 8px; border: 2px solid rgb(255 255 255 / 65%); border-radius: 22px; color: #fff; box-shadow: 0 7px 0 var(--note-dark); background: var(--note-color); }
.note-pad .icon { width: 31px; height: 31px; opacity: .82; }
.note-pad > span { font-size: 16px; font-weight: 800; }
.note-0 { --note-color: #db9b9b; --note-dark: #bf7d83; }
.note-1 { --note-color: #dbba75; --note-dark: #b99c5e; }
.note-2 { --note-color: #8bb89e; --note-dark: #6f9d82; }
.note-3 { --note-color: #aa96ce; --note-dark: #8b74b1; }
.note-pad:disabled { opacity: .67; }
.note-pad.lit { opacity: 1; color: #fff; filter: brightness(1.12); transform: translateY(5px) scale(1.02); box-shadow: 0 2px 0 var(--note-dark), 0 0 0 5px #f7e6ac; }
.music-status { min-height: 22px; margin-top: 28px; color: #a38bad; font-size: 14px; }

/* Painting */
.paint-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(185px, .8fr); align-items: center; gap: 32px; max-width: 740px; margin: 0 auto; }
.paint-canvas { padding: 9px; border: 1px solid #e1d9e8; border-radius: 29px; background: #fffefa; box-shadow: var(--shadow); }
.coloring-art { width: 100%; height: auto; touch-action: manipulation; }
.coloring-art [data-action="paint"] { cursor: pointer; transition: fill .2s ease; }
.coloring-art [data-action="paint"]:focus-visible { outline: none; stroke: #7854a9; stroke-width: 6px; stroke-dasharray: 5 3; }
.paint-canvas.finished .coloring-art [data-action="paint"] { cursor: default; }
.paint-tools > p:first-child { color: #8e749f; font-size: 14px; font-weight: 800; }
.palette { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 25px; }
.paint-color { width: 100%; aspect-ratio: 1; min-height: 48px; padding: 9px; border: 4px solid #fffefa; border-radius: 50%; background: var(--paint); box-shadow: 0 0 0 1px #dfd5e6, 0 4px 0 #e5dbea; }
.paint-color.selected { box-shadow: 0 0 0 3px #aa8bc4, 0 5px 0 #c8b4da; transform: translateY(-2px); }
.paint-color .icon { width: 25px; height: 25px; color: #4f4855; stroke-width: 2.3; }
.paint-tools > .primary { width: 100%; padding-right: 15px; padding-left: 15px; }
.paint-tools .quiet-note { text-align: center; }

/* Results, rewards and gifts */
.result-hero { position: relative; max-width: 940px; margin: 0 auto; padding: 28px 36px 36px; overflow: hidden; border: 1px solid #e7e0ec; border-radius: 30px; background: radial-gradient(ellipse at 50% 6%, #f6edff, transparent 52%), #fffefa; box-shadow: var(--shadow); text-align: center; }
.result-hero > h1 { max-width: 700px; margin-right: auto; margin-left: auto; font-size: clamp(28px, 3.3vw, 40px); }
.result-hero > p:not(.eyebrow) { max-width: 570px; margin-right: auto; margin-left: auto; color: #95839e; font-size: 15px; line-height: 1.8; }
.result-friends { position: relative; width: 320px; height: 245px; max-width: 100%; margin: 0 auto 8px; }
.result-friends > .friend-sprite { position: absolute; left: 0; bottom: 0; width: 245px; }
.result-cup { position: absolute; right: -4px; bottom: 13px; width: 142px; transform: rotate(8deg); filter: drop-shadow(0 7px 3px rgb(113 86 49 / 9%)); }
.confetti { position: absolute; display: block; width: 12px; height: 18px; border-radius: 4px; animation: confetti-sway 3.6s ease-in-out infinite; }
.confetti.c1 { left: 17px; top: 25px; background: #d9a0bb; transform: rotate(-25deg); }
.confetti.c2 { right: 28px; top: 24px; width: 11px; height: 11px; border-radius: 50%; background: #b0c9a0; animation-delay: -.9s; }
.confetti.c3 { right: -12px; top: 95px; width: 9px; height: 17px; background: #ecd18b; transform: rotate(30deg); animation-delay: -1.8s; }
.earned-total { display: inline-grid; grid-template-columns: 46px auto; align-items: center; column-gap: 8px; margin: 11px auto 28px; padding: 12px 25px 12px 15px; border: 1px solid #f0dfb7; border-radius: 20px; background: #fff7df; text-align: left; }
.earned-total > .reward-art { grid-row: 1 / 3; width: 46px; }
.earned-total strong { color: #b58c35; font-size: 26px; line-height: 1.1; }
.earned-total > span { margin-top: 3px; color: #b49a66; font-size: 14px; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 15px; }
.gift-picker { margin-top: 28px; padding: 27px; border: 1px solid #eadfc4; border-radius: 27px; background: #fffaeb; }
.gift-picker h2 { font-size: 23px; }
.gift-picker > div:first-child > p:last-child { color: #a08b71; font-size: 14px; }
.gift-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 14px; margin-top: 22px; }
.gift-options > button { display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; min-height: 148px; padding: 16px 10px; border: 1px solid #eadfc9; border-radius: 21px; background: #fffefa; box-shadow: 0 4px 0 #ece0c5; }
.gift-options > button > .art { width: 75px; height: 75px; }
.gift-options strong { color: #8b775e; font-size: 14px; line-height: 1.4; }
.offscreen-play { display: flex; align-items: center; gap: 24px; max-width: 940px; margin: 26px auto 0; padding: 26px; border: 1px solid #e1e8d8; border-radius: 25px; background: #f1f5e9; }
.offscreen-play > span { flex: 0 0 84px; width: 84px; }
.offscreen-play h2 { color: #7e9066; font-size: 20px; }
.offscreen-play p { color: #98a086; font-size: 14px; line-height: 1.8; }
.album-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 34px; }
.album-summary > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; column-gap: 15px; row-gap: 3px; min-height: 124px; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: #fffefa; box-shadow: var(--shadow); }
.album-summary > div > svg { grid-row: 1 / 3; width: 70px; height: 70px; }
.album-summary strong { align-self: end; color: #82649f; font-size: 28px; line-height: 1.1; }
.album-summary > div > span { align-self: start; color: #a08cae; font-size: 14px; }
.medal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.medal-card { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 23px 14px 19px; border: 1px solid var(--line); border-radius: 24px; background: #fffefa; text-align: center; }
.medal-card > .reward-art { width: 123px; height: 123px; margin-bottom: 15px; }
.medal-card > strong { margin-bottom: 6px; font-size: 15px; }
.medal-card > small { min-height: 32px; color: #a18cad; font-size: 14px; line-height: 1.5; }
.medal-card > span { margin-top: 13px; padding: 4px 9px; color: #ad97b7; border-radius: 8px; background: #f6f0f8; font-size: 14px; font-weight: 700; }
.medal-card.earned { border-color: #e5d3ad; background: linear-gradient(180deg, #fffbeb, #fffefa 70%); box-shadow: 0 5px 20px rgb(136 103 45 / 4%); }
.medal-card.earned > span { color: #a68a4d; background: #fbf1d7; }
.cup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cup-card { padding: 25px 18px 22px; border: 1px solid var(--line); border-radius: 24px; background: #fffefa; text-align: center; }
.cup-card > .reward-art { width: 140px; height: 140px; margin: 0 auto 18px; }
.cup-card h3 { font-size: 16px; }
.cup-card p { color: #ab96b3; font-size: 14px; }
.cup-card.earned { border-color: #e9d8af; background: #fffbef; }
.cup-card.earned p { color: #b49b63; }
.waiting > strong, .waiting h3 { color: #9c8ba5; }

/* Garden */
.garden-scene { position: relative; width: 100%; aspect-ratio: 1.85; min-height: 340px; max-height: 585px; overflow: hidden; border: 1px solid #dde6ce; border-radius: 30px; background: #c6e0b2; box-shadow: var(--shadow); isolation: isolate; }
.garden-scene > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.garden-scene::after { position: absolute; z-index: -1; inset: 35% 0 0; content: ""; background: linear-gradient(transparent, rgb(237 247 211 / 20%)); pointer-events: none; }
.garden-slot { position: absolute; z-index: 3; display: grid; place-items: center; width: clamp(48px, 6vw, 82px); aspect-ratio: 1; min-height: 48px; padding: 8px; border: 2px dashed rgb(255 255 245 / 90%); border-radius: 50%; background: rgb(255 255 235 / 40%); box-shadow: 0 5px 12px rgb(80 113 53 / 9%); transform: translate(-50%, -50%); }
.garden-slot:active:not(:disabled) { transform: translate(-50%, -48%); }
.garden-slot > span { color: rgb(113 140 81 / 80%); font-size: 28px; line-height: 1; }
.garden-slot.filled { padding: 1px; border-color: transparent; background: transparent; box-shadow: none; }
.garden-slot.filled .art { width: 100%; height: 100%; filter: drop-shadow(0 6px 2px rgb(80 109 50 / 18%)); }
.garden-slot.editing { border-style: solid; border-color: #fff5c6; background: rgb(255 250 212 / 60%); box-shadow: 0 0 0 4px rgb(255 255 246 / 35%), 0 6px 15px rgb(90 102 56 / 15%); }
.party-lights, .party-picnic, .party-butterfly, .party-flowers, .party-musician, .party-sign { position: absolute; z-index: 1; pointer-events: none; }
.party-lights { top: 2%; left: 10%; width: 80%; height: auto; }
.party-picnic { left: 40%; top: 72%; width: 19%; max-width: 155px; overflow: hidden; border: 4px solid #f6edda; border-radius: 20px; transform: rotate(-6deg); box-shadow: 0 5px 9px rgb(90 90 52 / 16%); }
.party-butterfly { top: 23%; right: 26%; width: 48px; transform: rotate(-20deg); }
.party-flowers { display: flex; left: 8%; bottom: 13%; width: 15%; }
.party-flowers .art { width: 62%; margin-right: -15%; transform: rotate(-8deg); }
.party-flowers .art:last-child { transform: rotate(12deg); }
.party-musician { right: 5%; bottom: 14%; width: 20%; }
.party-musician .friend-sprite { width: 100%; }
.party-musician .icon { position: absolute; top: 18%; right: 10%; color: #8b65a7; transform: rotate(15deg); }
.party-sign { display: flex; align-items: center; gap: 5px; left: 5%; top: 34%; padding: 7px 10px; color: #927d59; background: #fff7df; border: 1px solid #e2d2ac; border-radius: 10px; font-size: 14px; font-weight: 800; transform: rotate(-7deg); }
.party-sign .icon { width: 13px; height: 13px; color: #8da672; }
.festival-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.festival-status > button { justify-content: flex-start; gap: 10px; padding: 14px; min-height: 78px; border: 1px solid var(--line); border-radius: 19px; background: #fffefa; text-align: left; }
.festival-status > button > .art { flex: 0 0 42px; width: 42px; height: 42px; }
.festival-status > button > span { flex: 1; min-width: 0; color: #96839d; font-size: 14px; font-weight: 700; line-height: 1.4; }
.festival-status > button > .icon { width: 17px; height: 17px; color: #c0accd; }
.festival-status > button.ready { background: #f0f7e9; border-color: #d9e6cc; }
.festival-status > button.ready > .icon { color: #84a16e; }
.decor-section { margin-top: 30px; }
.decor-tray { display: flex; flex-wrap: wrap; gap: 14px; }
.decor-tray > button { display: flex; flex-direction: column; gap: 10px; width: 130px; min-height: 140px; padding: 15px 12px; border: 2px solid #e5dbeb; border-radius: 23px; background: #fffefa; box-shadow: 0 4px 0 #ece4f1; }
.decor-tray > button > .art { width: 72px; height: 72px; }
.decor-tray > button > span { color: #9a84a8; font-size: 14px; font-weight: 700; line-height: 1.4; }
.decor-tray > button.selected { border-color: #b291cc; background: #f3eafa; box-shadow: 0 4px 0 #d8c5e8; }
.decor-tray .remove-decor { color: #aa96b6; font-size: 14px; }
.remove-decor > .icon { width: 35px; height: 35px; margin-bottom: 15px; color: #c7b7d2; }
.garden-help { margin: 18px 0 0; color: #a38eaf; font-size: 14px; line-height: 1.7; }

/* Parent gate, settings, recommendations and import */
dialog { position: fixed; width: min(500px, calc(100% - 32px)); max-height: min(900px, calc(100dvh - 40px)); margin: auto; padding: 34px; overflow: auto; overscroll-behavior: contain; color: var(--ink); border: 1px solid #e0d5e9; border-radius: 28px; background: #fffefa; box-shadow: 0 22px 90px rgb(53 36 70 / 22%); }
dialog::backdrop { background: rgb(57 43 73 / 34%); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
dialog[open] { animation: modal-arrive .2s ease-out; }
dialog.wide-modal { width: min(740px, calc(100% - 32px)); }
dialog h2 { padding-right: 20px; font-size: 26px; }
dialog > p { color: #9987a4; font-size: 14px; line-height: 1.7; }
.modal-close { position: absolute; top: 16px; right: 16px; }
.modal-mark { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 25px; color: #aa87cb; border-radius: 19px; background: #f0e6fa; }
.modal-mark .icon { width: 29px; height: 29px; }
.gate-digits { margin: 22px 0; padding: 17px 13px 17px 23px; color: #9871b8; border: 1px solid #e6d9f1; border-radius: 17px; background: #f4edf9; text-align: center; font-size: 33px; font-weight: 800; letter-spacing: .23em; }
.field-label { display: block; margin: 14px 0 7px; color: #8b759b; font-size: 14px; font-weight: 700; }
input:not([type="checkbox"]):not([type="range"]):not([type="file"]), textarea, select { min-width: 0; width: 100%; min-height: 49px; padding: 12px 14px; color: #75627e; border: 1px solid #dfd1e9; border-radius: 13px; background: #fff; font-size: 16px; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #b8a7c1; opacity: 1; }
textarea { min-height: 93px; margin-bottom: 12px; resize: vertical; line-height: 1.6; }
select { padding-right: 28px; cursor: pointer; }
#gate { letter-spacing: .2em; font-size: 24px; text-align: center; }
#gate-error { min-height: 19px; margin: 9px 0 15px; color: #ab7997; font-size: 14px; }
dialog > .primary:last-child { width: 100%; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.modal-head h2 { margin-bottom: 0; }
.modal-head .eyebrow { margin-bottom: 5px; }
.settings-section { padding: 24px 0; border-top: 1px solid #eee5f2; }
.settings-section h3 { color: #7a628c; font-size: 18px; }
.settings-section > p:not(.quiet-note) { color: #9b88a6; font-size: 14px; line-height: 1.7; }
.age-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.age-options > button { min-height: 48px; padding: 10px 5px; border: 1px solid #e6daee; border-radius: 13px; background: #f8f2fc; color: #a087b0; font-size: 14px; font-weight: 800; }
.age-options > button.selected { color: #fff; border-color: #9d7abc; background: #9d7abc; box-shadow: 0 3px 0 #81619e; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 65px; padding: 12px 0; color: #90799e; border-bottom: 1px solid #f2ebf5; font-size: 14px; line-height: 1.5; cursor: pointer; }
.setting-row:last-child { border-bottom: none; }
.setting-row > select { flex: 0 1 205px; width: 205px; max-width: 53%; min-height: 45px; padding: 10px 26px 10px 12px; font-size: 14px; }
input[type="checkbox"] { position: relative; display: block; appearance: none; -webkit-appearance: none; flex: 0 0 48px; width: 48px; height: 28px; margin: 0; border: 1px solid #d7c8e2; border-radius: 999px; background: #e2d7e9; cursor: pointer; transition: background .2s ease; }
input[type="checkbox"]::before { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; content: ""; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgb(75 44 96 / 12%); transition: transform .2s ease; }
input[type="checkbox"]:checked { border-color: #a07abe; background: #a07abe; }
input[type="checkbox"]:checked::before { transform: translateX(20px); }
input[type="range"] { width: 170px; max-width: 49%; min-height: 48px; margin: 0; accent-color: #a282bf; cursor: pointer; }
details { margin: 16px 0 0; border: 1px solid #e9dfef; border-radius: 17px; background: #faf6fd; }
summary { position: relative; display: flex; align-items: center; min-height: 57px; padding: 15px 42px 15px 17px; color: #9a7baa; border-radius: 17px; font-size: 14px; font-weight: 750; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { position: absolute; top: 22px; right: 21px; width: 8px; height: 8px; content: ""; border-right: 2px solid #bda5cc; border-bottom: 2px solid #bda5cc; transform: rotate(45deg); transition: transform .2s ease; }
details[open] summary::after { transform: rotate(225deg); top: 26px; }
.world-levels { display: grid; gap: 0; padding: 0 17px 12px; }
.world-levels > label { display: grid; grid-template-columns: minmax(0, 1fr) 160px; align-items: center; gap: 12px; min-height: 62px; padding: 8px 0; border-top: 1px solid #eee4f4; color: #9c85ab; font-size: 14px; }
.world-levels select { min-height: 44px; padding: 9px 24px 9px 10px; font-size: 14px; }
.settings-section .quiet-note { color: #ac9ab6; font-size: 14px; }
.settings-section > select { margin-bottom: 3px; }
.backup-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.backup-actions > .secondary { padding: 12px 14px; font-size: 14px; }
.file-label { position: relative; overflow: hidden; cursor: pointer; }
.file-label input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.file-label:focus-within { outline: 3px solid #9d78d5; outline-offset: 4px; }
.settings-footnote { margin: 10px 0 0; padding-top: 20px; border-top: 1px solid #eee5f2; color: #b09bb9; font-size: 14px; }
.query-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.query-chips > span { padding: 5px 9px; color: #9c79b2; border: 1px solid #e5d7ee; border-radius: 9px; background: #f3eaf9; font-size: 14px; font-weight: 700; }
.query-list { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; counter-reset: recommendations; }
.query-list li { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 62px; padding: 13px 15px 13px 52px; border: 1px solid #e7deee; border-radius: 15px; background: #fff; counter-increment: recommendations; }
.query-list li::before { position: absolute; top: 16px; left: 14px; display: grid; place-items: center; width: 25px; height: 25px; content: counter(recommendations); color: #ab8ac2; border-radius: 50%; background: #f4ecfa; font-size: 14px; font-weight: 800; }
.query-list strong { color: #9a7eaa; font-size: 14px; }
.query-list small { color: #af9bbb; font-size: 14px; }
.query-note { margin: 17px 0 0; padding: 15px; color: #a68e76; border: 1px solid #ede0ca; border-radius: 14px; background: #fcf6e9; font-size: 14px; }
.import-card { margin-top: 18px; padding: 18px; color: #947e67; border: 1px solid #eadbc1; border-radius: 17px; background: #fff8e8; }
.import-card > strong { font-size: 14px; }
.import-card p { margin: 9px 0 15px; color: #a38d77; font-size: 14px; line-height: 1.7; }
.import-card button { margin: 0 6px 7px 0; font-size: 14px; }
#import-preview { margin-top: 13px; color: #a47d91; font-size: 14px; line-height: 1.6; }
.toast { position: fixed; z-index: 100; left: calc(50% + 110px); bottom: 24px; width: max-content; max-width: min(520px, calc(100% - 32px)); padding: 15px 22px; color: #fffefa; border: 1px solid rgb(255 255 255 / 20%); border-radius: 17px; background: #79638d; box-shadow: 0 10px 30px rgb(54 35 70 / 18%); transform: translateX(-50%); font-size: 14px; text-align: center; animation: toast-arrive .2s ease-out; }
.boot { display: grid; place-content: center; min-height: 100vh; padding: 30px; color: #ac97b9; text-align: center; }
.boot-mark { color: #9472b6; font-size: 60px; font-weight: 800; letter-spacing: -.07em; }
.boot p { font-size: 14px; }
noscript { display: block; padding: 20px; color: #80668e; text-align: center; }

/* Hover never gates touch interaction. */
@media (hover: hover) and (pointer: fine) {
  .primary:hover:not(:disabled) { background: #8562bf; }
  .secondary:hover:not(:disabled), .file-label:hover { background: #e9dff6; border-color: #d7c6e8; }
  .text-button:hover:not(:disabled) { color: #7850a8; background: #f1eaf7; }
  .icon-button:hover:not(:disabled), .listen-button:hover { color: #8a65b1; background: #f5eefb; border-color: #d9c8e8; }
  .nav-item:hover { background: #f7f2fb; color: #9777b3; }
  .nav-item.active:hover { background: #ebe1f6; }
  .friend-card:hover, .world-card:hover, .activity-card:hover, .mission-card:hover { transform: translateY(-3px); border-color: #d4c0e4; box-shadow: var(--shadow-hover); }
  .friend-card:hover .friend-sprite { animation: friendly-tilt .5s ease-out; }
  .garden-preview:hover { background: #e7efdd; border-color: #d5e3c6; }
  .answer-card:hover:not(:disabled), .order-piece:hover:not(:disabled), .collect-piece:hover:not(:disabled), .sort-piece:hover:not(:disabled) { transform: translateY(-3px); border-color: #c2a6d7; }
  .sort-bucket.ready:hover:not(:disabled) { border-color: #a784c4; background: #fff2ce; }
  .memory-card:hover:not(:disabled) { border-color: #b495ce; transform: translateY(-2px); }
  .difference-grid.interactive > button:hover:not(:disabled) { border-color: #c2a3d6; background: #f6edf9; }
  .maze-cell.path:hover:not(:disabled) { border-color: #d5ba72; background: #fff3ce; }
  .garden-slot:hover { transform: translate(-50%, -50%) scale(1.08); border-color: #fff4c4; }
  .gift-options > button:hover, .decor-tray > button:hover { border-color: #c9aedc; transform: translateY(-3px); }
  .coloring-art [data-action="paint"]:hover { stroke: #c3a4d5; stroke-width: 4.5px; }
}

/* Tablet */
@media (max-width: 1180px) {
  .page-content { padding-right: 25px; padding-left: 25px; }
  .topbar { padding-right: 25px; padding-left: 25px; gap: 10px; }
  .page-footer { padding-right: 25px; padding-left: 25px; }
  .hero-copy { width: 65%; padding: 30px 28px; }
  .hero-copy h1 { font-size: 31px; }
  .hero-copy > p { max-width: 310px; font-size: 14px; }
  .hero-friend { right: -3px; bottom: 28px; width: 272px; }
  .hero-caption { right: 18px; font-size: 14px; }
  .friend-grid { gap: 13px; }
  .friend-card { grid-template-columns: 96px minmax(0, 1fr); min-height: 164px; padding: 14px 10px 14px 5px; }
  .friend-art-wrap { width: 96px; }
  .friend-info > strong { font-size: 21px; }
  .friend-info > span { font-size: 14px; }
  .home-extras { grid-template-columns: 1fr; gap: 14px; }
  .mix-card, .garden-preview { min-height: 102px; }
  .world-grid { gap: 16px; }
  .world-card { min-height: 270px; padding: 20px; }
  .world-card-copy strong { font-size: 19px; }
  .mission-grid { gap: 16px; }
  .mission-picture { min-height: 188px; }
  .mission-picture > .friend-sprite { width: 188px; }
  .mission-copy { padding: 18px; }
  .mission-copy h2 { font-size: 19px; }
  .mission-bottom { gap: 8px; }
  .mission-dots { gap: 3px; }
  .mission-dots i { width: 20px; height: 20px; }
  .mission-intro { gap: 25px; padding: 30px; }
  .album-summary > div { grid-template-columns: 55px minmax(0, 1fr); gap: 10px; padding: 17px; }
  .album-summary > div > svg { width: 55px; height: 55px; }
  .medal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1020px) and (min-width: 901px) {
  .top-greeting { font-size: 14px; max-width: 230px; }
  .friend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .friend-card { grid-template-columns: 118px minmax(0, 1fr); padding-left: 10px; }
  .friend-art-wrap { width: 118px; }
  .friend-info > span { font-size: 14px; }
  .world-grid, .mission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-card { gap: 12px; padding: 16px; }
  .activity-symbol { flex-basis: 50px; width: 50px; height: 50px; }
  .activity-card strong { font-size: 14px; }
  .activity-card small { font-size: 14px; }
  .festival-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .rail { display: none; }
  .page-wrap { margin-left: 0; padding-bottom: 82px; }
  .topbar { min-height: 82px; }
  .topbar .age-pill, .topbar .stars-pill { min-height: 48px; }
  .topbar .icon-button { width: 48px; height: 48px; min-height: 48px; flex-basis: 48px; }
  .mobile-parent { display: inline-flex; }
  .mobile-nav { position: fixed; z-index: 30; inset: auto 0 0; display: block; padding: 5px 12px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid #e9e0f0; background: rgb(255 254 250 / 97%); box-shadow: 0 -5px 22px rgb(87 55 113 / 4%); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .mobile-nav nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; max-width: 650px; margin: 0 auto; }
  .mobile-nav .nav-item { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 61px; padding: 7px 3px; border-radius: 14px; font-size: 14px; text-align: center; line-height: 1.2; }
  .mobile-nav .nav-item .icon { width: 23px; height: 23px; }
  .mobile-nav .nav-item > span { max-width: 100%; }
  .mobile-nav .nav-long { display: none; }
  .mobile-nav .nav-short { display: inline; }
  .hero-copy { width: 64%; }
  .hero-friend { width: 285px; right: 8px; }
  .friend-card { grid-template-columns: 110px minmax(0, 1fr); padding-left: 8px; }
  .friend-art-wrap { width: 110px; }
  .world-heading { padding: 30px; }
  .world-heading > .friend-sprite { width: 220px; }
  .toast { left: 50%; bottom: calc(87px + env(safe-area-inset-bottom)); }
}
@media (max-width: 740px) {
  .friend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .friend-card { grid-template-columns: 115px minmax(0, 1fr); min-height: 164px; }
  .friend-art-wrap { width: 115px; }
  .friend-info > span { font-size: 14px; }
  .world-grid, .mission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-card { min-height: 260px; }
  .mission-picture { min-height: 214px; }
  .mission-picture > .friend-sprite { width: 212px; }
  .mission-copy { padding: 21px; }
  .activity-grid { grid-template-columns: 1fr; }
  .mission-intro { grid-template-columns: .8fr 1.2fr; gap: 25px; padding: 25px; }
  .mission-intro h1 { font-size: 28px; }
  .intro-text { font-size: 14px; }
  .story-steps li { font-size: 14px; }
  .intro-character > span:last-child:not(.friend-sprite) { width: 85px; height: 85px; padding: 10px; }
  .album-summary { gap: 12px; }
  .album-summary > div { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 19px 12px; text-align: center; }
  .album-summary strong, .album-summary > div > span { align-self: auto; }
  .album-summary > div > svg { width: 65px; height: 65px; }
  .album-summary strong { font-size: 26px; }
  .album-summary > div > span { font-size: 14px; }
  .festival-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .difference-boards { gap: 13px; }
  .difference-boards > div { padding: 12px; }
  .difference-grid { gap: 5px; }
  .difference-grid > span, .difference-grid > button { padding: 5px; border-radius: 13px; }
  .paint-layout { gap: 24px; }
  .palette { gap: 7px; }
  .paint-tools > .primary { font-size: 14px; }
}

/* Phones: 320–600 px */
@media (max-width: 600px) {
  html { scroll-padding-bottom: 85px; }
  h1 { font-size: 29px; }
  h2 { font-size: 22px; }
  .topbar { justify-content: flex-end; gap: 8px; min-height: 77px; padding: 13px 18px; }
  .top-greeting { display: none; }
  .age-pill { margin-right: auto; padding: 10px 12px; font-size: 14px; }
  .stars-pill { padding: 9px 12px; font-size: 14px; }
  .topbar .icon-button { border-radius: 15px; }
  .page-content { padding: 5px 18px 28px; }
  .page-footer { flex-direction: column; align-items: center; gap: 5px; margin-top: 0; padding: 0 18px 18px; font-size: 14px; }
  .page-wrap { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .mobile-nav { padding-right: 8px; padding-left: 8px; }
  .mobile-nav nav { gap: 2px; }
  .mobile-nav .nav-item { font-size: 14px; }
  .page-heading { margin-bottom: 23px; }
  .page-heading .eyebrow { font-size: 14px; }
  .page-heading > p:last-child:not(.eyebrow) { font-size: 14px; line-height: 1.7; }
  .section-title { gap: 10px; margin: 28px 0 16px; }
  .section-title h2 { font-size: 21px; }
  .section-title .eyebrow { font-size: 14px; }
  .section-title .text-button { gap: 5px; padding: 8px 0 8px 8px; font-size: 14px; }
  .section-title .text-button .icon { width: 17px; height: 17px; }
  .section-title > span { max-width: 135px; font-size: 14px; text-align: right; }
  .section-title p { font-size: 14px; }
  .village-hero { min-height: 0; border-radius: 26px; }
  .hero-image { object-position: 55% 0%; }
  .village-hero::after { background: linear-gradient(180deg, rgb(255 253 243 / 5%) 0%, rgb(255 253 243 / 8%) 21%, rgb(255 253 243 / 92%) 43%, #fffdf3 69%); }
  .hero-copy { width: 100%; max-width: none; padding: 184px 23px 26px; }
  .story-label { position: absolute; top: 21px; left: 20px; max-width: 175px; margin: 0; padding: 7px 9px; background: rgb(255 253 241 / 95%); font-size: 14px; line-height: 1.5; }
  .story-label i { flex: 0 0 5px; width: 5px; height: 5px; }
  .hero-copy h1 { margin-bottom: 14px; font-size: clamp(28px, 6.6vw, 34px); }
  .hero-copy > p { max-width: none; margin-bottom: 22px; color: #97858e; font-size: 14px; line-height: 1.7; }
  .hero-button { min-height: 52px; width: 100%; padding: 13px 14px; font-size: 14px; }
  .hero-detail { margin-top: 15px; text-align: center; font-size: 14px; }
  .hero-friend { top: 1px; right: 2px; bottom: auto; width: 190px; }
  .hero-caption { display: none; }
  .friend-grid { gap: 12px; }
  .friend-card { display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; min-height: 242px; padding: 12px 10px 18px; border-radius: 23px; text-align: center; }
  .friend-art-wrap { width: 133px; max-width: 100%; }
  .friend-info { align-items: center; gap: 2px; padding-bottom: 12px; }
  .friend-info > small { font-size: 14px; }
  .friend-info > strong { margin-bottom: 5px; font-size: 23px; }
  .friend-info > span { max-width: 160px; font-size: 14px; line-height: 1.5; }
  .round-play { right: 9px; bottom: 9px; width: 23px; height: 23px; }
  .round-play .icon { width: 10px; height: 10px; }
  .home-extras { margin-top: 20px; }
  .mix-card { flex-wrap: wrap; gap: 12px; padding: 18px; }
  .mix-card .feature-icon { flex-basis: 40px; width: 40px; height: 40px; }
  .mix-card > div { flex-basis: calc(100% - 54px); }
  .mix-card h2 { font-size: 16px; }
  .mix-card p { font-size: 14px; }
  .mix-card > .secondary { width: 100%; min-height: 48px; margin-top: 3px; font-size: 14px; }
  .garden-preview { min-height: 112px; padding: 17px; }
  .garden-preview strong { font-size: 14px; }
  .garden-preview small { font-size: 14px; line-height: 1.6; }
  .together-note { margin-top: 19px; padding: 12px 15px; font-size: 14px; }
  .world-grid { gap: 12px; }
  .world-card { min-height: 250px; padding: 17px 14px; border-radius: 22px; }
  .world-art { width: 75px; height: 75px; margin-bottom: 17px; padding: 10px; border-radius: 24px; }
  .world-card-copy strong { font-size: 18px; line-height: 1.3; }
  .world-card-copy > small { margin-bottom: 16px; font-size: 14px; line-height: 1.6; }
  .world-card-copy > span { gap: 5px; font-size: 14px; }
  .world-card-copy > span .icon { width: 16px; height: 16px; }
  .friend-welcome { gap: 11px; padding: 12px 16px 12px 7px; }
  .friend-welcome > .friend-sprite { width: 115px; }
  .friend-welcome h2 { font-size: 19px; }
  .friend-welcome p { font-size: 14px; }
  .soft-banner { flex-wrap: wrap; gap: 15px; padding: 20px; }
  .soft-banner > .icon { width: 28px; height: 28px; }
  .soft-banner > div { flex-basis: calc(100% - 50px); }
  .soft-banner p { font-size: 14px; }
  .soft-banner > button { width: 100%; font-size: 14px; }
  .world-heading { position: relative; align-items: flex-start; min-height: 316px; padding: 25px; overflow: hidden; border-radius: 26px; }
  .world-heading > div { position: relative; z-index: 1; }
  .world-heading .page-heading { width: 100%; max-width: 72%; margin-bottom: 26px; }
  .world-heading .page-heading h1 { font-size: 28px; }
  .world-heading .page-heading > p:last-child { font-size: 14px; }
  .world-heading .eyebrow { font-size: 14px; }
  .world-heading > .friend-sprite { position: absolute; top: 49px; right: -12px; width: 160px; opacity: .95; }
  .world-heading .primary { margin-top: 20px; font-size: 14px; }
  .world-heading .level-note { max-width: 230px; margin-top: 17px; font-size: 14px; }
  .activity-card { min-height: 108px; gap: 14px; padding: 16px; border-radius: 22px; }
  .activity-symbol { flex-basis: 58px; width: 58px; height: 58px; }
  .activity-card strong { font-size: 15px; }
  .activity-card small { font-size: 14px; }
  .mission-grid { grid-template-columns: 1fr; gap: 20px; }
  .mission-picture { min-height: 224px; }
  .mission-picture > .friend-sprite { width: 226px; }
  .mission-gift { right: 28px; bottom: 19px; width: 78px; height: 78px; }
  .mission-copy { padding: 24px; }
  .mission-copy h2 { font-size: 24px; }
  .mission-copy > p { font-size: 14px; }
  .mission-bottom > span:last-child { font-size: 14px; }
  .mission-dots i { width: 27px; height: 27px; font-size: 14px; }
  .mission-dots { gap: 6px; }
  .mission-intro { grid-template-columns: 1fr; gap: 19px; margin-top: 0; padding: 22px; border-radius: 27px; }
  .intro-character { max-width: 220px; margin: 0 auto; }
  .intro-character > span:last-child:not(.friend-sprite) { width: 85px; height: 85px; right: -12px; }
  .mission-intro h1 { font-size: 29px; }
  .intro-text { font-size: 14px; }
  .story-steps { margin: 23px 0 28px; }
  .story-steps li { font-size: 14px; }
  .mission-intro .primary { width: 100%; font-size: 14px; }
  .mission-intro .quiet-note { text-align: center; font-size: 14px; }
  .game-top { gap: 11px; min-height: 88px; padding: 16px; }
  .game-progress > div:first-child { gap: 6px; margin-bottom: 7px; }
  .game-progress strong { font-size: 14px; }
  .game-progress > div:first-child > span { font-size: 14px; }
  .progress-track { height: 8px; }
  .game-star { min-width: 0; gap: 4px; font-size: 15px; }
  .game-star .icon { width: 21px; height: 21px; }
  .game-main { margin-top: 10px; padding: 0 16px 18px; }
  .game-kicker { margin-bottom: 12px; font-size: 14px; }
  .game-kicker span { white-space: nowrap; }
  .prompt-line { align-items: center; gap: 10px; margin-bottom: 16px; }
  .prompt-line h1 { font-size: 25px; text-align: left; line-height: 1.28; }
  .prompt-line .listen-button { margin-left: auto; }
  .story-instruction { font-size: 14px; text-align: left; line-height: 1.7; }
  .display-row { gap: 9px; margin: 20px auto; }
  .sample { width: 120px; min-height: 114px; padding: 10px; border-radius: 21px; }
  .sample .visual { --sprite-size: 80px; height: 80px; }
  .sample .picture-label { font-size: 17px; }
  .sample.symbol-sample { min-height: 80px; }
  .sample.symbol-sample .picture-label { font-size: 36px; }
  .compact-display .sample { width: 77px; min-height: 84px; padding: 7px; border-radius: 17px; }
  .compact-display .sample .visual { --sprite-size: 55px; height: 55px; }
  .compact-display .sample .picture-label { font-size: 22px; }
  .task-area { margin-top: 22px; margin-bottom: 26px; }
  .task-tip { margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
  .answer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .answer-grid.answers-3 > .answer-card:last-child { grid-column: 1 / -1; width: calc(50% - 6.5px); margin: 0 auto; }
  .answer-card { min-height: 157px; gap: 8px; padding: 16px 12px; border-radius: 23px; }
  .answer-card .visual { --sprite-size: 109px; height: 109px; }
  .answer-card .picture-label { font-size: 26px; }
  .answer-check { width: 24px; height: 24px; top: 7px; right: 7px; }
  .answer-check .icon { width: 17px; height: 17px; }
  .pattern-grid { max-width: 115px; gap: 3px; padding: 4px; }
  .feedback { flex-wrap: wrap; gap: 5px 11px; min-height: 105px; margin-top: 25px; padding: 12px 17px 14px 8px; border-radius: 23px; }
  .feedback > .friend-sprite { width: 70px; margin: 0; }
  .feedback > div { flex-basis: calc(100% - 85px); }
  .feedback strong { font-size: 14px; line-height: 1.4; }
  .feedback p { font-size: 14px; line-height: 1.65; }
  .feedback > .primary { flex-basis: calc(100% - 10px); margin: 10px 0 4px 9px; font-size: 14px; }
  .game-tools { gap: 8px; margin-top: 10px; }
  .game-tools .text-button { gap: 6px; padding: 10px 4px; font-size: 14px; }
  .game-tools .text-button .icon { width: 19px; height: 19px; }
  .game-tools > span { max-width: 150px; font-size: 14px; }
  .collect-caption { gap: 9px; margin-bottom: 18px; font-size: 14px; }
  .collect-caption > .art { width: 38px; height: 38px; }
  .collect-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 370px; }
  .collect-piece { padding: 9px; border-radius: 19px; }
  .collect-piece > .icon { top: 3px; right: 3px; width: 18px; height: 18px; }
  .memory-grid { gap: 10px; max-width: 460px; }
  .memory-card { border-radius: 18px; }
  .memory-cover::before { inset: 7px; border-radius: 10px; }
  .memory-cover, .memory-face { padding: 13%; }
  .order-slots { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .order-slot { min-height: 157px; padding: 29px 11px 11px; border-radius: 21px; }
  .order-slot .visual { height: 91px; }
  .order-slot .picture-label { font-size: 14px; }
  .order-pieces { gap: 11px; }
  .order-piece { width: calc(50% - 6px); max-width: 180px; min-height: 139px; padding: 11px; border-radius: 21px; }
  .order-piece .visual { height: 95px; }
  .order-piece .picture-label { font-size: 14px; }
  .sort-items { gap: 9px; }
  .sort-piece { width: calc(33.333% - 6px); max-width: 108px; min-height: 106px; padding: 10px; border-radius: 18px; }
  .sort-piece .visual { --sprite-size: 69px; height: 69px; }
  .sort-piece .picture-label { font-size: 14px; }
  .sort-buckets { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 12px; }
  .sort-bucket { min-height: 190px; gap: 10px; padding: 12px; border-radius: 22px; }
  .bucket-label { flex-direction: column; gap: 6px; }
  .bucket-label > .visual { --sprite-size: 48px; flex-basis: 48px; width: 48px; height: 48px; }
  .bucket-label > strong { font-size: 14px; text-align: center; }
  .bucket-inside { gap: 4px; min-height: 57px; padding-top: 8px; }
  .bucket-inside > span { width: 38px; height: 38px; }
  .difference-boards { grid-template-columns: 1fr; gap: 17px; width: min(100%, 390px); }
  .difference-boards > div { padding: 15px; border-radius: 24px; }
  .difference-boards > div > small { margin-bottom: 10px; font-size: 14px; }
  .difference-grid { gap: 6px; }
  .difference-grid > span, .difference-grid > button { padding: 8px; border-radius: 15px; }
  .maze-board { gap: 5px; width: min(100%, 390px); padding: 9px; border-radius: 24px; }
  .maze-cell { border-radius: 13px; }
  .maze-cell.path > i { width: 6px; height: 6px; }
  .task-actions { gap: 8px; }
  .task-actions .secondary, .task-actions .text-button { padding: 11px 14px; font-size: 14px; }
  .mosaic-layout { grid-template-columns: 1fr; gap: 20px; max-width: 390px; }
  .mosaic-reference { width: 132px; }
  .mosaic-reference > small { margin-bottom: 7px; font-size: 14px; }
  .mosaic-reference > .puzzle-art { border-width: 5px; border-radius: 18px; }
  .mosaic-label { max-width: 300px; margin: 0 auto 12px; font-size: 14px; }
  .mosaic-board { gap: 5px; padding: 6px; border-radius: 19px; }
  .music-card { padding: 22px 16px 19px; border-radius: 25px; }
  .music-card > p:first-child { font-size: 14px; line-height: 1.7; }
  .music-card > .secondary { width: 100%; padding: 12px 11px; font-size: 14px; }
  .melody-progress { gap: 7px; margin: 18px 0 22px; }
  .melody-progress i { width: 23px; height: 23px; }
  .note-pads { gap: 9px; }
  .note-pad { min-height: 116px; gap: 17px; padding: 17px 4px; border-radius: 17px; }
  .note-pad .icon { width: 26px; height: 26px; }
  .note-pad > span { font-size: 14px; }
  .music-status { margin-top: 24px; font-size: 14px; }
  .paint-layout { grid-template-columns: 1fr; gap: 23px; max-width: 420px; }
  .paint-canvas { max-width: 380px; width: 100%; margin: 0 auto; padding: 7px; border-radius: 25px; }
  .paint-tools { max-width: 380px; width: 100%; margin: 0 auto; }
  .paint-tools > p:first-child { margin-bottom: 14px; text-align: center; }
  .palette { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; max-width: 280px; margin: 0 auto 24px; }
  .paint-color { min-height: 52px; }
  .paint-tools > .primary { width: 100%; font-size: 14px; }
  .paint-tools .quiet-note { font-size: 14px; }
  .result-hero { padding: 25px 22px 29px; border-radius: 27px; }
  .result-friends { width: 270px; height: 220px; }
  .result-friends > .friend-sprite { width: 220px; left: -5px; }
  .result-cup { width: 124px; right: -4px; bottom: 8px; }
  .confetti.c3 { right: 5px; top: 85px; }
  .result-hero > h1 { font-size: 28px; }
  .result-hero > p:not(.eyebrow) { font-size: 14px; line-height: 1.7; }
  .result-hero > .eyebrow { font-size: 14px; }
  .earned-total { margin: 8px auto 23px; }
  .result-actions { gap: 13px; }
  .result-actions > button { width: 100%; font-size: 14px; }
  .result-actions > .text-button { min-height: 48px; }
  .gift-picker { padding: 23px 18px; border-radius: 25px; }
  .gift-picker h2 { font-size: 23px; }
  .gift-picker > div:first-child > p:last-child { font-size: 14px; }
  .gift-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 19px; }
  .gift-options > button { min-height: 143px; padding: 15px 10px; border-radius: 20px; }
  .gift-options > button > .art { width: 70px; height: 70px; }
  .offscreen-play { align-items: flex-start; gap: 15px; padding: 22px 18px; }
  .offscreen-play > span { flex-basis: 55px; width: 55px; }
  .offscreen-play h2 { font-size: 19px; }
  .offscreen-play p { font-size: 14px; }
  .album-summary { gap: 9px; margin-bottom: 28px; }
  .album-summary > div { gap: 6px; min-height: 145px; padding: 15px 7px; border-radius: 21px; }
  .album-summary > div > svg { width: 57px; height: 57px; }
  .album-summary strong { font-size: 25px; }
  .album-summary > div > span { font-size: 14px; line-height: 1.5; }
  .medal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .medal-card { padding: 18px 10px; border-radius: 22px; }
  .medal-card > .reward-art { width: 105px; height: 105px; margin-bottom: 12px; }
  .medal-card > strong { font-size: 14px; line-height: 1.35; }
  .medal-card > small { font-size: 14px; line-height: 1.6; }
  .medal-card > span { margin-top: 11px; font-size: 14px; }
  .cup-grid { grid-template-columns: 1fr; gap: 15px; }
  .cup-card { padding: 23px; border-radius: 24px; }
  .cup-card > .reward-art { width: 130px; height: 130px; }
  .cup-card h3 { font-size: 19px; }
  .cup-card p { font-size: 14px; }
  .garden-scene { aspect-ratio: auto; min-height: 325px; height: 325px; border-radius: 25px; }
  .garden-scene > img { object-position: 50% 55%; }
  .garden-slot { width: 48px; height: 48px; padding: 5px; }
  .garden-slot > span { font-size: 24px; }
  .party-lights { top: 4%; left: 0; width: 100%; }
  .party-picnic { width: 25%; left: 39%; top: 80%; border-width: 3px; border-radius: 13px; }
  .party-butterfly { top: 21%; right: 15%; width: 34px; }
  .party-flowers { left: 2%; bottom: 9%; width: 22%; }
  .party-musician { right: 1%; bottom: 15%; width: 28%; }
  .party-sign { top: 32%; left: 4%; padding: 5px 7px; font-size: 14px; }
  .party-sign .icon { width: 10px; height: 10px; }
  .festival-status { gap: 10px; margin-top: 14px; }
  .festival-status > button { gap: 7px; min-height: 78px; padding: 11px; border-radius: 18px; }
  .festival-status > button > .art { flex-basis: 34px; width: 34px; height: 34px; }
  .festival-status > button > span { font-size: 14px; }
  .festival-status > button > .icon { width: 14px; height: 14px; }
  .decor-tray { gap: 11px; }
  .decor-tray > button { width: calc(50% - 5.5px); max-width: 170px; min-height: 142px; border-radius: 22px; }
  .garden-help { font-size: 14px; }
  dialog { width: calc(100% - 24px); max-height: calc(100dvh - 28px); padding: 28px 22px; border-radius: 25px; }
  dialog.wide-modal { width: calc(100% - 24px); }
  dialog h2 { padding-right: 18px; font-size: 24px; }
  dialog > p { font-size: 14px; }
  .modal-close { top: 13px; right: 13px; }
  .modal-head { gap: 12px; }
  .modal-head h2 { font-size: 25px; }
  .modal-head .eyebrow { font-size: 14px; }
  .modal-mark { margin-bottom: 22px; }
  .gate-digits { font-size: 30px; }
  .settings-section { padding: 22px 0; }
  .settings-section h3 { font-size: 17px; }
  .settings-section > p:not(.quiet-note) { font-size: 14px; }
  .age-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .age-options > button { font-size: 14px; }
  .setting-row { gap: 12px; font-size: 14px; }
  .setting-row > select { flex-basis: 145px; width: 145px; max-width: 54%; font-size: 14px; }
  .world-levels { padding: 0 12px 10px; }
  .world-levels > label { grid-template-columns: minmax(0, 1fr) 123px; gap: 9px; font-size: 14px; }
  .world-levels select { font-size: 14px; }
  summary { padding-left: 14px; font-size: 14px; }
  .backup-actions { grid-template-columns: 1fr; gap: 11px; }
  .backup-actions > .secondary { min-height: 50px; font-size: 14px; }
  .settings-footnote { font-size: 14px; }
  .settings-section .quiet-note { font-size: 14px; }
  .toast { max-width: calc(100% - 28px); padding: 14px 18px; font-size: 14px; line-height: 1.6; }
}
@media (max-width: 380px) {
  .topbar { gap: 7px; padding-right: 14px; padding-left: 14px; }
  .age-pill { padding: 10px; font-size: 14px; }
  .stars-pill { padding: 9px 10px; gap: 6px; }
  .stars-pill .icon { width: 18px; height: 18px; }
  .page-content { padding-right: 14px; padding-left: 14px; }
  .hero-copy { padding: 172px 20px 24px; }
  .hero-copy h1 { font-size: 27px; }
  .hero-copy > p { font-size: 14px; }
  .hero-friend { width: 178px; right: -3px; }
  .story-label { left: 16px; top: 19px; max-width: 137px; font-size: 14px; }
  .hero-button { font-size: 14px; }
  .hero-detail { font-size: 14px; }
  .section-title h2 { font-size: 19px; }
  .section-title .text-button { font-size: 14px; }
  .section-title .text-button .icon { display: none; }
  .friend-grid { gap: 10px; }
  .friend-card { min-height: 225px; padding: 11px 9px 16px; }
  .friend-art-wrap { width: 116px; }
  .friend-info > strong { font-size: 22px; }
  .friend-info > span { font-size: 14px; }
  .world-grid { gap: 10px; }
  .world-card { min-height: 245px; padding: 16px 12px; }
  .world-art { width: 67px; height: 67px; border-radius: 22px; }
  .world-card-copy strong { font-size: 16px; }
  .world-card-copy > small { font-size: 14px; }
  .world-card-copy > span { font-size: 14px; }
  .world-heading { min-height: 326px; padding: 22px; }
  .world-heading > .friend-sprite { top: 72px; right: -17px; width: 145px; }
  .world-heading .page-heading { max-width: 74%; }
  .world-heading .page-heading h1 { font-size: 25px; }
  .game-top { gap: 8px; padding-right: 14px; padding-left: 14px; }
  .game-progress strong { font-size: 14px; }
  .game-progress > div:first-child > span { font-size: 14px; }
  .game-star { font-size: 14px; gap: 3px; }
  .game-star .icon { width: 18px; height: 18px; }
  .game-main { padding-right: 14px; padding-left: 14px; }
  .prompt-line h1 { font-size: 23px; }
  .game-kicker { font-size: 14px; }
  .answer-card { min-height: 147px; padding: 13px 10px; }
  .answer-card .visual { --sprite-size: 99px; height: 99px; }
  .answer-card .picture-label { font-size: 24px; }
  .sample { width: 112px; }
  .compact-display .sample { width: 65px; min-height: 76px; padding: 6px; }
  .compact-display .sample .visual { --sprite-size: 49px; height: 49px; }
  .compact-display .sample .picture-label { font-size: 20px; }
  .display-row.compact-display { gap: 6px; }
  .memory-grid { gap: 8px; }
  .memory-card { border-radius: 15px; }
  .memory-cover::before { inset: 5px; border-radius: 8px; }
  .sort-buckets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sort-bucket { padding: 10px; }
  .difference-boards > div { padding: 12px; }
  .difference-grid { gap: 5px; }
  .difference-grid > span, .difference-grid > button { padding: 6px; border-radius: 12px; }
  .maze-board { gap: 4px; padding: 8px; border-radius: 21px; }
  .maze-cell { border-radius: 11px; }
  .music-card { padding-right: 13px; padding-left: 13px; }
  .note-pads { gap: 7px; }
  .note-pad { min-height: 110px; border-radius: 15px; }
  .note-pad > span { font-size: 14px; }
  .feedback { gap: 5px 9px; padding-right: 14px; }
  .feedback > .friend-sprite { width: 61px; }
  .feedback > div { flex-basis: calc(100% - 73px); }
  .feedback strong { font-size: 14px; }
  .feedback p { font-size: 14px; }
  .game-tools .text-button { font-size: 14px; }
  .game-tools > span { max-width: 135px; font-size: 14px; }
  .result-hero { padding-right: 17px; padding-left: 17px; }
  .result-friends { width: 245px; height: 210px; }
  .result-friends > .friend-sprite { width: 209px; }
  .result-cup { width: 113px; right: -2px; }
  .result-hero > h1 { font-size: 26px; }
  .album-summary > div { padding-right: 5px; padding-left: 5px; }
  .album-summary strong { font-size: 23px; }
  .album-summary > div > span { font-size: 14px; }
  .medal-card > .reward-art { width: 98px; height: 98px; }
  .festival-status > button { gap: 6px; padding: 10px; }
  .festival-status > button > .art { flex-basis: 29px; width: 29px; height: 29px; }
  .festival-status > button > span { font-size: 14px; }
  .festival-status > button > .icon { width: 12px; height: 12px; }
  dialog { padding: 26px 18px; }
  .world-levels > label { grid-template-columns: minmax(0, 1fr) 108px; font-size: 14px; }
  .world-levels select { padding-left: 7px; font-size: 14px; }
}

/* Motion is small, optional, and never needed to understand a task. */
@keyframes soft-arrive { from { opacity: .65; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-arrive { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-arrive { from { opacity: 0; translate: 0 7px; } to { opacity: 1; translate: 0 0; } }
@keyframes gentle-nudge { 0%, 100% { translate: 0 0; } 30% { translate: -4px 0; } 65% { translate: 4px 0; } }
@keyframes friendly-tilt { 0%, 100% { rotate: 0deg; } 35% { rotate: -4deg; } 70% { rotate: 3deg; } }
@keyframes confetti-sway { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Reading comfort at every viewport. 16px prose, 14px labels, 12–13px metadata. */
.primary, .secondary, .text-button, .file-label,
.hero-button, .mix-card .secondary, .soft-banner > button,
.mission-intro .primary, .feedback > .primary, .task-actions .secondary,
.task-actions .text-button, .music-card > .secondary, .paint-tools > .primary,
.result-actions > button, .backup-actions > .secondary, .import-card button {
  font-size: 16px;
}
.hero-copy > p, .page-heading > p:last-child:not(.eyebrow),
.mix-card p, .friend-welcome p, .soft-banner p, .intro-text,
.story-instruction, .task-tip, .feedback p, .music-card > p:first-child,
.result-hero > p:not(.eyebrow), .offscreen-play p,
.gift-picker > div:first-child > p:last-child,
dialog > p, .settings-section > p:not(.quiet-note), .import-card p,
.query-note, .story-steps li, .collect-caption {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.friend-info > small, .friend-info > span, .world-card-copy > small,
.world-card-copy > span, .activity-card small, .mission-copy > small,
.mission-copy > p, .mission-bottom > span:last-child,
.garden-preview small, .garden-help, .festival-status > button > span,
.decor-tray > button > span, .decor-tray .remove-decor,
.gift-options strong, .medal-card > small, .cup-card p,
.order-slot .picture-label, .order-piece .picture-label,
.sort-piece .picture-label, .bucket-label > strong,
.mosaic-reference > small, .mosaic-label, .music-status,
.query-list strong, .query-list small, .field-label,
.world-levels > label, .setting-row, summary {
  color: #7b6b86;
  font-size: 14px;
  line-height: 1.5;
}
.feedback strong { font-size: 17px; color: #76548f; }
.feedback.success strong { color: #527145; }
.feedback.success p { color: #607152; }
.game-kicker, .game-progress strong, .game-progress > div:first-child > span,
.game-tools .text-button, .difference-boards > div > small,
.bucket-inside .picture-label, .album-summary > div > span,
.setting-row > select, .world-levels select, .age-options > button {
  font-size: 14px;
}
.game-kicker, .game-kicker span { color: #826c92; }
.game-tools .text-button, .music-status { color: #7b658d; }
.hero-caption { color: #6e5682; font-size: 14px; }
.story-label { color: #63764f; font-size: 12px; letter-spacing: .015em; }
.hero-detail, .eyebrow, .section-title .eyebrow, .page-heading .eyebrow,
.world-heading .eyebrow, .result-hero > .eyebrow, .modal-head .eyebrow,
.top-greeting, .brand small, .version, .page-footer,
.quiet-note, .level-note, .settings-footnote, .settings-section .quiet-note,
.mission-intro .quiet-note, .world-heading .level-note,
.game-tools > span, .together-note, .earned-total > span,
.medal-card > span, .query-chips > span, .stamp,
.slot-number, .mission-dots i, .query-list li::before {
  font-size: 12px;
  line-height: 1.6;
}
.hero-detail, .top-greeting, .version, .page-footer,
.quiet-note, .settings-footnote, .settings-section .quiet-note,
.together-note, .game-tools > span { color: #87758f; }
.section-title .text-button { font-size: 14px; }
.section-title > span, .section-title p { font-size: 13px; }
.world-card { min-height: 292px; }
.world-card-copy > small { margin-bottom: 20px; }
.friend-info > small { font-size: 13px; }
.friend-card { min-height: 185px; }
.friend-info > span { max-width: none; }
.friend-info { padding-bottom: 23px; }
.friend-info > strong { margin-bottom: 7px; }
.mission-copy > p { font-size: 16px; line-height: 1.65; }
.mission-bottom { flex-wrap: wrap; }
.mission-dots i { width: 25px; height: 25px; }
.garden-preview strong, .mix-card h2 { font-size: 18px; }
.album-summary > div > span { font-size: 13px; line-height: 1.5; }
.medal-card > strong { font-size: 16px; }
.medal-card > small { min-height: 42px; }
.gift-options strong { font-size: 14px; }
.festival-status > button > span { font-size: 14px; }
.decor-tray > button > span { font-size: 14px; }
.party-sign { font-size: 12px; line-height: 1.3; }
.settings-section h3 { font-size: 20px; }
.settings-footnote { color: #87758f; }
.query-list strong { font-size: 16px; }
.query-list small { font-size: 14px; }
.query-note { font-size: 14px; }
.import-card > strong { font-size: 16px; }
#gate-error, #import-preview { font-size: 14px; }
.toast { font-size: 15px; }

@media (max-width: 1180px) {
  .hero-copy > p { max-width: 350px; }
  .friend-card { grid-template-columns: 96px minmax(0, 1fr); }
  .mission-copy { padding: 21px; }
}
@media (max-width: 1020px) and (min-width: 901px) {
  .friend-card { grid-template-columns: 118px minmax(0, 1fr); }
  .top-greeting { font-size: 12px; }
}
@media (max-width: 900px) {
  .mobile-nav .nav-item { min-height: 65px; font-size: 12px; }
  .friend-card { grid-template-columns: 105px minmax(0, 1fr); }
  .friend-art-wrap { width: 105px; }
}
@media (max-width: 740px) {
  .friend-card { grid-template-columns: 115px minmax(0, 1fr); }
  .friend-art-wrap { width: 115px; }
  .album-summary > div > span { font-size: 13px; }
}
@media (max-width: 600px) {
  .age-pill { flex: 1 1 auto; max-width: 166px; margin-right: auto; font-size: 14px; line-height: 1.3; white-space: normal; }
  .stars-pill { flex: 0 0 auto; font-size: 14px; }
  .mobile-nav .nav-item { font-size: 12px; }
  .hero-copy { padding-top: 170px; }
  .hero-copy > p { max-width: none; font-size: 16px; line-height: 1.65; }
  .hero-friend { width: 180px; }
  .story-label { max-width: 170px; font-size: 12px; text-transform: none; }
  .hero-detail { font-size: 12px; }
  .friend-card { min-height: 280px; padding-bottom: 19px; }
  .friend-art-wrap { width: 133px; }
  .friend-info > small { font-size: 13px; }
  .friend-info > span { font-size: 14px; }
  .friend-info { padding-bottom: 20px; }
  .round-play { width: 26px; height: 26px; }
  .round-play .icon { width: 12px; height: 12px; }
  .section-title { align-items: flex-start; }
  .section-title .text-button { max-width: 110px; min-height: 48px; padding-top: 8px; font-size: 14px; line-height: 1.35; }
  .section-title .text-button .icon { display: none; }
  .section-title > span { font-size: 12px; }
  .world-card { min-height: 295px; }
  .world-card-copy > small, .world-card-copy > span { font-size: 14px; }
  .world-card-copy > span { flex-wrap: wrap; line-height: 1.4; }
  .world-heading { min-height: 360px; }
  .world-heading .page-heading { max-width: 73%; }
  .world-heading .page-heading > p:last-child { font-size: 16px; }
  .world-heading > .friend-sprite { top: 65px; width: 145px; }
  .world-heading .primary { margin-top: 5px; font-size: 16px; }
  .world-heading .level-note { max-width: none; font-size: 12px; }
  .activity-card strong { font-size: 17px; }
  .activity-card small { font-size: 14px; }
  .activity-card { align-items: flex-start; }
  .activity-card > .icon { align-self: center; }
  .mission-copy > small { font-size: 14px; }
  .mission-copy > p { font-size: 16px; }
  .mission-bottom > span:last-child { font-size: 14px; }
  .mission-dots i { width: 27px; height: 27px; font-size: 12px; }
  .game-top { gap: 8px; }
  .game-progress strong { font-size: 14px; }
  .game-progress > div:first-child > span { font-size: 12px; }
  .game-kicker { font-size: 13px; line-height: 1.55; }
  .feedback > .friend-sprite { width: 65px; }
  .feedback > div { flex-basis: calc(100% - 79px); }
  .feedback strong { font-size: 17px; }
  .feedback p { font-size: 16px; line-height: 1.6; }
  .game-tools .text-button { font-size: 14px; }
  .game-tools > span { max-width: 150px; font-size: 12px; }
  .task-tip, .story-instruction { font-size: 16px; }
  .order-slot { min-height: 170px; }
  .order-slot .picture-label, .order-piece .picture-label { font-size: 14px; }
  .order-piece { min-height: 152px; }
  .sort-piece { min-height: 115px; }
  .sort-piece .picture-label, .bucket-label > strong { font-size: 14px; }
  .sort-bucket { min-height: 212px; }
  .difference-boards > div > small { font-size: 14px; }
  .mosaic-reference { width: 150px; }
  .mosaic-reference > small, .mosaic-label { font-size: 14px; }
  .mosaic-label { max-width: 340px; }
  .music-card > p:first-child { font-size: 16px; }
  .note-pad > span { font-size: 14px; }
  .music-status { font-size: 14px; }
  .paint-tools .quiet-note { font-size: 12px; }
  .result-hero > p:not(.eyebrow) { font-size: 16px; }
  .gift-picker > div:first-child > p:last-child { font-size: 16px; }
  .gift-options > button { min-height: 159px; }
  .gift-options strong { font-size: 14px; }
  .offscreen-play { flex-direction: column; gap: 11px; }
  .offscreen-play > span { flex-basis: auto; width: 58px; }
  .offscreen-play p { font-size: 16px; }
  .album-summary > div > span { font-size: 12px; }
  .album-summary > div { min-height: 160px; }
  .medal-card > strong { font-size: 16px; }
  .medal-card > small { min-height: 55px; font-size: 13px; }
  .medal-card > span { font-size: 12px; }
  .cup-card p { font-size: 14px; }
  .festival-status > button { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; min-height: 102px; padding: 12px; }
  .festival-status > button > .art { width: 36px; height: 36px; }
  .festival-status > button > span { font-size: 14px; }
  .festival-status > button > .icon { grid-column: 2; justify-self: end; width: 17px; height: 17px; }
  .party-sign { max-width: 145px; padding: 6px 8px; font-size: 12px; }
  .decor-tray > button > span, .decor-tray .remove-decor { font-size: 14px; }
  .garden-help { font-size: 14px; }
  .settings-section > p:not(.quiet-note), dialog > p { font-size: 16px; }
  .settings-section h3 { font-size: 20px; }
  .setting-row { font-size: 14px; }
  .setting-row > select { font-size: 14px; }
  .world-levels > label { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 13px 0; font-size: 14px; }
  .world-levels select { width: 100%; min-height: 48px; font-size: 16px; }
  summary { font-size: 14px; }
  .age-options > button { font-size: 14px; }
  .settings-footnote, .settings-section .quiet-note { font-size: 12px; }
  .import-card p { font-size: 16px; }
  .toast { font-size: 15px; }
}
@media (max-width: 380px) {
  .age-pill { padding-right: 7px; padding-left: 7px; font-size: 14px; }
  .stars-pill { padding-right: 9px; padding-left: 9px; }
  .hero-copy { padding-top: 166px; }
  .hero-friend { width: 176px; }
  .story-label { max-width: 138px; font-size: 12px; }
  .friend-art-wrap { width: 116px; }
  .friend-card { min-height: 277px; }
  .world-card { min-height: 300px; }
  .world-card-copy strong { font-size: 18px; }
  .world-heading { min-height: 383px; }
  .world-heading > .friend-sprite { width: 132px; top: 88px; }
  .game-top { gap: 7px; }
  .game-progress strong { font-size: 13px; }
  .game-progress > div:first-child > span { font-size: 12px; }
  .game-tools { align-items: flex-start; }
  .game-tools .text-button { font-size: 14px; }
  .game-tools > span { max-width: 132px; padding-top: 10px; font-size: 12px; }
  .feedback > .friend-sprite { width: 56px; }
  .feedback > div { flex-basis: calc(100% - 68px); }
  .note-pad > span { font-size: 14px; }
  .album-summary { gap: 7px; }
  .album-summary > div { padding-right: 6px; padding-left: 6px; }
  .album-summary > div > span { font-size: 12px; }
  .festival-status > button { grid-template-columns: 1fr; justify-items: center; gap: 7px; min-height: 139px; padding: 12px; text-align: center; }
  .festival-status > button > .icon { grid-column: auto; justify-self: center; }
  .world-levels > label { grid-template-columns: minmax(0, 1fr); font-size: 14px; }
  .world-levels select { font-size: 16px; }
}


/* Focus follows the painted region instead of a browser rectangle. */
.coloring-art [role="button"]:focus { outline:none; }
.coloring-art [role="button"]:focus-visible { stroke:#7655b4; stroke-width:6; filter:drop-shadow(0 0 2px #fff); }

@media (max-width: 380px) {
  .setting-row { flex-wrap:wrap; gap:12px; }
  .setting-row select, .setting-row input[type="range"] { width:100%; max-width:none; flex-basis:100%; }
  .setting-row input[type="checkbox"] { margin-left:auto; flex-shrink:0; }
}

/* Pastel keys retain readable note names. */
.note-pad { color:#463951; }

/* Постоянная ненавязчивая ссылка для родителей, видна во всех игровых разделах. */
body { padding-top: 52px; }
.rail { top: 52px; }
.lumi-support-banner {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  min-height: 52px; padding: 7px 20px;
  display: flex; align-items: center; justify-content: center; gap: 11px;
  background: linear-gradient(105deg, #f3e9ff 0%, #fff8f3 55%, #f4f0ff 100%);
  border-bottom: 1px solid #dfd3ef;
  box-shadow: 0 3px 14px rgb(63 40 89 / 8%);
}
.lumi-support-for-parents {
  color: #7c678d; font-size: 12px; font-weight: 800;
  letter-spacing: .02em; white-space: nowrap;
}
.lumi-support-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 37px; padding: 5px 14px;
  border: 1px solid #d9c6f0; border-radius: 999px;
  background: #fff; color: #67418f;
  font-size: 14px; font-weight: 850; line-height: 1.3;
  text-align: center; text-decoration: none;
  box-shadow: 0 2px 8px rgb(86 51 121 / 6%);
  transition: background-color .18s, border-color .18s, transform .18s;
  -webkit-tap-highlight-color: transparent;
}
.lumi-support-link:focus-visible { outline: 3px solid #b084dd; outline-offset: 2px; }
@media (hover:hover) { .lumi-support-link:hover { background: #f9f4ff; border-color: #aa88d0; transform: translateY(-1px); } }
.lumi-support-heart { color: #df6f91; font-size: 19px; line-height: 1; }
.lumi-support-arrow { color: #9074ae; font-size: 18px; line-height: 1; }
@media (max-width: 600px) {
  body { padding-top: 60px; }
  .lumi-support-banner { min-height: 60px; padding: 6px 8px; gap: 4px; flex-direction: column; }
  .lumi-support-for-parents { font-size: 10px; line-height: 1; }
  .lumi-support-link { min-height: 37px; max-width: calc(100vw - 16px); padding: 5px 9px; gap: 5px; font-size: clamp(10px, 3vw, 13px); }
  .lumi-support-heart, .lumi-support-arrow { font-size: 16px; }
}
@media (prefers-reduced-motion:reduce) { .lumi-support-link { transition: none; } }
