:root {
  --cream: #fff8e8;
  --cream-deep: #f8e7bd;
  --lime: #9be870;
  --lime-dark: #206a5d;
  --sky: #73c7ff;
  --blue-deep: #2764a5;
  --tomato: #ff6b5f;
  --mango: #ffd166;
  --ink: #243042;
  --muted: #657084;
  --white: #ffffff;
  --line: rgba(36, 48, 66, 0.16);
  --shadow: 0 16px 40px rgba(36, 48, 66, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(100% - 32px, 1040px);
  margin-inline: auto;
}

.hero {
  position: relative;
  min-height: 94svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(115, 199, 255, 0.58), rgba(255, 248, 232, 0.98) 74%),
    var(--cream);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background:
    radial-gradient(circle at 10% 80%, var(--lime) 0 22px, transparent 24px),
    radial-gradient(circle at 38% 92%, #85d66a 0 30px, transparent 32px),
    radial-gradient(circle at 70% 82%, var(--lime) 0 26px, transparent 28px),
    radial-gradient(circle at 92% 90%, #85d66a 0 34px, transparent 36px);
  opacity: 0.9;
}

.hero-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 72px 0 110px;
}

.hero-copy-block {
  min-width: 0;
}

.eyebrow,
.section-kicker {
  width: fit-content;
  margin: 0 0 14px;
  padding: 6px 10px;
  border: 1px solid rgba(32, 106, 93, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--lime-dark);
  font-size: 0.85rem;
  font-weight: 800;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.55rem, 12vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-art-card {
  position: relative;
  width: min(100%, 520px);
  justify-self: center;
  padding: 10px;
  border: 2px solid rgba(36, 48, 66, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 12px 12px 0 rgba(255, 209, 102, 0.66), var(--shadow);
  transform: rotate(1.5deg);
}

.hero-art-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -16px;
  width: 82px;
  height: 28px;
  border: 2px solid rgba(36, 48, 66, 0.12);
  border-radius: 4px;
  background: rgba(255, 107, 95, 0.74);
  transform: rotate(-7deg);
}

.hero-art-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 2px);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.65rem, 5vw, 3rem);
  line-height: 1.14;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.hero-copy,
.section-copy {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-copy {
  margin-bottom: 26px;
  color: #39445a;
  font-size: clamp(1.05rem, 4vw, 1.36rem);
}

.hero-actions,
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn,
.icon-btn {
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 850;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
}

.btn.primary {
  background: var(--tomato);
  color: var(--white);
  box-shadow: 0 10px 0 #c84c43;
}

.btn.secondary {
  background: var(--lime-dark);
  color: var(--white);
  box-shadow: 0 9px 0 #12463d;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(36, 48, 66, 0.18);
  color: var(--ink);
}

.btn.compact {
  min-height: 44px;
  padding: 10px 14px;
}

.btn:active,
.icon-btn:active,
.flip-card:active {
  transform: translateY(3px);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.flip-card:focus-visible {
  outline: 3px solid rgba(39, 100, 165, 0.38);
  outline-offset: 3px;
}

.identity-ticket {
  width: min(100%, 380px);
  margin-top: 34px;
  padding: 15px 16px;
  border: 2px dashed rgba(36, 48, 66, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 8px 8px 0 rgba(255, 209, 102, 0.68);
}

.identity-ticket span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.identity-ticket strong {
  display: block;
  font-size: 1.16rem;
}

.sky-doodles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.cloud {
  position: absolute;
  width: 104px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  animation: float 6s ease-in-out infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 14px;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  left: 18px;
  width: 42px;
  height: 42px;
}

.cloud::after {
  right: 16px;
  width: 54px;
  height: 54px;
}

.cloud-one {
  top: 78px;
  left: 8%;
}

.cloud-two {
  top: 150px;
  right: 8%;
  transform: scale(0.85);
  animation-delay: -2s;
}

.paper-plane {
  position: absolute;
  right: 15%;
  bottom: 24%;
  width: 0;
  height: 0;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 54px solid var(--white);
  filter: drop-shadow(0 8px 0 rgba(39, 100, 165, 0.14));
  transform: rotate(-18deg);
  animation: plane 7s ease-in-out infinite;
}

.paper-plane::after {
  content: "";
  position: absolute;
  top: -8px;
  left: -44px;
  width: 34px;
  height: 2px;
  background: rgba(39, 100, 165, 0.28);
  transform: rotate(18deg);
}

.sticker {
  position: absolute;
  padding: 8px 12px;
  border: 2px solid rgba(36, 48, 66, 0.18);
  border-radius: var(--radius);
  background: var(--mango);
  font-size: 0.88rem;
  font-weight: 900;
  box-shadow: 6px 6px 0 rgba(36, 48, 66, 0.08);
}

.sticker-one {
  top: 18%;
  right: 22%;
  transform: rotate(8deg);
}

.sticker-two {
  bottom: 18%;
  left: 7%;
  background: var(--lime);
  transform: rotate(-7deg);
}

.section {
  padding: 72px 0;
}

.supply-section {
  background: var(--cream);
}

.games-section {
  background: #eaf6ff;
}

.blessing-section {
  background: #f5ffe9;
}

.two-column,
.blessing-wrap,
.section-head {
  display: grid;
  gap: 24px;
}

.supply-card,
.game-panel,
.blessing-box {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.supply-card {
  position: relative;
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(116px, 0.42fr) 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  overflow: hidden;
  transform: rotate(1.2deg);
}

.supply-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px dashed rgba(36, 48, 66, 0.18);
  border-radius: var(--radius);
}

.supply-card::after {
  content: "";
  position: absolute;
  top: -36px;
  right: 24px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--mango);
}

.supply-illustration {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  border-radius: var(--radius);
  filter: drop-shadow(0 10px 0 rgba(36, 48, 66, 0.08));
}

.supply-content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.card-label {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin-bottom: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--lime-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.supply-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.25rem, 5vw, 2rem);
  font-weight: 900;
  line-height: 1.28;
}

.supply-card.is-popping {
  animation: pop 0.34s ease;
}

.game-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.game-panel {
  padding: 18px;
}

.panel-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.score-pill {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.score-pill span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--cream);
  font-weight: 800;
}

.star-stage {
  position: relative;
  height: clamp(280px, 58vw, 380px);
  overflow: hidden;
  border: 2px solid rgba(39, 100, 165, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(115, 199, 255, 0.58), rgba(255, 255, 255, 0.95)),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(255, 255, 255, 0.26) 26px 28px);
  touch-action: manipulation;
}

.stage-hint {
  position: absolute;
  inset: auto 16px 16px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.star-target {
  position: absolute;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent url("assets/images/star-happy.svg") center / contain no-repeat;
  color: var(--ink);
  cursor: pointer;
  box-shadow: none;
  filter: drop-shadow(0 7px 0 rgba(255, 107, 95, 0.22));
  animation: starIn 0.18s ease-out, starPulse 1.1s ease-in-out infinite;
  touch-action: manipulation;
}

.star-target::before,
.star-target::after {
  content: none;
}

.game-actions {
  margin-top: 14px;
}

.game-result {
  min-height: 28px;
  margin: 0;
  color: var(--lime-dark);
  font-weight: 900;
}

.icon-btn {
  width: 48px;
  height: 48px;
  justify-self: start;
  background: var(--mango);
  color: var(--ink);
  box-shadow: 0 8px 0 #d8a63d;
}

.icon-btn span {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

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

.flip-card {
  position: relative;
  min-height: 148px;
  border: 2px solid rgba(36, 48, 66, 0.14);
  border-radius: var(--radius);
  background: var(--cream);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    background 0.25s ease;
}

.flip-card:disabled {
  color: inherit;
  cursor: default;
  opacity: 1;
}

.flip-card .front,
.flip-card .back {
  position: absolute;
  inset: 0;
  padding: 12px;
  font-weight: 900;
  text-align: center;
}

.flip-card .front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--blue-deep);
  font-size: 0.92rem;
  line-height: 1.15;
}

.flip-card .front img {
  width: min(100%, 124px);
  height: auto;
  display: block;
  filter: drop-shadow(0 7px 0 rgba(36, 48, 66, 0.08));
}

.flip-card .front span {
  display: block;
}

.flip-card .back {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: var(--lime-dark);
  font-size: clamp(1rem, 4vw, 1.35rem);
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.flip-card.is-flipped {
  background: var(--lime);
  animation: flipPop 0.22s ease;
}

.flip-card.is-flipped .front {
  opacity: 0;
}

.flip-card.is-flipped .back {
  opacity: 1;
  transform: scale(1);
}

.blessing-wrap {
  align-items: center;
}

.blessing-box {
  padding: 22px;
}

.blessing-box p {
  margin-bottom: 18px;
  font-size: clamp(1.24rem, 4vw, 1.8rem);
  font-weight: 900;
  line-height: 1.35;
}

.blessing-box.is-changing {
  animation: pop 0.3s ease;
}

.section-head {
  align-items: end;
  margin-bottom: 20px;
}

.site-footer {
  padding: 42px 0;
  background: var(--ink);
  color: var(--white);
  text-align: center;
}

.site-footer p {
  margin-bottom: 8px;
  font-weight: 900;
}

.site-footer span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

@media (hover: hover) {
  .btn:hover,
  .icon-btn:hover,
  .flip-card:hover {
    transform: translateY(-2px);
  }
}

@media (min-width: 680px) {
  .hero-wrap {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.8fr);
  }

  .two-column,
  .blessing-wrap,
  .section-head {
    grid-template-columns: 1fr 1fr;
  }

  .game-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .panel-heading {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .icon-btn {
    justify-self: end;
  }

}

@media (min-width: 920px) {
  .hero-wrap {
    padding-top: 96px;
  }

  .supply-card {
    min-height: 300px;
    grid-template-columns: 180px 1fr;
  }

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

@media (max-width: 520px) {
  .wrap {
    width: min(100% - 24px, 1040px);
  }

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

  .hero-art-card {
    width: min(100%, 360px);
  }

  .section {
    padding: 56px 0;
  }

  .supply-card {
    grid-template-columns: 1fr;
  }

  .supply-illustration {
    width: min(100%, 260px);
    justify-self: center;
  }

  .sticker-one {
    right: 6%;
    top: 11%;
  }

  .sticker-two {
    left: 5%;
    bottom: 11%;
  }

  .paper-plane {
    right: 9%;
    bottom: 30%;
  }
}

@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;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(14px);
  }
}

@keyframes plane {
  0%,
  100% {
    transform: translate(0, 0) rotate(-18deg);
  }
  50% {
    transform: translate(-20px, 12px) rotate(-12deg);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.98) rotate(1.2deg);
  }
  60% {
    transform: scale(1.03) rotate(-0.4deg);
  }
  100% {
    transform: scale(1) rotate(1.2deg);
  }
}

@keyframes starIn {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes starPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes flipPop {
  0% {
    transform: scale(1);
  }
  55% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}
