/* 大锤大战僵尸 · 原版 PvZ 阳光后院墓碑主界面 × 雕木种子槽 × 疯锤商店 */
html:has(body.garden-page) {
  background: #dff0d2;
}
html[data-game-theme="dark"]:has(body.garden-page) {
  background: #0e1a14;
}
.garden-page {
  --gd-bg: #dff0d2;
  --gd-card: #ffffff;
  --gd-border: #b4d2a3;
  --gd-ink: #1a3820;
  --gd-muted: #4b6d50;
  background: linear-gradient(180deg, #e8f5dd 0%, #dceec9 55%, #d3e8bf 100%) !important;
  color: var(--gd-ink);
  min-height: 100dvh;
  overflow-x: hidden;
}
html[data-game-theme="dark"] .garden-page {
  --gd-bg: #0e1a14;
  --gd-card: #15251d;
  --gd-border: #2c4c3c;
  --gd-ink: #eef7ef;
  --gd-muted: #9ebda7;
  background: linear-gradient(180deg, #0e1a14 0%, #12221a 55%, #0d1812 100%) !important;
}

.gd-layout {
  width: min(calc(100% - 1.2rem), 70rem);
  margin: 0 auto;
  padding: .45rem 0 .85rem;
  display: grid;
}

/* 单一游戏机台框（雕木厚边，主菜单与战场一体呈现） */
.gd-console {
  background: linear-gradient(180deg, #5d3616 0%, #44250d 100%);
  border: 2.5px solid #a46830;
  border-radius: 1.08rem;
  padding: .5rem;
  box-shadow: 0 20px 48px rgba(24, 48, 22, 0.28), inset 0 1px 0 rgba(255, 232, 185, 0.35);
  display: grid;
  gap: .42rem;
}

/* ==================== 顶部雕木种子槽 ==================== */
.gd-seed-bank {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: .34rem;
  padding: .34rem .42rem;
  border-radius: .82rem;
  background:
    repeating-linear-gradient(90deg, rgba(255, 226, 175, 0.04) 0 14px, rgba(35, 16, 4, 0.06) 14px 28px),
    linear-gradient(180deg, #965d2a 0%, #734218 52%, #59310f 100%);
  border: 2px solid #bd7f42;
  box-shadow: inset 0 2px 0 rgba(255, 236, 198, 0.34), inset 0 -3px 0 rgba(38, 17, 4, 0.55);
  overflow-x: auto;
  scrollbar-width: none;
}
.gd-seed-bank[hidden] { display: none; }
.gd-seed-bank::-webkit-scrollbar { display: none; }

.gd-sun-box {
  flex: none;
  min-width: 66px;
  padding: .2rem .44rem;
  border-radius: .6rem;
  background: linear-gradient(180deg, #fffdf0 0%, #fef08a 58%, #fcd34d 100%);
  border: 2px solid #c26d0c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #6b2f09;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.9), 0 2px 6px rgba(0, 0, 0, 0.22);
}
.gd-sun-box .gd-sun-svg { width: 24px; height: 24px; display: block; }
.gd-sun-box strong { font: 880 .98rem/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.gd-sun-box.is-pop { animation: gd-sun-pop .28s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes gd-sun-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.gd-seeds {
  display: flex;
  flex: 1 1 auto;
  gap: .28rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.gd-seeds::-webkit-scrollbar { display: none; }

.gd-seed {
  position: relative;
  flex: 0 0 auto;
  width: 74px;
  min-height: 62px;
  padding: .16rem .18rem .14rem;
  border-radius: .56rem;
  border: 2px solid #96c572;
  background: linear-gradient(180deg, #fbfef5 0%, #e4f5ce 62%, #cfe8b0 100%);
  color: #17371c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 2px 5px rgba(0, 0, 0, 0.24);
  transition: transform .12s cubic-bezier(.34, 1.56, .64, 1), border-color .14s ease, box-shadow .14s ease;
}
.gd-seed .gd-seed-key {
  position: absolute;
  top: 2px;
  left: 3px;
  font: 800 .56rem/1 var(--sans);
  padding: 1px 3px;
  border-radius: 3px;
  background: rgba(65, 42, 16, 0.14);
  color: #5b3b18;
  pointer-events: none;
}
.gd-seed:hover:not(:disabled) { transform: translateY(-2px); border-color: #fde047; }
.gd-seed[aria-pressed="true"] {
  border-color: #facc15;
  box-shadow: 0 0 0 2.5px rgba(250, 204, 21, 0.9), 0 4px 12px rgba(0, 0, 0, 0.3);
  background: linear-gradient(180deg, #fffee8, #fef08a);
}
.gd-seed.is-guided { border-color: #fbbf24; animation: gd-guide-pulse 1.15s ease-in-out infinite; }
@keyframes gd-guide-pulse {
  0%, 100% { box-shadow: 0 0 0 2.5px rgba(251, 191, 36, 0.92), 0 0 12px rgba(250, 204, 21, 0.72); }
  50% { box-shadow: 0 0 0 4px rgba(254, 240, 138, 1), 0 0 20px rgba(250, 204, 21, 0.98); }
}
.gd-seed.is-poor { filter: grayscale(.55) brightness(.78); }
.gd-seed .gd-seed-art {
  width: 34px;
  height: 31px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.gd-seed .gd-seed-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 1.5px rgba(20, 45, 16, 0.35));
}
.gd-seed .gd-seed-name { font: 780 .66rem/1.05 var(--sans); white-space: nowrap; pointer-events: none; }
.gd-seed .gd-seed-cost {
  font: 840 .65rem/1 var(--sans);
  padding: .07rem .32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #854d0e;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.gd-seed .gd-seed-cd {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  transform-origin: top center;
  pointer-events: none;
}

.gd-bank-tools {
  flex: none;
  display: flex;
  align-items: stretch;
  gap: .26rem;
  margin-inline-start: auto;
}
.gd-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 50px;
  padding: .18rem .38rem;
  border-radius: .56rem;
  border: 2px solid #b57a45;
  background: linear-gradient(180deg, #9d6331, #75451d);
  color: #fef3c7;
  font: 760 .7rem/1.1 var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.gd-tool-btn:hover { filter: brightness(1.08); border-color: #fde047; }
.gd-tool-btn.is-coin {
  background: linear-gradient(180deg, #b45309, #78350f);
  border-color: #fbbf24;
  color: #fef9c3;
  min-width: 62px;
}
.gd-tool-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  border-color: #fca5a5;
  color: #fff;
}
.gd-tool-btn.is-fast {
  background: linear-gradient(180deg, #0284c7, #0369a1);
  border-color: #7dd3fc;
  color: #fff;
}

/* ==================== 游戏视口与画布 ==================== */
.gd-arena {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 540;
  max-height: min(76dvh, 610px);
  margin: 0 auto;
  border-radius: .8rem;
  overflow: hidden;
  border: 2px solid #7ab064;
  background: #4e9c2e;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.gd-console[data-gd-view="menu"] .gd-arena {
  max-height: min(82dvh, 640px);
}
.gd-console[data-gd-view="menu"] .gd-arena canvas {
  display: none;
}
.gd-arena canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.garden-page .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==================== Layer 3A: 原版 PvZ 阳光后院 × 苔藓雕石墓碑主菜单 ==================== */
.gd-title-screen {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  align-items: center;
  padding: clamp(12px, 2vw, 22px);
  overflow-y: auto;
}
.gd-title-screen[hidden] { display: none; }
.gd-title-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) brightness(0.92);
}
.gd-title-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 26% 36%, rgba(255, 250, 220, 0.22), transparent 52%),
    linear-gradient(100deg, rgba(16, 44, 14, 0.52) 0%, rgba(18, 42, 16, 0.36) 46%, rgba(14, 24, 18, 0.68) 100%);
}
.gd-title-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(290px, .92fr);
  gap: clamp(14px, 2.2vw, 24px);
  align-items: center;
}

.gd-title-left {
  display: grid;
  gap: 10px;
  align-content: center;
}
.gd-wood-sign {
  position: relative;
  padding: 12px 18px 11px;
  border-radius: 14px;
  background: linear-gradient(180deg, #9a602c 0%, #734117 64%, #572e0d 100%);
  border: 3px solid #d59a54;
  box-shadow: 0 12px 28px rgba(14, 26, 10, 0.45), inset 0 2px 0 rgba(255, 238, 198, 0.42);
  color: #fff9e6;
}
.gd-sign-nails { position: absolute; inset: 8px 10px auto; display: flex; justify-content: space-between; pointer-events: none; }
.gd-sign-nails i { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fef3c7, #6b3b12); }
.gd-sign-kicker {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(22, 101, 52, 0.92);
  border: 1px solid #86efac;
  color: #f0fdf4;
  font: 800 11px/1.2 var(--sans);
}
.gd-wood-sign h1 {
  margin: 4px 0 6px;
  font: 900 clamp(24px, 3.2vw, 36px)/1.08 "Noto Serif SC", "Songti SC", serif;
  color: #fffef2;
  text-shadow: 0 3px 0 #472108, 0 5px 14px rgba(0, 0, 0, 0.45);
}
.gd-wood-sign h1 span { color: #fde047; }
.gd-sign-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.gd-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(34, 18, 6, 0.56);
  border: 1.5px solid rgba(253, 224, 71, 0.5);
  color: #fef3c7;
  font: 800 11.5px/1.2 var(--sans);
}
.gd-stat-pill.is-coin { background: rgba(146, 64, 14, 0.82); border-color: #fde047; color: #fef9c3; }

.gd-mascots-showcase {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 13px;
  background: rgba(255, 251, 236, 0.92);
  border: 2px solid #9e622a;
  box-shadow: 0 8px 20px rgba(14, 30, 10, 0.34);
}
.gd-mascot-hero {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 4px 6px rgba(34, 24, 10, 0.28));
}
.gd-mascot-hero.is-chuimei { margin-left: -14px; width: 64px; height: 64px; }
.gd-speech-bubble {
  font: 700 12px/1.45 var(--sans);
  color: #3f230b;
}
.gd-speech-bubble strong { color: #166534; }

.gd-menu-stages-box {
  padding: 9px 11px;
  border-radius: 13px;
  background: rgba(255, 252, 240, 0.94);
  border: 2px solid #965c26;
  box-shadow: 0 10px 24px rgba(14, 28, 12, 0.36);
}
.gd-menu-stages-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.gd-menu-stages-head span { font: 860 12.5px/1.2 var(--sans); color: #47250b; }
.gd-menu-stages-head small { font: 600 11px/1.2 var(--sans); color: #6d4724; }
.gd-menu-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.gd-mstage-btn {
  display: grid;
  gap: 1px;
  padding: 6px 8px;
  border-radius: 9px;
  border: 2px solid #c99d62;
  background: linear-gradient(180deg, #fffdf5, #f1dec0);
  color: #3d210b;
  text-align: left;
  cursor: pointer;
  transition: transform .1s ease, border-color .14s ease;
}
.gd-mstage-btn:hover { transform: translateY(-1px); border-color: #16a34a; }
.gd-mstage-btn[aria-current="true"] {
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-color: #fde047;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.35);
}
.gd-mstage-btn strong { font: 820 11.5px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-mstage-btn small { font: 700 10.5px/1.15 var(--sans); color: #b45309; }
.gd-mstage-btn[aria-current="true"] small { color: #fef08a; }
.gd-mstage-btn.is-locked,
.gd-mstage-btn:disabled {
  opacity: 0.56;
  background: linear-gradient(180deg, #e5dac5, #d4c4a6);
  border-color: #a89678;
  color: #6b583e;
  cursor: not-allowed;
  transform: none;
}
.gd-mstage-btn.is-locked small { color: #786346; }

/* 经典 PvZ 雕石墓碑选单板 */
.gd-tombstone-board {
  display: grid;
  gap: 9px;
  padding: 16px 16px 14px;
  border-radius: 36px 36px 14px 14px;
  background:
    radial-gradient(circle at 50% 10%, rgba(226, 232, 240, 0.14), transparent 55%),
    linear-gradient(180deg, #5d6970 0%, #444f56 42%, #323b41 100%);
  border: 3.5px solid #252d32;
  outline: 2px solid rgba(163, 230, 53, 0.35);
  outline-offset: -6px;
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.22),
    inset 0 -8px 0 rgba(18, 22, 26, 0.55),
    0 18px 42px rgba(6, 14, 10, 0.65);
}
.gd-tomb-arch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #dcfce7;
  font: 900 13px/1.2 "Noto Serif SC", serif;
  letter-spacing: .16em;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.72);
  margin-bottom: 2px;
}
.gd-tomb-arch em { font-style: normal; }

.gd-stone-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 2.5px solid #22292e;
  background: linear-gradient(180deg, #7f8d96 0%, #616e76 55%, #4d5860 100%);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.28), inset 0 -3px 0 rgba(15, 23, 42, 0.45), 0 5px 12px rgba(0, 0, 0, 0.34);
  transition: transform .12s ease, filter .14s ease, border-color .14s ease;
}
.gd-stone-btn:hover { transform: translateY(-2px); filter: brightness(1.08); border-color: #fde047; }
.gd-stone-btn:active { transform: scale(.98); }
.gd-stone-ic { font-size: 22px; flex: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4)); }
.gd-stone-copy { flex: 1; min-width: 0; display: grid; gap: 1px; }
.gd-stone-copy strong { font: 900 15px/1.15 var(--sans); text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55); }
.gd-stone-copy small { font: 600 11px/1.25 var(--sans); color: #e2e8f0; opacity: .92; }
.gd-stone-go {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(254, 240, 138, 0.24);
  border: 1px solid #fde047;
  color: #fef9c3;
  font: 840 12px/1 var(--sans);
}
.gd-stone-btn.is-adventure {
  background: linear-gradient(180deg, #27a34f 0%, #177c39 58%, #115e2a 100%);
  border-color: #fde047;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.34), 0 8px 18px rgba(10, 48, 22, 0.48);
}
.gd-stone-btn.is-adventure .gd-stone-copy small { color: #dcfce7; }
.gd-stone-btn.is-shop {
  background: linear-gradient(180deg, #b86c25 0%, #8f4d14 58%, #6e380d 100%);
  border-color: #fbbf24;
}
.gd-stone-btn.is-shop .gd-stone-copy small { color: #fef3c7; }
.gd-shop-dot {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ef4444;
  border: 1px solid #fecaca;
  color: #fff;
  font: 860 10.5px/1 var(--sans);
  animation: gd-guide-pulse 1.5s infinite;
}
.gd-shop-dot[hidden] { display: none; }

.gd-tomb-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}
.gd-mini-stone {
  padding: 7px 10px;
  border-radius: 10px;
  border: 2px solid #22292e;
  background: linear-gradient(180deg, #64727a, #49545c);
  color: #f1f5f9;
  font: 800 12px/1.2 var(--sans);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.gd-mini-stone:hover { border-color: #fde047; filter: brightness(1.1); }

/* ==================== 波次横幅 / 新手引导 / 悬停提示 ==================== */
.gd-wave-banner {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: .52rem 1.3rem;
  border-radius: 999px;
  background: rgba(153, 27, 27, 0.92);
  border: 2px solid #fca5a5;
  color: #fff7ed;
  font: 860 clamp(.98rem, 2.3vw, 1.36rem)/1.2 var(--sans);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  pointer-events: none;
  z-index: 5;
}
.gd-wave-banner.is-ready {
  background: linear-gradient(135deg, #dc2626, #ea580c);
  border-color: #fde047;
  color: #fef9c3;
  font-size: clamp(1.3rem, 3.4vw, 2.1rem);
  padding: .55rem 1.8rem;
}
.gd-wave-banner[hidden] { display: none; }

.gd-guide-bar {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 16px);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .54rem .3rem .4rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffdf0 0%, #f5e5bd 100%);
  border: 2.5px solid #8a5628;
  color: #3d240f;
  font: 760 clamp(.72rem, 1.45vw, .84rem)/1.25 var(--sans);
  box-shadow: 0 8px 20px rgba(32, 18, 6, 0.34);
  z-index: 4;
}
.gd-guide-bar[hidden] { display: none; }
.gd-guide-step {
  flex: none;
  padding: .12rem .42rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fffef5;
  font: 840 .72rem/1.1 var(--sans);
}
.gd-guide-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-guide-skip {
  flex: none;
  padding: .12rem .44rem;
  border-radius: 999px;
  border: 1px solid #b8844c;
  background: rgba(138, 86, 40, 0.12);
  color: #6b3d17;
  font: 720 .7rem/1.1 var(--sans);
  cursor: pointer;
}

.gd-plant-tip {
  position: absolute;
  left: 10px;
  bottom: 34px;
  padding: .24rem .6rem;
  border-radius: .54rem;
  background: linear-gradient(180deg, rgba(255, 252, 240, 0.96), rgba(244, 229, 192, 0.96));
  border: 1.8px solid #8c5729;
  color: #3d240f;
  font: 740 .74rem/1.2 var(--sans);
  box-shadow: 0 6px 14px rgba(24, 16, 6, 0.28);
  pointer-events: none;
  z-index: 4;
}
.gd-plant-tip[hidden] { display: none; }

/* ==================== 暖木羊皮纸弹窗（商店 / 图鉴 / 剧情 / 结算） ==================== */
.gd-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: .7rem;
  background: rgba(14, 28, 14, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 12;
}
.gd-overlay[hidden] { display: none; }
.gd-overlay-card {
  width: min(100%, 28rem);
  max-height: 100%;
  overflow-y: auto;
  padding: 1rem 1.2rem;
  border-radius: 1.02rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 240, 0.72), transparent 65%),
    linear-gradient(180deg, #fffdf4 0%, #f5e6c3 100%);
  border: 3px solid #8a5628;
  outline: 2px solid rgba(254, 240, 138, 0.55);
  outline-offset: -5px;
  color: #3a220d;
  text-align: center;
  display: grid;
  gap: .48rem;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.85), 0 22px 48px rgba(14, 24, 10, 0.55);
}
.gd-shop-card, .gd-almanac-card {
  width: min(100%, 44rem);
  text-align: left;
  gap: .62rem;
}
.gd-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gd-modal-head h3 { margin: 0; font-size: 1.12rem; font-weight: 900; color: #5b2e0e; }
.gd-modal-head p { margin: 2px 0 0; font-size: .78rem; color: #6c431f; }
.gd-shop-keeper { display: flex; align-items: center; gap: 10px; }
.gd-shop-keeper img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: contain;
  background: #fef3c7;
  border: 2px solid #9a602e;
  padding: 2px;
}
.gd-modal-head-right { display: flex; align-items: center; gap: 8px; flex: none; }
.gd-coin-badge {
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fef08a, #f59e0b);
  border: 2px solid #b45309;
  color: #451a03;
  font: 900 .88rem/1 var(--sans);
}
.gd-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #9a602e;
  background: #fef3c7;
  color: #5b2e0e;
  font: 900 15px/1 var(--sans);
  cursor: pointer;
}
.gd-close-btn:hover { background: #fde68a; }

.gd-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.gd-shop-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 9px 11px;
  border-radius: 12px;
  border: 2px solid #c99d62;
  background: linear-gradient(180deg, #fffdf8, #f7e9cc);
  box-shadow: 0 3px 8px rgba(64, 34, 12, 0.12);
}
.gd-shop-item.is-max { border-color: #22c55e; background: linear-gradient(180deg, #f0fdf4, #dcfce7); }
.gd-shop-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(254, 240, 138, 0.45);
  border: 1.5px solid #d4a35d;
  display: grid;
  place-items: center;
  font-size: 22px;
  overflow: hidden;
}
.gd-shop-icon img { width: 38px; height: 38px; object-fit: contain; }
.gd-shop-info strong { display: block; font: 880 .86rem/1.2 var(--sans); color: #47240a; }
.gd-shop-info small { display: block; margin-top: 2px; font: 600 .73rem/1.3 var(--sans); color: #6c431f; }
.gd-shop-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px dashed rgba(154, 96, 46, 0.35);
}
.gd-shop-pips { font: 800 .76rem/1 var(--sans); color: #b45309; letter-spacing: 2px; }
.gd-shop-buy {
  padding: 5px 12px;
  border-radius: 999px;
  border: 2px solid #15803d;
  background: linear-gradient(180deg, #22c55e, #15803d);
  color: #fff;
  font: 840 .76rem/1.1 var(--sans);
  cursor: pointer;
}
.gd-shop-buy:hover:not(:disabled) { filter: brightness(1.08); }
.gd-shop-buy:disabled {
  background: #d6c5a3;
  border-color: #b49a70;
  color: #6b5230;
  cursor: not-allowed;
}

/* 图鉴 */
.gd-almanac-tabs { display: flex; gap: 8px; }
.gd-tab-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid #b8844c;
  background: #fdf4dc;
  color: #5b2e0e;
  font: 820 .8rem/1.1 var(--sans);
  cursor: pointer;
}
.gd-tab-btn[aria-selected="true"] {
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-color: #15803d;
  color: #fff;
}
.gd-almanac-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.gd-alm-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1.8px solid #c99d62;
  background: #fffdf7;
}
.gd-alm-card img { width: 50px; height: 50px; object-fit: contain; flex: none; }
.gd-alm-card strong { display: block; font: 860 .85rem/1.2 var(--sans); color: #47240a; }
.gd-alm-card em { display: block; font-style: normal; font: 760 .72rem/1.2 var(--sans); color: #b45309; margin: 1px 0; }
.gd-alm-card small { display: block; font: 600 .72rem/1.3 var(--sans); color: #6c431f; }

.gd-overlay-stars { font-size: 1.65rem; letter-spacing: .16em; color: #f59e0b; }
.gd-coin-earned {
  margin: 0 auto;
  padding: .28rem .85rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #fef08a, #fde047);
  border: 1.5px solid #ca8a04;
  color: #713f12;
  font: 860 .82rem/1.2 var(--sans);
}
.gd-coin-earned[hidden] { display: none; }
.gd-unlock-pill {
  margin: .06rem auto;
  padding: .3rem .78rem;
  border-radius: .65rem;
  background: #dcfce7;
  border: 1.5px solid #16a34a;
  color: #14532d;
  font: 760 .78rem/1.35 var(--sans);
}
.gd-story-card { gap: .44rem; padding: .92rem 1.18rem; }
.gd-story-badge {
  margin: 0 auto;
  padding: .16rem .65rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fffef5;
  font: 800 .72rem/1.2 var(--sans);
}
.gd-story-cast { display: flex; align-items: center; justify-content: center; gap: .85rem; }
.gd-cast-item { margin: 0; display: grid; justify-items: center; gap: 2px; }
.gd-cast-item img {
  width: 50px; height: 50px; object-fit: contain; padding: 4px; border-radius: 50%;
  background: radial-gradient(circle, #fffef6, #ead5a7); border: 2px solid #9a602e;
}
.gd-cast-item figcaption { font: 800 .72rem/1 var(--sans); color: #6b3d17; }
.gd-story-lines {
  display: grid; gap: .3rem; text-align: left; padding: .5rem .68rem; border-radius: .68rem;
  background: rgba(138, 86, 40, 0.08); border: 1px solid rgba(138, 86, 40, 0.22);
}
.gd-story-lines p { margin: 0; font-size: .8rem; line-height: 1.42; }
.gd-story-tips { display: flex; flex-wrap: wrap; justify-content: center; gap: .32rem; }
.gd-story-tips span {
  padding: .16rem .5rem; border-radius: 999px; background: #e6f4d4;
  border: 1px solid #84bd65; color: #1f4d27; font: 760 .72rem/1.2 var(--sans);
}
.gd-overlay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .42rem; margin-top: .16rem; }
.gd-overlay-actions .merge-button {
  min-height: 36px; padding: .34rem .88rem; border-radius: .66rem; font-weight: 820;
  border: 2px solid #9d6331; background: linear-gradient(180deg, #fff9e8, #ecd5a7); color: #5b3010; cursor: pointer;
}
.gd-overlay-actions .merge-primary {
  border-color: #15803d; background: linear-gradient(180deg, #22c55e, #15803d); color: #ffffff;
}

/* 战中底部状态栏 */
.gd-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem .7rem;
  padding: .1rem .32rem;
  font-size: .78rem;
  color: #f4dfc0;
}
.gd-status-bar[hidden] { display: none; }
.gd-status-bar strong { color: #fef08a; }
.gd-status-right { display: inline-flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.gd-mini-action {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid #c99453;
  background: rgba(255, 246, 224, 0.14);
  color: #fef3c7;
  font: 760 .72rem/1.15 var(--sans);
  cursor: pointer;
}
.gd-mini-action:hover { background: rgba(254, 240, 138, 0.25); }
.gd-mini-action[hidden] { display: none; }

/* ==================== 手机端响应式适配（0px 溢出 + 无拉伸草坪） ==================== */
@media (max-width: 780px) and (orientation: portrait) {
  .gd-layout { width: min(calc(100% - .55rem), 36rem); padding: .24rem 0 .6rem; }
  .gd-console { padding: .34rem; border-radius: .86rem; gap: .32rem; }
  .gd-console[data-gd-view="menu"] .gd-arena {
    aspect-ratio: auto;
    max-height: none;
    min-height: 540px;
  }
  .gd-title-screen { position: relative; padding: 10px; overflow: visible; }
  .gd-title-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gd-menu-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gd-mascot-hero { width: 54px; height: 54px; }
  .gd-mascot-hero.is-chuimei { width: 52px; height: 52px; }
  .gd-seed-bank { flex-wrap: wrap; padding: .26rem .3rem; gap: .26rem; }
  .gd-sun-box { min-width: 56px; padding: .14rem .34rem; flex-direction: row; gap: .24rem; }
  .gd-sun-box .gd-sun-svg { width: 19px; height: 19px; }
  .gd-sun-box strong { font-size: .86rem; }
  .gd-bank-tools { order: 2; margin-inline-start: auto; }
  .gd-seeds { order: 3; flex: 1 0 100%; }
  .gd-seed { width: 62px; min-height: 54px; }
  .gd-seed .gd-seed-art { width: 28px; height: 26px; }
  .gd-seed .gd-seed-key { display: none; }
  .gd-tool-btn { min-width: 42px; padding: .14rem .28rem; font-size: .66rem; flex-direction: row; gap: 3px; }
  .gd-tool-btn.is-coin { min-width: 54px; }
  .gd-overlay { position: fixed; inset: 0; z-index: 80; padding: .85rem; }
  .gd-shop-grid, .gd-almanac-grid { grid-template-columns: minmax(0, 1fr); }
  .gd-guide-bar { top: 3px; padding: .16rem .36rem; gap: .24rem; font-size: .65rem; }
}

/* ==================== 手机横屏阳光草坪一屏满览驾驶舱（844x390 零滚动） ==================== */
@media (orientation: landscape) and (max-height: 540px) {
  .gd-layout { width: calc(100% - .6rem); max-width: 68rem; padding: .08rem 0 .1rem; }
  .gd-console { padding: .18rem .28rem; border-radius: .74rem; gap: .16rem; }
  .gd-seed-bank { padding: .12rem .24rem; gap: .2rem; flex-wrap: nowrap; }
  .gd-sun-box { min-width: 48px; padding: .08rem .24rem; flex-direction: row; gap: .18rem; }
  .gd-sun-box .gd-sun-svg { width: 16px; height: 16px; }
  .gd-sun-box strong { font-size: .8rem; }
  .gd-seeds { flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .gd-seed { width: 52px; min-height: 38px; padding: 1px 2px; flex: none; gap: 0; }
  .gd-seed .gd-seed-art { width: 20px; height: 18px; }
  .gd-seed .gd-seed-name { font-size: 9px; line-height: 1; }
  .gd-seed .gd-seed-cost { font-size: 9px; padding: 0 4px; }
  .gd-seed .gd-seed-key { display: none; }
  .gd-bank-tools { flex: none; gap: 3px; }
  .gd-tool-btn { min-width: 36px; padding: .1rem .24rem; font-size: .64rem; flex-direction: row; gap: 2px; }
  .gd-console[data-gd-view="play"] .gd-arena {
    width: min(100%, calc((100dvh - 116px) * 16 / 9));
    max-height: calc(100dvh - 116px);
    margin-inline: auto;
  }
  .gd-console[data-gd-view="menu"] .gd-arena {
    aspect-ratio: auto;
    height: calc(100dvh - 48px);
    max-height: calc(100dvh - 48px);
    min-height: 260px;
  }
  .gd-title-screen { padding: 8px 12px; overflow-y: auto; }
  .gd-title-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 10px; align-items: center; }
  .gd-wood-sign { padding: 7px 10px; }
  .gd-wood-sign h1 { font-size: 1.35rem; margin: 2px 0; }
  .gd-mascots-showcase { display: none; }
  .gd-menu-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .gd-status-bar { display: none; }
  .gd-overlay { position: fixed; inset: 0; z-index: 80; padding: .6rem; }
}

/* ==================== 极简全图海报主菜单覆写（与全站 2048 统一极简风） ==================== */
.gd-title-screen {
  align-items: end;
  justify-items: center;
  padding: clamp(12px, 2.2vw, 22px);
  background: #122314;
}
.gd-title-bg {
  filter: saturate(1.06) contrast(1.02);
  object-position: center 22%;
}
.gd-title-scrim {
  background: linear-gradient(
    180deg,
    rgba(18, 35, 20, .03) 0%,
    rgba(18, 35, 20, .05) 42%,
    rgba(18, 35, 20, .78) 66%,
    rgba(18, 35, 20, .96) 86%,
    #122314 100%
  );
}
.gd-title-grid {
  width: min(100%, 34rem);
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.gd-title-left { gap: 8px; }
.gd-sign-nails, .gd-sign-kicker, .gd-mascots-showcase, .gd-menu-stages-head, .gd-tomb-arch, .gd-stone-copy small, .gd-stone-go {
  display: none !important;
}
.gd-wood-sign {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.gd-wood-sign h1 {
  margin: 0;
  font: 900 clamp(24px, 4.2vw, 32px)/1.08 var(--sans);
  text-shadow: 0 3px 14px rgba(0, 0, 0, .72);
}
.gd-stat-pill {
  padding: 3px 9px;
  background: rgba(12, 24, 14, .68);
  border-color: rgba(253, 224, 71, .35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.gd-menu-stages-box {
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: none;
}
.gd-menu-stages {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}
.gd-mstage-btn {
  padding: 5px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #f1f5f9;
  text-align: center;
}
.gd-mstage-btn strong { font-size: 11px; }
.gd-mstage-btn small { font-size: 9.5px; color: #fde68a; }
.gd-mstage-btn.is-locked, .gd-mstage-btn:disabled {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .09);
  color: rgba(241, 245, 249, .45);
}
.gd-tombstone-board {
  padding: 0;
  gap: 7px;
  border: 0;
  outline: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.gd-stone-subrow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.gd-stone-btn {
  justify-content: center;
  text-align: center;
  padding: 10px 10px;
  gap: 6px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: none;
}
.gd-stone-btn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(253, 224, 71, .6); }
.gd-stone-btn.is-adventure {
  padding: 13px 16px;
  border-radius: 15px;
  border: 1.5px solid #fef08a;
  background: linear-gradient(135deg, #a3e635 0%, #22c55e 100%);
  color: #0b2912;
  box-shadow: 0 10px 26px rgba(34, 197, 94, .38), inset 0 1px 0 rgba(255, 255, 255, .68);
}
.gd-stone-btn.is-adventure .gd-stone-copy strong { text-shadow: none; font-size: 16px; color: #08240e; }
.gd-stone-btn.is-shop {
  position: relative;
  border-color: rgba(251, 191, 36, .35);
  background: rgba(217, 119, 6, .22);
}
.gd-stone-btn.is-shop .gd-shop-dot {
  position: absolute;
  top: -6px;
  right: 4px;
  padding: 2px 6px;
  font-size: 9.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.gd-stone-ic { font-size: 16px; filter: none; }
.gd-stone-copy { flex: 0 1 auto; }
.gd-stone-copy strong { font-size: 13.5px; text-shadow: none; white-space: nowrap; }
.gd-tomb-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
}
.gd-mini-stone {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: rgba(241, 245, 249, .84);
  font-size: 12px;
  font-weight: 660;
  box-shadow: none;
}

@media (max-width: 780px) and (orientation: portrait) {
  .gd-layout:has(.gd-console[data-gd-view="menu"]) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - 3.6rem);
  }
  .gd-console[data-gd-view="menu"] { width: 100%; }
  .gd-console[data-gd-view="menu"] .gd-arena {
    min-height: 0;
    background: #122314;
  }
  .gd-title-screen {
    position: relative;
    padding: calc(min(100vw - 1.4rem, 30rem) * 0.52) 12px 14px;
    background: #122314;
  }
  .gd-title-bg {
    inset: 0 0 auto 0;
    height: auto;
    aspect-ratio: 16 / 10;
    object-position: center center;
  }
  .gd-title-scrim {
    inset: 0 0 auto 0;
    height: auto;
    aspect-ratio: 16 / 10;
    background: linear-gradient(180deg, transparent 0%, transparent 54%, rgba(18, 35, 20, .8) 82%, #122314 100%);
  }
  .gd-menu-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (orientation: landscape) and (max-height: 540px) {
  .gd-title-grid { width: min(100%, 34rem); grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .gd-menu-stages { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gd-stone-btn.is-adventure { padding: 8px 14px; }
}
