:root {
  color-scheme: light;
  --ink: #294c49;
  --muted: #6e817b;
  --paper: #fffdf7;
  --cream: #f8f2dd;
  --line: #dfd4b7;
  --green: #4d9a75;
  --green-dark: #34795d;
  --yellow: #f2bd45;
  --coral: #eb7466;
  --blue: #63a9cf;
  --shadow: 0 18px 42px rgba(77, 87, 55, 0.13);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: #f5f1df;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.78) 0 2px, transparent 2.5px) 0 0 / 28px 28px,
    linear-gradient(145deg, #f8f3df, #eef3e2 56%, #f8edd9);
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 4px solid rgba(66, 133, 105, 0.33);
  outline-offset: 3px;
}

.app {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 48px;
}

.loading-card,
.paper-card {
  background: rgba(255, 253, 247, 0.94);
  border: 2px solid rgba(221, 211, 183, 0.92);
  box-shadow: var(--shadow);
}

.loading-card {
  display: grid;
  min-height: 320px;
  margin-top: 80px;
  place-items: center;
  border-radius: 40px;
  font-size: 22px;
  font-weight: 800;
}

.loading-card span {
  font-size: 54px;
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  margin-bottom: 22px;
  padding: 9px 12px 9px 10px;
  background: rgba(255, 253, 247, 0.83);
  border: 2px solid rgba(221, 211, 183, 0.82);
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(76, 83, 55, 0.08);
  backdrop-filter: blur(8px);
}

.brand-button,
.album-button {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 4px;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
}

.brand-button {
  gap: 11px;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: #e5f0da;
  border-radius: 16px;
  font-size: 25px;
}

.brand-button strong,
.brand-button small {
  display: block;
}

.brand-button strong {
  margin-bottom: 1px;
  font-size: 18px;
}

.brand-button small {
  color: var(--muted);
  font-size: 12px;
}

.album-button {
  gap: 9px;
  padding: 7px 10px;
  border-radius: 15px;
  font-weight: 800;
}

.album-button:hover {
  background: #f2eddb;
}

.album-button > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 11px;
}

.album-button b {
  min-width: 47px;
  padding: 5px 8px;
  color: var(--green-dark);
  background: #e5f1e8;
  border-radius: 999px;
  text-align: center;
  font-size: 13px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  min-height: 440px;
  overflow: hidden;
  border-radius: 44px;
}

.hero::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255, 253, 247, 0) 52%, rgba(211, 231, 202, 0.54));
  content: "";
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 54px 20px 54px 54px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: #8c7041;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 520px;
  margin-bottom: 18px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-copy > p {
  max-width: 570px;
  margin-bottom: 28px;
  color: #536d67;
  font-size: 19px;
  line-height: 1.5;
}

.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  padding: 13px 20px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  color: white;
  background: linear-gradient(180deg, #5aaa82, #438c69);
  box-shadow: 0 8px 0 #34775b, 0 13px 20px rgba(52, 119, 91, 0.19);
}

.button-primary:active {
  box-shadow: 0 3px 0 #34775b, 0 7px 12px rgba(52, 119, 91, 0.16);
}

.button-soft {
  color: #755c2f;
  background: #f9e7b6;
  box-shadow: inset 0 0 0 2px #ecd294;
}

.button-soft span {
  margin-left: 5px;
  color: #866e43;
  font-size: 12px;
}

.button-outline {
  color: var(--ink);
  background: #fffdf7;
  box-shadow: inset 0 0 0 2px var(--line);
}

.hero-scene {
  position: relative;
  min-height: 440px;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 42px;
  right: 48px;
  width: 68px;
  height: 68px;
  background: #f8cd5e;
  border: 9px solid rgba(255, 246, 187, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(248, 205, 94, 0.13);
}

.hero-hill {
  position: absolute;
  bottom: -80px;
  border-radius: 50% 50% 0 0;
}

.hero-hill-back {
  right: -70px;
  width: 470px;
  height: 280px;
  background: #b7d5a8;
  transform: rotate(-8deg);
}

.hero-hill-front {
  right: -40px;
  bottom: -120px;
  width: 500px;
  height: 280px;
  background: #8ebd8c;
  transform: rotate(8deg);
}

.hero-animal {
  position: absolute;
  z-index: 1;
  width: 190px;
  height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 15px 10px rgba(66, 77, 47, 0.16));
}

.hero-animal-one {
  right: 205px;
  bottom: 42px;
  transform: rotate(-7deg);
}

.hero-animal-two {
  right: 44px;
  bottom: 36px;
  transform: rotate(5deg);
}

.hero-animal-three {
  right: 95px;
  bottom: 178px;
  width: 158px;
  height: 158px;
  transform: rotate(4deg);
}

.section-block {
  margin-top: 50px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 7px 19px;
}

.section-heading .eyebrow {
  margin-bottom: 5px;
}

.section-heading h2,
.grownup-note h2 {
  margin-bottom: 0;
  font-size: 31px;
  letter-spacing: -0.025em;
}

.section-heading > p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 14px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.step-card {
  position: relative;
  min-height: 230px;
  padding: 27px;
  overflow: hidden;
  border-radius: 30px;
}

.step-number {
  position: absolute;
  top: 19px;
  right: 20px;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #8c7041;
  background: #f8e9bf;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.step-symbol {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 17px;
  place-items: center;
  background: #e3f0e4;
  border-radius: 20px;
}

.step-symbol-home {
  background: #fae8c0;
}

.step-symbol-album {
  background: #e2ecf3;
}

.step-symbol svg {
  width: 39px;
  height: 39px;
  fill: none;
  stroke: var(--green-dark);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.step-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.48;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.level-card {
  overflow: hidden;
  border-radius: 32px;
}

.level-scene-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 145px;
  border-bottom: 2px solid var(--line);
}

.mini-habitat {
  position: relative;
  overflow: hidden;
}

.mini-habitat:first-child {
  border-right: 2px solid rgba(255, 255, 255, 0.78);
}

.mini-habitat svg {
  width: 100%;
  height: 100%;
}

.level-card-body {
  padding: 23px 24px 27px;
}

.level-label {
  color: #977541;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.level-card h3 {
  margin: 7px 0 8px;
  font-size: 24px;
}

.level-card p {
  min-height: 48px;
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.45;
}

.level-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: #6e817b;
  font-size: 13px;
  font-weight: 800;
}

.stars-small {
  white-space: nowrap;
  letter-spacing: 1px;
}

.star-filled {
  color: #efaf34;
  text-shadow: 0 2px 0 #c99122;
}

.star-empty {
  color: #ded8c7;
  text-shadow: none;
}

.level-start {
  width: 100%;
}

.grownup-note {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 42px;
  padding: 24px 30px;
  border-radius: 28px;
}

.note-icon {
  display: grid;
  flex: 0 0 54px;
  height: 54px;
  place-items: center;
  color: #8a6a33;
  background: #f8e7b7;
  border: 2px solid #ebcf8d;
  border-radius: 18px;
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 800;
}

.grownup-note h2 {
  margin-bottom: 5px;
  font-size: 20px;
}

.grownup-note p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.play-shell {
  padding: 28px;
  background: rgba(255, 253, 247, 0.67);
  border: 2px solid rgba(221, 211, 183, 0.83);
  border-radius: 38px;
  box-shadow: var(--shadow);
}

.play-heading {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.back-button,
.hint-button {
  min-height: 46px;
  padding: 10px 14px;
  color: var(--ink);
  background: #fffdf7;
  border: 2px solid var(--line);
  border-radius: 15px;
  cursor: pointer;
  font-weight: 900;
}

.back-button {
  justify-self: start;
}

.back-button span {
  margin-right: 4px;
}

.hint-button {
  justify-self: end;
  color: #795f2f;
  background: #f9e9b9;
  border-color: #ecd494;
}

.hint-button span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  place-items: center;
  color: #fff;
  background: #dca93b;
  border-radius: 50%;
}

.back-button:hover,
.hint-button:hover {
  transform: translateY(-1px);
}

.progress-copy {
  text-align: center;
}

.progress-copy span,
.progress-copy strong {
  display: block;
}

.progress-copy span {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.progress-copy strong {
  font-size: 18px;
}

.progress-track,
.album-progress {
  height: 10px;
  margin: 20px 0 25px;
  overflow: hidden;
  background: #e5e0cf;
  border-radius: 999px;
}

.progress-track span,
.album-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5da67d, #84bd82);
  border-radius: inherit;
  transition: width 300ms ease;
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.9fr) minmax(440px, 1.1fr);
  gap: 22px;
  align-items: stretch;
}

.animal-stage {
  display: flex;
  min-height: 455px;
  padding: 25px 24px 21px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  text-align: center;
}

.question-kicker {
  color: #91713c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.animal-picture-wrap {
  position: relative;
  display: grid;
  width: min(290px, 90%);
  height: 290px;
  margin: 2px auto -2px;
  place-items: center;
}

.picture-splotch {
  position: absolute;
  inset: 35px 17px 21px;
  background: #eef0d8;
  border-radius: 48% 52% 42% 58% / 54% 43% 57% 46%;
  transform: rotate(-5deg);
}

.picture-splotch::before,
.picture-splotch::after {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #e3e8c8;
  border-radius: 50%;
  content: "";
}

.picture-splotch::before {
  top: 8px;
  right: -8px;
}

.picture-splotch::after {
  bottom: 18px;
  left: -6px;
  width: 9px;
  height: 9px;
}

.animal-picture {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 13px 9px rgba(60, 72, 48, 0.14));
}

.animal-stage h1 {
  margin-bottom: 5px;
  font-size: 31px;
  letter-spacing: -0.025em;
}

.animal-stage > p {
  margin-bottom: 0;
  color: var(--muted);
}

.habitat-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.habitat-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 455px;
  padding: 0;
  overflow: hidden;
  flex-direction: column;
  color: var(--ink);
  background: #fffdf7;
  border: 3px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 12px 26px rgba(67, 76, 48, 0.09);
  cursor: pointer;
  text-align: left;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.habitat-card:hover:not(:disabled) {
  border-color: #b9caa8;
  box-shadow: 0 16px 30px rgba(67, 88, 56, 0.15);
  transform: translateY(-4px);
}

.habitat-card:disabled {
  cursor: default;
  opacity: 0.82;
}

.habitat-card.is-correct {
  border-color: var(--green);
  box-shadow: 0 0 0 5px rgba(77, 154, 117, 0.17), 0 16px 30px rgba(67, 88, 56, 0.14);
}

.habitat-card.is-correct:disabled {
  opacity: 1;
}

.habitat-card.is-wrong {
  border-color: var(--coral);
  box-shadow: 0 0 0 5px rgba(235, 116, 102, 0.13);
}

.habitat-card.is-hint {
  border-color: var(--yellow);
  box-shadow: 0 0 0 5px rgba(242, 189, 69, 0.2), 0 16px 30px rgba(130, 98, 35, 0.13);
}

.habitat-art {
  display: block;
  flex: 1 1 auto;
  min-height: 260px;
}

.habitat-art svg {
  width: 100%;
  height: 100%;
  min-height: 260px;
}

.habitat-copy {
  position: relative;
  z-index: 2;
  display: block;
  min-height: 133px;
  padding: 20px 21px 22px;
  background: rgba(255, 253, 247, 0.96);
  border-top: 2px solid rgba(221, 211, 183, 0.7);
}

.habitat-copy strong,
.habitat-copy small {
  display: block;
}

.habitat-copy strong {
  margin-bottom: 7px;
  font-size: 25px;
}

.habitat-copy small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.choice-mark {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: none;
  width: 43px;
  height: 43px;
  place-items: center;
  color: white;
  background: var(--green);
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(45, 89, 68, 0.22);
  font-size: 23px;
  font-weight: 900;
}

.is-correct .choice-mark,
.is-wrong .choice-mark,
.is-hint .choice-mark {
  display: grid;
}

.is-correct .choice-mark::before {
  content: "✓";
}

.is-wrong .choice-mark {
  background: var(--coral);
}

.is-wrong .choice-mark::before {
  content: "×";
}

.is-hint .choice-mark {
  color: #765d2f;
  background: var(--yellow);
}

.is-hint .choice-mark::before {
  content: "?";
}

.feedback-slot {
  min-height: 86px;
  margin-top: 18px;
}

.feedback-card {
  display: flex;
  min-height: 86px;
  padding: 15px 18px;
  align-items: center;
  gap: 13px;
  border: 2px solid #ddd7c4;
  border-radius: 22px;
}

.feedback-card > span {
  display: grid;
  flex: 0 0 42px;
  height: 42px;
  place-items: center;
  background: #e9e4d5;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 900;
}

.feedback-card p {
  flex: 1 1 auto;
  margin-bottom: 0;
  line-height: 1.4;
}

.feedback-idle {
  color: var(--muted);
  background: rgba(255, 253, 247, 0.72);
}

.feedback-try {
  background: #fff0eb;
  border-color: #efb3aa;
}

.feedback-try > span {
  color: white;
  background: var(--coral);
}

.feedback-hint {
  background: #fff5d7;
  border-color: #e8cb83;
}

.feedback-hint > span {
  color: #765d2f;
  background: var(--yellow);
}

.feedback-success {
  background: #e8f5e9;
  border-color: #9dccad;
}

.feedback-success > span {
  color: white;
  background: var(--green);
}

.feedback-next {
  flex: 0 0 auto;
}

.result-card {
  position: relative;
  max-width: 900px;
  margin: 45px auto 0;
  padding: 52px 54px 48px;
  overflow: hidden;
  border-radius: 42px;
  text-align: center;
}

.result-card::before,
.result-card::after {
  position: absolute;
  width: 220px;
  height: 220px;
  background: #e3efda;
  border-radius: 50%;
  content: "";
}

.result-card::before {
  top: -130px;
  left: -85px;
}

.result-card::after {
  right: -100px;
  bottom: -145px;
  background: #fae8bb;
}

.result-burst {
  position: relative;
  z-index: 1;
  display: grid;
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  place-items: center;
  color: white;
  background: var(--green);
  border: 10px solid #ddeddf;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(47, 112, 82, 0.2);
  font-size: 35px;
  font-weight: 900;
}

.result-card .eyebrow,
.result-card h1,
.result-card > p,
.result-stars,
.result-stats,
.result-animals,
.result-actions {
  position: relative;
  z-index: 1;
}

.result-card h1 {
  margin-bottom: 12px;
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.result-card > p {
  max-width: 610px;
  margin: 0 auto 16px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.48;
}

.result-stars {
  margin-bottom: 21px;
  font-size: 43px;
  letter-spacing: 7px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 620px;
  margin: 0 auto 23px;
  overflow: hidden;
  background: #f6f2e6;
  border: 2px solid #e0d8bf;
  border-radius: 22px;
}

.result-stats span {
  padding: 16px 12px;
}

.result-stats span + span {
  border-left: 2px solid #e0d8bf;
}

.result-stats b,
.result-stats small {
  display: block;
}

.result-stats b {
  margin-bottom: 2px;
  font-size: 25px;
}

.result-stats small {
  color: var(--muted);
  font-size: 12px;
}

.result-animals {
  display: flex;
  max-width: 700px;
  margin: 0 auto 27px;
  justify-content: center;
}

.result-animals img {
  width: 74px;
  height: 74px;
  margin-left: -12px;
  object-fit: contain;
  background: #fffdf7;
  border: 2px solid #e0d8bf;
  border-radius: 50%;
  filter: drop-shadow(0 5px 5px rgba(65, 78, 50, 0.12));
}

.result-animals img:first-child {
  margin-left: 0;
}

.result-actions {
  justify-content: center;
}

.album-shell {
  padding: 34px;
  background: rgba(255, 253, 247, 0.75);
  border: 2px solid rgba(221, 211, 183, 0.88);
  border-radius: 38px;
  box-shadow: var(--shadow);
}

.album-heading {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 18px;
  text-align: center;
}

.album-heading .back-button {
  grid-column: 1;
  align-self: center;
}

.album-heading > div {
  grid-column: 2;
}

.album-heading .eyebrow {
  margin-bottom: 5px;
}

.album-heading h1 {
  margin-bottom: 6px;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.035em;
}

.album-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.album-card {
  min-width: 0;
  overflow: hidden;
  background: #fffdf7;
  border: 2px solid var(--line);
  border-radius: 23px;
  box-shadow: 0 9px 20px rgba(70, 80, 52, 0.08);
}

.album-image {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  background: linear-gradient(145deg, #f7f2df, #e5efd9);
}

.album-image img {
  width: 95%;
  height: 95%;
  object-fit: contain;
  filter: drop-shadow(0 7px 6px rgba(67, 75, 51, 0.13));
}

.album-card > div:last-child {
  min-height: 68px;
  padding: 12px 13px 14px;
}

.album-card strong,
.album-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-card strong {
  margin-bottom: 3px;
  white-space: nowrap;
  font-size: 14px;
}

.album-card small {
  color: var(--muted);
  font-size: 12px;
}

.album-card.is-locked {
  color: #7e8176;
  border-style: dashed;
}

.album-card.is-locked .album-image {
  background: #ece9dd;
}

.album-card.is-locked .album-image span {
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  color: #a4a296;
  background: #f8f5eb;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 900;
}

.habitat-forest .habitat-art,
.mini-forest {
  background: #dcedcf;
}

.habitat-farm .habitat-art,
.mini-farm {
  background: #f8e8bd;
}

.habitat-desert .habitat-art,
.mini-desert {
  background: #f8dfad;
}

.habitat-north .habitat-art,
.mini-north {
  background: #dcecf0;
}

.habitat-jungle .habitat-art,
.mini-jungle {
  background: #d2e9c3;
}

.habitat-water .habitat-art,
.mini-water {
  background: #d5eaf3;
}

.sky-sun,
.water-sun {
  fill: #f5c75b;
}

.cold-sun {
  fill: #fff8d7;
}

.ground-back {
  fill: #a8cb8e;
}

.ground-front {
  fill: #77aa6e;
}

.trees path:first-child {
  fill: none;
  stroke: #805836;
  stroke-width: 11;
  stroke-linecap: round;
}

.trees path:last-child {
  fill: #4c8a58;
  stroke: #3e7750;
  stroke-width: 4;
  stroke-linejoin: round;
}

.barn path {
  fill: #d76758;
  stroke: #925042;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.barn path:nth-child(2),
.barn path:nth-child(4) {
  fill: #f0b861;
}

.fence {
  fill: none;
  stroke: #f7f0d7;
  stroke-width: 7;
  stroke-linecap: round;
}

.dune-back {
  fill: #e7bc66;
}

.dune-front {
  fill: #d9a64f;
}

.cactus {
  fill: none;
  stroke: #67905b;
  stroke-width: 14;
  stroke-linecap: round;
}

.ice-back {
  fill: #aed1dd;
  stroke: #8ab7c9;
  stroke-width: 4;
  stroke-linejoin: round;
}

.ice-front {
  fill: #eef9f7;
}

.snowcap {
  fill: #fffdf7;
}

.jungle-leaves path:first-child {
  fill: none;
  stroke: #745437;
  stroke-width: 10;
  stroke-linecap: round;
}

.jungle-leaves path:nth-child(2) {
  fill: #4a985e;
  stroke: #3f8053;
  stroke-width: 3;
}

.jungle-leaves path:last-child {
  fill: none;
  stroke: #4a985e;
  stroke-width: 7;
  stroke-linecap: round;
}

.water-horizon {
  fill: #72b8d8;
}

.wave-one,
.wave-two {
  fill: none;
  stroke: #effaf9;
  stroke-width: 7;
  stroke-linecap: round;
}

.fish {
  fill: #4c8cad;
  stroke: #3c7897;
  stroke-width: 3;
  stroke-linejoin: round;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .hero-copy {
    padding-left: 40px;
  }

  .hero-animal-one {
    right: 165px;
  }

  .hero-animal-two {
    right: 10px;
  }

  .hero-animal-three {
    right: 55px;
  }

  .level-grid {
    grid-template-columns: 1fr;
  }

  .level-card {
    display: grid;
    grid-template-columns: 42% 58%;
  }

  .level-scene-pair {
    height: 100%;
    min-height: 260px;
    border-right: 2px solid var(--line);
    border-bottom: 0;
  }

  .level-scene-pair svg {
    transform: scale(1.2);
  }

  .level-card p {
    min-height: 0;
  }

  .play-shell {
    padding: 22px;
  }

  .play-layout {
    grid-template-columns: minmax(275px, 0.7fr) minmax(390px, 1.3fr);
  }

  .animal-picture-wrap {
    height: 250px;
  }

  .animal-stage,
  .habitat-card {
    min-height: 420px;
  }

  .album-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app {
    width: min(100% - 22px, 1120px);
    padding-top: 11px;
  }

  .game-topbar {
    margin-bottom: 13px;
  }

  .brand-button small,
  .album-button > span:nth-child(2) {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 39px 28px 20px;
  }

  .hero h1 {
    font-size: clamp(43px, 10vw, 60px);
  }

  .hero-scene {
    min-height: 310px;
  }

  .hero-animal {
    width: 168px;
    height: 168px;
  }

  .hero-animal-one {
    right: 50%;
    bottom: 28px;
  }

  .hero-animal-two {
    right: 9%;
    bottom: 24px;
  }

  .hero-animal-three {
    right: 24%;
    bottom: 145px;
    width: 139px;
    height: 139px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .step-card {
    min-height: 0;
  }

  .level-card {
    display: block;
  }

  .level-scene-pair {
    height: 175px;
    min-height: 0;
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .level-scene-pair svg {
    transform: none;
  }

  .play-heading {
    grid-template-columns: 1fr 1fr;
  }

  .progress-copy {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .back-button {
    grid-column: 1;
    grid-row: 2;
  }

  .hint-button {
    grid-column: 2;
    grid-row: 2;
  }

  .play-layout {
    grid-template-columns: 1fr;
  }

  .animal-stage {
    min-height: 380px;
  }

  .animal-picture-wrap {
    height: 245px;
  }

  .habitat-card {
    min-height: 340px;
  }

  .habitat-art,
  .habitat-art svg {
    min-height: 205px;
  }

  .habitat-copy {
    min-height: 126px;
  }

  .feedback-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .feedback-card p {
    align-self: center;
  }

  .feedback-next {
    width: 100%;
  }

  .album-shell {
    padding: 23px;
  }

  .album-heading {
    display: block;
  }

  .album-heading .back-button {
    display: flex;
    margin-bottom: 25px;
  }

  .album-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .brand-button strong {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
  }

  .hero-copy {
    padding: 34px 20px 14px;
  }

  .hero-copy > p {
    font-size: 17px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-scene {
    min-height: 280px;
  }

  .hero-animal {
    width: 145px;
    height: 145px;
  }

  .hero-animal-one {
    right: 49%;
  }

  .hero-animal-two {
    right: 5%;
  }

  .hero-animal-three {
    right: 26%;
    bottom: 125px;
    width: 119px;
    height: 119px;
  }

  .section-block {
    margin-top: 38px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .grownup-note {
    align-items: flex-start;
    padding: 22px;
  }

  .play-shell {
    padding: 15px;
    border-radius: 28px;
  }

  .back-button,
  .hint-button {
    width: 100%;
    padding-inline: 9px;
    font-size: 13px;
  }

  .animal-stage {
    min-height: 330px;
    padding: 20px 14px 17px;
  }

  .animal-picture-wrap {
    width: 230px;
    height: 225px;
  }

  .animal-stage h1 {
    font-size: 27px;
  }

  .habitat-panel {
    gap: 10px;
  }

  .habitat-card {
    min-height: 286px;
    border-radius: 24px;
  }

  .habitat-art,
  .habitat-art svg {
    min-height: 165px;
  }

  .habitat-copy {
    min-height: 114px;
    padding: 15px 13px 16px;
  }

  .habitat-copy strong {
    font-size: 20px;
  }

  .habitat-copy small {
    font-size: 12px;
  }

  .choice-mark {
    top: 9px;
    right: 9px;
    width: 36px;
    height: 36px;
    border-width: 3px;
    font-size: 19px;
  }

  .feedback-card {
    padding: 13px;
  }

  .result-card {
    margin-top: 22px;
    padding: 38px 18px 31px;
    border-radius: 32px;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }

  .result-stats span + span {
    border-top: 2px solid #e0d8bf;
    border-left: 0;
  }

  .result-animals {
    flex-wrap: wrap;
  }

  .result-animals img {
    width: 59px;
    height: 59px;
  }

  .result-actions .button {
    width: 100%;
  }

  .album-shell {
    padding: 18px 13px;
    border-radius: 29px;
  }

  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .album-card > div:last-child {
    min-height: 65px;
    padding: 10px;
  }
}

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