:root {
  --bg: #fff4d7;
  --panel: #fffdf5;
  --panel-warm: #ffe5ad;
  --ink: #2b2418;
  --muted: #796a55;
  --line: rgba(43, 36, 24, 0.16);
  --line-strong: rgba(43, 36, 24, 0.28);
  --orange: #f7a83a;
  --orange-deep: #e16d34;
  --green: #a8df8c;
  --green-deep: #5fac5e;
  --blue: #8edbf1;
  --purple: #bca0f2;
  --pink: #f3a0b8;
  --shadow: 0 18px 42px rgba(81, 54, 25, 0.18);
  --small-shadow: 0 10px 22px rgba(81, 54, 25, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at 10% 6%, rgba(255, 209, 105, 0.55), transparent 28rem),
    radial-gradient(circle at 86% 10%, rgba(142, 219, 241, 0.35), transparent 24rem),
    linear-gradient(180deg, #fffaf0 0%, var(--bg) 50%, #f7dba9 100%);
}

button {
  font: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.game-shell {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

.game-header,
.status-bar,
.panel,
.feedback-area {
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
}

.game-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  min-height: 250px;
  overflow: hidden;
  padding: 28px;
  border-radius: 34px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(255, 229, 173, 0.88)),
    repeating-linear-gradient(45deg, rgba(225, 109, 52, 0.08) 0 14px, transparent 14px 28px);
}

.game-header::before,
.game-header::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.game-header::before {
  right: 210px;
  bottom: 26px;
  width: 220px;
  height: 48px;
  background: rgba(95, 172, 94, 0.2);
}

.game-header::after {
  right: -58px;
  top: -76px;
  width: 210px;
  height: 210px;
  background: rgba(247, 168, 58, 0.2);
}

.title-block,
.hero-stage {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--orange-deep);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.header-copy,
.panel-copy {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.header-copy {
  max-width: 620px;
  font-size: 1rem;
}

.hero-stage {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
}

.secondary-button,
.stall-card,
.shop-item,
.build-slot {
  cursor: pointer;
  border: 0;
  color: var(--ink);
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.secondary-button:hover,
.stall-card:hover,
.shop-item:hover,
.build-slot:hover {
  transform: translateY(-3px);
  filter: saturate(1.04);
  box-shadow: 0 14px 24px rgba(81, 54, 25, 0.15);
}

.secondary-button {
  min-width: 132px;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd66d, var(--orange));
  box-shadow: var(--small-shadow);
}

.status-bar {
  display: grid;
  grid-template-columns: 0.7fr 0.7fr 1.6fr;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border-radius: 26px;
  background: rgba(255, 253, 245, 0.86);
  backdrop-filter: blur(8px);
}

.status-item {
  min-height: 78px;
  padding: 14px 16px;
  border: 2px solid rgba(255, 255, 255, 0.64);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 236, 184, 0.94), rgba(255, 255, 255, 0.76));
}

.status-goal {
  background:
    linear-gradient(135deg, rgba(168, 223, 140, 0.72), rgba(255, 255, 255, 0.8));
}

.status-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.status-item strong {
  font-size: 1.35rem;
}

.status-progress {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  gap: 18px;
  align-items: start;
}

.panel {
  min-height: 220px;
  padding: 18px;
  border-radius: 30px;
  background: var(--panel);
}

.gym-panel {
  grid-column: 1 / 2;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.72), transparent 13rem),
    linear-gradient(135deg, #d5f2b6 0%, #fffdf5 72%);
}

.market-panel {
  grid-column: 1 / 2;
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 232, 130, 0.55), transparent 15rem),
    linear-gradient(135deg, #ace8f4 0%, #fffdf5 74%);
}

.board-panel {
  grid-column: 1 / 2;
  min-height: 430px;
  background:
    radial-gradient(circle at top right, rgba(188, 160, 242, 0.16), transparent 13rem),
    var(--panel);
}

.shop-panel {
  position: sticky;
  top: 16px;
  grid-column: 2 / 3;
  grid-row: 1 / span 3;
  background:
    linear-gradient(180deg, rgba(255, 229, 173, 0.8), rgba(255, 253, 245, 0.96)),
    var(--panel);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-tag {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.74);
}

.gym-scene {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 2px solid rgba(95, 172, 94, 0.26);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 248, 218, 0.85) 0 45%, transparent 45%),
    repeating-linear-gradient(90deg, rgba(95, 172, 94, 0.12) 0 2px, transparent 2px 76px),
    linear-gradient(180deg, #fff4c7 0 47%, #bfe792 47% 100%);
}

.gym-scene::before {
  content: "";
  position: absolute;
  left: -40px;
  right: -40px;
  bottom: 0;
  height: 118px;
  border-top: 8px solid rgba(43, 36, 24, 0.08);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.38) 0 34px, transparent 34px 68px),
    #94d77e;
}

.gym-wall {
  position: absolute;
  inset: 0;
}

.wall-clock {
  position: absolute;
  top: 24px;
  left: 28px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 4px solid #f9bc56;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 900;
  background: #fffdf5;
}

.poster {
  position: absolute;
  top: 24px;
  display: grid;
  place-items: center;
  width: 66px;
  height: 82px;
  border: 3px solid rgba(43, 36, 24, 0.12);
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  box-shadow: var(--small-shadow);
}

.poster-power {
  left: 112px;
  background: linear-gradient(160deg, #f37d57, #ffbb66);
}

.poster-stretch {
  left: 196px;
  background: linear-gradient(160deg, #57b4d8, #9edb8a);
}

.gym-door {
  position: absolute;
  right: 32px;
  bottom: 96px;
  display: grid;
  place-items: end center;
  width: 92px;
  height: 142px;
  padding-bottom: 14px;
  border: 4px solid #c07d48;
  border-bottom: 0;
  border-radius: 46px 46px 0 0;
  color: #fff8df;
  font-size: 0.84rem;
  font-weight: 900;
  background:
    radial-gradient(circle at 74% 55%, #ffd36e 0 5px, transparent 6px),
    linear-gradient(90deg, #b96a3f, #8e4d32);
}

.equipment {
  position: absolute;
  z-index: 2;
}

.equipment.is-locked,
[data-decoration].is-locked {
  opacity: 0.38;
  filter: grayscale(0.85);
}

.equipment.is-locked::after,
.build-slot.is-locked::after {
  content: "待解锁";
  position: absolute;
  inset: auto 8px 8px;
  display: grid;
  place-items: center;
  min-height: 24px;
  border-radius: 999px;
  color: #fffaf0;
  font-size: 0.72rem;
  font-weight: 900;
  background: rgba(43, 36, 24, 0.72);
}

.equipment.is-owned,
[data-decoration].is-owned {
  filter: drop-shadow(0 10px 14px rgba(95, 172, 94, 0.18));
}

.treadmill {
  left: 28px;
  bottom: 70px;
  width: 160px;
  height: 92px;
}

.treadmill .belt {
  position: absolute;
  left: 14px;
  bottom: 10px;
  width: 126px;
  height: 28px;
  border: 4px solid #514131;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #4f6471 0 16px, #657b89 16px 30px);
}

.treadmill .console {
  position: absolute;
  right: 10px;
  top: 4px;
  width: 54px;
  height: 42px;
  border: 4px solid #514131;
  border-radius: 16px;
  background: #8edbf1;
}

.treadmill .handle {
  position: absolute;
  right: 36px;
  top: 40px;
  width: 72px;
  height: 60px;
  border-top: 6px solid #514131;
  border-right: 6px solid #514131;
  border-radius: 0 30px 0 0;
  transform: skewX(-18deg);
}

.bench {
  left: 210px;
  bottom: 76px;
  width: 168px;
  height: 110px;
}

.bench .bar {
  position: absolute;
  left: 12px;
  top: 16px;
  width: 138px;
  height: 8px;
  border-radius: 999px;
  background: #514131;
}

.bench .plate {
  position: absolute;
  top: 4px;
  width: 18px;
  height: 34px;
  border-radius: 8px;
  background: #f37d57;
}

.bench .plate-left {
  left: 0;
}

.bench .plate-right {
  right: 0;
}

.bench .seat {
  position: absolute;
  left: 42px;
  bottom: 26px;
  width: 86px;
  height: 26px;
  border-radius: 14px;
  background: #6cb6d7;
  transform: rotate(-12deg);
  box-shadow:
    -28px 34px 0 -7px #514131,
    42px 30px 0 -7px #514131;
}

.rack {
  right: 150px;
  bottom: 72px;
  display: grid;
  gap: 8px;
  width: 104px;
  padding: 12px;
  border: 5px solid #514131;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.rack span {
  height: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 16px 50%, #e16d34 0 9px, transparent 10px),
    radial-gradient(circle at calc(100% - 16px) 50%, #e16d34 0 9px, transparent 10px),
    linear-gradient(90deg, transparent 0 14px, #514131 14px calc(100% - 14px), transparent calc(100% - 14px));
}

.material-pile {
  position: absolute;
  left: 390px;
  bottom: 66px;
  z-index: 2;
  width: 154px;
  height: 118px;
}

.mat {
  position: absolute;
  display: grid;
  place-items: center;
  border: 3px solid rgba(43, 36, 24, 0.16);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 900;
  box-shadow: var(--small-shadow);
}

.mat.box {
  left: 18px;
  bottom: 0;
  width: 76px;
  height: 58px;
  border-radius: 16px;
  background: #d99853;
}

.mat.towel {
  right: 0;
  bottom: 16px;
  width: 76px;
  height: 40px;
  border-radius: 999px;
  background: #f3a0b8;
}

.mat.drink {
  left: 58px;
  top: 0;
  width: 46px;
  height: 70px;
  border-radius: 14px 14px 10px 10px;
  background: linear-gradient(180deg, #b8f1ff 0 36%, #57b4d8 36%);
}

.empty-slots {
  position: absolute;
  right: 24px;
  bottom: 28px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 78px);
  gap: 10px;
}

.build-slot {
  position: relative;
  min-height: 62px;
  padding: 8px;
  border: 3px dashed rgba(43, 36, 24, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.build-slot.is-unlocked {
  border-style: solid;
  border-color: rgba(95, 172, 94, 0.55);
  background: linear-gradient(180deg, #f3fff0, #dff4c9);
}

.stall-row,
.shop-list {
  display: grid;
  gap: 12px;
}

.street-scene {
  position: relative;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 238px;
  padding: 14px;
  overflow: hidden;
  border: 2px solid rgba(75, 142, 163, 0.24);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 18%, #fff3a8 0 8px, transparent 9px),
    radial-gradient(circle at 34% 12%, #ffd06d 0 7px, transparent 8px),
    radial-gradient(circle at 62% 18%, #fff3a8 0 8px, transparent 9px),
    radial-gradient(circle at 86% 13%, #ffd06d 0 7px, transparent 8px),
    linear-gradient(180deg, #275176 0 40%, #4aa2bd 40% 100%);
}

.street-scene::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 68px;
  height: 5px;
  background: repeating-linear-gradient(90deg, #ffdb67 0 20px, transparent 20px 38px);
}

.street-scene::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 22px, transparent 22px 44px),
    #d69a69;
}

.stall-card {
  position: relative;
  z-index: 1;
  min-height: 184px;
  overflow: hidden;
  padding: 0;
  border: 3px solid rgba(43, 36, 24, 0.15);
  border-radius: 24px 24px 18px 18px;
  background: #fffdf5;
  box-shadow: var(--small-shadow);
}

.stall-roof {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
  place-items: center;
  height: 52px;
  border-bottom: 3px solid rgba(43, 36, 24, 0.12);
  color: #fff;
  font-size: 0.9rem;
  text-shadow: 0 1px 0 rgba(43, 36, 24, 0.3);
}

.mall-card .stall-roof {
  background: linear-gradient(90deg, #f37d57, #ffbf68);
}

.night-card .stall-roof {
  background: linear-gradient(90deg, #6c67c8, #57b4d8);
}

.grill-card .stall-roof {
  background: linear-gradient(90deg, #d34f38, #f7a83a);
}

.store-window,
.store-door,
.lanterns,
.crate-row,
.grill-smoke,
.skewer-row {
  position: absolute;
}

.store-window {
  left: 18px;
  top: 76px;
  width: 54px;
  height: 48px;
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.6) 47% 53%, transparent 53%),
    linear-gradient(180deg, transparent 47%, rgba(255, 255, 255, 0.6) 47% 53%, transparent 53%),
    #83d8ed;
}

.store-door {
  right: 18px;
  bottom: 0;
  width: 48px;
  height: 82px;
  border-radius: 22px 22px 0 0;
  background: #9d6946;
}

.lanterns {
  left: 22px;
  right: 22px;
  top: 66px;
  height: 30px;
  background:
    radial-gradient(circle at 16% 50%, #ffdf70 0 10px, transparent 11px),
    radial-gradient(circle at 50% 50%, #ff7b6d 0 10px, transparent 11px),
    radial-gradient(circle at 84% 50%, #ffdf70 0 10px, transparent 11px);
}

.crate-row {
  left: 16px;
  right: 16px;
  bottom: 18px;
  height: 54px;
  border-radius: 14px;
  background:
    repeating-linear-gradient(90deg, rgba(43, 36, 24, 0.12) 0 3px, transparent 3px 34px),
    #d99853;
}

.grill-smoke {
  left: 26px;
  top: 64px;
  width: 76px;
  height: 48px;
  background:
    radial-gradient(circle at 20% 78%, rgba(255, 255, 255, 0.8) 0 13px, transparent 14px),
    radial-gradient(circle at 54% 44%, rgba(255, 255, 255, 0.72) 0 16px, transparent 17px),
    radial-gradient(circle at 82% 72%, rgba(255, 255, 255, 0.68) 0 11px, transparent 12px);
}

.skewer-row {
  left: 16px;
  right: 16px;
  bottom: 22px;
  height: 46px;
  border: 5px solid #514131;
  border-radius: 14px;
  background:
    repeating-linear-gradient(100deg, transparent 0 16px, #f0d28a 16px 20px, transparent 20px 35px),
    #444;
}

.merge-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 12px;
}

.sample-item {
  display: inline-grid;
  place-items: center;
  min-width: 66px;
  min-height: 40px;
  padding: 6px 12px;
  border: 2px solid rgba(43, 36, 24, 0.12);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  background: #fff3c8;
}

.sample-dumbbell {
  background: #d6f2c4;
}

.sample-shoe {
  background: #c8edfb;
}

.sample-ticket {
  background: #f8c5d5;
}

.merge-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(44px, 1fr));
  gap: 10px;
  min-height: 320px;
  padding: 14px;
  border: 3px solid rgba(43, 36, 24, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(43, 36, 24, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(43, 36, 24, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 10% 12%, rgba(247, 168, 58, 0.12), transparent 7rem),
    #fff8e4;
  background-size: calc(100% / 6) calc(100% / 5), calc(100% / 6) calc(100% / 5), auto, auto;
}

.board-cell {
  position: relative;
  min-height: 54px;
  border: 2px dashed rgba(43, 36, 24, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 -4px 0 rgba(43, 36, 24, 0.04);
}

.board-cell::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  border-radius: 7px;
  background: rgba(247, 168, 58, 0.12);
  transform: translate(-50%, -50%) rotate(12deg);
  z-index: 0;
}

.board-cell > * {
  position: relative;
  z-index: 1;
}

.shop-list {
  grid-template-columns: 1fr;
}

.shop-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
  border: 2px solid rgba(43, 36, 24, 0.12);
  border-radius: 20px;
  text-align: left;
  background: rgba(255, 255, 255, 0.8);
}

.shop-item:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.shop-item.is-affordable {
  border-color: rgba(95, 172, 94, 0.55);
  background: linear-gradient(180deg, #ffffff, #f3fff0);
}

.shop-item.is-complete {
  border-color: rgba(43, 36, 24, 0.08);
  background: rgba(255, 255, 255, 0.54);
}

.shop-item strong {
  color: var(--orange-deep);
}

.shop-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
}

.feedback-area {
  min-height: 50px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 253, 245, 0.78);
}

.goose,
.mini-goose {
  position: relative;
}

.hero-goose {
  width: 190px;
  height: 188px;
}

.goose-shadow {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 2px;
  height: 28px;
  border-radius: 50%;
  background: rgba(43, 36, 24, 0.13);
}

.goose-body {
  position: absolute;
  left: 38px;
  bottom: 24px;
  width: 118px;
  height: 118px;
  border: 4px solid rgba(43, 36, 24, 0.12);
  border-radius: 54% 50% 46% 52%;
  background: linear-gradient(150deg, #fffdf7 0 54%, #f2e7ca 100%);
}

.goose-belly {
  position: absolute;
  left: 62px;
  bottom: 38px;
  width: 72px;
  height: 64px;
  border-radius: 50%;
  background: #fff7df;
}

.goose-head {
  position: absolute;
  left: 68px;
  top: 18px;
  width: 78px;
  height: 72px;
  border: 4px solid rgba(43, 36, 24, 0.12);
  border-radius: 50% 48% 46% 50%;
  background: #fffdf7;
}

.goose-cheek {
  position: absolute;
  left: 102px;
  top: 58px;
  width: 20px;
  height: 12px;
  border-radius: 50%;
  background: rgba(243, 160, 184, 0.58);
}

.goose-beak {
  position: absolute;
  left: 132px;
  top: 48px;
  width: 42px;
  height: 25px;
  border-radius: 45% 60% 58% 42%;
  background: linear-gradient(180deg, #ffbd47, #ed7a2d);
}

.goose-eye {
  position: absolute;
  left: 111px;
  top: 42px;
  width: 11px;
  height: 14px;
  border-radius: 50%;
  background: #2b2418;
  box-shadow: 3px 2px 0 -1px #fff;
}

.goose-wing {
  position: absolute;
  bottom: 54px;
  width: 42px;
  height: 62px;
  border: 4px solid rgba(43, 36, 24, 0.1);
  border-radius: 50% 50% 48% 52%;
  background: #efe5c7;
}

.wing-left {
  left: 22px;
  transform: rotate(16deg);
}

.wing-right {
  right: 18px;
  transform: rotate(-24deg);
}

.goose-leg {
  position: absolute;
  bottom: 15px;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #f2a137;
}

.leg-left {
  left: 68px;
}

.leg-right {
  right: 58px;
}

.sweatband {
  position: absolute;
  left: 72px;
  top: 21px;
  width: 70px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #57b4d8, #7fe0d6);
  transform: rotate(-8deg);
}

.whistle {
  position: absolute;
  left: 86px;
  bottom: 88px;
  width: 28px;
  height: 20px;
  border: 4px solid #f7a83a;
  border-radius: 10px;
  background: #fffdf5;
  transform: rotate(8deg);
}

.mini-goose {
  width: 72px;
  height: 86px;
  flex: 0 0 72px;
}

.gym-scene > .mini-goose {
  position: absolute;
  left: 536px;
  bottom: 70px;
  z-index: 4;
}

.shop-goose {
  position: absolute;
  right: 16px;
  bottom: 24px;
  transform: scale(0.92);
}

.mini-body,
.mini-head,
.mini-beak,
.mini-eye,
.mini-band {
  position: absolute;
  display: block;
}

.mini-body {
  left: 11px;
  bottom: 8px;
  width: 48px;
  height: 52px;
  border: 3px solid rgba(43, 36, 24, 0.12);
  border-radius: 52% 48% 46% 54%;
  background: #fffdf7;
}

.mini-head {
  left: 25px;
  top: 8px;
  width: 36px;
  height: 34px;
  border: 3px solid rgba(43, 36, 24, 0.12);
  border-radius: 50%;
  background: #fffdf7;
}

.mini-beak {
  right: 0;
  top: 24px;
  width: 24px;
  height: 15px;
  border-radius: 45% 60% 58% 42%;
  background: #f2a137;
}

.mini-eye {
  right: 20px;
  top: 22px;
  width: 6px;
  height: 8px;
  border-radius: 50%;
  background: #2b2418;
}

.mini-band {
  left: 24px;
  top: 10px;
  width: 35px;
  height: 10px;
  border-radius: 999px;
  background: var(--blue);
  transform: rotate(-8deg);
}

.goose-blue .mini-band {
  background: #57b4d8;
}

.goose-runner .mini-band {
  background: #57b4d8;
}

.goose-lifter .mini-band {
  background: #f37d57;
}

.goose-coach .mini-band {
  background: #8d68da;
}

.goose-builder .mini-band {
  background: #5fac5e;
}

.goose-decorator .mini-band {
  background: #f7a83a;
}

.mini-goose.is-entering {
  animation: gooseUnlockEntrance 900ms cubic-bezier(0.2, 0.9, 0.25, 1.2) both;
}

.goose-red .mini-band {
  background: #f37d57;
}

.goose-green .mini-band {
  background: #5fac5e;
}

.goose-purple .mini-band {
  background: #8d68da;
}

.goose-yellow .mini-band {
  background: #f7a83a;
}

.goose-green .mini-body,
.goose-green .mini-head {
  background: #f3fff0;
}

.goose-purple .mini-body,
.goose-purple .mini-head {
  background: #fbf5ff;
}

.goose-yellow .mini-body,
.goose-yellow .mini-head {
  background: #fff9df;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 36, 24, 0.42);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  padding: 28px;
  border: 2px solid var(--line);
  border-radius: 30px;
  background: #fffaf0;
  box-shadow: 0 24px 70px rgba(43, 36, 24, 0.32);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: var(--orange);
}

.help-section {
  margin-top: 14px;
  padding: 14px 16px;
  border: 2px solid rgba(43, 36, 24, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.help-section h3 {
  margin: 0 0 6px;
  color: var(--orange-deep);
  font-size: 0.98rem;
}

.help-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}


  .game-header,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .shop-panel,
  .gym-panel,
  .market-panel,
  .board-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .shop-panel {
    position: static;
  }

  .street-scene {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .game-shell {
    width: min(100% - 18px, 1240px);
    padding-top: 10px;
  }

  .game-header,
  .panel-header {
    display: flex;
    flex-direction: column;
  }

  .status-bar,
  .street-scene,
  .shop-item {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    justify-items: start;
  }

  .gym-scene {
    min-height: 620px;
  }

  .treadmill {
    left: 20px;
    bottom: 340px;
  }

  .bench {
    left: 24px;
    bottom: 220px;
  }

  .rack {
    left: 24px;
    right: auto;
    bottom: 116px;
  }

  .material-pile {
    left: auto;
    right: 18px;
    bottom: 238px;
  }

  .gym-scene > .mini-goose {
    left: auto;
    right: 52px;
    bottom: 130px;
  }

  .empty-slots {
    left: 18px;
    right: 18px;
    bottom: 22px;
    grid-template-columns: 1fr;
  }

  .merge-board {
    grid-template-columns: repeat(3, minmax(54px, 1fr));
    background-size: calc(100% / 3) calc(100% / 10), calc(100% / 3) calc(100% / 10), auto, auto;
  }
}

.link-merge-layout {
  grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1.05fr);
}

.link-merge-layout .board-panel {
  grid-column: 1 / 2;
  grid-row: 1;
}

.link-merge-layout .gym-panel {
  grid-column: 2 / 3;
  grid-row: 1;
}

@media (max-width: 980px) {
  .link-merge-layout {
    grid-template-columns: 1fr;
  }

  .link-merge-layout .board-panel,
  .link-merge-layout .gym-panel {
    grid-column: auto;
    grid-row: auto;
  }
}

/* 任务 3：参考图风格视觉重构覆盖层 */
:root {
  --cream: #fff8dc;
  --candy-yellow: #ffd86f;
  --candy-orange: #ff9f42;
  --candy-red: #ff6f61;
  --mint: #9fe7b1;
  --sky: #8bd9f6;
  --tile-line: rgba(116, 75, 39, 0.22);
  --cartoon-line: #714d2d;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 217, 111, 0.58) 0 12px, transparent 13px),
    radial-gradient(circle at 94% 16%, rgba(139, 217, 246, 0.45) 0 15px, transparent 16px),
    radial-gradient(circle at 28% 88%, rgba(159, 231, 177, 0.48) 0 18px, transparent 19px),
    linear-gradient(180deg, #fff9e9 0%, #ffe8b8 52%, #f8cf8e 100%);
}

.game-shell {
  position: relative;
}

.game-shell::before,
.game-shell::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  opacity: 0.45;
  filter: blur(1px);
}

.game-shell::before {
  left: -72px;
  top: 190px;
  width: 190px;
  height: 190px;
  background: repeating-linear-gradient(45deg, #fff 0 10px, #ffd86f 10px 20px);
}

.game-shell::after {
  right: -54px;
  bottom: 88px;
  width: 150px;
  height: 150px;
  background: repeating-linear-gradient(-45deg, #fff 0 9px, #8bd9f6 9px 18px);
}

.game-header,
.status-bar,
.panel,
.feedback-area,
.modal-card {
  border-color: rgba(113, 77, 45, 0.24);
  box-shadow:
    0 22px 0 rgba(255, 255, 255, 0.34) inset,
    0 20px 44px rgba(113, 77, 45, 0.18);
}

.game-header {
  border-width: 3px;
  background:
    radial-gradient(circle at 86% 74%, rgba(255, 255, 255, 0.75) 0 38px, transparent 39px),
    linear-gradient(135deg, rgba(255, 251, 234, 0.96), rgba(255, 220, 137, 0.9)),
    repeating-linear-gradient(135deg, rgba(255, 159, 66, 0.12) 0 18px, transparent 18px 36px);
}

.status-item {
  border-color: rgba(113, 77, 45, 0.12);
  box-shadow: inset 0 -5px 0 rgba(113, 77, 45, 0.08);
}

.panel {
  position: relative;
  border-width: 3px;
}

.board-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 216, 111, 0.26), transparent 9rem),
    radial-gradient(circle at 90% 10%, rgba(255, 111, 97, 0.16), transparent 8rem),
    linear-gradient(180deg, #fffdf2 0%, #fff0ca 100%);
}

.board-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 3px dashed rgba(255, 159, 66, 0.38);
  border-radius: 25px;
}

.board-panel::after {
  content: "合成能量";
  position: absolute;
  right: 22px;
  bottom: 16px;
  color: rgba(225, 109, 52, 0.18);
  font: 900 1.1rem/1 "Microsoft YaHei", sans-serif;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.merge-samples {
  position: relative;
  z-index: 1;
  gap: 10px;
  padding: 10px;
  border: 2px solid rgba(113, 77, 45, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
}

.sample-item {
  border-color: rgba(113, 77, 45, 0.18);
  box-shadow: 0 5px 0 rgba(113, 77, 45, 0.08);
}

.merge-board {
  position: relative;
  z-index: 1;
  gap: clamp(7px, 1vw, 11px);
  min-height: clamp(312px, 40vw, 430px);
  padding: clamp(12px, 2vw, 20px);
  border: 5px solid var(--cartoon-line);
  border-radius: 30px;
  background:
    linear-gradient(90deg, var(--tile-line) 2px, transparent 2px),
    linear-gradient(180deg, var(--tile-line) 2px, transparent 2px),
    radial-gradient(circle at 18% 18%, rgba(255, 216, 111, 0.35), transparent 8rem),
    radial-gradient(circle at 78% 78%, rgba(139, 217, 246, 0.24), transparent 8rem),
    linear-gradient(180deg, #fff8dc, #ffe8af);
  background-size: calc(100% / 6) calc(100% / 5), calc(100% / 6) calc(100% / 5), auto, auto, auto;
  box-shadow:
    inset 0 0 0 6px rgba(255, 255, 255, 0.52),
    inset 0 -12px 0 rgba(113, 77, 45, 0.08),
    0 16px 0 rgba(113, 77, 45, 0.12);
}

.merge-board::before,
.merge-board::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.merge-board::before {
  inset: 9px;
  border: 2px dashed rgba(255, 159, 66, 0.34);
}

.merge-board::after {
  left: 18px;
  right: 18px;
  top: 50%;
  height: 12px;
  opacity: 0.3;
  background:
    radial-gradient(circle, #ff9f42 0 4px, transparent 5px) 0 50% / 44px 12px repeat-x;
  transform: translateY(-50%);
}

#merge-path-preview {
  stroke: #ff9f42;
  stroke-width: 8;
  filter: drop-shadow(0 3px 0 rgba(113, 77, 45, 0.22)) drop-shadow(0 0 10px rgba(255, 216, 111, 0.75));
}

.board-cell {
  min-height: clamp(58px, 8.4vw, 78px);
  border: 3px solid rgba(113, 77, 45, 0.2);
  border-radius: 20px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.95) 0 11px, transparent 12px),
    linear-gradient(180deg, #fffdf4, #ffd987);
  box-shadow:
    inset 0 -8px 0 rgba(113, 77, 45, 0.08),
    0 7px 0 rgba(113, 77, 45, 0.14);
}

.board-cell::after {
  inset: auto 10px 9px auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  transform: none;
}

.board-cell[data-item-id="towel"] {
  background: linear-gradient(180deg, #fff8fb, #f7adc5);
}

.board-cell[data-item-id="shoe"] {
  background: linear-gradient(180deg, #f5fdff, #9ee3f7);
}

.board-cell[data-item-id="dumbbell"] {
  background: linear-gradient(180deg, #fbfff7, #b7ec9d);
}

.board-cell[data-item-id="drink"] {
  background: linear-gradient(180deg, #f6fdff, #8edbf1);
}

.board-cell[data-item-id="ticket"] {
  background: linear-gradient(180deg, #fff9e5, #ffc76b);
}

.board-cell.is-selected {
  border-color: #ff6f61;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.95) 0 12px, transparent 13px),
    linear-gradient(180deg, #fff3a6, #ff9f42);
  box-shadow:
    0 0 0 5px rgba(255, 216, 111, 0.68),
    0 12px 0 rgba(113, 77, 45, 0.18),
    0 0 26px rgba(255, 159, 66, 0.55);
}

.board-cell.is-selected::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 3px dashed rgba(255, 111, 97, 0.7);
  border-radius: 24px;
  animation: linkPathPulse 780ms ease-in-out infinite alternate;
}

.board-cell.is-merging {
  animation: mergeBurst 360ms ease both;
}

.board-item {
  gap: 6px;
}

.board-item-icon {
  display: grid;
  place-items: center;
  width: 1.85em;
  height: 1.85em;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 -3px 0 rgba(113, 77, 45, 0.08);
}

.board-item-name {
  padding: 3px 7px;
  border-radius: 999px;
  color: #6d4b30;
  background: rgba(255, 255, 255, 0.62);
}

.gym-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 12%, rgba(139, 217, 246, 0.2), transparent 9rem),
    linear-gradient(180deg, #f6fff0, #fffaf0);
}

.gym-panel::before {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 3px dashed rgba(95, 172, 94, 0.28);
  border-radius: 25px;
}

.gym-scene {
  isolation: isolate;
  min-height: 430px;
  border: 5px solid #6e8b52;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0 25%, transparent 25%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.42) 0 24%, transparent 24%),
    linear-gradient(180deg, #fff1bd 0 48%, #98d978 48% 100%);
  box-shadow:
    inset 0 0 0 6px rgba(255, 255, 255, 0.44),
    inset 0 -18px 0 rgba(76, 111, 54, 0.12),
    0 16px 0 rgba(76, 111, 54, 0.12);
}

.gym-scene::before {
  left: 50%;
  right: auto;
  bottom: -80px;
  width: 620px;
  height: 260px;
  border: 0;
  background:
    linear-gradient(30deg, rgba(255, 255, 255, 0.28) 0 3px, transparent 3px 46px),
    linear-gradient(150deg, rgba(76, 111, 54, 0.18) 0 3px, transparent 3px 46px),
    linear-gradient(180deg, #b8e995, #81c66c);
  transform: translateX(-50%) rotateX(58deg) rotateZ(-45deg);
  transform-origin: center top;
  box-shadow: 0 -8px 0 rgba(76, 111, 54, 0.12) inset;
}

.gym-scene::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 44px;
  z-index: 1;
  height: 72px;
  border-radius: 50%;
  background: rgba(76, 111, 54, 0.12);
  transform: skewX(-18deg);
  pointer-events: none;
}

.wall-clock,
.poster,
.gym-door,
.equipment,
.material-pile,
.empty-slots,
.gym-scene > .mini-goose {
  z-index: 3;
}

.wall-clock {
  border-color: #714d2d;
  color: #714d2d;
  box-shadow: 0 6px 0 rgba(113, 77, 45, 0.12);
}

.wall-clock::before,
.wall-clock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  border-radius: 999px;
  background: #714d2d;
  transform-origin: bottom center;
}

.wall-clock::before {
  height: 16px;
  transform: translate(-50%, -100%) rotate(0deg);
}

.wall-clock::after {
  height: 13px;
  transform: translate(-50%, -100%) rotate(90deg);
}

.poster {
  transform: rotate(-2deg);
}

.poster-stretch {
  transform: rotate(3deg);
}

.poster.is-locked,
.gym-door.is-locked {
  opacity: 0.48;
  filter: grayscale(0.95);
}

.equipment {
  filter: drop-shadow(0 12px 0 rgba(76, 61, 43, 0.12));
  transform: skewY(-4deg);
}

.equipment.is-locked,
[data-decoration].is-locked {
  opacity: 1;
  filter: grayscale(1) saturate(0.35) drop-shadow(0 12px 0 rgba(76, 61, 43, 0.12));
}

.equipment.is-locked::after,
.build-slot.is-locked::after {
  content: "待解锁";
  border: 2px solid rgba(255, 255, 255, 0.46);
  background: rgba(70, 70, 70, 0.78);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
}

.equipment.is-locked::before {
  content: "锁";
  position: absolute;
  right: 6px;
  top: -12px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  color: #fff;
  font: 900 0.78rem/1 "Microsoft YaHei", sans-serif;
  background: #6f737a;
}

.equipment.is-owned,
[data-decoration].is-owned {
  opacity: 1;
  filter: saturate(1.08) drop-shadow(0 14px 14px rgba(95, 172, 94, 0.25));
  animation: unlockPop 520ms ease both;
}

.treadmill .belt,
.treadmill .console,
.treadmill .handle,
.bench .bar,
.bench .seat,
.rack {
  border-color: #59402b;
}

.rack {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 240, 202, 0.82));
}

.material-pile {
  transform: rotate(-2deg);
}

.mat {
  border-color: rgba(113, 77, 45, 0.24);
}

.empty-slots {
  align-items: end;
}

.build-slot {
  border-color: rgba(113, 77, 45, 0.28);
  color: #714d2d;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 232, 175, 0.74));
  box-shadow: 0 7px 0 rgba(113, 77, 45, 0.12);
}

.build-slot.is-unlocked {
  border-color: rgba(95, 172, 94, 0.72);
  background: linear-gradient(180deg, #f6fff1, #bdeea2);
}

.gym-scene > .mini-goose {
  animation: gooseEntrance 2.8s ease-in-out infinite;
}

.gym-scene > .mini-goose.is-entering {
  animation: gooseUnlockEntrance 900ms cubic-bezier(0.2, 0.9, 0.25, 1.2) both;
}

.mini-body,
.mini-head {
  box-shadow: inset -7px -7px 0 rgba(113, 77, 45, 0.06);
}

#shop-upgrade-area {
  border: 2px solid rgba(113, 77, 45, 0.12);
  box-shadow: inset 0 -8px 0 rgba(113, 77, 45, 0.06);
}

.shop-item {
  border-color: rgba(113, 77, 45, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 242, 207, 0.84));
  box-shadow: 0 7px 0 rgba(113, 77, 45, 0.1);
}

.shop-item.is-affordable {
  border-color: rgba(95, 172, 94, 0.72);
  background: linear-gradient(180deg, #ffffff, #e6ffd9);
}

.shop-item.is-affordable .shop-icon {
  background: linear-gradient(135deg, #9fe7b1, #5fac5e);
}

.feedback-area {
  border-width: 3px;
  color: #714d2d;
  background:
    radial-gradient(circle at 20px 50%, rgba(255, 216, 111, 0.35) 0 10px, transparent 11px),
    linear-gradient(180deg, rgba(255, 253, 245, 0.9), rgba(255, 238, 193, 0.86));
}

.feedback-area.is-hot {
  animation: feedbackBounce 480ms ease both;
}

.board-cell.has-item {
  cursor: pointer;
}

.board-cell.has-item[data-item-id="towel"] {
  background: linear-gradient(180deg, #fff8fb, #f7adc5) !important;
}

.board-cell.has-item[data-item-id="shoe"] {
  background: linear-gradient(180deg, #f5fdff, #9ee3f7) !important;
}

.board-cell.has-item[data-item-id="dumbbell"] {
  background: linear-gradient(180deg, #fbfff7, #b7ec9d) !important;
}

.board-cell.has-item[data-item-id="drink"] {
  background: linear-gradient(180deg, #f6fdff, #8edbf1) !important;
}

.board-cell.has-item[data-item-id="ticket"],
.board-cell.has-item[data-item-id="medal"] {
  background: linear-gradient(180deg, #fff9e5, #ffc76b) !important;
}

.board-cell.has-item[data-item-id="heart"] {
  background: linear-gradient(180deg, #fff6f6, #ffaaa1) !important;
}

.board-cell .board-item-icon {
  color: #714d2d !important;
  background: rgba(255, 255, 255, 0.58) !important;
}

.board-cell.is-selected,
.board-cell.is-target {
  border-color: #ff6f61 !important;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.95) 0 12px, transparent 13px),
    linear-gradient(180deg, #fff3a6, #ff9f42) !important;
  box-shadow:
    0 0 0 5px rgba(255, 216, 111, 0.68),
    0 12px 0 rgba(113, 77, 45, 0.18),
    0 0 26px rgba(255, 159, 66, 0.55) !important;
}

.board-cell.is-invalid {
  border-color: #df4944 !important;
  background: linear-gradient(180deg, #fff3ee, #ffb4a8) !important;
}

.board-cell.is-merging {
  animation: mergeBurst 360ms ease both !important;
}

@keyframes linkPathPulse {
  from {
    opacity: 0.42;
    transform: scale(0.98);
  }
  to {
    opacity: 0.95;
    transform: scale(1.04);
  }
}

@keyframes mergeBurst {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  56% {
    opacity: 0.95;
    transform: scale(1.18) rotate(-3deg);
  }
  100% {
    opacity: 0.3;
    transform: scale(0.72) rotate(5deg);
  }
}

@keyframes unlockPop {
  0% {
    transform: translateY(8px) scale(0.94) skewY(-4deg);
  }
  70% {
    transform: translateY(-4px) scale(1.04) skewY(-4deg);
  }
  100% {
    transform: translateY(0) scale(1) skewY(-4deg);
  }
}

@keyframes gooseEntrance {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@keyframes gooseUnlockEntrance {
  0% {
    opacity: 0;
    transform: translateX(96px) translateY(18px) scale(0.78) rotate(8deg);
  }
  62% {
    opacity: 1;
    transform: translateX(-10px) translateY(-12px) scale(1.08) rotate(-5deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1) rotate(-2deg);
  }
}

@keyframes feedbackBounce {
  0% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .merge-board {
    min-height: 360px;
  }

  .gym-scene {
    min-height: 470px;
  }
}

@media (max-width: 700px) {
  .game-shell {
    width: min(100% - 16px, 1240px);
  }

  .game-header {
    min-height: auto;
    padding: 22px;
  }

  .status-bar {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 14px;
    border-radius: 26px;
  }

  .merge-board {
    grid-template-columns: repeat(3, minmax(54px, 1fr));
    min-height: 520px;
    gap: 9px;
    background-size: calc(100% / 3) calc(100% / 10), calc(100% / 3) calc(100% / 10), auto, auto, auto;
  }

  .board-cell {
    min-height: 58px;
  }

  .gym-scene {
    min-height: 650px;
  }

  .gym-scene::before {
    width: 500px;
  }

  .poster-power {
    left: 96px;
  }

  .poster-stretch {
    left: 174px;
  }

  .gym-door {
    right: 18px;
    bottom: 382px;
    width: 82px;
    height: 122px;
  }

  .treadmill {
    left: 18px;
    bottom: 336px;
  }

  .bench {
    left: 22px;
    bottom: 224px;
  }

  .rack {
    left: 24px;
    right: auto;
    bottom: 126px;
  }

  .material-pile {
    right: 16px;
    bottom: 248px;
  }

  .gym-scene > .mini-goose {
    right: 54px;
    bottom: 140px;
  }

  .empty-slots {
    left: 18px;
    right: 18px;
    bottom: 24px;
    grid-template-columns: 1fr;
  }

  .shop-item {
    grid-template-columns: 44px 1fr;
  }

  .shop-item strong {
    grid-column: 2;
  }
}

/* 任务 2-4：最终双区域精简界面 */
:root {
  --ui-bg: #f7fbff;
  --ui-panel: rgba(255, 255, 255, 0.92);
  --ui-blue: #78aee8;
  --ui-blue-strong: #4e91d6;
  --ui-blue-soft: #dcedff;
  --ui-ink: #25405c;
  --ui-muted: #6f88a3;
  --ui-green: #9edbb8;
  --ui-yellow: #ffe39d;
  --ui-red: #ff9b91;
}

body {
  overflow-x: hidden;
  color: var(--ui-ink);
  background:
    linear-gradient(90deg, rgba(120, 174, 232, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(120, 174, 232, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 14% 12%, rgba(220, 237, 255, 0.9), transparent 20rem),
    radial-gradient(circle at 86% 16%, rgba(226, 247, 236, 0.9), transparent 22rem),
    var(--ui-bg);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
}

.game-shell {
  width: min(1280px, calc(100% - 28px));
  padding: 18px 0 22px;
}

.game-shell::before,
.game-shell::after,
.game-header,
.status-bar,
#shop-upgrade-area,
.board-panel::after,
.gym-panel::before {
  display: none;
}

.game-layout,
.link-merge-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.98fr) minmax(420px, 1.02fr);
  gap: 18px;
  align-items: stretch;
}

.panel {
  position: relative;
  min-height: calc(100vh - 40px);
  padding: clamp(16px, 2vw, 24px);
  border: 2px solid var(--ui-blue);
  border-radius: 34px;
  color: var(--ui-ink);
  background:
    radial-gradient(circle at 0 0, transparent 0 22px, var(--ui-panel) 23px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.92));
  box-shadow: 0 14px 34px rgba(66, 116, 171, 0.12);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(120, 174, 232, 0.35);
  border-radius: 25px;
}

.board-panel::before,
.gym-panel::before {
  content: "";
  display: block;
  position: absolute;
  inset: 10px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(120, 174, 232, 0.35);
  border-radius: 25px;
  background: transparent;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--ui-blue-strong);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0 0 6px;
  color: var(--ui-ink);
  font-size: clamp(2rem, 3.7vw, 3.7rem);
  letter-spacing: -0.05em;
}

h2 {
  color: var(--ui-ink);
  font-size: 1.25rem;
}

.panel-copy,
.status-label,
.status-progress,
.feedback-area,
.gym-help {
  color: var(--ui-muted);
}

.panel-actions {
  flex: 0 0 auto;
}

.secondary-button {
  min-width: auto;
  padding: 10px 14px;
  border: 2px solid var(--ui-blue);
  border-radius: 999px;
  color: var(--ui-ink);
  background: #ffffff;
  box-shadow: 0 8px 0 rgba(120, 174, 232, 0.14);
}

.secondary-button:hover {
  box-shadow: 0 10px 0 rgba(120, 174, 232, 0.16);
}

.inline-status {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.board-status {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gym-status {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.status-item {
  min-height: auto;
  padding: 12px 14px;
  border: 1px solid rgba(120, 174, 232, 0.36);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.status-item strong {
  display: block;
  color: var(--ui-ink);
  font-size: 1.35rem;
}

.status-goal {
  background: rgba(236, 248, 255, 0.76);
}

.panel-tag,
.sample-item {
  border: 1px solid rgba(120, 174, 232, 0.42);
  color: var(--ui-blue-strong);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.merge-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid rgba(120, 174, 232, 0.32);
  border-radius: 20px;
  background: rgba(236, 248, 255, 0.52);
}

.merge-board {
  gap: clamp(7px, 0.9vw, 10px);
  min-height: clamp(360px, 42vw, 520px);
  padding: clamp(12px, 1.6vw, 18px);
  border: 2px solid var(--ui-blue);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(120, 174, 232, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, rgba(120, 174, 232, 0.18) 1px, transparent 1px),
    #ffffff;
  background-size: calc(100% / 6) calc(100% / 5), calc(100% / 6) calc(100% / 5), auto;
  box-shadow: inset 0 0 0 8px rgba(220, 237, 255, 0.42);
}

.merge-board::before {
  inset: 8px;
  border: 1px dashed rgba(120, 174, 232, 0.46);
}

.merge-board::after {
  display: none;
}

#merge-path-preview {
  stroke: var(--ui-blue-strong);
  stroke-width: 4;
  filter: drop-shadow(0 0 8px rgba(120, 174, 232, 0.55));
}

.board-cell {
  min-height: clamp(60px, 7.8vw, 82px);
  border: 1px solid rgba(120, 174, 232, 0.5);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 3px rgba(220, 237, 255, 0.26);
}

.board-cell::after {
  display: none;
}

.board-cell.has-item[data-item-id] {
  background: #ffffff !important;
}

.board-cell.has-item[data-item-id="towel"] {
  border-color: rgba(255, 155, 145, 0.72);
}

.board-cell.has-item[data-item-id="shoe"],
.board-cell.has-item[data-item-id="drink"] {
  border-color: rgba(78, 145, 214, 0.72);
}

.board-cell.has-item[data-item-id="dumbbell"],
.board-cell.has-item[data-item-id="heart"] {
  border-color: rgba(102, 184, 142, 0.72);
}

.board-cell.has-item[data-item-id="ticket"],
.board-cell.has-item[data-item-id="medal"] {
  border-color: rgba(235, 178, 65, 0.72);
}

.board-cell .board-item-icon {
  width: 2em;
  height: 2em;
  border: 1px solid rgba(120, 174, 232, 0.42);
  color: var(--ui-blue-strong) !important;
  background: rgba(236, 248, 255, 0.88) !important;
  box-shadow: none;
}

.board-item-name {
  color: var(--ui-muted);
  background: transparent;
}

.board-cell.is-selected,
.board-cell.is-target {
  border-color: var(--ui-blue-strong) !important;
  background: rgba(220, 237, 255, 0.82) !important;
  box-shadow: 0 0 0 4px rgba(120, 174, 232, 0.18) !important;
}

.board-cell.is-selected::before {
  border: 1px dashed var(--ui-blue-strong);
}

.board-cell.is-invalid {
  border-color: var(--ui-red) !important;
  background: rgba(255, 239, 237, 0.9) !important;
}

.rule-strip,
.gym-help,
.game-over-summary {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(120, 174, 232, 0.34);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
}

.rule-strip p,
.gym-help p {
  margin: 0;
  line-height: 1.55;
}

.feedback-area {
  min-height: 46px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(120, 174, 232, 0.42);
  border-radius: 18px;
  background: rgba(236, 248, 255, 0.7);
  box-shadow: none;
}

.feedback-area.is-hot {
  color: var(--ui-blue-strong);
}

.gym-scene {
  min-height: clamp(440px, 50vw, 590px);
  border: 2px solid var(--ui-blue);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(120, 174, 232, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(120, 174, 232, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0 49%, #edf8f2 49% 100%);
  background-size: 32px 32px, 32px 32px, auto;
  box-shadow: inset 0 0 0 8px rgba(220, 237, 255, 0.32);
}

.gym-scene::before {
  left: -24px;
  right: -24px;
  bottom: 0;
  width: auto;
  height: 118px;
  border-top: 1px solid rgba(120, 174, 232, 0.34);
  background:
    linear-gradient(90deg, rgba(120, 174, 232, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(120, 174, 232, 0.12) 1px, transparent 1px),
    #eef9f4;
  background-size: 38px 38px, 38px 38px, auto;
  transform: none;
  box-shadow: none;
}

.gym-scene::after {
  display: none;
}

.wall-clock,
.poster,
.gym-door,
.treadmill .belt,
.treadmill .console,
.treadmill .handle,
.bench .bar,
.bench .seat,
.rack,
.mat,
.build-slot {
  border-color: var(--ui-blue) !important;
}

.wall-clock,
.poster,
.gym-door,
.rack,
.mat,
.build-slot {
  color: var(--ui-ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 0 rgba(120, 174, 232, 0.12);
}

.poster-power,
.poster-stretch {
  background: rgba(255, 255, 255, 0.88);
}

.gym-door {
  color: var(--ui-ink);
  background:
    radial-gradient(circle at 74% 55%, var(--ui-yellow) 0 5px, transparent 6px),
    linear-gradient(180deg, #ffffff, #dcedff);
}

.treadmill .belt {
  background: repeating-linear-gradient(90deg, #dcedff 0 16px, #f8fcff 16px 30px);
}

.treadmill .console,
.bench .seat {
  background: #dcedff;
}

.bench .bar,
.rack span {
  background: var(--ui-blue-strong);
}

.bench .plate {
  background: var(--ui-yellow);
}

.rack span {
  background:
    radial-gradient(circle at 16px 50%, var(--ui-yellow) 0 9px, transparent 10px),
    radial-gradient(circle at calc(100% - 16px) 50%, var(--ui-yellow) 0 9px, transparent 10px),
    linear-gradient(90deg, transparent 0 14px, var(--ui-blue-strong) 14px calc(100% - 14px), transparent calc(100% - 14px));
}

.mat.box,
.mat.towel,
.mat.drink {
  background: #ffffff;
}

.equipment {
  filter: drop-shadow(0 8px 0 rgba(120, 174, 232, 0.14));
  transform: none;
}

.equipment.is-locked,
[data-decoration].is-locked {
  opacity: 1;
  filter: grayscale(1) saturate(0.25) drop-shadow(0 8px 0 rgba(120, 174, 232, 0.1));
}

.equipment.is-locked::after,
.build-slot.is-locked::after {
  color: var(--ui-ink);
  border: 1px solid rgba(120, 174, 232, 0.34);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: none;
}

.equipment.is-locked::before {
  border: 1px solid rgba(120, 174, 232, 0.6);
  color: var(--ui-blue-strong);
  background: #ffffff;
}

.equipment.is-owned,
[data-decoration].is-owned {
  filter: drop-shadow(0 10px 12px rgba(102, 184, 142, 0.22));
}

.build-slot {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.build-slot.is-unlocked {
  border-color: var(--ui-green) !important;
  background: rgba(238, 249, 244, 0.92);
}

.game-over-summary[hidden] {
  display: none;
}

.game-over-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  color: var(--ui-ink);
}

@media (max-width: 980px) {
  .game-layout,
  .link-merge-layout {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: auto;
  }

  .merge-board {
    min-height: 420px;
  }
}

@media (max-width: 700px) {
  .game-shell {
    width: min(100% - 16px, 1280px);
    padding-top: 8px;
  }

  .panel-header,
  .board-status,
  .gym-status,
  .game-over-summary {
    grid-template-columns: 1fr;
  }

  .panel-header {
    display: grid;
  }

  .merge-board {
    grid-template-columns: repeat(3, minmax(54px, 1fr));
    min-height: 520px;
    background-size: calc(100% / 3) calc(100% / 10), calc(100% / 3) calc(100% / 10), auto;
  }
}

/* 任务 2-4 最终覆盖：本地原创图形、紧凑双区、健身房重排 */
.local-fade-in-left {
  animation: localFadeLeft 420ms ease both;
}

.local-fade-in-right {
  animation: localFadeRight 420ms ease both;
}

.board-stage {
  position: relative;
}

.merge-path-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ui-icon {
  position: relative;
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.35em;
  vertical-align: -0.14em;
}

.ui-icon::before,
.ui-icon::after {
  position: absolute;
  content: "";
  box-sizing: border-box;
}

.ui-icon-coin::before {
  inset: 0.08em;
  border: 0.16em solid #e4aa35;
  border-radius: 50%;
  background: #ffe39d;
}

.ui-icon-coin::after {
  left: 0.44em;
  top: 0.26em;
  width: 0.18em;
  height: 0.52em;
  border-radius: 999px;
  background: #e4aa35;
}

.ui-icon-restart::before {
  inset: 0.12em;
  border: 0.16em solid var(--ui-blue-strong);
  border-right-color: transparent;
  border-radius: 50%;
}

.ui-icon-restart::after {
  right: 0;
  top: 0.06em;
  border-left: 0.34em solid var(--ui-blue-strong);
  border-top: 0.22em solid transparent;
  border-bottom: 0.22em solid transparent;
}

.ui-icon-signal::before {
  left: 0.08em;
  right: 0.08em;
  bottom: 0.12em;
  height: 0.8em;
  background:
    linear-gradient(90deg, var(--ui-blue-strong) 0 0.18em, transparent 0.18em 0.34em, var(--ui-blue-strong) 0.34em 0.52em, transparent 0.52em 0.68em, var(--ui-blue-strong) 0.68em 0.86em);
  clip-path: polygon(0 72%, 20% 72%, 20% 100%, 39% 100%, 39% 44%, 59% 44%, 59% 100%, 78% 100%, 78% 16%, 100% 16%, 100% 100%, 0 100%);
}

.ui-icon-route::before {
  left: 0.14em;
  top: 0.18em;
  width: 0.78em;
  height: 0.62em;
  border: 0.15em solid var(--ui-blue-strong);
  border-left-color: transparent;
  border-radius: 0.5em;
}

.ui-icon-unlock::before {
  left: 0.18em;
  bottom: 0.1em;
  width: 0.7em;
  height: 0.46em;
  border-radius: 0.14em;
  background: var(--ui-yellow);
  border: 0.12em solid #e4aa35;
}

.ui-icon-unlock::after {
  left: 0.28em;
  top: 0.04em;
  width: 0.46em;
  height: 0.46em;
  border: 0.14em solid var(--ui-blue-strong);
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50% 50% 0 0;
}

.ui-icon-gauge::before {
  inset: 0.18em 0.1em 0.04em;
  border: 0.15em solid var(--ui-blue-strong);
  border-bottom: 0;
  border-radius: 1em 1em 0 0;
}

.ui-icon-gauge::after {
  left: 0.48em;
  bottom: 0.16em;
  width: 0.12em;
  height: 0.42em;
  border-radius: 999px;
  background: #e4aa35;
  transform: rotate(36deg);
  transform-origin: bottom center;
}

.ui-icon-info::before {
  inset: 0.08em;
  border: 0.14em solid var(--ui-blue-strong);
  border-radius: 50%;
}

.ui-icon-info::after {
  left: 0.47em;
  top: 0.34em;
  width: 0.13em;
  height: 0.42em;
  border-radius: 999px;
  background: var(--ui-blue-strong);
  box-shadow: 0 -0.2em 0 var(--ui-blue-strong);
}

.sample-art {
  position: relative;
  display: inline-block;
  width: 1.25em;
  height: 1em;
  margin-right: 0.3em;
  vertical-align: -0.14em;
}

.sample-art::before,
.sample-art::after {
  position: absolute;
  content: "";
  box-sizing: border-box;
}

.sample-art-dumbbell::before {
  left: 0.1em;
  top: 0.38em;
  width: 1.05em;
  height: 0.18em;
  border-radius: 999px;
  background: var(--ui-blue-strong);
}

.sample-art-dumbbell::after {
  inset: 0.22em 0;
  border-left: 0.28em solid var(--ui-yellow);
  border-right: 0.28em solid var(--ui-yellow);
}

.sample-art-shoe::before {
  left: 0.08em;
  bottom: 0.16em;
  width: 1.06em;
  height: 0.42em;
  border-radius: 0.12em 0.52em 0.18em 0.18em;
  background: var(--ui-blue-strong);
}

.sample-art-shoe::after {
  left: 0.1em;
  bottom: 0.08em;
  width: 1.08em;
  height: 0.12em;
  border-radius: 999px;
  background: #25405c;
}

.sample-art-drink::before {
  left: 0.38em;
  top: 0.1em;
  width: 0.48em;
  height: 0.78em;
  border: 0.11em solid var(--ui-blue-strong);
  border-radius: 0.16em 0.16em 0.12em 0.12em;
  background: linear-gradient(180deg, #fff 0 36%, var(--ui-blue-soft) 36%);
}

.sample-art-drink::after {
  left: 0.48em;
  top: 0;
  width: 0.28em;
  height: 0.14em;
  border-radius: 999px;
  background: var(--ui-blue-strong);
}

.local-item .art-shape {
  inset: 0;
}

.local-item-towel .art-shape::before {
  left: 7px;
  top: 9px;
  width: 22px;
  height: 16px;
  border: 2px solid #c96d8c;
  border-radius: 7px;
  background: repeating-linear-gradient(90deg, #ffe6f0 0 5px, #f7adc5 5px 10px);
}

.local-item-towel .art-shape::after {
  left: 10px;
  top: 13px;
  width: 16px;
  height: 2px;
  background: rgba(201, 109, 140, 0.8);
  box-shadow: 0 5px 0 rgba(201, 109, 140, 0.8);
}

.local-item-shoe .art-shape::before {
  left: 6px;
  top: 13px;
  width: 24px;
  height: 13px;
  border-radius: 5px 14px 6px 6px;
  background: #4e91d6;
}

.local-item-shoe .art-shape::after {
  left: 7px;
  top: 25px;
  width: 25px;
  height: 4px;
  border-radius: 999px;
  background: #25405c;
}

.local-item-drink .art-shape::before {
  left: 12px;
  top: 5px;
  width: 13px;
  height: 26px;
  border: 2px solid #4e91d6;
  border-radius: 5px 5px 4px 4px;
  background: linear-gradient(180deg, #fff 0 38%, #8edbf1 38%);
}

.local-item-drink .art-shape::after {
  left: 14px;
  top: 2px;
  width: 9px;
  height: 5px;
  border-radius: 999px;
  background: #4e91d6;
}

.local-item-dumbbell .art-shape::before {
  left: 5px;
  top: 15px;
  width: 26px;
  height: 5px;
  border-radius: 999px;
  background: #25405c;
}

.local-item-dumbbell .art-shape::after {
  left: 3px;
  top: 10px;
  width: 30px;
  height: 15px;
  border-left: 7px solid #ffe39d;
  border-right: 7px solid #ffe39d;
}

.local-item-ticket .art-shape::before {
  left: 6px;
  top: 9px;
  width: 24px;
  height: 18px;
  border: 2px solid #e4aa35;
  border-radius: 6px;
  background: #fff5cf;
}

.local-item-ticket .art-shape::after {
  left: 17px;
  top: 11px;
  width: 2px;
  height: 14px;
  border-left: 2px dashed #e4aa35;
}

.local-item-medal .art-shape::before {
  left: 11px;
  top: 12px;
  width: 15px;
  height: 15px;
  border: 2px solid #e4aa35;
  border-radius: 50%;
  background: #ffe39d;
}

.local-item-medal .art-shape::after {
  left: 12px;
  top: 4px;
  width: 13px;
  height: 13px;
  clip-path: polygon(0 0, 42% 0, 50% 72%, 58% 0, 100% 0, 66% 100%, 34% 100%);
  background: #4e91d6;
}

.local-item-heart .art-shape::before {
  left: 10px;
  top: 10px;
  width: 16px;
  height: 16px;
  background: #ff9b91;
  transform: rotate(45deg);
}

.local-item-heart .art-shape::after {
  left: 7px;
  top: 8px;
  width: 22px;
  height: 14px;
  border-radius: 999px 999px 4px 4px;
  background:
    radial-gradient(circle at 31% 50%, #ff9b91 0 7px, transparent 8px),
    radial-gradient(circle at 69% 50%, #ff9b91 0 7px, transparent 8px);
}

.game-shell {
  width: min(1220px, calc(100% - 20px));
  padding: 10px 0 12px;
}

.game-layout,
.link-merge-layout {
  grid-template-columns: minmax(390px, 0.96fr) minmax(400px, 1.04fr);
  gap: 12px;
}

.panel {
  min-height: calc(100vh - 24px);
  padding: 14px;
  border-radius: 26px;
}

.panel::before,
.board-panel::before,
.gym-panel::before {
  inset: 7px;
  border-radius: 20px;
}

.panel-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 8px;
}

h1 {
  margin-bottom: 2px;
  font-size: clamp(1.7rem, 3vw, 3.1rem);
}

h2 {
  font-size: 1.05rem;
}

.panel-copy {
  font-size: 0.88rem;
  line-height: 1.45;
}

.inline-status {
  gap: 8px;
  margin: 8px 0;
}

.status-item {
  padding: 9px 10px;
  border-radius: 16px;
}

.status-item strong {
  font-size: 1.12rem;
}

.merge-samples {
  margin-bottom: 8px;
  padding: 6px;
}

.sample-item,
.panel-tag {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.merge-board {
  min-height: clamp(318px, 36vw, 440px);
  padding: 10px;
  gap: 7px;
  border-radius: 22px;
}

.board-cell {
  min-height: clamp(50px, 6.4vw, 68px);
  border-radius: 14px;
}

.board-cell .board-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.board-item-name {
  font-size: 0.68rem;
}

.rule-strip,
.gym-help,
.game-over-summary,
.feedback-area {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 16px;
  font-size: 0.85rem;
}

.feedback-area {
  min-height: 38px;
}

.gym-scene {
  min-height: clamp(344px, 39vw, 456px);
  overflow: hidden;
  border-radius: 22px;
}

.gym-scene::before {
  height: 92px;
}

.gym-wall {
  height: 42%;
}

.wall-clock {
  left: 48%;
  top: 18px;
  width: 42px;
  height: 42px;
  font-size: 0.74rem;
}

.poster {
  top: 22px;
  width: 66px;
  height: 54px;
  border-width: 2px;
  font-size: 0.74rem;
}

.poster-power {
  left: 18px;
}

.poster-stretch {
  left: 92px;
}

.gym-door {
  right: 18px;
  bottom: 122px;
  width: 74px;
  height: 108px;
  border-width: 2px;
  border-radius: 18px 18px 8px 8px;
  font-size: 0.72rem;
}

.treadmill {
  left: 18px;
  bottom: 112px;
  width: 142px;
  height: 78px;
}

.treadmill .belt {
  left: 8px;
  bottom: 8px;
  width: 116px;
  height: 22px;
  border-width: 3px;
}

.treadmill .console {
  right: 12px;
  top: 4px;
  width: 44px;
  height: 34px;
  border-width: 3px;
}

.treadmill .handle {
  right: 32px;
  top: 31px;
  width: 58px;
  height: 48px;
  border-top-width: 5px;
  border-right-width: 5px;
}

.bench {
  left: 178px;
  bottom: 108px;
  width: 142px;
  height: 86px;
}

.bench .bar {
  left: 10px;
  top: 12px;
  width: 118px;
  height: 7px;
}

.bench .plate {
  top: 2px;
  width: 16px;
  height: 30px;
}

.bench .seat {
  left: 34px;
  bottom: 20px;
  width: 76px;
  height: 23px;
}

.rack {
  right: 116px;
  bottom: 114px;
  width: 88px;
  gap: 6px;
  padding: 9px;
  border-width: 3px;
}

.rack span {
  height: 12px;
}

.material-pile {
  left: 48%;
  bottom: 24px;
  width: 126px;
  height: 92px;
  transform: translateX(-50%) rotate(-2deg);
}

.mat {
  border-width: 2px;
  font-size: 0.66rem;
}

.mat.box {
  width: 64px;
  height: 44px;
}

.mat.towel {
  width: 66px;
  height: 32px;
}

.mat.drink {
  left: 52px;
  width: 36px;
  height: 58px;
}

.gym-scene > .mini-goose {
  left: auto;
  right: 28px;
  bottom: 28px;
}

.empty-slots {
  left: 14px;
  right: 184px;
  bottom: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.build-slot {
  min-height: 52px;
  padding: 6px;
  border-width: 2px;
  border-radius: 14px;
  font-size: 0.76rem;
}

.equipment.is-locked,
[data-decoration].is-locked,
.build-slot.is-locked {
  filter: grayscale(1) saturate(0.18);
}

.equipment.is-locked,
[data-decoration].is-locked {
  opacity: 0.58;
}

.build-slot.is-locked {
  color: #789;
  background: rgba(236, 241, 245, 0.82);
}

.equipment.is-locked::before {
  right: 2px;
  top: -8px;
  width: 26px;
  height: 26px;
  border-color: rgba(120, 174, 232, 0.72);
  color: var(--ui-ink);
  background:
    linear-gradient(180deg, #ffffff, #e8eef5);
}

.equipment.is-locked::after,
.build-slot.is-locked::after {
  content: "未解锁";
  right: 0;
  bottom: -8px;
  padding: 3px 7px;
  border: 1px solid rgba(120, 174, 232, 0.36);
  border-radius: 999px;
  color: #607080;
  font-size: 0.66rem;
  background: rgba(255, 255, 255, 0.88);
}

.equipment.is-owned,
[data-decoration].is-owned,
.build-slot.is-unlocked {
  opacity: 1;
  filter: saturate(1.08) drop-shadow(0 8px 12px rgba(102, 184, 142, 0.2));
}

.build-slot.is-unlocked::after {
  content: "已开放";
  position: absolute;
  right: 6px;
  bottom: -8px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #2f7b55;
  font-size: 0.64rem;
  background: #eef9f4;
}

@keyframes localFadeLeft {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes localFadeRight {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 1080px) {
  .game-layout,
  .link-merge-layout {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: auto;
  }

  .merge-board {
    min-height: 380px;
  }

  .gym-scene {
    min-height: 430px;
  }
}

@media (max-width: 700px) {
  .game-shell {
    width: min(100% - 12px, 1280px);
    padding: 6px 0 10px;
  }

  .game-layout,
  .link-merge-layout {
    gap: 10px;
  }

  .panel {
    padding: 12px;
    border-radius: 22px;
  }

  .panel-header {
    grid-template-columns: 1fr;
  }

  .board-status,
  .gym-status {
    grid-template-columns: 1fr 1fr;
  }

  .merge-board {
    min-height: 450px;
    padding: 8px;
    gap: 6px;
  }

  .board-cell {
    min-height: 44px;
  }

  .gym-scene {
    min-height: 500px;
  }

  .poster-power {
    left: 12px;
  }

  .poster-stretch {
    left: 84px;
  }

  .wall-clock {
    left: 54%;
  }

  .gym-door {
    right: 12px;
    bottom: 278px;
    width: 66px;
    height: 94px;
  }

  .treadmill {
    left: 12px;
    bottom: 306px;
  }

  .bench {
    left: 18px;
    bottom: 206px;
  }

  .rack {
    left: 18px;
    right: auto;
    bottom: 112px;
  }

  .material-pile {
    left: auto;
    right: 18px;
    bottom: 182px;
    transform: rotate(-2deg);
  }

  .gym-scene > .mini-goose {
    right: 28px;
    bottom: 108px;
  }

  .empty-slots {
    left: 12px;
    right: 12px;
    bottom: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .build-slot {
    min-height: 48px;
    font-size: 0.72rem;
  }
}

@media (max-width: 430px) {
  .board-status,
  .gym-status {
    grid-template-columns: 1fr;
  }

  .merge-board {
    min-height: 430px;
  }

  .empty-slots {
    grid-template-columns: 1fr;
  }

  .gym-scene {
    min-height: 590px;
  }
}

/* 任务 2-4：分散式健身房布局与三分钟倒计时 */
.gym-countdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid rgba(120, 174, 232, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 248, 255, 0.86)),
    rgba(255, 255, 255, 0.88);
}

.countdown-label,
.countdown-status {
  display: block;
  margin: 0;
  color: var(--ui-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.countdown-time {
  display: block;
  margin: 2px 0;
  color: var(--ui-blue-strong);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1;
  letter-spacing: 0.04em;
}

.gym-countdown.is-running .countdown-time {
  color: var(--orange-deep);
}

.gym-countdown.is-ended {
  border-color: rgba(225, 109, 52, 0.4);
  background: linear-gradient(135deg, rgba(255, 240, 200, 0.96), rgba(255, 255, 255, 0.9));
}

.countdown-button {
  min-width: 86px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--ui-blue-strong), #66b88e);
  box-shadow: 0 8px 0 rgba(120, 174, 232, 0.16);
}

.countdown-button:focus-visible {
  outline: 3px solid rgba(247, 168, 58, 0.48);
  outline-offset: 3px;
}

.gym-scene {
  min-height: clamp(500px, 43vw, 560px);
  overflow: hidden;
}

.gym-scene::before {
  height: 118px;
}

.gym-wall {
  height: 46%;
}

.wall-clock {
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
}

.poster-power {
  left: 20px;
  top: 24px;
}

.poster-stretch {
  left: 104px;
  top: 92px;
}

.gym-door {
  right: 22px;
  bottom: 208px;
  width: 78px;
  height: 106px;
}

.treadmill {
  left: 20px;
  bottom: 248px;
  width: 136px;
  height: 76px;
}

.treadmill .belt {
  width: 110px;
}

.treadmill .console {
  width: 42px;
  height: 32px;
}

.treadmill .handle {
  right: 30px;
  top: 30px;
  width: 56px;
  height: 46px;
}

.bench {
  left: 50%;
  bottom: 160px;
  width: 136px;
  height: 86px;
  transform: translateX(-50%);
}

.bench .bar {
  width: 112px;
}

.bench .seat {
  left: 30px;
  width: 76px;
}

.rack {
  right: 22px;
  bottom: 118px;
  width: 88px;
}

.material-pile {
  left: 28px;
  bottom: 104px;
  width: 120px;
  height: 90px;
  transform: rotate(-2deg);
}

.mat.box {
  width: 60px;
  height: 42px;
}

.mat.towel {
  width: 62px;
  height: 30px;
}

.mat.drink {
  left: 50px;
  width: 34px;
  height: 56px;
}

.gym-scene > .mini-goose {
  right: 34px;
  bottom: 28px;
}

.empty-slots {
  left: 18px;
  right: 150px;
  bottom: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.build-slot {
  min-height: 58px;
  padding-bottom: 14px;
}

.equipment.is-locked::before {
  top: -10px;
}

.equipment.is-locked::after {
  right: 4px;
  bottom: -18px;
}

.build-slot.is-locked::after,
.build-slot.is-unlocked::after {
  right: 8px;
  bottom: 4px;
}

@media (max-width: 1080px) {
  .gym-scene {
    min-height: 520px;
  }
}

@media (max-width: 700px) {
  .gym-countdown {
    grid-template-columns: 1fr;
  }

  .countdown-button {
    width: 100%;
  }

  .gym-scene {
    min-height: 620px;
  }

  .poster-power {
    left: 14px;
    top: 22px;
  }

  .poster-stretch {
    left: 88px;
    top: 22px;
  }

  .wall-clock {
    left: auto;
    right: 98px;
    transform: none;
  }

  .gym-door {
    right: 14px;
    bottom: 392px;
    width: 66px;
    height: 94px;
  }

  .treadmill {
    left: 14px;
    bottom: 390px;
  }

  .bench {
    left: 18px;
    bottom: 282px;
    transform: none;
  }

  .rack {
    left: 18px;
    right: auto;
    bottom: 170px;
  }

  .material-pile {
    left: auto;
    right: 18px;
    bottom: 242px;
  }

  .gym-scene > .mini-goose {
    right: 28px;
    bottom: 120px;
  }

  .empty-slots {
    left: 12px;
    right: 12px;
    bottom: 18px;
  }
}

@media (max-width: 430px) {
  .gym-scene {
    min-height: 720px;
  }

  .wall-clock {
    right: 18px;
    top: 84px;
  }

  .gym-door {
    bottom: 498px;
  }

  .treadmill {
    bottom: 492px;
  }

  .bench {
    bottom: 384px;
  }

  .rack {
    bottom: 270px;
  }

  .material-pile {
    bottom: 342px;
  }

  .gym-scene > .mini-goose {
    bottom: 134px;
  }
}
