/* =========================================================
   农场收菜9 · 全屏竖屏 H5 农场游戏
   卡通手绘风：奶油纸感 / 蜂蜜橙 / 青草绿 / 泥土棕
   ========================================================= */

:root {
  --orange: #FF8A3D;
  --orange-deep: #E8641D;
  --orange-soft: #FFB055;
  --cream: #FFF7E8;
  --cream-deep: #F7E7C9;
  --brown: #5A3A20;
  --brown-2: #7A5738;
  --brown-3: #A18363;
  --gold: #FFC93C;
  --grass: #6FB246;
  --grass-deep: #4F8C31;
  --sky: #8DDCEA;
  --white: #FFFDF7;
  --ink: #432914;
  --shadow-soft: 0 10px 24px rgba(63, 40, 18, .18);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, #A8E4EA 0%, #77C4CF 55%, #4E9EAD 100%);
}

body {
  color: var(--brown);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.game {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  max-width: 480px;
  overflow: hidden;
  isolation: isolate;
  background: #9BDDDF;
}

@media (min-width: 520px) {
  .game {
    box-shadow: 0 0 80px rgba(15, 45, 48, .35);
  }
}

/* =========================================================
   背景世界
   ========================================================= */

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

.sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 56%, rgba(255, 255, 255, .22), transparent 62%),
    linear-gradient(180deg, #7BD3E7 0%, #9EE2DF 25%, #C4EAC4 45%, #B7E194 58%, #8FCE60 77%, #74B447 100%);
}

.sky::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 46%;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(255, 255, 255, .16), transparent 42%),
    radial-gradient(ellipse at 82% 34%, rgba(255, 255, 255, .12), transparent 46%);
}

.sun {
  position: absolute;
  top: calc(11% + env(safe-area-inset-top));
  right: 7.5%;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #FFFDE2 0%, #FFF08B 34%, #FFDA45 62%, #F8B322 100%);
  box-shadow:
    0 0 0 10px rgba(255, 241, 148, .22),
    0 0 34px rgba(255, 228, 104, .72),
    inset -6px -8px 14px rgba(217, 138, 14, .22);
  z-index: 1;
}

.sun::before {
  content: "";
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg,
      rgba(255, 249, 190, .46) 0deg 5deg,
      transparent 5deg 24deg);
  -webkit-mask: radial-gradient(circle, transparent 0 44%, #000 45% 100%);
  mask: radial-gradient(circle, transparent 0 44%, #000 45% 100%);
  animation: sunSpin 60s linear infinite;
}

@keyframes sunSpin {
  to { transform: rotate(360deg); }
}

.cloud {
  position: absolute;
  width: 104px;
  height: 32px;
  border-radius: 60px;
  background: #FFFFFF;
  opacity: .92;
  filter: drop-shadow(0 7px 8px rgba(72, 126, 136, .12));
  z-index: 1;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #FFFFFF;
}

.cloud::before {
  width: 48px;
  height: 48px;
  left: 14px;
  bottom: 8px;
}

.cloud::after {
  width: 60px;
  height: 60px;
  right: 10px;
  bottom: 6px;
}

.cloud-1 {
  top: 13%;
  left: 4%;
  animation: cloudDrift 54s linear infinite;
}

.cloud-2 {
  top: 25%;
  left: 58%;
  transform: scale(.68);
  opacity: .74;
  animation: cloudDrift 44s linear infinite -17s;
}

.cloud-3 {
  top: 8%;
  left: 42%;
  transform: scale(.5);
  opacity: .56;
  animation: cloudDrift 68s linear infinite -31s;
}

@keyframes cloudDrift {
  from { margin-left: -180px; }
  to { margin-left: calc(100vw + 40px); }
}

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

.hill-a {
  left: -58%;
  bottom: 12%;
  width: 158%;
  height: 35%;
  background: #B9E39A;
  opacity: .72;
  transform: rotate(-3deg);
}

.hill-b {
  right: -56%;
  bottom: 10%;
  width: 150%;
  height: 31%;
  background: #A1D87A;
  opacity: .85;
  transform: rotate(2deg);
}

.hill-c {
  left: -16%;
  bottom: -7%;
  width: 132%;
  height: 40%;
  background: linear-gradient(180deg, #90CE60 0%, #78B94C 58%, #67A73F 100%);
  z-index: 2;
}

.bush {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #8FD86C, #58A23D 72%);
  box-shadow: inset -6px -8px 12px rgba(45, 92, 28, .25);
}

.bush-1 {
  left: 27%;
  top: 38%;
  width: 38px;
  height: 25px;
  transform: rotate(-4deg);
}

.bush-2 {
  right: 27%;
  top: 42%;
  width: 31px;
  height: 21px;
}

.house-wrap {
  position: absolute;
  left: 4.5%;
  top: 13.5%;
  width: 39%;
  max-width: 190px;
  z-index: 3;
  filter: drop-shadow(0 12px 12px rgba(51, 78, 33, .18));
}

.house-art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.smoke {
  position: absolute;
  top: 1%;
  right: 17%;
  width: 28px;
  height: 26px;
  pointer-events: none;
}

.smoke i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .8);
  filter: blur(1px);
  animation: smokeRise 5.2s ease-out infinite;
}

.smoke i:nth-child(2) {
  width: 16px;
  height: 16px;
  animation-delay: 1.7s;
}

.smoke i:nth-child(3) {
  width: 20px;
  height: 20px;
  animation-delay: 3.4s;
}

@keyframes smokeRise {
  0% { transform: translate(0, 8px) scale(.55); opacity: 0; }
  18% { opacity: .7; }
  100% { transform: translate(16px, -44px) scale(1.35); opacity: 0; }
}

.tree {
  position: absolute;
  z-index: 2;
  transform-origin: 50% 100%;
  animation: treeSway 7s ease-in-out infinite;
  filter: drop-shadow(0 10px 12px rgba(40, 72, 26, .16));
}

.tree svg {
  display: block;
  width: 100%;
  height: auto;
}

.tree-r {
  right: 1.5%;
  top: 21%;
  width: 25%;
}

.tree-l {
  left: -5%;
  top: 36%;
  width: 21%;
  opacity: .96;
  animation-delay: -2.4s;
}

@keyframes treeSway {
  0%, 100% { transform: rotate(-.8deg); }
  50% { transform: rotate(.9deg); }
}

.chicken {
  position: absolute;
  z-index: 4;
  width: 38px;
  transform: scaleX(var(--flip, 1));
}

.chicken svg {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 92%;
  animation: chickenPeck 3.6s ease-in-out infinite;
  filter: drop-shadow(0 3px 3px rgba(45, 66, 28, .18));
}

.chicken-1 {
  left: 46%;
  top: 28%;
}

.chicken-2 {
  right: 15%;
  top: 27%;
  width: 30px;
  --flip: -1;
}

.chicken-2 svg {
  animation-delay: -1.5s;
}

@keyframes chickenPeck {
  0%, 100% { transform: rotate(0) translateY(0); }
  38% { transform: rotate(-7deg) translateY(1px); }
  50% { transform: rotate(2deg) translateY(0); }
  70% { transform: rotate(0) translateY(-1px); }
}

.flower {
  position: absolute;
  z-index: 2;
  width: 24px;
  color: #FFF0F0;
  animation: flowerSway 5s ease-in-out infinite;
  transform-origin: 50% 100%;
}

.flower svg {
  display: block;
  width: 100%;
  height: auto;
}

.flower-1 { left: 3.5%; top: 49%; color: #FFF1F1; }
.flower-2 { right: 5%; top: 45%; width: 20px; color: #FFD6E3; animation-delay: -1.7s; }
.flower-3 { left: 2.5%; top: 60%; width: 18px; color: #FFF4C9; animation-delay: -3.2s; }

@keyframes flowerSway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(5deg); }
}

/* =========================================================
   顶部 HUD
   ========================================================= */

.hud {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  pointer-events: none;
}

.hud > *,
.hud .hud-right > * {
  pointer-events: auto;
}

.hud-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 252, 244, .97), rgba(255, 242, 221, .92));
  border: 1.5px solid rgba(255, 255, 255, .95);
  box-shadow:
    0 5px 14px rgba(70, 46, 22, .16),
    inset 0 1px 0 #FFFFFF;
  color: var(--brown);
}

.coin-pill {
  padding-right: 14px;
}

.coin-ico {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: #8D5500;
  background: radial-gradient(circle at 34% 28%, #FFF0A8 0%, #FFD24A 42%, #FFB61F 72%, #E89A12 100%);
  box-shadow:
    inset 0 -2px 3px rgba(152, 86, 0, .28),
    inset 0 2px 2px rgba(255, 255, 255, .6),
    0 2px 5px rgba(151, 91, 0, .28);
}

.coin-ico .mp-icon {
  width: 17px;
  height: 17px;
}

.pill-label {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #8E6A44;
}

.pill-num {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  transition: transform .18s ease;
}

.coin-pill.bump .pill-num {
  transform: scale(1.22);
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.basket-pill {
  padding: 0 12px 0 9px;
  gap: 5px;
}

.basket-pill .mp-icon {
  width: 18px;
  height: 18px;
  color: #B26C33;
}

.basket-pill .pill-num {
  min-width: 12px;
  text-align: center;
}

.basket-pill.bump {
  animation: basketBump .34s ease;
}

@keyframes basketBump {
  0%, 100% { transform: scale(1); }
  42% { transform: scale(1.13) rotate(-3deg); }
  70% { transform: scale(.96) rotate(1deg); }
}

.sound-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #6B4A2A;
  background: linear-gradient(180deg, rgba(255, 252, 244, .97), rgba(255, 242, 221, .92));
  border: 1.5px solid rgba(255, 255, 255, .95);
  box-shadow:
    0 5px 14px rgba(70, 46, 22, .16),
    inset 0 1px 0 #FFFFFF;
  transition: transform .15s ease, opacity .2s ease;
}

.sound-btn .mp-icon {
  width: 19px;
  height: 19px;
}

.sound-btn:active {
  transform: scale(.92);
}

/* =========================================================
   连收提示
   ========================================================= */

.combo-chip {
  position: absolute;
  top: calc(58px + env(safe-area-inset-top));
  left: 50%;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  color: #FFF8E8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
  background: linear-gradient(135deg, #FFB055 0%, #FF7A25 65%, #EE5D12 100%);
  border: 1.5px solid rgba(255, 225, 176, .9);
  box-shadow:
    0 4px 0 rgba(180, 72, 10, .55),
    0 8px 16px rgba(207, 92, 20, .28);
  transform: translate(-50%, -8px) scale(.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .3, 1.3);
  overflow: hidden;
}

.combo-chip .mp-icon {
  width: 16px;
  height: 16px;
  color: #FFF0B0;
}

.combo-chip.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.combo-chip.max {
  background: linear-gradient(135deg, #FFD34E 0%, #FF9C2E 52%, #FF6E1C 100%);
  animation: comboGlow 1.2s ease-in-out infinite;
}

@keyframes comboGlow {
  0%, 100% { box-shadow: 0 4px 0 rgba(180, 72, 10, .5), 0 0 0 0 rgba(255, 211, 78, .4), 0 8px 16px rgba(207, 92, 20, .28); }
  50% { box-shadow: 0 4px 0 rgba(180, 72, 10, .5), 0 0 0 8px rgba(255, 211, 78, 0), 0 8px 16px rgba(207, 92, 20, .28); }
}

.combo-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(120, 45, 4, .25);
}

.combo-bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: #FFF2B0;
  transform-origin: 0 50%;
  transition: transform .16s linear;
}

/* =========================================================
   菜地
   ========================================================= */

.field-wrap {
  position: absolute;
  left: 50%;
  bottom: calc(112px + env(safe-area-inset-bottom));
  z-index: 12;
  width: min(92%, 380px);
  transform: translateX(-50%);
}

.field-sign {
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  height: 27px;
  margin: 0 auto 8px;
  padding: 0 12px;
  border-radius: 10px;
  color: #FFF1D6;
  background: linear-gradient(180deg, #8B5B34 0%, #6D4325 100%);
  border: 1.5px solid rgba(255, 222, 174, .42);
  box-shadow:
    0 3px 0 rgba(63, 37, 17, .55),
    0 6px 12px rgba(55, 34, 16, .24),
    inset 0 1px 0 rgba(255, 255, 255, .22);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .03em;
  white-space: nowrap;
}

.field-sign .mp-icon {
  width: 14px;
  height: 14px;
  color: #A8E078;
}

.field-sign b {
  padding-left: 6px;
  margin-left: 2px;
  border-left: 1px solid rgba(255, 235, 198, .28);
  color: #FFD88B;
  font-size: 10.5px;
  font-weight: 700;
}

.plots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(6px, 2.2vw, 9px);
}

.plot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / .97;
  border-radius: 18px;
  outline: none;
  -webkit-touch-callout: none;
}

.plot-soil {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255, 234, 196, .2), transparent 54%),
    repeating-linear-gradient(180deg,
      rgba(0, 0, 0, .10) 0 2px,
      transparent 2px 14px),
    linear-gradient(155deg, #8A5934 0%, #734627 46%, #5D381F 100%);
  border: 2px solid rgba(255, 220, 170, .26);
  box-shadow:
    inset 0 4px 8px rgba(255, 230, 190, .13),
    inset 0 -10px 14px rgba(35, 20, 9, .3),
    0 5px 0 #4A2B18,
    0 8px 13px rgba(37, 23, 11, .26);
  transition: transform .1s ease, box-shadow .1s ease, filter .2s ease;
  overflow: hidden;
}

.plot-soil::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 28%;
  background: linear-gradient(180deg, rgba(255, 235, 201, .18), transparent);
}

.plot-soil::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image:
    radial-gradient(circle at 18% 72%, rgba(255, 223, 181, .32) 0 1.4px, transparent 2px),
    radial-gradient(circle at 74% 62%, rgba(255, 223, 181, .24) 0 1.2px, transparent 2px),
    radial-gradient(circle at 42% 88%, rgba(255, 223, 181, .26) 0 1.1px, transparent 2px),
    radial-gradient(circle at 88% 84%, rgba(255, 223, 181, .2) 0 1px, transparent 1.6px);
}

.plot:active .plot-soil {
  transform: translateY(4px) scale(.985);
  box-shadow:
    inset 0 4px 8px rgba(255, 230, 190, .1),
    inset 0 -8px 12px rgba(35, 20, 9, .32),
    0 1px 0 #4A2B18,
    0 3px 7px rgba(37, 23, 11, .22);
}

.plot:focus-visible .plot-soil {
  outline: 3px solid #FFF3D0;
  outline-offset: 2px;
}

.plot.empty .plot-empty {
  opacity: 1;
  transform: scale(1);
}

.plot-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #FFEBCB;
  opacity: 0;
  transform: scale(.86);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}

.plot-empty .plus {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 238, 208, .55);
  background: rgba(255, 237, 205, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

.plot-empty .plus .mp-icon {
  width: 18px;
  height: 18px;
  opacity: .9;
}

.plot-empty em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  opacity: .62;
  transform: translateX(.08em);
}

.crop {
  position: absolute;
  left: 50%;
  bottom: -5%;
  width: 96%;
  height: 100%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  filter: drop-shadow(0 3px 2px rgba(38, 22, 9, .22));
  transform-origin: 50% 92%;
}

.crop-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.plot[data-stage="2"] .crop {
  animation: cropSway 3.8s ease-in-out infinite;
  transform-origin: 50% 92%;
}

@keyframes cropSway {
  0%, 100% { transform: translateX(-50%) rotate(-1.4deg); }
  50% { transform: translateX(-50%) rotate(1.6deg); }
}

.plot.ripe .crop {
  animation: cropBob 2.3s ease-in-out infinite;
  filter: drop-shadow(0 3px 2px rgba(38, 22, 9, .2)) drop-shadow(0 0 7px rgba(255, 225, 120, .65));
}

@keyframes cropBob {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  50% { transform: translateX(-50%) translateY(-4px) scale(1.03); }
}


.plot.tap-nudge .crop {
  animation: cropNudge .34s ease;
}

@keyframes cropNudge {
  0%, 100% { transform: translateX(-50%) rotate(0); }
  30% { transform: translateX(-50%) rotate(-4deg) scale(1.02); }
  65% { transform: translateX(-50%) rotate(3deg) scale(.99); }
}

.plot.golden .plot-soil {
  border-color: rgba(255, 221, 112, .78);
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 237, 154, .4), transparent 58%),
    repeating-linear-gradient(180deg,
      rgba(0, 0, 0, .09) 0 2px,
      transparent 2px 14px),
    linear-gradient(155deg, #8F6034 0%, #7A4A24 46%, #5E391C 100%);
  box-shadow:
    inset 0 4px 8px rgba(255, 240, 180, .22),
    inset 0 -10px 14px rgba(35, 20, 9, .28),
    0 5px 0 #4A2B18,
    0 0 18px rgba(255, 203, 76, .55),
    0 8px 13px rgba(37, 23, 11, .24);
}

.plot.golden .crop {
  filter: drop-shadow(0 3px 2px rgba(38, 22, 9, .2)) drop-shadow(0 0 9px rgba(255, 207, 72, .95));
}

.golden-flag {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  display: none;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  color: #8C5600;
  background: radial-gradient(circle at 35% 28%, #FFF4B8, #FFD24A 62%, #F1A51D);
  box-shadow: 0 2px 4px rgba(108, 66, 0, .35);
}

.golden-flag .mp-icon {
  width: 13px;
  height: 13px;
}

.plot.golden .golden-flag {
  display: grid;
}

.plot-timer {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  display: none;
  padding: 2.5px 6px;
  border-radius: 999px;
  color: #FFEAC9;
  background: rgba(49, 30, 14, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.plot.growing .plot-timer {
  display: block;
}

.plot-progress {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 3px;
  z-index: 3;
  display: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(36, 21, 10, .42);
  overflow: hidden;
}

.plot.growing .plot-progress {
  display: block;
}

.plot-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FFD36A 0%, #FFA13F 61%, #FF7D22 100%);
  box-shadow: 0 0 5px rgba(255, 184, 74, .6);
}

.plot-ready {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #FFFFFF;
  background: linear-gradient(180deg, #FFA852, #FF7620);
  border: 1.5px solid rgba(255, 236, 203, .9);
  box-shadow:
    0 3px 0 #C65512,
    0 5px 9px rgba(105, 49, 9, .3);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .2s ease, transform .24s cubic-bezier(.2, .9, .3, 1.5);
  pointer-events: none;
}

.plot-ready .mp-icon {
  width: 14px;
  height: 14px;
}

.plot.ripe .plot-ready {
  opacity: 1;
  transform: scale(1);
  animation: readyPop 1.9s ease-in-out infinite;
}

@keyframes readyPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.sparkles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}

.plot.ripe .sparkles {
  opacity: 1;
}

.sparkles i {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #FFF6AD;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 4px #FFE56B);
  animation: twinkle 1.9s ease-in-out infinite;
}

.sparkles i:nth-child(1) { left: 18%; top: 28%; animation-delay: -.2s; }
.sparkles i:nth-child(2) { right: 16%; top: 42%; width: 4px; height: 4px; animation-delay: -.9s; }
.sparkles i:nth-child(3) { left: 27%; top: 64%; width: 4px; height: 4px; animation-delay: -1.4s; }

@keyframes twinkle {
  0%, 100% { transform: scale(.5) rotate(0deg); opacity: .3; }
  50% { transform: scale(1.25) rotate(45deg); opacity: 1; }
}

.plot.sowing .plot-soil {
  animation: soilPop .42s cubic-bezier(.2, .9, .3, 1.4);
}

@keyframes soilPop {
  0% { transform: scale(1); }
  42% { transform: scale(.92) translateY(3px); }
  72% { transform: scale(1.035) translateY(-1px); }
  100% { transform: scale(1); }
}

.plot.just-harvested .plot-soil {
  animation: harvestPop .4s ease-out;
}

@keyframes harvestPop {
  0% { transform: scale(1); filter: brightness(1.25); }
  45% { transform: scale(.91) translateY(3px); filter: brightness(1.4); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* =========================================================
   底部种子栏
   ========================================================= */

.dock {
  position: absolute;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(92%, 400px);
  padding: 10px 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 251, 241, .98) 0%, rgba(255, 240, 216, .97) 100%);
  border: 1.5px solid rgba(255, 255, 255, .95);
  box-shadow:
    0 14px 32px rgba(70, 42, 18, .25),
    0 3px 0 rgba(197, 155, 103, .28),
    inset 0 1px 0 #FFFFFF;
  transform: translateX(-50%);
}

.seed-info {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.seed-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 47px;
  height: 47px;
  border-radius: 15px;
  background:
    radial-gradient(circle at 38% 25%, rgba(255, 255, 255, .55), transparent 55%),
    linear-gradient(155deg, #FFD69F 0%, #FFAE62 58%, #FF8A3D 100%);
  border: 1.5px solid rgba(255, 255, 255, .8);
  box-shadow:
    inset 0 -3px 5px rgba(191, 93, 21, .2),
    0 4px 8px rgba(206, 111, 30, .22);
}

.seed-icon svg {
  display: block;
  width: 66%;
  height: 66%;
  filter: drop-shadow(0 2px 1px rgba(120, 60, 10, .2));
}

.free-tag {
  position: absolute;
  top: -5px;
  right: -7px;
  padding: 1.5px 5px;
  border-radius: 999px;
  color: #FFFFFF;
  background: linear-gradient(180deg, #74CA62, #46A73B);
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 2px 4px rgba(41, 111, 33, .28);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.3;
}

.seed-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.seed-copy b {
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: .01em;
  color: #5D3B1D;
  white-space: nowrap;
}

.seed-copy span {
  overflow: hidden;
  color: #836344;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sow-btn {
  flex: 0 0 auto;
  min-width: 92px;
  height: 43px;
  padding: 0 15px;
  border-radius: 15px;
  color: #FFFFFF;
  background: linear-gradient(180deg, #FFAB62 0%, #FF8A3D 48%, #FF7220 100%);
  border: 1.5px solid rgba(255, 228, 196, .75);
  box-shadow:
    0 4px 0 #D45B13,
    0 7px 14px rgba(224, 100, 24, .32),
    inset 0 1px 0 rgba(255, 255, 255, .42);
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: .02em;
  text-shadow: 0 1px 0 rgba(163, 67, 7, .3);
  transition: transform .1s ease, box-shadow .1s ease, filter .2s ease;
}

.sow-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #D45B13,
    0 3px 8px rgba(224, 100, 24, .22),
    inset 0 1px 0 rgba(255, 255, 255, .3);
}

.sow-btn:disabled {
  background: linear-gradient(180deg, #EADCC6, #E0CEB2);
  color: #A48B6D;
  border-color: rgba(255, 255, 255, .6);
  box-shadow:
    0 3px 0 #CBB596,
    inset 0 1px 0 rgba(255, 255, 255, .5);
  text-shadow: none;
  opacity: .92;
  cursor: default;
}

/* =========================================================
   特效 / 提示
   ========================================================= */

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}

.float-text {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  color: #FFE286;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .01em;
  white-space: nowrap;
  text-shadow:
    0 2px 0 #A95A10,
    0 0 10px rgba(255, 208, 73, .75);
  animation: floatUp .98s cubic-bezier(.16, .8, .3, 1) forwards;
}

.float-text.golden {
  color: #FFF3A6;
  font-size: 19px;
  text-shadow:
    0 2px 0 #B86B05,
    0 0 14px rgba(255, 201, 60, .95);
}

.float-text.combo {
  color: #FFFFFF;
  font-size: 15px;
  text-shadow:
    0 2px 0 #C24D10,
    0 0 10px rgba(255, 155, 54, .7);
}

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); }
  16% { opacity: 1; transform: translate(-50%, -58%) scale(1.12); }
  32% { transform: translate(-50%, -66%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(.94); }
}

.particle {
  position: absolute;
  z-index: 1;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: particleBurst .68s ease-out forwards;
}

@keyframes particleBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.15); }
}

.coin-fly {
  position: fixed;
  z-index: 61;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #FFF1A8, #FFD24A 44%, #FFB31C 74%, #E39A12);
  border: 1.5px solid #FFF3C0;
  box-shadow: 0 0 10px rgba(255, 205, 63, .75);
  pointer-events: none;
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(100px + env(safe-area-inset-top));
  z-index: 70;
  width: max-content;
  max-width: min(86vw, 340px);
  padding: 9px 16px;
  border-radius: 999px;
  color: #FFF6E6;
  background: rgba(57, 37, 20, .92);
  border: 1px solid rgba(255, 236, 203, .18);
  box-shadow: 0 8px 22px rgba(38, 23, 10, .28);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.game.shake {
  animation: screenShake .34s ease;
}

@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  22% { transform: translate(-2px, 1px); }
  44% { transform: translate(2px, -1px); }
  66% { transform: translate(-1px, 0); }
  82% { transform: translate(1px, 1px); }
}

@supports not (aspect-ratio: 1 / .97) {
  .plot {
    height: 0;
    padding-bottom: 97%;
  }
}

/* =========================================================
   小尺寸适配
   ========================================================= */

@media (min-width: 440px) and (max-height: 820px) {
  .field-wrap {
    width: min(88%, 360px);
  }

  .house-wrap {
    top: 10%;
    width: 33%;
  }

  .tree-r {
    top: 18%;
    width: 21%;
  }
}

@media (max-height: 750px) {
  .field-wrap {
    bottom: calc(100px + env(safe-area-inset-bottom));
    width: min(88%, 340px);
  }

  .house-wrap {
    top: 10.5%;
    width: 36%;
  }

  .tree-r {
    top: 19%;
    width: 23%;
  }

  .tree-l {
    top: 35%;
    width: 19%;
  }

  .sun {
    top: 10%;
    width: 57px;
    height: 57px;
  }

  .chicken-1 { top: 26%; }
  .chicken-2 { top: 25%; }

  .dock {
    width: min(92%, 360px);
    padding: 8px 10px;
  }

  .seed-icon {
    width: 43px;
    height: 43px;
  }

  .sow-btn {
    height: 40px;
    min-width: 88px;
    font-size: 13px;
  }
}

@media (max-height: 640px) {
  .field-wrap {
    bottom: calc(90px + env(safe-area-inset-bottom));
    width: min(86%, 300px);
  }

  .dock {
    width: min(92%, 320px);
  }

  .house-wrap {
    top: 9%;
    width: 29%;
  }

  .tree-r {
    top: 18%;
    width: 20%;
  }

  .tree-l,
  .chicken-2,
  .flower-3 {
    display: none;
  }

  .chicken-1 {
    top: 24%;
    width: 32px;
  }

  .sun {
    top: 9%;
    width: 49px;
    height: 49px;
  }

  .hud {
    top: calc(7px + env(safe-area-inset-top));
  }

  .hud-pill {
    height: 36px;
  }

  .sound-btn {
    width: 36px;
    height: 36px;
  }

  .combo-chip {
    top: calc(48px + env(safe-area-inset-top));
    height: 30px;
    font-size: 12px;
  }

  .field-sign {
    height: 24px;
    margin-bottom: 6px;
    font-size: 10.5px;
  }

  .plot-empty .plus {
    width: 26px;
    height: 26px;
  }

  .plot-empty em {
    font-size: 8px;
  }

  .seed-copy b {
    font-size: 12.5px;
  }

  .seed-copy span {
    font-size: 9.5px;
  }

  .sow-btn {
    min-width: 82px;
    height: 38px;
    font-size: 12.5px;
    border-radius: 13px;
  }

  .toast {
    top: calc(86px + env(safe-area-inset-top));
    font-size: 11.5px;
  }
}

@media (max-width: 350px) {
  .hud {
    padding: 0 10px;
  }

  .hud-pill {
    height: 36px;
    padding-right: 10px;
  }

  .pill-label {
    display: none;
  }

  .coin-pill {
    padding-right: 11px;
    gap: 5px;
  }

  .sound-btn {
    width: 36px;
    height: 36px;
  }

  .seed-copy span {
    max-width: 108px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sun::before,
  .cloud,
  .tree,
  .flower,
  .chicken svg,
  .smoke i,
  .plot[data-stage="2"] .crop,
  .plot.ripe .crop,
  .plot.ripe .plot-ready,
  .sparkles i,
  .combo-chip.max {
    animation: none !important;
  }
}
