:root {
  color-scheme: light;
  --ink: #244c45;
  --muted: #687f78;
  --paper: #fffdf6;
  --cream: #f6efd8;
  --line: #ded1a8;
  --green: #4c9b70;
  --green-dark: #32785a;
  --coral: #ed795f;
  --coral-dark: #c95543;
  --gold: #e9ad39;
  --blue: #68a9cd;
  --violet: #8172b7;
  --shadow: 0 18px 42px rgba(75, 67, 38, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #f2ecd3;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.82) 0 2px, transparent 3px) 0 0 / 38px 38px,
    linear-gradient(150deg, #fbf8eb 0%, #f0e8cb 52%, #e9e4c8 100%);
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 4px solid rgba(91, 152, 199, 0.4);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

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

.paper,
.loading-card {
  border: 2px solid rgba(214, 195, 144, 0.78);
  border-radius: 30px;
  background: rgba(255, 253, 246, 0.97);
  box-shadow: var(--shadow);
}

.loading-card {
  display: grid;
  min-height: 380px;
  place-content: center;
  text-align: center;
}

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

.loading-card p {
  margin: 12px 0 0;
  font-size: 22px;
  font-weight: 900;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #f3b24b, #e47767);
  box-shadow: 0 8px 0 rgba(190, 87, 68, 0.18);
  font-size: 28px;
  transition: transform 160ms ease;
}

.brand:hover .brand-mark {
  transform: translateY(-2px) rotate(-3deg);
}

.brand small,
.eyebrow {
  display: block;
  color: #9a691e;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  overflow: hidden;
  font-size: clamp(18px, 2.2vw, 24px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions,
.hero-actions,
.game-actions,
.result-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.icon-button,
.primary-button,
.soft-button,
.route-card,
.stage-card,
.cycle-slot,
.album-card,
.back-link {
  min-height: 46px;
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.icon-button:hover,
.primary-button:hover,
.soft-button:hover,
.route-card:hover,
.stage-card:hover:not(:disabled),
.album-card:hover:not(:disabled),
.back-link:hover {
  transform: translateY(-2px);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 48px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 900;
}

.primary-button,
.soft-button {
  padding: 13px 20px;
  border-radius: 16px;
  font-weight: 900;
}

.primary-button {
  color: #fff;
  background: var(--coral);
  box-shadow: 0 7px 0 var(--coral-dark);
}

.primary-button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 var(--coral-dark);
}

.soft-button {
  border: 2px solid var(--line);
  color: var(--ink);
  background: #fffaf0;
  box-shadow: 0 5px 0 rgba(177, 153, 99, 0.18);
}

.soft-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(177, 153, 99, 0.18);
}

button:disabled {
  cursor: default;
}

.hero {
  display: grid;
  min-height: 470px;
  overflow: hidden;
  grid-template-columns: 1.02fr 0.98fr;
}

.hero-copy {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: clamp(30px, 5vw, 64px);
}

.hero h1,
.game-head h1,
.result-card h1,
.album-head h1,
.detail-card h1 {
  margin: 8px 0 14px;
  color: #1e4942;
  font-size: clamp(36px, 5.5vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-copy > p {
  max-width: 560px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.48;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.hero-note span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
}

.hero-art {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 15%, rgba(255, 255, 255, 0.86), transparent 28%),
    linear-gradient(155deg, #dcebcf 0%, #f5dca9 54%, #edbd9d 100%);
}

.hero-art::before,
.hero-art::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.hero-art::before {
  width: 320px;
  height: 320px;
  right: -110px;
  top: -105px;
  border: 38px solid rgba(255, 255, 255, 0.28);
}

.hero-art::after {
  width: 170px;
  height: 170px;
  left: -80px;
  bottom: -82px;
  background: rgba(255, 255, 255, 0.26);
}

.hero-plant {
  position: absolute;
  width: 255px;
  height: 255px;
  right: -28px;
  bottom: -18px;
  object-fit: contain;
  opacity: 0.74;
  filter: drop-shadow(0 14px 14px rgba(59, 87, 61, 0.16));
}

.mini-cycle {
  position: absolute;
  inset: 32px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.mini-stage {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  background: rgba(255, 253, 245, 0.82);
  box-shadow: 0 12px 24px rgba(75, 73, 47, 0.12);
  transform: rotate(-2deg);
}

.mini-stage:nth-child(even) {
  transform: rotate(2deg);
}

.mini-stage > span {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-weight: 900;
}

.stage-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 152px;
  overflow: visible;
  filter: drop-shadow(0 7px 5px rgba(54, 80, 67, 0.12));
}

.mini-svg {
  width: 90%;
  max-height: 160px;
}

.how {
  display: grid;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding: 26px 30px;
  grid-template-columns: 250px 1fr;
}

.how h2,
.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.how ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(4, 1fr);
}

.how li {
  display: grid;
  min-height: 92px;
  align-content: center;
  padding: 13px 12px 13px 58px;
  position: relative;
  border-radius: 20px;
  background: #f8f3e3;
}

.how li > span {
  position: absolute;
  top: 50%;
  left: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 900;
  transform: translateY(-50%);
}

.how li b {
  font-size: 16px;
}

.how li small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.25;
}

.routes-section {
  margin-top: 34px;
}

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

.section-heading p {
  max-width: 270px;
  margin: 0 0 3px;
  color: var(--muted);
  text-align: right;
}

.routes-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.route-card {
  display: flex;
  min-height: 260px;
  align-items: flex-start;
  padding: 24px;
  flex-direction: column;
  color: var(--ink);
  text-align: left;
}

.route-card::after {
  width: 100%;
  height: 8px;
  margin-top: auto;
  border-radius: 12px;
  background: var(--route-color);
  content: "";
}

.route-top {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.route-top i {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: var(--route-color);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--route-color) 25%, transparent);
  font-style: normal;
  font-size: 22px;
  font-weight: 900;
}

.route-top em {
  padding: 6px 9px;
  border-radius: 9px;
  color: #8b672b;
  background: #fff2c9;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.route-card > strong {
  font-size: 25px;
  line-height: 1.08;
}

.route-card > small {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.42;
}

.route-card > b {
  margin: auto 0 18px;
  color: color-mix(in srgb, var(--route-color) 70%, #254c45);
  font-size: 15px;
}

.adult-note {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 18px;
  padding: 20px 25px;
}

.adult-note > span {
  font-size: 36px;
}

.adult-note b {
  display: block;
  margin-bottom: 3px;
}

.adult-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.game-shell {
  padding: clamp(20px, 3.5vw, 38px);
}

.game-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.game-head h1 {
  margin-bottom: 8px;
  font-size: clamp(34px, 4.5vw, 50px);
}

.game-head p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.progress-flower {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.progress-flower span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: #fffaf0;
  font-weight: 900;
}

.progress-flower .done {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.progress-flower .current {
  border-color: var(--coral);
  color: #fff;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(237, 121, 95, 0.14);
}

.garden-board {
  display: grid;
  align-items: stretch;
  gap: 18px;
  grid-template-columns: 190px 1fr;
}

.plant-panel {
  position: relative;
  display: flex;
  min-height: 430px;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  padding: 18px 14px;
  border: 2px dashed #c9bf96;
  border-radius: 26px;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.95), transparent 40%),
    #edf1dd;
}

.plant-panel::before {
  position: absolute;
  inset: auto -20px -26px;
  height: 90px;
  border-radius: 50% 50% 0 0;
  background: #d9d1a3;
  content: "";
}

.plant-panel img {
  position: relative;
  z-index: 1;
  width: 170px;
  height: 290px;
  object-fit: contain;
  filter: drop-shadow(0 14px 13px rgba(51, 85, 57, 0.16));
}

.plant-panel b {
  position: relative;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 13px;
  background: rgba(255, 253, 246, 0.9);
  font-size: 15px;
}

.plant-label {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  color: #8d6b30;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.puzzle-panel {
  min-width: 0;
}

.cycle-track {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cycle-slot {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 212px;
  align-content: center;
  justify-items: center;
  padding: 20px 8px 12px;
  border: 3px dashed #cbbf96;
  border-radius: 24px;
  color: var(--ink);
  background: #fbf8eb;
}

.cycle-slot.has-stage {
  border-style: solid;
  border-color: #b8cfae;
  background: #f5f8e9;
  box-shadow: 0 8px 19px rgba(67, 93, 70, 0.1);
}

.cycle-slot.has-stage:hover:not(:disabled) {
  background: #fff1e5;
  transform: translateY(-2px);
}

.cycle-slot.is-wrong {
  border-color: var(--coral);
  background: #fff0ea;
  animation: soft-shake 280ms ease;
}

.cycle-slot.is-hinted {
  border-color: var(--gold);
  background: #fff7d9;
  box-shadow: 0 0 0 5px rgba(233, 173, 57, 0.14);
}

.cycle-track.is-solved .cycle-slot {
  border-color: var(--green);
  background: #edf8ed;
}

.slot-number {
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 9px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #9c8d61;
  font-weight: 900;
}

.is-solved .slot-number {
  background: var(--green);
}

.cycle-slot .stage-svg {
  width: 100%;
  max-height: 138px;
}

.cycle-slot > b {
  margin-top: -3px;
  font-size: 16px;
}

.empty-mark {
  color: #c5b786;
  font-family: Georgia, serif;
  font-size: 64px;
  line-height: 1;
}

.cycle-slot > small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.stage-shelf {
  display: grid;
  gap: 11px;
  margin-top: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stage-card {
  display: grid;
  min-width: 0;
  min-height: 180px;
  align-content: center;
  justify-items: center;
  padding: 9px 8px 12px;
  border: 2px solid var(--line);
  border-radius: 22px;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: 0 6px 0 rgba(176, 154, 102, 0.16);
}

.stage-card:hover:not(:disabled) {
  border-color: #8fc19e;
  background: #f7fbea;
  box-shadow: 0 9px 0 rgba(78, 142, 101, 0.16);
}

.stage-card:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(176, 154, 102, 0.16);
}

.stage-card.is-used {
  opacity: 0.23;
  box-shadow: none;
}

.stage-card .stage-svg {
  width: 100%;
  max-height: 126px;
}

.stage-card > b {
  margin-top: -2px;
  font-size: 15px;
}

.mystery-name {
  color: #718079;
}

.cycle-track.is-wheel {
  position: relative;
  max-width: 610px;
  margin: 0 auto;
  grid-template-areas:
    "one two"
    "four three";
  grid-template-columns: 1fr 1fr;
}

.cycle-track.is-wheel .slot-1 {
  grid-area: one;
}

.cycle-track.is-wheel .slot-2 {
  grid-area: two;
}

.cycle-track.is-wheel .slot-3 {
  grid-area: three;
}

.cycle-track.is-wheel .slot-4 {
  grid-area: four;
}

.cycle-track.is-wheel .cycle-slot {
  min-height: 190px;
}

.wheel-center {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 5px solid #fffdf6;
  border-radius: 50%;
  color: #fff;
  background: var(--violet);
  box-shadow: 0 7px 16px rgba(65, 57, 103, 0.22);
  font-size: 32px;
  transform: translate(-50%, -50%);
}

.feedback-placeholder {
  min-height: 18px;
  margin-top: 14px;
}

.feedback {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 17px;
  border-radius: 18px;
  font-weight: 800;
}

.feedback > span {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  font-size: 19px;
}

.feedback p {
  margin: 0;
  line-height: 1.38;
}

.feedback.gentle {
  background: #f3efe2;
}

.feedback.error {
  color: #7d4437;
  background: #ffe7df;
}

.feedback.hint {
  color: #75591d;
  background: #fff1c5;
}

.feedback.success {
  color: #286a4c;
  background: #ddf3df;
}

.game-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.hint-button {
  margin-right: auto;
  background: #fff4c8;
}

.success-note {
  margin-top: 16px;
  padding: 18px;
  border: 2px solid #b9d7b8;
  border-radius: 22px;
  background: #edf8ea;
}

.success-cycle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.success-cycle span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.success-cycle i {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-style: normal;
  font-weight: 900;
}

.success-cycle em {
  color: #82a188;
  font-style: normal;
  font-weight: 900;
}

.success-note p {
  margin: 15px 0 0;
  color: #466d5a;
  text-align: center;
  line-height: 1.42;
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 68px);
  text-align: center;
}

.result-card::before,
.result-card::after {
  position: absolute;
  border-radius: 50%;
  background: rgba(233, 173, 57, 0.12);
  content: "";
}

.result-card::before {
  width: 250px;
  height: 250px;
  top: -110px;
  left: -90px;
}

.result-card::after {
  width: 190px;
  height: 190px;
  right: -75px;
  bottom: -90px;
}

.result-butterfly {
  width: min(330px, 72vw);
  margin: -20px auto -18px;
}

.result-butterfly .stage-svg {
  max-height: 220px;
}

.result-card h1 {
  font-size: clamp(38px, 6vw, 64px);
}

.stars {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 20px 0;
}

.stars span {
  color: #d7d0b8;
  font-size: clamp(46px, 7vw, 70px);
  filter: drop-shadow(0 5px 0 rgba(116, 95, 45, 0.12));
}

.stars .earned {
  color: #efb33e;
}

.result-card > p {
  max-width: 580px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.45;
}

.result-stats {
  display: grid;
  max-width: 610px;
  gap: 12px;
  margin: 28px auto;
  grid-template-columns: repeat(3, 1fr);
}

.result-stats span {
  display: grid;
  min-height: 100px;
  place-content: center;
  padding: 14px;
  border-radius: 20px;
  background: #f6f1e2;
}

.result-stats b {
  color: var(--green-dark);
  font-size: 31px;
}

.result-stats small {
  color: var(--muted);
}

.result-actions {
  position: relative;
  z-index: 2;
  justify-content: center;
}

.album-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 30px 34px;
}

.album-head h1 {
  margin-bottom: 7px;
  font-size: clamp(34px, 5vw, 50px);
}

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

.album-count {
  display: grid;
  width: 105px;
  height: 105px;
  flex: 0 0 auto;
  place-content: center;
  border: 8px solid #dbe9cc;
  border-radius: 50%;
  text-align: center;
  background: #fffdf6;
}

.album-count b {
  color: var(--green-dark);
  font-size: 34px;
  line-height: 1;
}

.album-count span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.album-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  grid-template-columns: repeat(3, 1fr);
}

.album-card {
  position: relative;
  display: grid;
  min-height: 330px;
  overflow: hidden;
  align-content: end;
  justify-items: center;
  padding: 18px;
  color: var(--ink);
  text-align: center;
}

.album-card > img {
  position: absolute;
  width: 175px;
  height: 175px;
  top: 12px;
  right: -31px;
  object-fit: contain;
  opacity: 0.33;
}

.album-butterfly {
  position: relative;
  z-index: 1;
  width: 220px;
  margin-bottom: -6px;
}

.album-card strong {
  position: relative;
  z-index: 1;
  font-size: 20px;
}

.album-card small {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  color: var(--green-dark);
  font-weight: 900;
}

.album-number {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 15px;
  color: #a1813b;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 900;
}

.album-card.is-locked {
  min-height: 260px;
  align-content: center;
  background:
    repeating-linear-gradient(-45deg, transparent 0 10px, rgba(197, 188, 153, 0.1) 10px 20px),
    #f4f0e3;
}

.lock-mark {
  display: grid;
  width: 92px;
  height: 92px;
  margin-bottom: 18px;
  place-items: center;
  border: 3px dashed #c2b68e;
  border-radius: 50%;
  color: #b6a978;
  font-family: Georgia, serif;
  font-size: 50px;
}

.album-card.is-locked strong {
  color: #8c897a;
}

.album-card.is-locked small {
  color: #9a9788;
}

.center-actions {
  justify-content: center;
  margin-top: 24px;
}

.detail-card {
  padding: clamp(22px, 4vw, 42px);
}

.back-link {
  padding: 10px 4px;
  color: var(--green-dark);
  background: transparent;
  font-weight: 900;
}

.detail-title {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  margin: 12px 0 22px;
  padding: 25px 30px;
  border-radius: 26px;
  background: linear-gradient(140deg, #eff2dd, #fbe2c6);
}

.detail-title h1 {
  margin-bottom: 8px;
  font-size: clamp(36px, 5vw, 54px);
}

.detail-title p {
  margin: 0;
  color: var(--muted);
}

.detail-title img {
  width: 220px;
  height: 190px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 10px rgba(53, 76, 53, 0.16));
}

.detail-stages {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}

.detail-stages article {
  position: relative;
  padding: 12px 15px 18px;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: #fffdf8;
}

.detail-stages article > span {
  position: absolute;
  top: 11px;
  left: 11px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-weight: 900;
}

.detail-stages h2 {
  margin: 3px 0 8px;
  font-size: 21px;
}

.detail-stages p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
}

.detail-fact {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 17px;
  padding: 18px;
  border-radius: 20px;
  background: #fff1c7;
}

.detail-fact > span {
  font-size: 30px;
}

.detail-fact p {
  margin: 0;
  line-height: 1.42;
}

@keyframes soft-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-5px);
  }
  70% {
    transform: translateX(5px);
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1.12fr 0.88fr;
  }

  .hero-copy {
    padding: 38px;
  }

  .mini-cycle {
    inset: 24px 18px;
  }

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

  .garden-board {
    grid-template-columns: 150px 1fr;
  }

  .plant-panel img {
    width: 145px;
  }

  .cycle-slot {
    min-height: 190px;
  }

  .stage-card {
    min-height: 165px;
  }

  .detail-stages {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .topbar {
    align-items: flex-start;
  }

  .top-actions {
    justify-content: flex-end;
  }

  .sound-button span:last-child {
    display: none;
  }

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

  .hero-copy {
    padding: 32px 28px;
  }

  .hero-art {
    min-height: 400px;
  }

  .hero-plant {
    width: 220px;
    height: 220px;
  }

  .how {
    padding: 24px;
  }

  .how ol {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .route-card {
    min-height: 220px;
  }

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

  .section-heading p {
    text-align: left;
  }

  .game-head {
    flex-direction: column;
  }

  .garden-board {
    grid-template-columns: 1fr;
  }

  .plant-panel {
    min-height: 160px;
    align-items: center;
    justify-content: center;
    padding-left: 180px;
  }

  .plant-panel::before {
    inset: auto -20px -48px;
  }

  .plant-panel img {
    position: absolute;
    width: 170px;
    height: 155px;
    left: 10px;
    bottom: -5px;
  }

  .plant-panel b {
    font-size: 18px;
  }

  .cycle-slot,
  .cycle-track.is-wheel .cycle-slot {
    min-height: 176px;
  }

  .stage-card {
    min-height: 152px;
  }

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

  .album-card {
    min-height: 300px;
  }
}

@media (max-width: 520px) {
  .brand small {
    display: none;
  }

  .brand strong {
    max-width: 150px;
    white-space: normal;
    line-height: 1.02;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 25px;
  }

  .icon-button {
    padding: 9px 10px;
  }

  .top-actions .icon-button:last-child span:last-child {
    font-size: 0;
  }

  .top-actions .icon-button:last-child span:last-child::after {
    font-size: 14px;
    content: "Альбом";
  }

  .hero-copy {
    padding: 28px 22px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero-art {
    min-height: 360px;
  }

  .mini-cycle {
    inset: 17px 13px;
    gap: 9px;
  }

  .mini-stage {
    border-radius: 21px;
  }

  .mini-stage > span {
    width: 26px;
    height: 26px;
    top: 7px;
    left: 8px;
    font-size: 13px;
  }

  .how ol {
    grid-template-columns: 1fr;
  }

  .adult-note {
    align-items: flex-start;
  }

  .game-shell {
    padding: 16px 12px 20px;
    border-radius: 24px;
  }

  .game-head h1 {
    font-size: 35px;
  }

  .game-head p {
    font-size: 16px;
  }

  .progress-flower span {
    width: 34px;
    height: 34px;
  }

  .plant-panel {
    min-height: 135px;
    padding-left: 140px;
  }

  .plant-panel img {
    width: 140px;
    height: 135px;
  }

  .cycle-track,
  .stage-shelf {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cycle-slot,
  .cycle-track.is-wheel .cycle-slot {
    min-height: 166px;
    border-radius: 19px;
  }

  .cycle-slot .stage-svg {
    max-height: 112px;
  }

  .stage-card {
    min-height: 150px;
    border-radius: 19px;
  }

  .stage-card .stage-svg {
    max-height: 108px;
  }

  .cycle-track.is-wheel {
    grid-template-columns: 1fr 1fr;
  }

  .wheel-center {
    width: 49px;
    height: 49px;
    border-width: 4px;
    font-size: 26px;
  }

  .success-cycle {
    align-items: stretch;
    flex-direction: column;
  }

  .success-cycle span {
    justify-content: flex-start;
  }

  .success-cycle em {
    display: none;
  }

  .game-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .game-actions .primary-button,
  .game-actions .soft-button {
    width: 100%;
  }

  .result-card {
    padding: 28px 18px 34px;
  }

  .result-card h1 {
    font-size: 40px;
  }

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

  .result-stats span {
    min-height: 82px;
  }

  .result-actions {
    display: grid;
  }

  .album-head {
    align-items: flex-start;
    padding: 24px 20px;
  }

  .album-count {
    width: 80px;
    height: 80px;
    border-width: 6px;
  }

  .album-count b {
    font-size: 27px;
  }

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

  .album-card {
    min-height: 300px;
  }

  .detail-title {
    align-items: flex-start;
    padding: 22px;
    flex-direction: column;
  }

  .detail-title img {
    width: 100%;
    height: 155px;
  }

  .detail-stages {
    grid-template-columns: 1fr;
  }
}
