/* 莓园打地鼠 — 木质机台 + 暖阳莓园舞台 */

:root {
  --sun-1: #ffe9a8;
  --sun-2: #ffc79a;
  --sun-3: #f7a3b6;
  --grass-1: #a4d878;
  --grass-2: #6fae52;
  --grass-3: #4f8a3c;
  --wood-1: #b98157;
  --wood-2: #8a5533;
  --wood-3: #5d3620;
  --soil-1: #9b6543;
  --soil-2: #4a2c1b;
  --berry: #e8456b;
  --berry-deep: #b32b4f;
  --gold: #f6c34a;
  --ink: #3a2418;
  --ink-soft: #6b4a34;
  --cream: #fff6e7;
  --cols: 4;
  --rows: 3;
  --safe-bottom: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(1200px 700px at 50% -10%, var(--sun-1) 0%, var(--sun-2) 42%, var(--sun-3) 100%),
    linear-gradient(180deg, #ffe4bd 0%, #ffd0b4 60%, #f6a9bb 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

.noscript-banner {
  padding: 14px 18px;
  background: var(--cream);
  border-bottom: 3px solid var(--wood-3);
  text-align: center;
  font-weight: 700;
}

#game-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.6vw, 18px);
  padding: clamp(10px, 1.6vw, 20px) clamp(12px, 2vw, 28px) calc(16px + var(--safe-bottom));
  max-width: 1240px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ---------- 木梁顶栏 ---------- */
.cabinet-topbar {
  width: 100%;
  max-width: 1160px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 16px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 3px, rgba(0, 0, 0, .05) 3px 7px),
    linear-gradient(180deg, var(--wood-1), var(--wood-2) 62%, var(--wood-3));
  border: 3px solid var(--wood-3);
  box-shadow: 0 6px 0 rgba(60, 32, 16, .35), inset 0 2px 0 rgba(255, 236, 205, .35);
}

.cab-title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: clamp(16px, 2.1vw, 22px);
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(70, 38, 18, .6);
}

.cab-tools { display: flex; gap: 8px; }

.cab-btn {
  min-width: 40px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--wood-3);
  text-decoration: none;
  background: linear-gradient(180deg, #fff4de, #e9cba4);
  border: 2px solid var(--wood-3);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--wood-3), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: transform .12s ease, box-shadow .12s ease;
}

.cab-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--wood-3); }
.cab-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wood-3); }

/* ---------- 机身主体 ---------- */
.cabinet-body {
  width: 100%;
  max-width: 1160px;
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(150px, 190px);
  gap: clamp(8px, 1.4vw, 18px);
  align-items: stretch;
}

/* 侧翼木牌 */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 18px;
  background:
    repeating-linear-gradient(92deg, rgba(255, 255, 255, .05) 0 4px, rgba(0, 0, 0, .04) 4px 9px),
    linear-gradient(180deg, var(--wood-1), var(--wood-2) 70%, var(--wood-3));
  border: 3px solid var(--wood-3);
  box-shadow: 0 8px 0 rgba(60, 32, 16, .3), inset 0 2px 0 rgba(255, 240, 210, .3);
}

.panel-block {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 246, 231, .95), rgba(240, 219, 189, .92));
  border: 2px solid rgba(93, 54, 32, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.panel-block::before,
.panel-block::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9bd, #8a5a33);
}
.panel-block::before { left: 6px; }
.panel-block::after { right: 6px; }

.panel-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.panel-value {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--ink);
}

.panel-sub {
  font-size: 13px;
  font-weight: 800;
  color: var(--berry-deep);
}

.panel-hint {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-soft);
}

.score-num { color: #2f7a2f; }
.combo-num { color: var(--berry-deep); }
.time-num { color: #a8541b; }

.panel-value.bump { animation: bump .26s cubic-bezier(.3, 1.6, .5, 1); }

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* 难度木牌 tab */
.diff-tabs { display: flex; flex-direction: column; gap: 6px; }

.diff-tab {
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--wood-3);
  background: linear-gradient(180deg, #f7e3c4, #dcb98c);
  border: 2px solid var(--wood-3);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--wood-3);
  transition: transform .12s ease, box-shadow .12s ease, background .18s ease;
}

.diff-tab:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--wood-3); }
.diff-tab:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wood-3); }

.diff-tab.is-active {
  color: var(--cream);
  background: linear-gradient(180deg, #6fae52, #4f8a3c);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

/* 沙漏 */
.hourglass {
  position: relative;
  width: 100%;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(226, 202, 168, .9));
  border: 2px solid rgba(93, 54, 32, .5);
  overflow: hidden;
}

.hourglass-sand {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--gold), #e08a2e);
  transition: transform .2s linear;
}

/* ---------- 中央舞台：草地土台 ---------- */
.stage-core { display: flex; justify-content: center; min-width: 0; }

.garden {
  position: relative;
  width: 100%;
  max-width: 720px;
  padding: clamp(12px, 2vw, 22px);
  border-radius: 26px;
  background:
    radial-gradient(120% 90% at 50% 8%, #c7e89b 0%, var(--grass-1) 34%, var(--grass-2) 74%, var(--grass-3) 100%);
  border: 6px solid var(--wood-2);
  box-shadow:
    0 12px 0 rgba(60, 32, 16, .28),
    inset 0 6px 18px rgba(20, 60, 10, .28),
    inset 0 -10px 24px rgba(20, 50, 10, .22);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.garden-sky {
  position: absolute;
  inset: -30% -20% auto -20%;
  height: 70%;
  background: radial-gradient(60% 60% at 50% 30%, rgba(255, 244, 200, .75), rgba(255, 216, 160, .28) 55%, transparent 75%);
  filter: blur(2px);
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, 0, 0); }
  to { transform: translate3d(2%, 1%, 0); }
}

.garden-vines {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
}

.vine {
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 34% 28%, #ff8fa6, var(--berry) 60%, var(--berry-deep));
  box-shadow: 0 3px 6px rgba(120, 20, 45, .35), inset 0 -2px 3px rgba(0, 0, 0, .2);
  opacity: .92;
}

/* 洞位阵列 */
.holes-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 16px);
}

.hole {
  position: relative;
  aspect-ratio: 1 / 0.94;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hole-pit {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 2%;
  height: 62%;
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(70% 90% at 50% 12%, rgba(0, 0, 0, .55), transparent 70%),
    linear-gradient(180deg, var(--soil-2) 0%, #3a2314 100%);
  box-shadow:
    inset 0 6px 10px rgba(0, 0, 0, .55),
    0 4px 0 rgba(255, 255, 255, .22),
    0 -2px 0 var(--soil-1);
  overflow: hidden;
}

.hole-rim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26%;
  height: 34%;
  border-radius: 50%;
  background: linear-gradient(180deg, #b07c53, var(--soil-1) 55%, #7a4a2e);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .35), 0 3px 6px rgba(30, 18, 8, .35);
}

/* 地鼠：软胶质感 */
.mole {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 62%;
  height: 74%;
  transform: translate(-50%, 108%);
  transition: transform .13s cubic-bezier(.34, 1.4, .64, 1);
  pointer-events: none;
  will-change: transform;
}

.hole[data-phase="rise"] .mole,
.hole[data-phase="up"] .mole {
  transform: translate(-50%, 0);
  animation: mole-bob 1.1s ease-in-out infinite;
}

@keyframes mole-bob {
  0%, 100% { transform: translate(-50%, 0) scaleY(1); }
  50% { transform: translate(-50%, 3%) scaleY(.97); }
}

.hole[data-phase="duck"] .mole { transform: translate(-50%, 108%); animation: none; }

.hole.is-hit .mole { animation: squash .26s ease-out; }

@keyframes squash {
  0% { transform: translate(-50%, 0) scale(1, 1); }
  30% { transform: translate(-50%, 14%) scale(1.32, .58); }
  60% { transform: translate(-50%, -6%) scale(.9, 1.12); }
  100% { transform: translate(-50%, 108%) scale(1, 1); }
}

.mole-body {
  position: absolute;
  inset: 0;
  border-radius: 48% 48% 40% 40% / 52% 52% 48% 48%;
  background: radial-gradient(circle at 32% 24%, #dcaa7a 0%, #b0784c 46%, #7d5030 100%);
  box-shadow:
    inset 0 -10px 14px rgba(60, 32, 12, .45),
    inset 0 8px 12px rgba(255, 236, 205, .5),
    0 6px 10px rgba(30, 18, 8, .3);
}

.mole-face { position: absolute; inset: 0; }

.mole-face::before,
.mole-face::after {
  content: "";
  position: absolute;
  top: 30%;
  width: 13%;
  height: 13%;
  border-radius: 50%;
  background: #2a1a10;
  box-shadow: inset 0 -1px 2px rgba(255, 255, 255, .35);
}
.mole-face::before { left: 28%; }
.mole-face::after { right: 28%; }

.mole-snout {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 26%;
  height: 18%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #ffd9c2, #e8a98c);
  box-shadow: inset 0 -2px 3px rgba(120, 70, 40, .4);
}

.mole-snout::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 34%;
  height: 34%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #7a4230;
}

.mole-helmet,
.mole-fuse { display: none; }

/* 金鼠 */
.hole[data-species="gold"] .mole-body {
  background: radial-gradient(circle at 32% 24%, #ffe9a0 0%, #f2c14e 46%, #b8862a 100%);
  box-shadow:
    inset 0 -10px 14px rgba(120, 80, 10, .45),
    inset 0 8px 12px rgba(255, 248, 210, .6),
    0 0 16px rgba(246, 195, 74, .7);
}

/* 铁盔鼠 */
.hole[data-species="helmet"] .mole-helmet {
  display: block;
  position: absolute;
  left: 6%;
  right: 6%;
  top: -8%;
  height: 48%;
  border-radius: 50% 50% 14% 14%;
  background: linear-gradient(180deg, #dfe7ee 0%, #9aa7b4 52%, #6d7a86 100%);
  box-shadow: inset 0 4px 6px rgba(255, 255, 255, .8), 0 3px 6px rgba(20, 30, 40, .35);
}

.hole[data-species="helmet"] .mole-helmet::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -6%;
  width: 12%;
  height: 22%;
  transform: translateX(-50%);
  border-radius: 40%;
  background: linear-gradient(180deg, #f4f8fb, #98a5b1);
}

.hole[data-species="helmet"][data-broken="1"] .mole-helmet { display: none; }

/* 炸弹鼠 */
.hole[data-species="bomb"] .mole-body {
  background: radial-gradient(circle at 32% 24%, #6b6470 0%, #3e3a42 48%, #22202a 100%);
  box-shadow:
    inset 0 -10px 14px rgba(0, 0, 0, .5),
    inset 0 8px 12px rgba(255, 255, 255, .18),
    0 0 14px rgba(40, 30, 45, .6);
}

.hole[data-species="bomb"] .mole-fuse {
  display: block;
  position: absolute;
  left: 52%;
  top: -14%;
  width: 8%;
  height: 22%;
  border-radius: 40%;
  background: linear-gradient(180deg, #d9c39a, #8a7550);
  transform: rotate(14deg);
}

.hole[data-species="bomb"] .mole-fuse::after {
  content: "";
  position: absolute;
  left: -60%;
  top: -46%;
  width: 220%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd76a 0%, #ff8a3d 55%, rgba(255, 90, 40, 0) 75%);
  animation: fuse-flicker .5s ease-in-out infinite alternate;
}

@keyframes fuse-flicker {
  from { transform: scale(.85); opacity: .85; }
  to { transform: scale(1.15); opacity: 1; }
}

.hole[data-species="bomb"] .mole-face::before,
.hole[data-species="bomb"] .mole-face::after {
  background: #ffd166;
  box-shadow: 0 0 6px rgba(255, 160, 60, .9);
}

/* 洞位键位提示（桌面可见、触屏隐藏） */
.hole-key {
  position: absolute;
  right: 8%;
  bottom: 4%;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 246, 231, .62);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  pointer-events: none;
}

@media (max-width: 768px) {
  .hole-key { display: none; }
}

/* 命中碎片 */
.chip {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--chip-color, #ffd166);
  pointer-events: none;
  animation: chip-fly .5s ease-out forwards;
}

@keyframes chip-fly {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); opacity: 0; }
}

/* 狂热光幕 */
.frenzy-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(70% 70% at 50% 40%, rgba(255, 226, 130, .55), rgba(255, 140, 170, .28) 60%, transparent 80%);
  transition: opacity .25s ease;
}

.garden.is-frenzy .frenzy-veil { opacity: 1; animation: frenzy-pulse 1s ease-in-out infinite alternate; }
.garden.is-frenzy { box-shadow: 0 12px 0 rgba(60, 32, 16, .28), inset 0 0 60px rgba(255, 210, 120, .6); }

@keyframes frenzy-pulse {
  from { filter: brightness(.92); }
  to { filter: brightness(1.18); }
}

.garden.is-frenzy .vine { animation: vine-drop 1.2s ease-in infinite; }

@keyframes vine-drop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* 木槌 */
.hammer {
  position: absolute;
  z-index: 5;
  width: 74px;
  height: 74px;
  margin: -14px 0 0 -30px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
}

.hammer-head {
  position: absolute;
  left: 0;
  top: 0;
  width: 62px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(180deg, #d8a06a, #a4693d 60%, #7a4526);
  border: 3px solid #5d3620;
  box-shadow: inset 0 3px 0 rgba(255, 240, 210, .55);
}

.hammer-grip {
  position: absolute;
  left: 46px;
  top: 26px;
  width: 16px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(180deg, #c8945f, #8a5533);
  border: 3px solid #5d3620;
  transform: rotate(24deg);
}

.hammer.is-swing { animation: swing .18s ease-out; }

@keyframes swing {
  0% { transform: rotate(-38deg) translateY(0); }
  45% { transform: rotate(6deg) translateY(4px); }
  100% { transform: rotate(-30deg) translateY(0); }
}

@media (hover: hover) and (pointer: fine) {
  .garden { cursor: none; }
  .hammer { opacity: 1; }
}

/* toast */
.toast {
  position: absolute;
  left: 50%;
  top: 14%;
  z-index: 6;
  transform: translate(-50%, -8px);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #4a1a2c;
  background: linear-gradient(180deg, #fff2c9, #ffd98a);
  border: 3px solid #b9814a;
  box-shadow: 0 5px 0 rgba(90, 50, 20, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-warn { background: linear-gradient(180deg, #ffd7d7, #ff9aa6); color: #6a1220; }

/* ---------- 弹层 ---------- */
.modal-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(46, 26, 14, .45);
  backdrop-filter: blur(2px);
}

.modal-layer.hidden { display: none; }

.modal-card {
  width: min(360px, 100%);
  padding: 20px 18px;
  text-align: center;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff7e6, #f2ddba);
  border: 4px solid var(--wood-2);
  box-shadow: 0 10px 0 rgba(60, 32, 16, .4), inset 0 2px 0 rgba(255, 255, 255, .9);
}

.rules-card { width: min(440px, 100%); text-align: left; }

.modal-badge { font-size: 40px; line-height: 1; }

.modal-card h2 {
  margin: 8px 0 6px;
  font-size: 21px;
  font-weight: 900;
  color: var(--ink);
}

.modal-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.modal-btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.rules-body { max-height: 46vh; overflow-y: auto; margin-bottom: 14px; }
.rules-body h3 { margin: 12px 0 6px; font-size: 14px; color: var(--berry-deep); }
.rules-body ul { margin: 0; padding-left: 18px; }
.rules-body li { font-size: 13px; line-height: 1.65; color: var(--ink); }

.score-summary { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .65);
  border: 2px solid rgba(146, 96, 56, .3);
  font-size: 14px;
}

.summary-line strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.text-highlight { color: #2f7a2f; }

/* ---------- 底部操作台 ---------- */
.cabinet-controls {
  width: 100%;
  max-width: 1160px;
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 12px;
  border-radius: 18px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 4px, rgba(0, 0, 0, .04) 4px 9px),
    linear-gradient(180deg, var(--wood-1), var(--wood-2) 70%, var(--wood-3));
  border: 3px solid var(--wood-3);
  box-shadow: 0 8px 0 rgba(60, 32, 16, .3), inset 0 2px 0 rgba(255, 240, 210, .3);
}

.arcade-btn {
  min-width: 96px;
  min-height: 46px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #46291a;
  background: linear-gradient(180deg, #ffe9bd, #e8bd85);
  border: 3px solid var(--wood-3);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--wood-3), inset 0 2px 0 rgba(255, 255, 255, .85);
  transition: transform .12s ease, box-shadow .12s ease;
}

.arcade-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--wood-3); }
.arcade-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--wood-3); }
.arcade-btn--wide { flex: 0 1 180px; }
.arcade-btn--alt { background: linear-gradient(180deg, #d9ecbf, #a8cf85); }
.arcade-btn--berry { color: #4a1024; background: linear-gradient(180deg, #ffc2d1, #ef7f9c); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .cabinet-body {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .side-panel {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  .panel-block { flex: 1 1 120px; }

  .diff-tabs { flex-direction: row; flex: 1 1 100%; }
  .diff-tab { flex: 1; }
  .panel-hint { flex: 1 1 100%; }

  .garden { max-width: 560px; }
}

@media (max-width: 768px) {
  :root { --safe-bottom: 68px; }

  #game-app { padding-left: 10px; padding-right: 10px; }
  .garden { border-width: 5px; border-radius: 20px; }
  .hammer { display: none; }
  .hole { aspect-ratio: 1 / 1; }
  .arcade-btn { min-height: 48px; }
  .cabinet-controls { flex-wrap: wrap; }
  .arcade-btn--wide { flex: 1 1 40%; }
}

@media (max-width: 420px) {
  .cab-title { font-size: 15px; letter-spacing: 1px; }
  .panel-value { font-size: 20px; }
  .modal-card { padding: 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .garden-sky { animation: none; }
  .mole { transition: none; }
}
