:root {
  --ink: #16392f;
  --green: #2c7a5a;
  --leaf: #4fb06d;
  --mint: #e9fbf2;
  --sky: #c9f2ff;
  --water: #5bb7e5;
  --sun: #ffc857;
  --coral: #ff6f61;
  --rose: #ffb9c9;
  --paper: #fffdf4;
  --line: rgba(22, 57, 47, 0.18);
  --shadow: 0 18px 38px rgba(22, 57, 47, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Avenir, "Avenir Next", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, var(--sky), var(--mint) 56%, #fffdf4);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 13px 18px;
  color: #ffffff;
  background: var(--green);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 8px 0 rgba(22, 57, 47, 0.18);
}

button:hover,
button:focus-visible {
  background: #23684c;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.plain-button {
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--line);
}

.plain-button:hover,
.plain-button:focus-visible {
  background: var(--mint);
}

.hidden {
  display: none !important;
}

.game-shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  display: grid;
  min-height: 92vh;
  place-items: center;
  overflow: hidden;
  padding: 32px;
}

.hero-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(233, 251, 242, 0.94), rgba(233, 251, 242, 0.7), rgba(201, 242, 255, 0.28));
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin-right: auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 14ch;
  font-size: 3.6rem;
  line-height: 1.02;
}

h2 {
  margin: 0 0 14px;
  font-size: 2.1rem;
  line-height: 1.12;
}

.lead {
  max-width: 640px;
  margin: 20px 0 28px;
  font-size: 1.18rem;
  line-height: 1.7;
  font-weight: 650;
}

.start-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.start-row {
  display: flex;
  width: min(620px, 100%);
  gap: 12px;
}

input,
textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #ffffff;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 22px;
  background: rgba(255, 253, 244, 0.94);
  border-bottom: 2px solid var(--line);
  backdrop-filter: blur(10px);
}

.player-chip,
.score-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #ffffff;
  font-weight: 900;
}

.player-chip {
  margin-left: auto;
}

.score-chip img {
  width: 30px;
  height: 30px;
  margin-right: 8px;
}

.screen {
  padding: 32px;
}

.section-heading {
  width: min(1080px, 100%);
  margin: 0 auto 20px;
}

.map-stage {
  position: relative;
  width: min(1080px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 4px solid rgba(22, 57, 47, 0.22);
  border-radius: 8px;
  background: var(--sky);
  box-shadow: var(--shadow);
}

.map-stage > img {
  display: block;
  width: 100%;
  min-height: 430px;
  object-fit: cover;
}

.area-buttons {
  position: absolute;
  inset: 0;
}

.area-button {
  position: absolute;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  width: min(250px, 32%);
  min-height: 88px;
  padding: 10px;
  color: var(--ink);
  background: #ffffff;
  border: 3px solid var(--ink);
  box-shadow: 0 8px 0 rgba(22, 57, 47, 0.2);
}

.area-button img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

.area-button span {
  display: block;
  text-align: left;
}

.area-button .area-title {
  font-weight: 950;
}

.area-button .area-meta {
  margin-top: 4px;
  font-size: 0.86rem;
  color: var(--green);
}

.area-button.completed {
  border-color: var(--sun);
}

.area-button.locked {
  opacity: 0.62;
}

.area-bunny {
  left: 6%;
  top: 60%;
}

.area-squirrel {
  left: 22%;
  top: 18%;
}

.area-monkey {
  left: 38%;
  top: 42%;
}

.area-owl {
  right: 10%;
  top: 18%;
}

.area-fox {
  left: 39%;
  top: 67%;
}

.area-bear {
  right: 5%;
  top: 45%;
}

.area-festival {
  right: 6%;
  bottom: 4%;
}

.action-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: min(1080px, 100%);
  margin: 20px auto 0;
}

.guide-layout,
.feedback-layout {
  display: grid;
  grid-template-columns: minmax(180px, 300px) minmax(0, 680px);
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 72vh;
}

.guide-art,
.side-art,
.reward-leaf {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.guide-panel,
.question-panel,
.list-panel,
.summary-card {
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.guide-panel p {
  line-height: 1.7;
}

.question-layout {
  display: grid;
  grid-template-columns: minmax(190px, 280px) minmax(0, 760px);
  gap: 24px;
  width: min(1080px, 100%);
  margin: 0 auto;
  align-items: start;
}

.mission-side {
  position: sticky;
  top: 100px;
}

.mission-label {
  margin: 14px 0;
  font-weight: 900;
}

.mission-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12px, 1fr));
  gap: 6px;
}

.mission-dot {
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mission-dot.done {
  background: var(--leaf);
}

.mission-dot.current {
  background: var(--sun);
}

.prompt {
  margin: 18px 0;
  padding: 18px;
  border: 2px dashed rgba(22, 57, 47, 0.28);
  border-radius: 8px;
  background: var(--paper);
  line-height: 1.75;
}

.prompt ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.audio-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border: 2px solid rgba(91, 183, 229, 0.5);
  border-radius: 8px;
  background: #eaf7ff;
}

.audio-panel span {
  font-weight: 800;
  line-height: 1.5;
}

.options {
  display: grid;
  gap: 10px;
}

.option-button {
  display: block;
  width: 100%;
  min-height: 58px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
  border: 2px solid var(--line);
  box-shadow: none;
}

.option-button.selected {
  border-color: var(--water);
  background: #eaf7ff;
}

.option-button.correct {
  border-color: var(--green);
  background: var(--mint);
}

.option-button.wrong {
  border-color: var(--coral);
  background: #fff0ee;
}

.word-bank,
.sentence-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 64px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.word-bank {
  margin-bottom: 12px;
}

.word-chip {
  min-height: 42px;
  color: var(--ink);
  background: var(--mint);
  border: 2px solid var(--line);
  box-shadow: none;
}

.sentence-slots .word-chip {
  background: #eaf7ff;
}

.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hint-text {
  margin: 14px 0 0;
  padding: 12px;
  border-left: 5px solid var(--sun);
  background: #fff8df;
  line-height: 1.6;
}

.checklist {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.speaking-box {
  margin-top: 14px;
}

.speaking-note {
  margin: 0 0 12px;
  padding: 12px;
  border-left: 5px solid var(--coral);
  background: #fff0ee;
  line-height: 1.6;
  font-weight: 750;
}

.check-item {
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--mint);
}

.answer-box {
  margin-top: 14px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  line-height: 1.6;
}

.reward-wrap {
  display: grid;
  place-items: center;
  width: min(680px, 100%);
  min-height: 72vh;
  margin: 0 auto;
  text-align: center;
}

.reward-leaf {
  width: min(220px, 60%);
  margin-bottom: 18px;
}

.list-panel {
  width: min(920px, 100%);
  margin: 0 auto;
}

.review-item {
  padding: 18px 0;
  border-bottom: 2px solid var(--line);
}

.review-item:last-child {
  border-bottom: 0;
}

.review-item h3 {
  margin: 0 0 8px;
}

.review-item p {
  margin: 8px 0;
  line-height: 1.6;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.summary-card h3 {
  margin: 0 0 10px;
}

.summary-card p {
  margin: 0;
  line-height: 1.65;
}

@media (max-width: 820px) {
  .hero {
    min-height: 92vh;
    padding: 22px;
    align-items: end;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  .start-row,
  .guide-layout,
  .feedback-layout,
  .question-layout {
    grid-template-columns: 1fr;
  }

  .start-row {
    display: grid;
  }

  .top-bar {
    flex-wrap: wrap;
  }

  .player-chip {
    margin-left: 0;
  }

  .screen {
    padding: 20px;
  }

  .map-stage > img {
    min-height: 760px;
  }

  .area-button {
    width: 82%;
    grid-template-columns: 50px 1fr;
  }

  .area-bunny {
    left: 8%;
    top: 85%;
  }

  .area-squirrel {
    left: 8%;
    top: 71%;
  }

  .area-monkey {
    left: 8%;
    top: 57%;
  }

  .area-owl {
    left: 8%;
    top: 43%;
    right: auto;
  }

  .area-fox {
    left: 8%;
    top: 29%;
  }

  .area-bear {
    left: 8%;
    top: 15%;
    right: auto;
  }

  .area-festival {
    left: 8%;
    right: auto;
    top: 1%;
    bottom: auto;
  }

  .mission-side {
    position: static;
  }

  .side-art {
    width: min(180px, 70%);
  }

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