:root {
  color-scheme: light;
  --ink: #283044;
  --muted: #697386;
  --line: rgba(40, 48, 68, 0.16);
  --cream: #fff9e8;
  --sky: #cfefff;
  --mint: #cfffdd;
  --pink: #ffd7ea;
  --yellow: #ffe37a;
  --blue: #4e8cff;
  --green: #26b66d;
  --red: #f05b66;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 227, 122, 0.7), transparent 26%),
    radial-gradient(circle at 86% 10%, rgba(255, 215, 234, 0.75), transparent 24%),
    linear-gradient(135deg, var(--sky), var(--cream) 52%, var(--mint));
}

button,
select {
  font: inherit;
}

.app {
  width: min(1100px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 38px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #397798;
  font-weight: 900;
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: 0;
}

.intro,
.mission p {
  color: var(--muted);
  line-height: 1.7;
}

.mascot {
  position: relative;
  min-height: 170px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 0 rgba(40, 48, 68, 0.18);
  overflow: hidden;
}

.moon {
  position: absolute;
  width: 92px;
  height: 92px;
  right: 26px;
  top: 28px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: inset -18px 0 0 #ffd15f;
}

.star {
  position: absolute;
  width: 54px;
  height: 54px;
  background: #ff8fb8;
  clip-path: polygon(50% 0, 61% 34%, 98% 34%, 68% 55%, 79% 90%, 50% 68%, 21% 90%, 32% 55%, 2% 34%, 39% 34%);
}

.star-a {
  left: 30px;
  top: 38px;
}

.star-b {
  left: 82px;
  bottom: 28px;
  transform: rotate(18deg) scale(0.78);
  background: #71d6ff;
}

.detective {
  position: absolute;
  right: 52px;
  bottom: 20px;
  font-size: 56px;
}

.control-panel,
.score-board,
.game-board {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 0 rgba(40, 48, 68, 0.16);
}

.control-panel {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 14px;
}

.control-panel label {
  font-weight: 900;
}

select {
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

button {
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

button:hover,
button:focus-visible {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.score-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
}

.score-board div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f3fbff;
  text-align: center;
}

.score-board span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.score-board strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.game-board {
  padding: 18px;
}

.mission {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.mission h2 {
  margin-bottom: 0;
  font-size: 25px;
}

.puzzle-zone {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.shadow-card,
.choice {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
}

.shadow-card {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 300px;
  padding: 18px;
  background: linear-gradient(180deg, #f4f6fb, #ffffff);
}

.shadow-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

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

.choice {
  display: grid;
  place-items: center;
  min-height: 142px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(40, 48, 68, 0.24);
}

.choice:hover,
.choice:focus-visible {
  outline: 3px solid #71d6ff;
}

.choice.correct {
  background: #dfffea;
  border-color: var(--green);
}

.choice.wrong {
  background: #ffe5e8;
  border-color: var(--red);
}

.shape-display {
  width: 170px;
  height: 170px;
  position: relative;
  display: grid;
  place-items: center;
}

.shape-display.shadow {
  filter: grayscale(1) brightness(0.42);
  opacity: 0.84;
}

.shape {
  position: absolute;
  width: 92px;
  height: 92px;
  transform: rotate(var(--rot));
  background: var(--shape-color);
  box-shadow: inset -8px -8px 0 rgba(40, 48, 68, 0.14);
}

.shape.star {
  clip-path: polygon(50% 0, 61% 34%, 98% 34%, 68% 55%, 79% 90%, 50% 68%, 21% 90%, 32% 55%, 2% 34%, 39% 34%);
}

.shape.diamond {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.shape.blob {
  border-radius: 45% 55% 42% 58% / 55% 38% 62% 45%;
}

.shape.rocket {
  clip-path: polygon(50% 0, 82% 30%, 72% 88%, 50% 72%, 28% 88%, 18% 30%);
}

.dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.dot.one {
  left: 36px;
  top: 40px;
}

.dot.two {
  right: 36px;
  top: 42px;
}

.dot.three {
  left: 72px;
  bottom: 32px;
}

.stripe {
  position: absolute;
  width: 96px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  transform: rotate(var(--stripe-rot));
}

.feedback {
  margin-top: 16px;
  min-height: 48px;
  padding: 13px 15px;
  border-radius: 8px;
  font-weight: 900;
  line-height: 1.5;
}

.feedback.neutral {
  background: #f3fbff;
}

.feedback.good {
  background: #dcffe9;
  color: #167342;
}

.feedback.bad {
  background: #ffe1e5;
  color: #9b2632;
}

@media (max-width: 820px) {
  .hero,
  .puzzle-zone,
  .control-panel {
    grid-template-columns: 1fr;
  }

  .mascot {
    min-height: 130px;
  }

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

  .shadow-card {
    min-height: 230px;
  }
}

@media (max-width: 560px) {
  .choice-area {
    grid-template-columns: 1fr;
  }

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

  .shape-display {
    width: 142px;
    height: 142px;
  }
}
