@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap");
:root {
  font-family: "Nunito", system-ui, sans-serif;
  color: #123f45;
  background: #edf4f0;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 4px solid #ec9d2e;
  outline-offset: 4px;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
.shell {
  max-width: 1500px;
  margin: auto;
  padding: 0 54px;
}
header {
  height: 105px;
  display: flex;
  align-items: center;
  gap: 25px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.1;
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: 800;
}
.brand b {
  font-size: 23px;
  letter-spacing: 3px;
}
.brand-icon {
  background: #164d4b;
  color: #ffc35b;
  border-radius: 17px;
  font-size: 38px;
  width: 54px;
  height: 57px;
  text-align: center;
  line-height: 57px;
}
nav {
  display: flex;
  gap: 12px;
  margin: auto;
}
.nav {
  background: transparent;
  padding: 12px 21px;
  border-radius: 30px;
  font-weight: 800;
  color: #56736f;
}
.nav.active {
  background: white;
  color: #164d4b;
  box-shadow: 0 3px 0 #dce7df;
}
.nav span {
  margin-left: 6px;
  background: #e2eee5;
  padding: 2px 7px;
  border-radius: 10px;
}
.score {
  background: #fff5d9;
  border: 1px solid #f1d598;
  padding: 10px 19px;
  border-radius: 24px;
  font-weight: 900;
}
.sound {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dceae0;
  font-size: 24px;
}
.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 27px 0 23px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #658179;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(30px, 3.1vw, 46px);
  letter-spacing: -1.7px;
  line-height: 1.12;
  margin: 10px 0;
}
p {
  line-height: 1.65;
}
.intro p {
  margin: 8px 0 0;
  color: #5d7773;
  font-size: 17px;
}
.level-pill {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #e0eadf;
  border-radius: 18px;
  padding: 13px 18px;
}
.level-pill strong {
  display: block;
}
.level-pill small {
  font-size: 14px;
  color: #58715f;
}
.world {
  height: 520px;
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background: #104c53;
  box-shadow: 0 16px 35px #123f4514;
}
.world:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #073f46e8, #073f4655 42%, #073f4610 70%);
  z-index: 1;
  pointer-events: none;
}
.world-art {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 54%;
}
.world-intro {
  position: absolute;
  z-index: 2;
  top: 38px;
  left: 35px;
  width: 245px;
  color: white;
}
.world-intro .eyebrow {
  color: #b1d9c5;
}
.world-intro h2 {
  font-size: 31px;
  line-height: 1.12;
  margin: 13px 0;
}
.world-intro p {
  font-size: 15px;
  color: #d1e7db;
}
.tiny-badge {
  background: #ffffff20;
  border: 1px solid #ffffff30;
  border-radius: 20px;
  padding: 6px 12px;
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
}
.map-node {
  position: absolute;
  z-index: 3;
  background: transparent;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  transform: translate(-50%, -50%);
  transition: filter 0.2s;
}
.map-node:hover {
  filter: brightness(1.15);
}
.node-icon {
  width: 61px;
  height: 61px;
  display: grid;
  place-items: center;
  background: #fff8de;
  border: 4px solid #f9c763;
  box-shadow:
    0 6px 0 #94794e,
    0 10px 28px #073f4644;
  border-radius: 50%;
  font-size: 27px;
}
.map-node.current .node-icon {
  animation: bob 3s ease-in-out infinite;
  outline: 8px solid #ffd16533;
}
.node-label {
  color: #163f43;
  background: #fffdf2;
  border-radius: 10px;
  padding: 5px 11px;
  font-weight: 900;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 3px 0 #d9dfcf;
}
.map-node.done .node-icon {
  background: #ceeec4;
  border-color: #81c488;
}
.map-note {
  position: absolute;
  z-index: 2;
  bottom: 23px;
  left: 32px;
  color: #d2e9dd;
  font-size: 13px;
}
.under-map {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 23px;
  margin: 27px 0;
}
.quest-strip,
.progress-card {
  background: white;
  border: 1px solid #dce6de;
  border-radius: 23px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.quest-strip h3,
.progress-card h3 {
  margin: 0 0 5px;
  font-size: 18px;
}
.quest-strip p,
.progress-card p {
  margin: 0;
  font-size: 14px;
  color: #688078;
}
.big-icon {
  font-size: 34px;
  background: #fff0cc;
  padding: 13px;
  border-radius: 17px;
}
.quest-strip .primary {
  margin-left: auto;
  white-space: nowrap;
}
.primary {
  background: #f7c65d;
  color: #263f35;
  padding: 14px 25px;
  border-radius: 14px;
  font-weight: 900;
  box-shadow: 0 4px 0 #dba742;
  transition: transform 0.15s;
}
.primary:hover {
  transform: translateY(-2px);
}
.primary:disabled {
  opacity: 0.45;
  transform: none;
}
.secondary {
  background: #e7efe8;
  padding: 12px 20px;
  border-radius: 13px;
  font-weight: 800;
  color: #35594d;
}
.progress-line {
  height: 9px;
  border-radius: 20px;
  background: #e8eee6;
  margin-top: 12px;
  overflow: hidden;
}
.progress-line span {
  display: block;
  height: 100%;
  background: #73ae82;
  transition: width 0.5s;
}
.progress-card > div {
  flex: 1;
}
.grand-prize {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 760px;
  margin: 4px auto 12px;
  border: 2px solid #f2bf53;
  border-radius: 24px;
  padding: 22px 26px;
  background: linear-gradient(135deg, #fff8df, #fff0c3);
  box-shadow: 0 8px 0 #e2a93f, 0 18px 38px #bd7f2428;
  text-align: left;
}
.grand-prize-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: white;
  font-size: 42px;
}
.grand-prize h2 {
  margin: 4px 0 6px;
  font-size: 25px;
}
.grand-prize p {
  margin: 0;
  color: #526d63;
  line-height: 1.5;
}
.grand-prize strong {
  color: #9b5723;
}
.grand-prize .completion-status {
  margin-top: 9px;
  color: #7b6744;
  font-size: 13px;
  font-weight: 800;
}
.grand-prize .completion-status.is-success {
  color: #2f7658;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #748980;
  font-size: 13px;
  padding: 10px 0 24px;
}
footer button {
  background: none;
  color: #547568;
  font-size: 13px;
}
.play {
  max-width: 850px;
  margin: 24px auto 50px;
}
.play-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 25px;
}
.back {
  background: white;
  border-radius: 13px;
  width: 44px;
  height: 44px;
  font-size: 22px;
}
.play-top .progress-line {
  flex: 1;
  margin: 0;
}
.step-label {
  font-size: 14px;
  font-weight: 800;
  color: #658179;
}
.game-card {
  background: white;
  border-radius: 28px;
  padding: 36px 44px;
  box-shadow: 0 10px 45px #294f4110;
  animation: enter 0.3s ease;
}
.game-heading {
  display: flex;
  align-items: center;
  gap: 17px;
}
.game-heading .emoji {
  font-size: 43px;
  background: #f3f3df;
  border-radius: 20px;
  padding: 16px;
}
.game-heading h1 {
  font-size: 29px;
  letter-spacing: -0.7px;
}
.reference {
  color: #6a8378;
  font-size: 14px;
}
.story {
  font-size: 21px;
  line-height: 1.75;
  margin: 27px 0;
  color: #32584e;
}
.listen {
  background: #edf4f0;
  border-radius: 20px;
  padding: 9px 17px;
  color: #386955;
  font-weight: 800;
}
.audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}
.activity-title {
  font-size: 26px;
  line-height: 1.25;
  margin: 24px 0 8px;
}
.hint {
  font-size: 16px;
  color: #678274;
  margin: 8px 0 24px;
}
.options {
  display: grid;
  gap: 12px;
}
.option {
  background: #f3f6f0;
  border: 2px solid #e2e9df;
  border-radius: 17px;
  padding: 17px 21px;
  text-align: left;
  font-weight: 800;
  font-size: 18px;
  color: #365b4e;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.option:hover {
  border-color: #a9caae;
  transform: translateX(3px);
}
.option.good {
  background: #dff1d9;
  border-color: #75af70;
}
.option.wrong {
  background: #fff1d3;
  border-color: #e7b653;
}
.feedback {
  min-height: 32px;
  margin: 19px 0 0;
  font-size: 17px;
  font-weight: 800;
  color: #3f7951;
}
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tile {
  padding: 15px;
  border: 2px solid #dfebdf;
  border-radius: 15px;
  min-height: 69px;
  background: #f5f8ef;
  color: #355d49;
  font-size: 17px;
  font-weight: 800;
}
.tile.selected {
  border-color: #e7b248;
  background: #fff1cf;
}
.tile.matched {
  border-color: #8ac990;
  background: #e4f1de;
  color: #4f7750;
}
.sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: #edf4ed;
  padding: 15px;
  border-radius: 18px;
  min-height: 86px;
}
.word {
  background: white;
  border: 2px solid #d7e6d8;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 800;
  padding: 12px 16px;
  color: #325c45;
}
.bank {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 18px;
}
.order-item {
  width: 100%;
  display: flex;
  gap: 13px;
  align-items: center;
}
.order-item span {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #e7efdf;
  display: grid;
  place-items: center;
}
.result {
  text-align: center;
  padding: 25px 0;
}
.result .trophy {
  font-size: 80px;
  display: block;
  animation: bob 2s infinite;
}
.result h1 {
  font-size: 35px;
}
.reward {
  background: #fff0c9;
  border-radius: 18px;
  padding: 17px;
  font-size: 22px;
  font-weight: 900;
  display: inline-block;
}
.discovery {
  background: #edf4e8;
  border-radius: 18px;
  padding: 20px;
  margin: 25px 0;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0 60px;
}
.collect-card {
  background: white;
  padding: 25px;
  border-radius: 23px;
  border: 1px solid #dae7d9;
}
.collect-card .emoji {
  font-size: 45px;
}
.collect-card h2 {
  font-size: 22px;
}
.collect-card p {
  font-size: 16px;
  color: #627b68;
}
.collect-card.locked {
  background: #e6ece3;
  color: #6f806f;
}
.collect-card .secondary {
  margin-top: 10px;
}
dialog {
  border: 0;
  border-radius: 25px;
  padding: 35px;
  max-width: 530px;
  width: calc(100% - 32px);
  color: #264c3e;
}
dialog::backdrop {
  background: #092e3acc;
  backdrop-filter: blur(5px);
}
.close {
  float: right;
  background: #e4eddf;
  border-radius: 50%;
  font-size: 27px;
  width: 38px;
  height: 38px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #173f35;
  color: white;
  border-radius: 15px;
  padding: 13px 23px;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
#toast.show {
  opacity: 1;
}
.confetti {
  position: fixed;
  top: -20px;
  width: 11px;
  height: 17px;
  pointer-events: none;
  z-index: 20;
  animation: fall 2.2s ease-in forwards;
}
@keyframes fall {
  to {
    transform: translateY(105vh) rotate(620deg);
  }
}
@keyframes bob {
  50% {
    transform: translateY(-7px);
  }
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1500px) {
  .world {
    height: 580px;
  }
}
@media (max-width: 900px) {
  .shell {
    padding: 0 25px;
  }
  .world-intro {
    width: 200px;
    left: 23px;
  }
  .world-intro h2 {
    font-size: 25px;
  }
  .world {
    height: 485px;
  }
  .under-map {
    grid-template-columns: 1fr;
  }
  .collection-grid {
    grid-template-columns: 1fr 1fr;
  }
  .quest-strip {
    padding: 18px;
  }
}
@media (max-width: 600px) {
  .shell {
    padding: 0 16px;
  }
  header {
    height: auto;
    min-height: 86px;
    padding: 12px 0;
    gap: 10px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 10px;
    gap: 7px;
    letter-spacing: 1px;
  }
  .brand b {
    font-size: 17px;
    letter-spacing: 2px;
  }
  .brand-icon {
    width: 39px;
    height: 43px;
    font-size: 29px;
    line-height: 43px;
    border-radius: 12px;
  }
  nav {
    order: 5;
    position: static;
    width: 100%;
    transform: none;
    display: flex;
    justify-content: center;
    background: #fff;
    padding: 6px;
    border: 1px solid #dbe7d9;
    border-radius: 30px;
    box-shadow: 0 4px 16px #123e451c;
    white-space: nowrap;
  }
  .nav {
    font-size: 14px;
    padding: 10px 16px;
  }
  .nav.active {
    background: #e8efdf;
    box-shadow: none;
  }
  .sound {
    margin-left: auto;
    width: 36px;
    height: 36px;
  }
  .score {
    padding: 8px 12px;
    font-size: 14px;
  }
  .intro {
    margin: 17px 0 20px;
    align-items: start;
  }
  .intro h1 {
    font-size: 31px;
  }
  .intro p {
    font-size: 15px;
    max-width: 240px;
  }
  .level-pill {
    display: none;
  }
  .eyebrow {
    font-size: 12px;
  }
  .world {
    height: 570px;
    border-radius: 23px;
  }
  .world-art {
    object-position: 58% center;
  }
  .world:before {
    background: linear-gradient(#073f4699, #073f4600 45%, #073f4644);
  }
  .world-intro {
    left: 22px;
    top: 22px;
    width: 240px;
  }
  .world-intro h2 {
    font-size: 25px;
    margin: 9px 0;
  }
  .world-intro p {
    display: none;
  }
  .node-icon {
    width: 54px;
    height: 54px;
    font-size: 24px;
  }
  .node-label {
    font-size: 13px;
    padding: 5px 8px;
  }
  .map-node:nth-of-type(1) {
    left: 26% !important;
    top: 38% !important;
  }
  .map-node:nth-of-type(2) {
    left: 72% !important;
    top: 43% !important;
  }
  .map-node:nth-of-type(3) {
    left: 28% !important;
    top: 59% !important;
  }
  .map-node:nth-of-type(4) {
    left: 74% !important;
    top: 64% !important;
  }
  .map-node:nth-of-type(5) {
    left: 27% !important;
    top: 80% !important;
  }
  .map-node:nth-of-type(6) {
    left: 74% !important;
    top: 86% !important;
  }
  .map-note {
    bottom: 10px;
    left: 17px;
    font-size: 12px;
  }
  .under-map {
    gap: 15px;
    margin: 18px 0;
  }
  .grand-prize {
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 8px;
    padding: 18px 16px;
  }
  .grand-prize-icon {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    font-size: 31px;
  }
  .grand-prize h2 {
    font-size: 20px;
  }
  .quest-strip {
    flex-wrap: wrap;
    gap: 12px;
  }
  .quest-strip .primary {
    width: 100%;
    margin: 0;
  }
  .big-icon {
    padding: 10px;
    font-size: 27px;
  }
  .quest-strip h3 {
    font-size: 17px;
  }
  footer {
    padding-bottom: 90px;
    font-size: 12px;
    gap: 12px;
  }
  .game-card {
    padding: 25px 21px;
    border-radius: 22px;
  }
  .play {
    margin: 14px auto 20px;
  }
  .game-heading .emoji {
    font-size: 32px;
    padding: 12px;
  }
  .game-heading h1 {
    font-size: 23px;
  }
  .story {
    font-size: 19px;
  }
  .activity-title {
    font-size: 24px;
  }
  .option {
    font-size: 17px;
    padding: 15px;
  }
  .tile {
    font-size: 15px;
    padding: 10px;
  }
  .actions {
    flex-wrap: wrap;
  }
  .actions .primary {
    margin-left: auto;
  }
  .collection-grid {
    grid-template-columns: 1fr;
  }
  .result h1 {
    font-size: 30px;
  }
  .step-label {
    font-size: 12px;
  }
  .word {
    font-size: 16px;
    padding: 10px 12px;
  }
}

/* Test-version experience */
html,
body {
  overflow-x: hidden;
}
button,
input {
  min-height: 44px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 4px solid #f7c65d;
  outline-offset: 3px;
}
.sound.is-on {
  background: #f7c65d;
  color: #173f3d;
}
.star-bump {
  animation: star-bump 0.45s ease;
}
@keyframes star-bump {
  50% {
    transform: scale(1.18) rotate(3deg);
    background: #fff2b7;
  }
}
.level-pill > span {
  font-size: 30px;
}
.node-label small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.72;
}
.map-node.state-available .node-icon,
.map-node.state-started .node-icon {
  animation: available-glow 2.4s ease-in-out infinite;
}
.map-node.state-started .node-icon {
  background: #f7c65d;
  border-color: #fff5cc;
  color: #173f3d;
}
.map-node.state-completed .node-icon {
  background: #e76b20;
  border-color: #fff0d8;
  color: white;
  box-shadow: 0 5px 0 #a64416, 0 0 0 8px #f7c65d55;
}
.map-node.state-completed .node-label {
  background: #fff4df;
  color: #70401f;
}
.map-node.just-unlocked .node-icon {
  animation: island-unlock 0.8s ease both;
}
.map-node.chosen .node-icon {
  transform: scale(1.22);
}
.world.is-zooming .world-art {
  transform: scale(1.035);
}
.world-art {
  transition: transform 0.32s ease;
}
@keyframes available-glow {
  50% {
    box-shadow: 0 5px 0 #3e876e, 0 0 0 10px #8ce0ae35;
  }
}
@keyframes island-unlock {
  0% {
    transform: scale(0.6) rotate(-10deg);
    opacity: 0;
  }
  65% {
    transform: scale(1.22) rotate(4deg);
  }
}
.welcome-dialog {
  width: min(760px, calc(100% - 28px));
  max-width: 760px;
  max-height: min(620px, calc(100dvh - 24px));
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: #fffaf1;
}
.welcome-dialog[open] {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(300px, 1.2fr);
  align-items: end;
}
.welcome-dialog > img {
  display: block;
  width: 100%;
  height: 390px;
  object-fit: contain;
  object-position: center bottom;
  background: radial-gradient(circle at center 72%, #f4d6ac 0 32%, transparent 33%);
}
.welcome-dialog form {
  align-self: center;
  min-width: 0;
  padding: 42px 42px 42px 18px;
}
.welcome-dialog h2 {
  margin: 8px 0 24px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.welcome-dialog label {
  display: block;
  margin-bottom: 7px;
  color: #315e52;
  font-weight: 850;
}
.welcome-dialog input {
  width: 100%;
  border: 2px solid #c9ddd3;
  border-radius: 14px;
  padding: 12px 14px;
  background: white;
  color: #183f3c;
  font: inherit;
  font-size: 18px;
}
.welcome-dialog .primary {
  width: 100%;
  margin-top: 8px;
}
.privacy-note {
  color: #6f857c;
  font-size: 13px;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.danger-soft {
  border: 1px solid #e5b799;
  border-radius: 14px;
  padding: 11px 16px;
  background: #fff3ea;
  color: #8a3d20;
  font-weight: 850;
}
.parent-story-list {
  display: grid;
  gap: 6px;
  padding-left: 24px;
  color: #49665d;
}
.confirm-dialog {
  width: min(460px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  padding: 28px;
}
.story-visual {
  position: relative;
  overflow: hidden;
  margin: 26px 0 20px;
  border-radius: 22px;
  background: #dcece5;
  aspect-ratio: 16 / 9;
}
.story-step {
  padding-top: 24px;
}
.story-step .mascot-guide {
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 174px;
  margin: 12px 0 8px;
}
.story-step .mascot-guide img {
  width: 150px;
  height: 182px;
}
.story-step .dialogue-bubble {
  padding: 16px 19px;
}
.story-step .story-visual {
  max-height: 300px;
  margin: 14px 0 8px;
}
.scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 5px 0 12px;
  color: #5a796e;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.3px;
}
.scroll-cue span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8f2e9;
  animation: scroll-hint 1.2s ease-in-out infinite;
}
@keyframes scroll-hint {
  50% {
    transform: translateY(3px);
  }
}
.story-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: story-zoom 12s ease-in-out infinite alternate;
}
.story-visual figcaption {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #082f32cc;
  color: white;
  font-size: 12px;
  font-weight: 750;
}
@keyframes story-zoom {
  to {
    transform: scale(1.035);
  }
}
.story p {
  margin: 0 0 14px;
}
.audio-controls {
  justify-content: space-between;
  border-radius: 16px;
  padding: 8px 10px;
  background: #f2f7f4;
  color: #6c8279;
  font-size: 13px;
}
.listen {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  justify-content: center;
}
.listen.is-playing {
  background: #dff2e4;
  box-shadow: inset 0 0 0 2px #72aa7d;
}
.sound-bars {
  display: inline-flex;
  align-items: end;
  gap: 2px;
  height: 15px;
}
.sound-bars i {
  display: block;
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: currentColor;
}
.listen.is-playing .sound-bars i {
  animation: sound-bar 0.65s ease-in-out infinite alternate;
}
.listen.is-playing .sound-bars i:nth-child(2) {
  animation-delay: 0.18s;
}
.listen.is-playing .sound-bars i:nth-child(3) {
  animation-delay: 0.34s;
}
@keyframes sound-bar {
  to {
    height: 15px;
  }
}
.option.good::after,
.word.good::after {
  content: "✓ Верно";
  float: right;
  margin-left: 10px;
  color: #2f7447;
  font-weight: 900;
}
.option.wrong::after,
.word.wrong::after,
.tile.wrong::after {
  content: "↻ Попробуй ещё";
  float: right;
  margin-left: 10px;
  color: #8a641d;
  font-size: 13px;
  font-weight: 900;
}
.option.wrong,
.word.wrong,
.tile.wrong {
  background: #fff2c8;
  border-color: #d4a941;
  color: #5c491b;
}
.idea-reveal {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  border: 2px solid #f0cb74;
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(135deg, #fff9df, #fffdf3);
  color: #244f47;
}
.idea-reveal span {
  color: #9b6822;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.idea-reveal strong {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.35;
}
.reflection-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 28px 0 18px;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #edf7f0, #fff9e9);
}
.reflection-card h2 {
  margin: 7px 0;
  color: #244e46;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
}
.reflection-card p {
  margin: 0;
  color: #657e73;
}
.reflection-icon {
  font-size: 48px;
}
.reflection-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mission-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mission-actions .option {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 92px;
  text-align: left;
}
.mission-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff2c7;
  color: #9b6822;
  font-weight: 900;
}
.final-island-icon {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 10px;
  border-radius: 24px;
  background: #eff5df;
  font-size: 42px;
}
.final-glow {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px #f5d997, 0 18px 60px #d99b3530;
  animation: none;
}
.final-glow::before {
  content: "";
  position: absolute;
  top: -140px;
  left: 50%;
  width: 360px;
  height: 260px;
  border-radius: 50%;
  background: #ffe9a977;
  filter: blur(35px);
  transform: translateX(-50%);
  pointer-events: none;
}
.hero-unlocked,
.next-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  max-width: 580px;
  margin: 14px auto;
  border: 1px solid #d8e8de;
  border-radius: 17px;
  padding: 14px 18px;
  background: #f6faf6;
  text-align: left;
}
.hero-unlocked div,
.next-preview {
  display: flex;
  flex-direction: column;
}
.hero-unlocked small,
.next-preview span {
  color: #6d8579;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.hero-medal {
  font-size: 35px;
}
.final-actions {
  justify-content: center;
  flex-wrap: wrap;
}
.collection-score {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 2px 10px;
  border: 1px solid #d9e8de;
  border-radius: 18px;
  padding: 15px 19px;
  background: white;
}
.collection-score strong {
  font-size: 20px;
}
.collection-score span {
  color: #6c8279;
  font-size: 12px;
}
.collection-section {
  margin: 34px 0 48px;
}
.collection-section > h2,
.section-heading h2 {
  margin: 0 0 18px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.section-heading > span {
  color: #678274;
  font-weight: 850;
}
.collect-card h3 {
  margin: 7px 0;
  font-size: 20px;
}
.heroes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.hero-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 15px;
  border: 1px solid #dce9df;
  border-radius: 20px;
  padding: 18px;
  background: white;
}
.hero-card.locked {
  opacity: 0.62;
  background: #eef2ef;
}
.hero-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff0d9;
  font-size: 32px;
  font-weight: 900;
}
.hero-card h3 {
  margin: 0 0 5px;
}
.hero-card p {
  margin: 0 0 7px;
  color: #587168;
  line-height: 1.5;
}
.hero-card small {
  color: #6b8379;
}
.hero-card blockquote {
  margin: 10px 0 0;
  border-left: 3px solid #e7a153;
  padding-left: 10px;
  color: #355e52;
  font-size: 14px;
}
.survey {
  max-width: 700px;
  margin: 34px auto 0;
  border: 1px solid #dbe9df;
  border-radius: 24px;
  padding: 26px;
  background: #f8fbf7;
  text-align: left;
}
.survey fieldset {
  margin: 20px 0;
  border: 0;
  padding: 0;
}
.survey legend {
  margin-bottom: 10px;
  color: #315d51;
  font-weight: 900;
}
.survey-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.survey-options label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.survey-options label span {
  display: block;
  min-height: 44px;
  border: 2px solid #d9e7df;
  border-radius: 999px;
  padding: 10px 14px;
  background: white;
  cursor: pointer;
  font-weight: 750;
}
.survey-options input:checked + span {
  border-color: #e76b20;
  background: #fff0de;
  color: #6b351c;
}
.survey-options input:focus-visible + span {
  outline: 4px solid #f7c65d;
  outline-offset: 2px;
}
.survey.thanks {
  text-align: center;
}
.survey.thanks > span {
  font-size: 42px;
}
.feedback-page {
  max-width: 780px;
  margin: 35px auto 70px;
}

@media (max-width: 768px) {
  .welcome-dialog {
    width: min(600px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
  }
  .welcome-dialog[open] {
    grid-template-columns: 140px minmax(0, 1fr);
    align-items: end;
  }
  .welcome-dialog > img {
    height: 320px;
  }
  .welcome-dialog form {
    padding: 30px 28px 30px 5px;
  }
  .welcome-dialog h2 {
    font-size: clamp(26px, 4.5vw, 32px);
  }
  .heroes-grid {
    grid-template-columns: 1fr;
  }
  .story {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .welcome-dialog[open] {
    grid-template-columns: 105px minmax(0, 1fr);
    align-items: end;
  }
  .welcome-dialog > img {
    align-self: end;
    height: 330px;
    min-height: 0;
    max-height: 46dvh;
  }
  .welcome-dialog form {
    padding: 25px 18px 25px 2px;
  }
  .welcome-dialog h2 {
    margin-bottom: 16px;
    font-size: clamp(23px, 6.2vw, 28px);
  }
  .game-card {
    padding: 24px 18px;
  }
  .story-visual {
    margin-top: 18px;
    border-radius: 16px;
  }
  .story-visual figcaption {
    right: 7px;
    bottom: 7px;
    font-size: 10px;
  }
  .audio-controls,
  .reflection-actions {
    grid-template-columns: 1fr;
  }
  .listen {
    width: 100%;
  }
  .audio-controls > span {
    width: 100%;
    text-align: center;
  }
  .reflection-card {
    grid-template-columns: 1fr;
    padding: 19px;
  }
  .reflection-icon {
    font-size: 38px;
  }
  .reflection-actions {
    display: grid;
  }
  .mission-actions {
    grid-template-columns: 1fr;
  }
  .mission-actions .option {
    min-height: 70px;
  }
  .result-dialogue {
    grid-template-columns: 105px minmax(0, 1fr);
  }
  .hero-card {
    grid-template-columns: 54px 1fr;
    padding: 15px;
  }
  .hero-avatar {
    width: 54px;
    height: 54px;
    font-size: 27px;
  }
  .survey {
    padding: 19px 14px;
  }
  .survey-options {
    display: grid;
  }
  .survey-options label span {
    border-radius: 14px;
  }
  .final-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-node.state-available .node-icon,
  .map-node.state-started .node-icon,
  .story-visual img,
  .listen.is-playing .sound-bars i {
    animation: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.faith-notes {
  margin: 20px 0;
  border: 1px solid #d7e6d8;
  border-radius: 14px;
  padding: 15px;
}
.faith-notes summary {
  cursor: pointer;
  font-weight: 800;
  line-height: 1.5;
}
.faith-notes a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.faith-notes p {
  font-size: 16px;
}
dialog {
  max-height: 85vh;
  overflow-y: auto;
}

.map-node.is-locked .node-icon,
.map-node.state-locked .node-icon {
  background: #d1dcd6;
  border-color: #a4b8af;
  box-shadow: 0 4px 0 #6e8d83;
  font-size: 23px;
}
.map-node.is-locked .node-label,
.map-node.state-locked .node-label {
  background: #e0e8df;
  color: #587268;
}
.map-node.is-locked:hover,
.map-node.state-locked:hover {
  filter: none;
}
.collect-card button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.mascot-strip {
  overflow: hidden;
  min-height: 132px;
}
.mascot-small {
  width: 122px;
  height: 145px;
  object-fit: contain;
  align-self: flex-end;
  margin: -18px -4px -28px -8px;
  filter: drop-shadow(0 8px 10px #27493a22);
}
.mascot-name {
  display: inline-block;
  margin-bottom: 4px;
  color: #e76b20;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.mascot-guide {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 244px;
  margin: 16px 0 10px;
  padding: 8px 18px 8px 0;
  border: 1px solid #f1d9bd;
  border-radius: 26px;
  background: linear-gradient(135deg, #fff7eb, #fffdf8);
  overflow: hidden;
}
.mascot-stage {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: radial-gradient(circle at 50% 70%, #f4d6ac 0 35%, transparent 36%);
}
.mascot-guide img {
  width: 205px;
  height: 250px;
  object-fit: contain;
  object-position: center bottom;
  margin-bottom: -10px;
  filter: drop-shadow(0 12px 12px #52351f22);
  transition: transform 0.25s ease;
}
.dialogue-bubble {
  position: relative;
  border: 2px solid #f1c58d;
  border-radius: 22px;
  padding: 21px 24px;
  background: #fff;
  box-shadow: 0 9px 22px #79552c12;
}
.dialogue-bubble::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-left: 2px solid #f1c58d;
  border-bottom: 2px solid #f1c58d;
  background: #fff;
  transform: translateY(-50%) rotate(45deg);
}
.dialogue-bubble strong {
  display: inline-block;
  margin-bottom: 7px;
  color: #e76b20;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.dialogue-bubble p {
  margin: 0;
  color: #3f352d;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.48;
}
.dialogue-bubble.speaking {
  animation: dialogue-pop 0.28s ease;
}
@keyframes dialogue-pop {
  0% {
    transform: scale(0.98);
  }
  70% {
    transform: scale(1.015);
  }
}
.feedback:not(:empty) {
  min-height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  color: transparent;
  font-size: 0;
}
.mascot-celebrate {
  display: block;
  width: 230px;
  height: 250px;
  margin: -28px 0 -8px;
  object-fit: contain;
  animation: bob 2s infinite;
}
.result-dialogue {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  max-width: 650px;
  margin: 0 auto 6px;
  text-align: left;
}
.result-bubble p {
  font-size: 18px;
}
@media (max-width: 600px) {
  .mascot-strip {
    min-height: 116px;
  }
  .mascot-small {
    width: 92px;
    height: 122px;
    margin-left: -12px;
  }
  .mascot-guide {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 8px;
    min-height: 164px;
    padding: 6px 8px 6px 0;
    border-radius: 20px;
  }
  .mascot-guide img {
    width: 116px;
    height: 170px;
    margin-left: -7px;
    margin-bottom: -7px;
  }
  .story-step {
    padding: 18px 16px 24px;
  }
  .story-step .game-heading {
    gap: 11px;
  }
  .story-step .game-heading .emoji {
    padding: 10px;
    border-radius: 15px;
    font-size: 32px;
  }
  .story-step .game-heading h1 {
    font-size: 24px;
  }
  .story-step .mascot-guide {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 116px;
    margin: 10px 0 7px;
  }
  .story-step .mascot-guide img {
    width: 88px;
    height: 122px;
    margin-left: -4px;
    margin-bottom: -5px;
  }
  .story-step .dialogue-bubble {
    padding: 11px 10px 11px 13px;
  }
  .story-step .dialogue-bubble p {
    font-size: 12px;
    line-height: 1.32;
  }
  .story-step .story-visual {
    aspect-ratio: 2.15 / 1;
    max-height: 154px;
    margin: 10px 0 6px;
  }
  .dialogue-bubble {
    padding: 14px 13px 14px 16px;
    border-radius: 17px;
  }
  .dialogue-bubble::before {
    left: -9px;
    width: 15px;
    height: 15px;
  }
  .dialogue-bubble strong {
    margin-bottom: 4px;
    font-size: 11px;
  }
  .dialogue-bubble p {
    font-size: 14px;
    line-height: 1.4;
  }
  .mascot-celebrate {
    width: 125px;
    height: 170px;
    margin-left: -8px;
  }
  .result-dialogue {
    grid-template-columns: 115px minmax(0, 1fr);
    gap: 5px;
  }
  .result-bubble p {
    font-size: 14px;
  }
}

.project-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #d6e3d9;
  border-bottom: 1px solid #d6e3d9;
  padding: 13px 0;
  color: #56736f;
  font-size: 15px;
  font-weight: 700;
}
.church-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.church-brand > span {
  font-size: 13px;
}
.church-brand img {
  display: block;
  width: 105px;
  height: auto;
}
@media (max-width: 600px) {
  .project-brand {
    gap: 13px;
    padding: 12px 0;
    font-size: 13px;
    line-height: 1.4;
  }
  .project-brand > span {
    max-width: 180px;
  }
  .church-brand {
    flex-direction: column;
    gap: 3px;
  }
  .church-brand > span {
    font-size: 12px;
  }
  .church-brand img {
    width: 85px;
  }
}
