:root {
  --mint: #33b6a6;
  --mint-dark: #117b75;
  --coral: #ff725e;
  --yellow: #ffd34d;
  --blue: #4aa3ff;
  --green: #8fd85a;
  --ink: #193333;
  --soft-ink: #60706d;
  --paper: #fffaf1;
  --panel: rgba(255, 255, 255, 0.82);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "PingFang SC", Inter, ui-rounded, "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 211, 77, 0.34), transparent 28%),
    linear-gradient(135deg, #e6fbf6 0%, #fff8e6 46%, #e8f5ff 100%);
}

button {
  font: inherit;
}

.game-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.game-stage {
  width: min(1180px, 100%);
  min-height: min(720px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 4px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(28, 92, 98, 0.18);
  background: #fefefe;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  background: linear-gradient(90deg, #ffffff 0%, #e9fff8 100%);
  border-bottom: 1px solid rgba(51, 182, 166, 0.18);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--mint-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1;
}

.level-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 12px 18px;
  color: #0c5f5b;
  background: #dffbf2;
  border: 2px solid #a4ead9;
  font-size: 1rem;
  font-weight: 900;
}

.hospital-scene {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,250,241,0.82)),
    repeating-linear-gradient(90deg, rgba(51, 182, 166, 0.06) 0 2px, transparent 2px 210px);
}

.hospital-scene::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(199, 239, 231, 0.34));
}

.wall-sign,
.counter,
.chairs,
.plant {
  position: absolute;
  pointer-events: none;
}

.wall-sign {
  right: 7%;
  top: 12%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 18px;
  color: #0d7e73;
  background: rgba(255,255,255,0.72);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 900;
}

.cross {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: white;
  background: var(--mint);
  font-size: 1.7rem;
  line-height: 1;
}

.counter {
  right: 4%;
  bottom: 18%;
  width: 260px;
  height: 110px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #fff6dc, #ffd77c);
  box-shadow: 0 14px 30px rgba(131, 104, 28, 0.15);
}

.nurse {
  position: absolute;
  left: 24px;
  top: -58px;
  width: 64px;
  height: 76px;
  border-radius: 34px 34px 20px 20px;
  background: #ffd2c5;
  border: 8px solid #fff;
}

.nurse::before {
  content: "+";
  position: absolute;
  left: 17px;
  top: -24px;
  color: var(--coral);
  font-weight: 900;
}

.monitor {
  position: absolute;
  right: 28px;
  top: -24px;
  width: 82px;
  height: 56px;
  border-radius: 10px;
  background: #223f46;
}

.chairs {
  left: 3%;
  bottom: 20%;
  display: flex;
  gap: 8px;
}

.chairs span {
  width: 72px;
  height: 80px;
  border-radius: 18px 18px 10px 10px;
  background: #7ed7cd;
  box-shadow: inset 0 -10px 0 rgba(14, 113, 108, 0.12);
}

.plant {
  bottom: 8%;
  width: 86px;
  height: 96px;
  border-radius: 0 0 22px 22px;
  background: #ffe1a0;
}

.plant::before {
  content: "";
  position: absolute;
  left: -18px;
  top: -38px;
  width: 122px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 50%, #54c774 0 18px, transparent 19px),
    radial-gradient(circle at 52% 34%, #42a85f 0 22px, transparent 23px),
    radial-gradient(circle at 72% 54%, #72d88a 0 20px, transparent 21px);
}

.plant-left {
  left: 12%;
}

.plant-right {
  right: 4%;
}

.play-area {
  position: relative;
  z-index: 1;
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(240px, 0.88fr) minmax(360px, 1.12fr);
  align-items: center;
  gap: clamp(14px, 4vw, 56px);
  padding: 34px clamp(24px, 6vw, 76px) 20px;
}

.boy-card {
  justify-self: end;
  display: grid;
  justify-items: center;
  align-content: end;
  width: min(330px, 100%);
  min-height: 430px;
  border-radius: 26px;
  background: var(--panel);
  border: 2px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 50px rgba(33, 95, 99, 0.13);
}

.boy-listen {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.boy-card img {
  width: min(310px, 100%);
  height: auto;
  display: block;
}

.boy-hint {
  margin: 0 0 12px;
  color: var(--soft-ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.choice-zone {
  position: relative;
  width: min(500px, 100%);
  aspect-ratio: 1;
  justify-self: start;
}

.arrow,
.arrow-center {
  position: absolute;
  display: grid;
  place-items: center;
  border: 0;
  color: #163333;
  font-weight: 950;
  text-transform: none;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.arrow {
  width: 34%;
  height: 34%;
  clip-path: polygon(50% 0, 100% 38%, 76% 38%, 76% 100%, 24% 100%, 24% 38%, 0 38%);
  font-size: clamp(1rem, 2.6vw, 1.6rem);
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
  box-shadow: 0 12px 0 rgba(26, 62, 65, 0.18);
}

.arrow:hover,
.arrow:focus-visible {
  transform: scale(1.045);
  filter: saturate(1.05);
  outline: none;
}

.arrow-right:hover,
.arrow-right:focus-visible {
  transform: rotate(90deg) scale(1.045);
}

.arrow-down:hover,
.arrow-down:focus-visible {
  transform: rotate(180deg) scale(1.045);
}

.arrow-left:hover,
.arrow-left:focus-visible {
  transform: rotate(-90deg) scale(1.045);
}

.arrow:disabled {
  cursor: default;
}

.arrow-up {
  top: 0;
  left: 33%;
  background: var(--coral);
}

.arrow-right {
  right: 0;
  top: 33%;
  background: var(--green);
  transform: rotate(90deg);
}

.arrow-right span {
  transform: rotate(-90deg);
}

.arrow-down {
  bottom: 0;
  left: 33%;
  background: var(--blue);
  transform: rotate(180deg);
}

.arrow-down span {
  transform: rotate(-180deg);
}

.arrow-left {
  left: 0;
  top: 33%;
  background: var(--yellow);
  transform: rotate(-90deg);
}

.arrow-left span {
  transform: rotate(90deg);
}

.arrow-center {
  left: 39%;
  top: 39%;
  width: 22%;
  height: 22%;
  border-radius: 999px;
  color: white;
  background: var(--mint);
  border: 8px solid white;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
  box-shadow: 0 12px 26px rgba(19, 100, 96, 0.18);
}

.arrow.correct {
  filter: brightness(1.08) saturate(1.18);
  box-shadow: 0 0 0 8px rgba(255,255,255,0.8), 0 0 0 14px rgba(51, 182, 166, 0.28);
}

.arrow.wrong {
  animation: shake 280ms ease;
}

@keyframes shake {
  0%, 100% { translate: 0; }
  25% { translate: -8px 0; }
  75% { translate: 8px 0; }
}

.game-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 24px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(51, 182, 166, 0.18);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.progress {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.dot {
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: #d8eee9;
}

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

.dot.now {
  background: #ffd34d;
  box-shadow: inset 0 0 0 2px #117b75;
}

.feedback {
  margin: 0;
  color: var(--soft-ink);
  font-size: 1rem;
  font-weight: 800;
}

.next-button {
  border: 0;
  border-radius: 16px;
  padding: 12px 20px;
  color: white;
  background: var(--mint-dark);
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 820px) {
  .game-shell {
    padding: 10px;
  }

  .game-stage {
    min-height: calc(100vh - 20px);
    border-radius: 22px;
  }

  .topbar {
    align-items: flex-start;
    padding: 14px 16px;
  }

  .level-pill {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .wall-sign,
  .counter,
  .chairs,
  .plant {
    opacity: 0.52;
  }

  .play-area {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px 14px;
    gap: 8px;
  }

  .boy-card {
    justify-self: center;
    width: min(250px, 82vw);
    min-height: 300px;
  }

  .boy-card img {
    width: min(235px, 78vw);
  }

  .choice-zone {
    justify-self: center;
    width: min(360px, 92vw);
  }

  .game-footer {
    grid-template-columns: 1fr;
    padding: 12px 16px 16px;
  }

  .footer-actions,
  .footer-actions .listen-btn,
  .next-button {
    width: 100%;
  }
}
