:root {
  color-scheme: light;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  --ink: #284e50;
  --muted: #6a7f7e;
  --paper: #fffdf8;
  --line: #d9d4bd;
  --green: #579477;
  --teal: #4d8e92;
  --gold: #e5ad49;
  --coral: #d8786b;
  --purple: #8a72a8;
  --shadow: 0 20px 46px rgba(50, 75, 73, .14);
}

* { box-sizing: border-box; }
.animal-portrait { display: block; width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 7px 7px rgba(49, 73, 65, .15)); }
html { min-width: 320px; min-height: 100%; background: #f1f8f5; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 7%, rgba(229, 173, 73, .22) 0 150px, transparent 152px),
    radial-gradient(circle at 96% 92%, rgba(77, 142, 146, .15) 0 190px, transparent 192px),
    linear-gradient(145deg, #eff8f4, #fffaf0 58%, #f3eef8);
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .12;
  background-image: radial-gradient(#527976 1px, transparent 1px);
  background-size: 27px 27px;
  content: "";
}
button { color: inherit; font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:focus-visible { outline: 4px solid rgba(229, 173, 73, .78); outline-offset: 4px; }
h1, h2, p { margin-top: 0; }

.app {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 48px;
}
.topbar,
.brand,
.top-actions,
.section-heading,
.game-heading,
.scene-label,
.answers-heading,
.feedback,
.result-actions {
  display: flex;
  align-items: center;
}
.topbar { min-height: 66px; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.brand { gap: 12px; min-width: 0; padding: 0; text-align: left; background: none; border: 0; }
.brand-mark {
  position: relative;
  display: grid;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  place-items: center;
  color: #fff;
  font: 900 31px/1 Georgia, serif;
  background: var(--teal);
  border: 5px solid #d9eeee;
  border-radius: 20px 20px 20px 7px;
  box-shadow: 0 7px 16px rgba(67, 87, 78, .13);
  transform: rotate(-3deg);
}
.brand-mark i,
.brand-mark b { position: absolute; font-style: normal; }
.brand-mark i { left: 12px; top: 10px; }
.brand-mark b { right: 10px; bottom: 5px; }
.brand strong,
.brand small { display: block; }
.brand strong { font-size: 24px; font-weight: 900; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.top-actions { gap: 10px; }
.quiet-badge,
.back-button {
  min-height: 49px;
  flex-shrink: 0;
  font-weight: 900;
  background: rgba(255, 253, 248, .94);
  border: 2px solid var(--line);
  border-radius: 17px;
}
.quiet-badge { display: inline-flex; align-items: center; gap: 7px; padding: 0 16px; color: var(--muted); font-size: 13px; }
.quiet-badge > span { color: var(--coral); font-size: 20px; }
.back-button { width: 49px; min-width: 49px; padding: 0; font-size: 22px; }
.top-spark { display: grid; width: 46px; height: 46px; place-items: center; color: var(--gold); font-size: 25px; }
.eyebrow {
  margin: 0 0 8px;
  color: #39765f;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.primary-button,
.secondary-button,
.next-button,
.hint-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 21px;
  font-weight: 900;
  border-radius: 17px;
}
.primary-button,
.next-button { color: #fff; background: var(--teal); border: 0; box-shadow: 0 7px 0 #346d70; }
.secondary-button,
.hint-button { background: #fff8dd; border: 2px solid #e4c66d; }

.hero {
  display: grid;
  min-height: 500px;
  align-items: center;
  grid-template-columns: 1fr 1fr;
  gap: clamp(34px, 5vw, 62px);
  padding: clamp(38px, 5.5vw, 68px);
  overflow: hidden;
  background: rgba(255, 253, 248, .97);
  border: 3px solid var(--line);
  border-radius: 46px;
  box-shadow: var(--shadow);
}
.hero h1 { margin-bottom: 18px; font-size: clamp(47px, 5.8vw, 69px); font-weight: 900; letter-spacing: -.05em; line-height: .98; }
.hero-copy > p:not(.eyebrow) { margin-bottom: 27px; color: var(--muted); font-size: 18px; font-weight: 800; line-height: 1.52; }
.hero-board {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: linear-gradient(150deg, #e0f2ee, #fff0bc);
  border: 8px solid #fff;
  border-radius: 38px;
  box-shadow: 0 20px 38px rgba(57, 75, 70, .18);
}
.hero-label {
  position: absolute;
  top: 20px;
  left: 22px;
  z-index: 4;
  padding: 8px 12px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--teal);
  border-radius: 999px;
}
.hero-animal { position: absolute; bottom: -6px; width: 49%; }
.hero-animal svg,
.animal svg,
.level-preview svg,
.result-animal svg { display: block; width: 100%; height: auto; }
.hero-speaker { left: -5px; }
.hero-listener { right: -7px; transform: scaleX(-1); }
.hero-bubble {
  position: absolute;
  top: 71px;
  left: 50%;
  z-index: 3;
  width: 210px;
  padding: 16px 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  background: #fff;
  border: 3px solid #d8d1b7;
  border-radius: 22px 22px 22px 6px;
  box-shadow: 0 8px 18px rgba(54, 78, 72, .13);
  transform: translateX(-50%) rotate(-2deg);
}
.hero-options {
  position: absolute;
  top: 147px;
  left: 50%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateX(-50%);
}
.hero-options i { min-width: 118px; padding: 7px 11px; text-align: center; font-size: 10px; font-style: normal; font-weight: 900; background: #fff; border: 2px solid #dbd5c1; border-radius: 999px; }
.hero-options i:first-child { color: #fff; background: var(--green); border-color: var(--green); }
.hero-options i:last-child { min-width: 37px; align-self: center; color: #fff; background: var(--coral); border-color: var(--coral); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-facts > span { display: flex; min-height: 47px; align-items: center; gap: 6px; padding: 8px 12px; color: var(--muted); background: #f1f3ec; border-radius: 15px; }
.hero-facts strong { color: var(--ink); font-size: 19px; }
.hero-facts small { font-size: 11px; font-weight: 900; }

.how-section,
.levels-section { margin-top: 48px; }
.section-heading { justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: clamp(32px, 4vw, 45px); font-weight: 900; }
.section-heading > p { max-width: 460px; margin: 0; color: var(--muted); font-size: 14px; font-weight: 800; line-height: 1.45; text-align: right; }
.steps-grid,
.levels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps-grid > article {
  display: grid;
  min-height: 132px;
  align-items: center;
  grid-template-columns: 62px 1fr;
  gap: 15px;
  padding: 21px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 25px;
}
.steps-grid > article > b {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  color: #fff;
  font: 900 27px/1 Georgia, serif;
  background: var(--teal);
  border: 5px solid #d9eeee;
  border-radius: 20px 20px 20px 7px;
}
.steps-grid > article:nth-child(2) > b { background: var(--gold); border-color: #fff0be; }
.steps-grid > article:nth-child(3) > b { background: var(--purple); border-color: #e8def6; }
.steps-grid strong,
.steps-grid small { display: block; }
.steps-grid strong { margin-bottom: 7px; font-size: 18px; }
.steps-grid small { color: var(--muted); font-size: 13px; font-weight: 800; line-height: 1.4; }

.level-card {
  min-width: 0;
  min-height: 370px;
  padding: 24px;
  overflow: hidden;
  text-align: left;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 29px;
  box-shadow: 0 8px 0 #d8d0b7;
  transition: transform .18s ease, border-color .18s ease;
}
.level-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.level-top,
.level-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.level-top > b { color: var(--accent); font: 900 38px/1 Georgia, serif; }
.level-top > small { color: var(--gold); font-size: 12px; font-weight: 900; }
.level-preview {
  position: relative;
  display: grid;
  height: 116px;
  align-items: center;
  grid-template-columns: 100px 25px 1fr;
  margin: 17px 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 12%, white);
  border-radius: 20px;
}
.level-preview > span { align-self: end; width: 106px; }
.level-preview > i { color: var(--accent); font: 900 31px/1 Georgia, serif; }
.level-preview > strong { max-height: 75px; padding-right: 10px; overflow: hidden; font-size: 11px; line-height: 1.35; }
.level-copy,
.level-copy > small,
.level-copy > strong,
.level-copy > span { display: block; }
.level-copy > small { color: var(--accent); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.level-copy > strong { margin: 6px 0; font-size: 22px; line-height: 1.1; }
.level-copy > span { min-height: 58px; color: var(--muted); font-size: 13px; font-weight: 800; line-height: 1.4; }
.level-footer { margin-top: 17px; font-size: 11px; font-weight: 900; }
.level-footer > b { color: var(--accent); }
.parent-note {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 17px 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  background: rgba(255, 253, 248, .85);
  border: 2px dashed var(--line);
  border-radius: 22px;
}
.parent-note > span { font-size: 25px; }
.parent-note p { margin: 0; }

.game-shell,
.result-card {
  padding: clamp(22px, 4vw, 45px);
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 42px;
  box-shadow: var(--shadow);
}
.game-heading { justify-content: space-between; gap: 20px; }
.game-heading h1 { margin-bottom: 7px; font-size: clamp(35px, 4.6vw, 52px); font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.game-heading p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); font-weight: 900; }
.round-badge {
  display: grid;
  min-width: 82px;
  height: 82px;
  place-items: center;
  align-content: center;
  color: #fff;
  font-family: Georgia, serif;
  background: var(--accent);
  border: 6px solid color-mix(in srgb, var(--accent) 25%, white);
  border-radius: 23px 23px 23px 8px;
}
.round-badge strong { font-size: 29px; line-height: 1; }
.round-badge small { margin-top: 4px; font-size: 10px; }
.progress-track { height: 12px; margin: 23px 0; overflow: hidden; background: #ece9df; border-radius: 999px; }
.progress-track span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .25s ease; }
.dialogue-layout { display: grid; align-items: stretch; grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); gap: 17px; }
.scene-card,
.answers-card { min-width: 0; padding: 21px; border: 2px solid var(--line); border-radius: 29px; }
.scene-card { background: #eff7f4; }
.answers-card { background: #fffcf5; }
.scene-label { gap: 11px; min-height: 62px; padding: 10px 13px; background: #fff; border-radius: 18px; }
.scene-label > span { display: grid; min-width: 40px; height: 40px; place-items: center; color: #fff; font-size: 20px; background: var(--accent); border-radius: 13px; }
.scene-label small,
.scene-label strong { display: block; }
.scene-label small { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.scene-label strong { margin-top: 3px; font-size: 13px; line-height: 1.35; }
.characters-stage {
  position: relative;
  min-height: 350px;
  margin-top: 13px;
  overflow: hidden;
  background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 14%, white), #fff1c8);
  border-radius: 24px;
}
.speaker-character,
.listener-character { position: absolute; bottom: 0; width: 47%; text-align: center; }
.speaker-character { left: -2px; }
.listener-character { right: -4px; transform: scaleX(-1); }
.speaker-character .animal,
.listener-character .animal { width: 100%; }
.speaker-character > small,
.listener-character > small {
  position: absolute;
  bottom: 8px;
  left: 50%;
  z-index: 3;
  padding: 6px 9px;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
  background: var(--teal);
  border-radius: 999px;
  transform: translateX(-50%);
}
.listener-character > small { transform: translateX(-50%) scaleX(-1); }
.characters-stage blockquote {
  position: absolute;
  top: 24px;
  left: 50%;
  z-index: 4;
  width: 76%;
  margin: 0;
  padding: 15px 17px;
  text-align: center;
  background: #fff;
  border: 3px solid #d9d2b9;
  border-radius: 21px 21px 21px 7px;
  box-shadow: 0 8px 17px rgba(55, 76, 71, .13);
  transform: translateX(-50%);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.characters-stage blockquote.highlighted { border-color: var(--gold); box-shadow: 0 0 0 6px rgba(229, 173, 73, .18); }
.characters-stage blockquote small,
.characters-stage blockquote strong { display: block; }
.characters-stage blockquote small { margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.characters-stage blockquote strong { font-size: 16px; line-height: 1.35; }
.your-turn { display: flex; min-height: 62px; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 13px; color: #fff; background: var(--teal); border-radius: 18px; }
.your-turn > span { font-size: 26px; }
.your-turn p { margin: 0; }
.your-turn small,
.your-turn strong { display: block; }
.your-turn small { font-size: 9px; font-weight: 900; text-transform: uppercase; }
.your-turn strong { margin-top: 3px; font-size: 13px; }

.answers-heading { align-items: flex-start; justify-content: space-between; gap: 13px; }
.answers-heading h2 { margin: 0; font-size: 22px; line-height: 1.15; }
.answers-heading > span {
  display: grid;
  min-width: 53px;
  height: 48px;
  place-items: center;
  color: #fff;
  font: 900 21px/1 Georgia, serif;
  background: var(--coral);
  border-radius: 16px 16px 16px 6px;
}
.answers-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 17px; }
.answer-card {
  display: grid;
  min-width: 0;
  min-height: 112px;
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr) 29px;
  gap: 9px;
  padding: 12px;
  text-align: left;
  background: #fff;
  border: 3px solid #ddd7c6;
  border-radius: 20px 20px 20px 7px;
  box-shadow: 0 5px 0 #d8d1c0;
}
.answer-card:nth-child(odd):last-child { grid-column: 1 / -1; }
.answer-card:hover:not(:disabled) { border-color: var(--accent); }
.answer-icon { display: grid; width: 42px; height: 42px; place-items: center; font-size: 20px; background: #f3f1e8; border-radius: 13px; }
.answer-card strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.32; }
.answer-card b { display: grid; width: 29px; height: 29px; place-items: center; color: var(--muted); background: #efede5; border-radius: 50%; }
.answer-card.wrong { opacity: .62; border-color: #dda69e; box-shadow: 0 5px 0 #c98e84; }
.answer-card.wrong b { color: #fff; background: var(--coral); }
.answer-card.hinted { background: #fff8d8; border-color: var(--gold); animation: glow 1.2s ease-in-out infinite alternate; }
.answer-card.correct { background: #edf8f0; border-color: var(--green); box-shadow: 0 5px 0 #76a98e; }
.answer-card.correct b { color: #fff; background: var(--green); }
@keyframes glow { to { box-shadow: 0 0 0 6px rgba(229, 173, 73, .22); } }

.feedback {
  min-height: 85px;
  gap: 12px;
  margin-top: 17px;
  padding: 12px;
  background: #f2f3ed;
  border: 2px solid #dcdbd2;
  border-radius: 21px;
}
.feedback.success { background: #edf8f0; border-color: #9fc7ac; }
.feedback.retry { background: #fff2ee; border-color: #e5b1a8; }
.feedback.hint { background: #fff8d9; border-color: #ead079; }
.feedback-icon { display: grid; min-width: 47px; height: 47px; place-items: center; font-size: 22px; background: #fff; border-radius: 14px; }
.feedback > div { min-width: 0; flex: 1; }
.feedback strong,
.feedback small,
.feedback em { display: block; }
.feedback strong { font-size: 14px; }
.feedback small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.35; }
.feedback em { margin-top: 6px; color: #39765f; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.feedback .hint-button,
.feedback .next-button { min-width: 124px; flex-shrink: 0; padding: 0 14px; font-size: 12px; }

.result-card { display: grid; min-height: 590px; align-items: center; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 5vw, 65px); }
.result-art {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  background: linear-gradient(150deg, #e1f3ee, #fff0be);
  border: 7px solid #fff;
  border-radius: 35px;
  box-shadow: 0 18px 35px rgba(57, 75, 70, .17);
}
.result-animal { position: absolute; bottom: 17px; width: 57%; }
.result-one { left: -8px; }
.result-two { right: -7px; transform: scaleX(-1); }
.result-bubble {
  position: absolute;
  top: 42px;
  left: 50%;
  z-index: 3;
  width: max-content;
  max-width: 75%;
  padding: 12px 17px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  background: #fff;
  border: 3px solid #d7d0b7;
  border-radius: 20px 20px 20px 6px;
  transform: translateX(-50%);
}
.result-heart { position: absolute; top: 108px; left: 50%; z-index: 3; color: var(--coral); font: 900 48px/1 Georgia, serif; transform: translateX(-50%); }
.result-copy h1 { margin-bottom: 13px; font-size: clamp(40px, 5vw, 59px); line-height: 1; letter-spacing: -.045em; }
.result-copy > p { color: var(--muted); font-weight: 800; line-height: 1.5; }
.result-stars { margin: 18px 0; color: var(--gold); font-size: 39px; letter-spacing: 5px; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.result-stats span { padding: 13px 8px; text-align: center; background: #f1f2eb; border-radius: 17px; }
.result-stats strong,
.result-stats small { display: block; }
.result-stats strong { font-size: 24px; }
.result-stats small { color: var(--muted); font-size: 10px; font-weight: 900; }
.result-copy blockquote { margin: 17px 0; padding: 13px 16px; color: #39765f; font-weight: 900; line-height: 1.35; background: #eef7f1; border-left: 5px solid var(--green); border-radius: 10px 17px 17px 10px; }
.result-actions { flex-wrap: wrap; gap: 11px; }
.error-card { margin-top: 100px; padding: 30px; text-align: center; background: var(--paper); border: 3px solid var(--line); border-radius: 30px; }
.error-card > span { display: block; font: 900 55px/1 Georgia, serif; }
.error-card strong,
.error-card small { display: block; margin-top: 10px; }

@media (max-width: 930px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-board { width: min(540px, 100%); margin: 0 auto; }
  .hero-facts { justify-content: center; }
  .steps-grid { grid-template-columns: 1fr; }
  .levels-grid { grid-template-columns: repeat(2, 1fr); }
  .level-card:last-child { grid-column: 1 / -1; }
  .dialogue-layout { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 1fr; }
  .result-art { width: min(480px, 100%); margin: 0 auto; }
}

@media (max-width: 680px) {
  .app { width: min(100% - 20px, 1120px); padding-top: 12px; }
  .topbar { min-height: 53px; margin-bottom: 13px; }
  .brand-mark { width: 46px; height: 46px; font-size: 25px; border-width: 4px; border-radius: 16px 16px 16px 6px; }
  .brand strong { font-size: 18px; }
  .brand small { display: none; }
  .quiet-badge { width: 47px; min-width: 47px; min-height: 46px; justify-content: center; padding: 0; font-size: 0; }
  .hero { min-height: auto; padding: 33px 20px; border-radius: 31px; }
  .hero h1 { font-size: clamp(42px, 13vw, 54px); }
  .hero-board { min-height: 310px; }
  .hero-bubble { width: 190px; font-size: 13px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .section-heading > p { text-align: left; }
  .levels-grid { grid-template-columns: 1fr; }
  .level-card:last-child { grid-column: auto; }
  .game-shell,
  .result-card { padding: 20px 14px; border-radius: 29px; }
  .game-heading { align-items: flex-start; }
  .round-badge { min-width: 64px; height: 64px; border-width: 4px; }
  .round-badge strong { font-size: 23px; }
  .scene-card,
  .answers-card { padding: 15px; border-radius: 23px; }
  .characters-stage { min-height: 320px; }
  .characters-stage blockquote { width: 88%; }
  .answers-grid { grid-template-columns: 1fr; }
  .answer-card:nth-child(odd):last-child { grid-column: auto; }
  .answer-card { min-height: 88px; }
  .feedback { align-items: stretch; flex-wrap: wrap; }
  .feedback > div { min-width: calc(100% - 62px); }
  .feedback .hint-button,
  .feedback .next-button { width: 100%; }
  .result-art { min-height: 340px; }
  .result-copy { text-align: center; }
  .result-copy blockquote { text-align: left; }
  .result-actions { flex-direction: column; }
  .result-actions button { width: 100%; }
}

@media (max-width: 390px) {
  .brand strong { max-width: 145px; line-height: 1.05; }
  .game-heading h1 { font-size: 31px; }
  .game-heading p:not(.eyebrow) { font-size: 13px; }
  .characters-stage { min-height: 300px; }
  .characters-stage blockquote strong { font-size: 14px; }
  .answer-card { grid-template-columns: 40px minmax(0, 1fr) 28px; padding: 10px; }
  .answer-icon { width: 40px; height: 40px; }
}

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