:root {
  color-scheme: light;
  --ink: #385039;
  --ink-soft: #6c7967;
  --leaf: #6f9f5b;
  --leaf-dark: #477441;
  --cream: #fffaf0;
  --paper: #fffdf7;
  --sun: #f4cf68;
  --peach: #e98c75;
  --blue: #77b8d5;
  --shadow: rgba(65, 83, 48, 0.16);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  padding: max(14px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  color: var(--ink);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.78) 0 4px, transparent 4.5px) 0 0 / 82px 82px,
    linear-gradient(180deg, #e6f3d4, #f8eabe 53%, #f8efd6);
}

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

.game-shell {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 5px 5px 15px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

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

h1,
h2 {
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.header-actions {
  display: flex;
  gap: 9px;
}

.round-button {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  color: var(--leaf-dark);
  border: 0;
  border-radius: 50%;
  background: rgba(255, 253, 246, 0.88);
  box-shadow: 0 5px 0 rgba(70, 105, 58, 0.15), 0 10px 22px var(--shadow);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.round-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgba(70, 105, 58, 0.15), 0 13px 24px var(--shadow);
}

.round-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(70, 105, 58, 0.15);
}

.round-button svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.sound-button {
  font-size: 21px;
}

.sound-button[aria-pressed="false"] {
  opacity: 0.72;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.67fr);
  gap: clamp(14px, 2vw, 23px);
  align-items: stretch;
}

.game-board {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.78);
  border-radius: clamp(27px, 4vw, 42px);
  background: linear-gradient(180deg, #cae7c1 0 52%, #8fbd70 53% 100%);
  box-shadow: 0 22px 60px var(--shadow), inset 0 0 0 1px rgba(71, 107, 57, 0.08);
  isolation: isolate;
}

.game-board::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  opacity: 0.44;
  background-image: radial-gradient(circle, #fff9df 0 3px, transparent 3.5px);
  background-size: 77px 77px;
  pointer-events: none;
}

.board-sun {
  position: absolute;
  z-index: 1;
  top: 35px;
  right: 52px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 15px rgba(255, 235, 146, 0.3);
}

.board-cloud {
  position: absolute;
  z-index: 1;
  width: 88px;
  height: 24px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.78);
  animation: cloud-float 5s ease-in-out infinite alternate;
}

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

.board-cloud::before {
  left: 14px;
  width: 38px;
  height: 38px;
}

.board-cloud::after {
  right: 12px;
  width: 29px;
  height: 29px;
}

.cloud-left {
  top: 67px;
  left: 45px;
}

.cloud-right {
  top: 145px;
  right: 18px;
  scale: 0.66;
  animation-delay: -2s;
}

.board-hill {
  position: absolute;
  z-index: 0;
  border-radius: 50% 50% 0 0;
}

.hill-one {
  right: -80px;
  bottom: 80px;
  width: 470px;
  height: 240px;
  background: #a4cd82;
  transform: rotate(-5deg);
}

.hill-two {
  bottom: -95px;
  left: -100px;
  width: 650px;
  height: 300px;
  background: #78aa62;
  transform: rotate(4deg);
}

.picnic-flag {
  position: absolute;
  z-index: 4;
  top: 7.5%;
  right: 1.6%;
  display: grid;
  width: 74px;
  height: 55px;
  place-items: center;
  color: #945844;
  border: 4px solid #fff5d8;
  border-radius: 8px 8px 19px 8px;
  background: repeating-linear-gradient(45deg, #f1a08d 0 11px, #fff5d8 11px 22px);
  box-shadow: 0 7px 0 rgba(125, 82, 57, 0.13);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  transform: rotate(3deg);
  animation: flag-wave 1.7s ease-in-out infinite alternate;
}

.trail-line {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.trail-line path {
  fill: none;
  stroke: rgba(255, 244, 209, 0.84);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 38;
  vector-effect: non-scaling-stroke;
}

.trail-spaces {
  position: absolute;
  z-index: 3;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trail-space {
  position: absolute;
  top: var(--y);
  left: var(--x);
  display: grid;
  width: clamp(42px, 5.2vw, 60px);
  aspect-ratio: 1;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.87);
  border-radius: 50%;
  background: #fff9e7;
  box-shadow: 0 5px 0 rgba(72, 104, 55, 0.15), 0 8px 16px rgba(65, 83, 48, 0.12);
  font-size: clamp(20px, 2.8vw, 31px);
  transform: translate(-50%, -50%);
}

.trail-space[data-symbol="flower"] {
  background: #fff1c6;
}

.trail-space[data-symbol="star"] {
  background: #fff7dc;
}

.trail-space[data-symbol="leaf"] {
  background: #e8f3d7;
}

.trail-space b {
  position: absolute;
  top: -7px;
  right: -5px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: #fff;
  border: 2px solid #fff5eb;
  border-radius: 50%;
  background: var(--peach);
  font: 12px/1 sans-serif;
}

.start-space,
.finish-space {
  width: clamp(57px, 6.8vw, 80px);
  border-radius: 22px;
  font-size: clamp(25px, 3.5vw, 40px);
}

.start-space small,
.finish-space small {
  position: absolute;
  bottom: -20px;
  color: var(--leaf-dark);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.finish-space {
  background: repeating-linear-gradient(45deg, #fff6dc 0 10px, #f3a08d 10px 20px);
}

.player-token {
  position: absolute;
  z-index: 6;
  top: var(--y);
  left: var(--x);
  display: grid;
  width: clamp(48px, 5.5vw, 66px);
  aspect-ratio: 1;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 7px 0 rgba(67, 86, 52, 0.18), 0 11px 18px rgba(61, 78, 47, 0.18);
  transition: top 210ms cubic-bezier(0.34, 1.4, 0.64, 1), left 210ms cubic-bezier(0.34, 1.4, 0.64, 1), transform 210ms ease;
}

.player-token span {
  font-size: clamp(28px, 3.6vw, 43px);
  line-height: 1;
}

.player-token small {
  position: absolute;
  bottom: -20px;
  padding: 2px 6px;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.child-token {
  background: #ffdc83;
  transform: translate(calc(-50% - 12px), calc(-50% - 9px)) rotate(-5deg);
}

.child-token small {
  background: #c88432;
}

.dad-token {
  background: #a9d8e9;
  transform: translate(calc(-50% + 12px), calc(-50% + 9px)) rotate(5deg) scale(1.06);
}

.dad-token small {
  background: #4e879e;
}

.player-token.did-hop {
  animation: token-hop 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-token.at-finish {
  box-shadow: 0 0 0 9px rgba(255, 232, 133, 0.35), 0 8px 0 rgba(67, 86, 52, 0.16);
}

.control-panel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: clamp(27px, 4vw, 38px);
  background: rgba(255, 252, 240, 0.9);
  box-shadow: 0 20px 55px var(--shadow);
}

.turn-card,
.interaction-card,
.win-card {
  display: flex;
  min-height: 100%;
  padding: clamp(25px, 3.2vw, 38px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.turn-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px 6px 7px;
  color: var(--leaf-dark);
  border-radius: 999px;
  background: #eaf2d9;
  font-size: 12px;
  font-weight: 900;
}

.turn-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #ffdc83;
  font-size: 20px;
}

.turn-avatar[data-player="dad"] {
  background: #a9d8e9;
}

.turn-card h2,
.interaction-card h2,
.win-card h2 {
  margin-bottom: 8px;
  font-size: clamp(31px, 3vw, 43px);
  line-height: 1.05;
}

.turn-card > p,
.interaction-card > p,
.win-card > p {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.spinner-stage {
  position: relative;
  display: grid;
  margin: 10px 0 18px;
  place-items: center;
}

.spinner-arrow {
  position: absolute;
  z-index: 4;
  top: -19px;
  color: var(--peach);
  filter: drop-shadow(0 3px 0 rgba(124, 77, 56, 0.15));
  font-size: 31px;
}

.spinner {
  position: relative;
  display: grid;
  width: clamp(172px, 18vw, 214px);
  aspect-ratio: 1;
  padding: 0;
  cursor: pointer;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  filter: drop-shadow(0 8px 0 rgba(73, 98, 52, 0.17)) drop-shadow(0 13px 20px rgba(64, 81, 48, 0.15));
  transition: transform 140ms ease, filter 140ms ease;
}

.spinner:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.015);
}

.spinner:active:not(:disabled) {
  transform: translateY(4px) scale(0.98);
  filter: drop-shadow(0 3px 0 rgba(73, 98, 52, 0.17));
}

.spinner:disabled {
  cursor: default;
}

.wheel {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 8px solid #fff9eb;
  border-radius: 50%;
  background: conic-gradient(#f8d878 0 33.33%, #f0a18d 33.33% 66.66%, #9dca83 66.66% 100%);
  transform: rotate(var(--wheel-turn, 0deg));
  transition: transform 900ms cubic-bezier(0.16, 0.76, 0.28, 1);
}

.wheel::after {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: inherit;
  background: repeating-conic-gradient(transparent 0 58deg, rgba(255, 255, 255, 0.55) 58deg 60deg);
}

.wheel-symbol,
.wheel-center {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
}

.wheel-symbol {
  font-size: clamp(28px, 3.5vw, 39px);
}

.symbol-flower {
  top: 19%;
  left: 54%;
}

.symbol-star {
  right: 18%;
  bottom: 22%;
}

.symbol-leaf {
  bottom: 21%;
  left: 19%;
}

.wheel-center {
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 39%;
  aspect-ratio: 1;
  color: var(--leaf-dark);
  border: 5px solid rgba(80, 112, 65, 0.12);
  border-radius: 50%;
  background: #fffdf4;
  box-shadow: 0 4px 0 rgba(74, 100, 57, 0.13);
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.spin-result {
  position: absolute;
  z-index: 6;
  bottom: -14px;
  padding: 7px 12px;
  opacity: 0;
  color: var(--leaf-dark);
  border: 3px solid #fff;
  border-radius: 999px;
  background: #fff8dd;
  box-shadow: 0 5px 0 rgba(67, 91, 52, 0.13);
  font-weight: 900;
  transform: translateY(8px) scale(0.85);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spin-result.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.one-action-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f3ecda;
  font-size: 12px !important;
}

.interaction-card {
  background: radial-gradient(circle at 50% 22%, #fff1bd, transparent 38%), #fffaf0;
}

.interaction-icon,
.win-sun {
  display: grid;
  width: 105px;
  height: 105px;
  margin-bottom: 19px;
  place-items: center;
  border-radius: 50%;
  background: #ffe49a;
  box-shadow: 0 0 0 13px rgba(255, 225, 143, 0.31), 0 8px 0 rgba(121, 84, 42, 0.12);
  font-size: 57px;
  animation: interaction-bob 800ms ease-in-out infinite alternate;
}

.primary-button {
  min-height: 51px;
  padding: 12px 20px;
  cursor: pointer;
  color: #fffdf7;
  border: 0;
  border-radius: 999px;
  background: var(--leaf-dark);
  box-shadow: 0 6px 0 #315c35, 0 12px 22px rgba(49, 92, 53, 0.2);
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #315c35, 0 15px 24px rgba(49, 92, 53, 0.21);
}

.primary-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #315c35;
}

.win-card {
  background: radial-gradient(circle at 50% 24%, #fff2ad, transparent 42%), #fffaf0;
}

.win-sun {
  color: #c78b2e;
  font-size: 64px;
  animation: sunny 1.3s ease-in-out infinite alternate;
}

.rules-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 2vw, 22px);
  margin-top: 16px;
  padding: 13px 18px;
  border: 2px solid rgba(77, 106, 60, 0.08);
  border-radius: 24px;
  background: rgba(255, 252, 241, 0.72);
}

.rules-strip > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rules-strip > div > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--leaf);
  font-size: 12px;
  font-weight: 900;
}

.rules-strip p {
  display: grid;
  margin: 0;
}

.rules-strip b {
  font-size: 12px;
}

.rules-strip small {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.rules-strip i {
  color: #c9a958;
  font-style: normal;
  font-weight: 900;
}

.floating-message {
  position: absolute;
  z-index: 12;
  top: 45%;
  left: 50%;
  padding: 9px 15px;
  color: var(--leaf-dark);
  border: 3px solid #fff;
  border-radius: 999px;
  background: #fff5be;
  box-shadow: 0 7px 0 rgba(71, 98, 55, 0.14);
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 900;
  pointer-events: none;
  animation: float-up 1.05s ease-out forwards;
}

.confetti-layer {
  position: absolute;
  z-index: 11;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -18px;
  left: var(--x);
  width: 11px;
  height: 17px;
  border-radius: 3px;
  animation: confetti-fall 2.3s var(--delay) ease-in forwards;
}

.interaction-glow {
  animation: board-glow 800ms ease-out;
}

.game-complete .picnic-flag {
  animation-duration: 420ms;
}

.turn-pop {
  animation: turn-pop 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.round-button:focus-visible,
.spinner:focus-visible,
.primary-button:focus-visible {
  outline: 5px solid rgba(232, 139, 115, 0.72);
  outline-offset: 5px;
}

@keyframes cloud-float {
  from { transform: translateX(-7px); }
  to { transform: translateX(12px); }
}

@keyframes flag-wave {
  from { transform: rotate(-2deg) scale(0.98); }
  to { transform: rotate(4deg) scale(1.03); }
}

@keyframes token-hop {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -18px; }
}

@keyframes interaction-bob {
  from { transform: rotate(-5deg) translateY(2px); }
  to { transform: rotate(5deg) translateY(-5px); }
}

@keyframes sunny {
  from { transform: rotate(-8deg) scale(0.96); }
  to { transform: rotate(8deg) scale(1.04); }
}

@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, 15px) scale(0.8); }
  24% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -65px) scale(1.08); }
}

@keyframes confetti-fall {
  to { transform: translate(var(--drift), 650px) rotate(var(--spin)); }
}

@keyframes board-glow {
  35% { box-shadow: 0 0 0 13px rgba(255, 222, 122, 0.48), 0 22px 60px var(--shadow); }
}

@keyframes turn-pop {
  0% { transform: scale(0.94); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 920px) {
  .game-layout {
    grid-template-columns: 1fr;
  }

  .control-panel {
    min-height: 430px;
  }

  .game-board {
    min-height: 520px;
  }
}

@media (max-width: 600px) {
  body {
    padding-inline: 9px;
  }

  .game-header {
    gap: 8px;
    padding-inline: 3px;
  }

  .game-header .eyebrow {
    display: none;
  }

  h1 {
    font-size: clamp(26px, 7vw, 34px);
  }

  .header-actions {
    gap: 5px;
  }

  .round-button {
    width: 40px;
    height: 40px;
  }

  .round-button svg {
    width: 22px;
  }

  .game-board {
    min-height: 370px;
    border-width: 3px;
    border-radius: 27px;
  }

  .trail-space {
    width: 39px;
    border-width: 3px;
    font-size: 20px;
  }

  .start-space,
  .finish-space {
    width: 50px;
    border-radius: 16px;
  }

  .player-token {
    width: 46px;
    border-width: 3px;
  }

  .player-token span {
    font-size: 28px;
  }

  .picnic-flag {
    width: 57px;
    height: 43px;
    font-size: 9px;
  }

  .board-sun {
    top: 24px;
    right: 35px;
    width: 57px;
    height: 57px;
  }

  .board-cloud {
    scale: 0.66;
  }

  .control-panel {
    min-height: 410px;
    border-radius: 27px;
  }

  .turn-card,
  .interaction-card,
  .win-card {
    padding: 24px 20px;
  }

  .spinner {
    width: 176px;
  }

  .rules-strip {
    gap: 5px;
    padding-inline: 8px;
  }

  .rules-strip > div {
    gap: 5px;
  }

  .rules-strip > div > span {
    width: 25px;
    height: 25px;
  }

  .rules-strip small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
