/* 经典农场 · 竖屏种菜经营小游戏 */
:root {
  --orange: #FF8A3D;
  --orange-deep: #E2641A;
  --gold: #FFD34D;
  --cream: #FFF8E9;
  --ink: #4A2A12;
  --ink-soft: #8A5E33;
  --brown: #5B3517;
  --soil: #8A542E;
  --grass: #78C64A;
  --grass-deep: #4E9B35;
  --wood: #C9894D;
  --wood-deep: #9E5D2D;
  --shadow-soft: 0 8px 20px rgba(47, 27, 8, .2);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #17370f;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  display: flex;
  justify-content: center;
  background:
    radial-gradient(90% 60% at 50% 0%, #367429 0%, #1a4413 58%, #0c2408 100%);
}

button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

img { display: block; }

.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #6FBF48;
  box-shadow: 0 0 80px rgba(0, 0, 0, .48);
  user-select: none;
  -webkit-user-select: none;
}

/* ================= 田园背景 ================= */
.world {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #8FD9FF 0%, #BEEB9B 31%, #78C24C 56%, #4F9E34 100%);
}

.world::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 132px;
  background: linear-gradient(180deg, rgba(29, 72, 17, .34), rgba(29, 72, 17, .12) 54%, rgba(29, 72, 17, 0));
  pointer-events: none;
}

.world-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56%;
  background-image: url("images/gen/farm-cover.jpg");
  background-size: cover;
  background-position: center 28%;
  background-repeat: no-repeat;
  filter: saturate(1.08) brightness(1.03);
  animation: sceneBreathe 26s ease-in-out infinite alternate;
  transform-origin: 50% 30%;
  will-change: transform;
}

.world-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(36, 78, 21, .13) 0%, rgba(36, 78, 21, 0) 26%, rgba(51, 108, 28, 0) 60%, #72BE48 100%),
    radial-gradient(58% 42% at 66% 20%, rgba(255, 245, 180, .26), transparent 68%);
  pointer-events: none;
}

.world-light {
  position: absolute;
  top: -18%;
  right: -18%;
  width: 80%;
  height: 55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 188, .5) 0%, rgba(255, 244, 188, .12) 42%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.world-grass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  background:
    radial-gradient(120% 46% at 50% 0%, rgba(255, 255, 255, .12), transparent 62%),
    repeating-linear-gradient(104deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 19px),
    repeating-linear-gradient(14deg, rgba(37, 91, 23, .08) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, rgba(124, 199, 74, 0) 0%, #74C048 20%, #5EAF3D 62%, #4B9A32 100%);
}

.cloud {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .66);
  filter: blur(13px);
  pointer-events: none;
}
.cloud-a { top: 12%; left: -12%; width: 46%; height: 7%; }
.cloud-b { top: 23%; right: -16%; width: 50%; height: 6%; opacity: .7; }

.world-bush {
  position: absolute;
  width: 42%;
  height: 16%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 56%, #58A835 0 26%, transparent 27%),
    radial-gradient(circle at 58% 42%, #6FBD44 0 30%, transparent 31%),
    radial-gradient(circle at 76% 60%, #4B972E 0 25%, transparent 26%),
    radial-gradient(circle at 50% 76%, #3F8628 0 46%, transparent 47%);
  opacity: .8;
  pointer-events: none;
}
.bush-left { left: -18%; bottom: 10%; }
.bush-right { right: -20%; bottom: 4%; transform: scale(.86); opacity: .65; }

/* ================= 顶部 HUD ================= */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) 11px 0;
  pointer-events: none;
}

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

.hud-left {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 0;
}

.avatar-wrap {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
}

.avatar-ring {
  width: 100%;
  height: 100%;
  padding: 2px;
  border-radius: 16px;
  background: linear-gradient(180deg, #FFFDF3, #FFD98F);
  box-shadow:
    0 0 0 2px rgba(126, 77, 29, .26),
    0 4px 0 rgba(126, 77, 29, .2),
    0 7px 14px rgba(26, 64, 19, .3);
  overflow: hidden;
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  background: #8ED8FF;
}

.avatar-level {
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 8px 2px 8px 2px;
  background: linear-gradient(180deg, #FFB052, #EF6A1B);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  text-shadow: 0 1px 1px rgba(120, 45, 0, .4);
  box-shadow: 0 1px 4px rgba(120, 60, 10, .4);
}

.player-block {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 128px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.player-line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.player-line b {
  min-width: 0;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.2;
  color: #FFFDF2;
  text-shadow: 0 1px 2px rgba(36, 72, 18, .65);
}

.level-chip {
  flex: 0 0 auto;
  height: 15px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 247, 221, .92);
  color: #A95A10;
  font-size: 8.5px;
  font-weight: 900;
  line-height: 15px;
  box-shadow: 0 1px 2px rgba(74, 43, 12, .2);
}

.xp-track {
  position: relative;
  width: 100%;
  height: 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 252, 236, .38);
  background: linear-gradient(180deg, rgba(67, 46, 27, .88), rgba(47, 31, 17, .92));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4), 0 2px 5px rgba(24, 53, 13, .2);
  overflow: hidden;
}

.xp-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFD76A, #FFA72B 70%, #FF8A3D);
  box-shadow: 0 0 7px rgba(255, 198, 63, .7);
  transition: width .35s ease;
}

.xp-track span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .03em;
  color: #FFF6D8;
  text-shadow: 0 1px 1px rgba(56, 30, 8, .55);
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding-top: 2px;
}

.coin-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 5px 0 5px;
  border: 1.5px solid rgba(255, 243, 205, .46);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(90, 62, 39, .95), rgba(49, 32, 19, .96));
  color: #FFF7DF;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: .01em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 3px 9px rgba(22, 44, 14, .28);
  cursor: pointer;
  transition: transform .1s ease;
}

.coin-pill:active { transform: scale(.96); }

.coin-ico {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #FFF6B8, #FFD34D 48%, #F5A51A 100%);
  color: #9A5008;
  box-shadow: inset 0 1px 0 #FFF9CC, inset 0 -2px 0 #DC8C09, 0 1px 3px rgba(100, 55, 3, .3);
}

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

.coin-pill b {
  min-width: 30px;
  text-align: center;
  font-size: 12.5px;
}

.coin-plus {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #8DDF59, #4EAE24);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 1px 2px rgba(43, 92, 17, .35);
}

.coin-plus .mp-icon { width: 12px; height: 12px; }

.round-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .88);
  background: linear-gradient(180deg, #FFF9EC, #F4DDB6);
  color: #7E5228;
  box-shadow: 0 3px 0 rgba(151, 92, 37, .34), 0 5px 11px rgba(30, 72, 20, .22);
  cursor: pointer;
  transition: transform .1s ease;
}

.round-btn .mp-icon { width: 17px; height: 17px; }
.round-btn:active { transform: translateY(2px) scale(.94); }
.round-btn.is-off { color: #B79C7C; }

/* ================= 主舞台 ================= */
.stage {
  position: absolute;
  z-index: 10;
  top: calc(62px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  bottom: calc(108px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  padding: 0 14px;
  pointer-events: none;
}

.stage > * { pointer-events: auto; }

.field-pet {
  position: absolute;
  right: 8px;
  top: -52px;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  pointer-events: none;
}

.pet-photo {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid #FFFDF2;
  overflow: hidden;
  background: #FFD98F;
  box-shadow: 0 3px 0 rgba(126, 77, 29, .32), 0 7px 15px rgba(27, 61, 16, .34);
  animation: petBounce 3.2s ease-in-out infinite;
}

.pet-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.pet-bubble {
  position: relative;
  margin-bottom: 20px;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1.5px solid #FFF4D8;
  background: linear-gradient(180deg, #FFFDF3, #FFEAC2);
  color: #95531A;
  font-size: 8.5px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(141, 84, 30, .22), 0 4px 9px rgba(35, 49, 12, .18);
}

.pet-bubble::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: 4px;
  width: 7px;
  height: 7px;
  background: #FFEBC5;
  border-right: 1.5px solid #FFF4D8;
  border-bottom: 1.5px solid #FFF4D8;
  transform: rotate(-45deg);
}

/* ---------- 农田卡片 ---------- */
.field-card {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: clamp(88px, 18vh, 158px);
  padding: 7px;
  border: 2px solid #8A4E23;
  border-radius: 25px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .12), transparent 16%, transparent 84%, rgba(76, 40, 13, .16)),
    repeating-linear-gradient(96deg, rgba(87, 45, 16, .14) 0 2px, transparent 2px 25px),
    linear-gradient(180deg, #E0A467 0%, #C8884B 42%, #A96A35 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 238, 202, .68),
    inset 0 -4px 0 rgba(86, 44, 17, .26),
    0 8px 0 rgba(106, 60, 24, .28),
    0 18px 30px rgba(34, 55, 15, .32);
}

.field-card::before,
.field-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #FFE0A6, #B9793E 64%, #8A5122 100%);
  box-shadow: inset 0 1px 1px rgba(255, 245, 218, .6), 0 1px 2px rgba(60, 30, 8, .35);
  pointer-events: none;
}
.field-card::before { top: 7px; left: 8px; }
.field-card::after { top: 7px; right: 8px; }

.field-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 5px 7px;
  color: #FFF8E8;
}

.field-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.field-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 244, 210, .62);
  background: linear-gradient(180deg, #8BD24F, #4F9A2B);
  color: #F6FFD9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 2px 0 rgba(62, 92, 24, .26);
}

.field-ico .mp-icon { width: 18px; height: 18px; }

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

.field-copy b {
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .03em;
  text-shadow: 0 1px 2px rgba(74, 36, 8, .48);
  white-space: nowrap;
}

.field-copy small {
  font-size: 8.4px;
  font-weight: 700;
  line-height: 1.15;
  color: #FFEBC9;
  opacity: .88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.barn-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  padding: 0 8px 0 6px;
  border: 1.5px solid rgba(122, 74, 30, .32);
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFCF0, #FFE9BC);
  color: #8A4E1A;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(132, 82, 31, .36), inset 0 1px 0 #fff;
  cursor: pointer;
  flex: 0 0 auto;
}

.barn-chip .mp-icon { width: 13px; height: 13px; color: #B56A1D; }
.barn-chip b {
  display: inline-block;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #FF8A3D;
  color: #fff;
  font-size: 9px;
  line-height: 15px;
  text-align: center;
}
.barn-chip:active { transform: translateY(1px) scale(.98); }

.field-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 7px;
  border: 2px solid rgba(87, 48, 18, .62);
  border-radius: 19px;
  background:
    radial-gradient(120% 44% at 50% 0%, rgba(255, 255, 255, .18), transparent 64%),
    repeating-linear-gradient(92deg, rgba(255, 255, 255, .045) 0 2px, transparent 2px 24px),
    linear-gradient(180deg, #7FC950 0%, #68B640 38%, #56A035 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, .3),
    inset 0 -5px 12px rgba(40, 84, 20, .28);
  overflow: hidden;
}

.field-body::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 17px;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 255, 255, .11) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 26%, rgba(255, 255, 255, .09) 0 2px, transparent 3px),
    radial-gradient(circle at 14% 83%, rgba(255, 250, 140, .18) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 88% 75%, rgba(255, 250, 140, .15) 0 1.5px, transparent 2.5px);
}

.plots {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100%;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 7px;
}

/* ---------- 地块 ---------- */
.plot {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  color: #FFE9C9;
  background:
    radial-gradient(95% 52% at 50% 5%, rgba(255, 211, 153, .16), transparent 64%),
    repeating-linear-gradient(90deg, rgba(43, 20, 6, .18) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(0deg, rgba(255, 216, 160, .06) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #9D6438 0%, #89512B 56%, #7A4422 100%);
  box-shadow:
    inset 0 5px 11px rgba(56, 27, 8, .38),
    inset 0 -3px 0 rgba(255, 208, 150, .12),
    inset 0 0 0 1.5px rgba(97, 52, 22, .55),
    0 3px 0 #6D3C1D;
  transition: transform .12s ease, box-shadow .12s ease;
}

.plot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 5px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, rgba(255, 226, 174, .32), rgba(255, 206, 140, .03));
  pointer-events: none;
}

.plot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 13px;
  background:
    radial-gradient(circle at 22% 26%, #FFF7B8 0 2px, transparent 2.6px),
    radial-gradient(circle at 79% 35%, #FFF7B8 0 1.7px, transparent 2.3px),
    radial-gradient(circle at 67% 17%, #FFF7B8 0 1.3px, transparent 1.9px),
    radial-gradient(circle at 34% 12%, #FFF7B8 0 1.2px, transparent 1.8px);
  opacity: 0;
  transition: opacity .2s ease;
}

.plot:active {
  transform: translateY(2px) scale(.988);
  box-shadow:
    inset 0 5px 11px rgba(56, 27, 8, .42),
    inset 0 0 0 1.5px rgba(97, 52, 22, .55),
    0 1px 0 #6D3C1D;
}

.plot[data-state="ripe"] {
  box-shadow:
    inset 0 0 0 2px rgba(255, 219, 105, .92),
    inset 0 0 24px rgba(255, 196, 64, .34),
    0 0 18px rgba(255, 196, 64, .5),
    0 3px 0 #6D3C1D;
}

.plot[data-state="ripe"]::after {
  opacity: 1;
  animation: sparkleGlow 1.25s ease-in-out infinite alternate;
}

.plot-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.seed-spot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 228, 178, .54);
  background: rgba(255, 226, 168, .1);
  box-shadow: inset 0 2px 7px rgba(45, 22, 6, .32);
  color: #FFE2A8;
  transition: transform .15s ease, background .15s ease;
}

.plot-empty .mp-icon { width: 18px; height: 18px; }
.plot:active .seed-spot { transform: scale(.94); background: rgba(255, 226, 168, .18); }

.plot-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #FFE8C2;
  opacity: .9;
  text-shadow: 0 1px 2px rgba(45, 22, 6, .55);
}

.plot.is-hint .seed-spot {
  animation: hintPulse 1.15s ease-in-out infinite;
  border-color: #FFEBA8;
  background: rgba(255, 231, 150, .22);
}

.crop-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 19px;
  bottom: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.crop-svg {
  display: block;
  width: auto;
  height: 100%;
  max-width: 92%;
  filter: drop-shadow(0 3px 3px rgba(42, 19, 5, .32));
}

.plot[data-state="growing"] .crop-svg {
  animation: sway 3.2s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}

.plot[data-state="ripe"] .crop-wrap {
  animation: ripeBounce 1.35s ease-in-out infinite;
  transform-origin: 50% 100%;
}

.plot-time {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(49, 26, 9, .58);
  color: #FFEACB;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.plot-time .mp-icon { width: 10px; height: 10px; color: #FFD86B; }

.water-chip {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .48);
  background: linear-gradient(180deg, #9BE4FF, #3DAEF0);
  color: #fff;
  box-shadow: 0 2px 0 #1F7BB8, 0 3px 7px rgba(6, 55, 92, .28);
  animation: waterPulse 1.6s ease-in-out infinite;
}

.water-chip .mp-icon { width: 13px; height: 13px; filter: drop-shadow(0 1px 0 rgba(0, 60, 100, .35)); }

.water-chip.is-done {
  background: linear-gradient(180deg, #8AB56A, #5B8A3F);
  box-shadow: 0 2px 0 #40662B, inset 0 1px 0 rgba(255, 255, 255, .22);
  animation: none;
  color: #EBFFD9;
}

.progress {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 5px;
  height: 6px;
  border-radius: 999px;
  background: rgba(48, 25, 9, .52);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .38);
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #B9EA6A, #FFD34D);
  box-shadow: 0 0 7px rgba(255, 219, 90, .7);
  transition: width .25s linear;
}

.plot.is-watered .progress-fill {
  background: linear-gradient(90deg, #8CE0FF, #4BB6F6);
  box-shadow: 0 0 7px rgba(100, 205, 255, .8);
}

.ripe-badge {
  position: absolute;
  left: 50%;
  bottom: 9px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE776, #FFAA2D);
  color: #7A3A08;
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 2px 0 #C95613, 0 3px 8px rgba(60, 30, 4, .24);
  transform: translateX(-50%);
}

.ripe-badge .mp-icon { width: 11px; height: 11px; }

.splash-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 13px;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 18%, rgba(190, 240, 255, .95) 0 2.5px, transparent 3.2px),
    radial-gradient(circle at 45% 9%, rgba(190, 240, 255, .9) 0 2px, transparent 2.8px),
    radial-gradient(circle at 68% 22%, rgba(190, 240, 255, .92) 0 2.2px, transparent 3px),
    radial-gradient(circle at 36% 44%, rgba(190, 240, 255, .85) 0 2px, transparent 2.8px),
    radial-gradient(circle at 58% 56%, rgba(190, 240, 255, .82) 0 1.8px, transparent 2.6px),
    radial-gradient(circle at 80% 46%, rgba(190, 240, 255, .9) 0 2.2px, transparent 3px);
  animation: splashFall .72s ease-out forwards;
}

.plot.just-planted .crop-wrap { animation: cropPop .4s cubic-bezier(.2, 1.4, .4, 1) both; }

/* ---------- 农田底部 ---------- */
.field-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 5px 1px;
  color: #FFF4DC;
  font-size: 8.6px;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(74, 36, 8, .45);
}

.field-foot > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-score {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  font-weight: 800;
  color: #FFF9E3;
}

.field-score .mp-icon { width: 11px; height: 11px; color: #FFD34D; filter: drop-shadow(0 1px 0 rgba(120, 64, 0, .35)); }
.field-score b { color: #FFF6B8; font-size: 10.5px; }

.bump { animation: pillBump .34s ease; }

@keyframes pillBump {
  0% { transform: scale(1); }
  38% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

/* ================= 底部操作栏 ================= */
.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 8px 10px calc(7px + env(safe-area-inset-bottom));
  border-top: 2px solid rgba(255, 231, 188, .52);
  border-radius: 22px 22px 0 0;
  background:
    repeating-linear-gradient(95deg, rgba(78, 38, 10, .14) 0 2px, transparent 2px 24px),
    linear-gradient(180deg, #D59B5E 0%, #B87840 45%, #92582A 100%);
  box-shadow:
    0 -7px 20px rgba(42, 23, 6, .3),
    inset 0 2px 0 rgba(255, 242, 209, .48);
}

.dock-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.dock-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 5px 2px 4px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #FFF7E4;
  cursor: pointer;
  transition: transform .12s ease;
}

.dock-btn:active { transform: translateY(3px) scale(.96); }

.dock-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 15px;
  border: 2px solid #FFFDF3;
  background: linear-gradient(180deg, #FFFDF4 0%, #FFF0D1 56%, #F5D8A9 100%);
  box-shadow:
    0 3px 0 rgba(121, 75, 30, .38),
    0 6px 12px rgba(50, 26, 5, .26),
    inset 0 1px 0 #fff;
  transition: transform .12s ease, box-shadow .12s ease;
}

.dock-icon .mp-icon {
  width: 25px;
  height: 25px;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .5));
}

.dock-btn.is-active .dock-icon {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 3px rgba(255, 196, 82, .38),
    0 4px 0 rgba(180, 92, 16, .42),
    0 8px 16px rgba(65, 31, 3, .3),
    inset 0 1px 0 #fff;
}

.tone-seed { color: #4E9B2D; }
.tone-water { color: #2B9BDF; }
.tone-harvest { color: #E47A1B; }
.tone-shop { color: #D94F35; }

.dock-btn.is-active .tone-seed { background: linear-gradient(180deg, #F4FFE7, #CFEFA8); }
.dock-btn.is-active .tone-water { background: linear-gradient(180deg, #EDFBFF, #BEECFF); }
.dock-btn.is-active .tone-harvest { background: linear-gradient(180deg, #FFF8E6, #FFDCA0); }
.dock-btn.is-active .tone-shop { background: linear-gradient(180deg, #FFF4EC, #FFD6C6); }

.dock-label {
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .04em;
  text-shadow: 0 1px 2px rgba(78, 37, 6, .55);
}

.dock-badge {
  position: absolute;
  top: 1px;
  right: calc(50% - 25px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  border: 1.5px solid #FFF9E8;
  background: linear-gradient(180deg, #7ACB48, #3E8E21);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(40, 60, 12, .3);
  pointer-events: none;
}

.dock-badge[hidden] { display: none; }
.dock-badge.is-hot {
  background: linear-gradient(180deg, #FFB14F, #F2671A);
  animation: badgePulse 1.5s ease-in-out infinite;
}

.dock-tip {
  margin: 4px 0 0;
  text-align: center;
  color: #FFF1D8;
  font-size: 8.6px;
  font-weight: 700;
  letter-spacing: .02em;
  opacity: .92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(74, 36, 8, .45);
}

/* ================= 弹层通用 ================= */
.sheet-scrim {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(30, 20, 8, .48);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fadeIn .18s ease;
}

.sheet-scrim[hidden] { display: none; }

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  max-height: 78%;
  padding: 7px 14px calc(12px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  border-top: 2px solid #FFF6DC;
  background:
    radial-gradient(110% 32% at 50% 0%, #FFFDF6 0%, #FFF8E9 52%, #FBEACB 100%);
  box-shadow: 0 -16px 40px rgba(25, 18, 5, .35), inset 0 2px 0 rgba(255, 255, 255, .9);
  transform: translateY(104%);
  transition: transform .3s cubic-bezier(.2, .85, .28, 1);
  pointer-events: none;
}

.sheet.is-open {
  transform: translateY(0);
  pointer-events: auto;
}

.sheet-handle {
  flex: 0 0 auto;
  width: 42px;
  height: 4px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: rgba(150, 105, 58, .28);
}

.sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.sheet-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.sheet-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  color: #5A3517;
  letter-spacing: .03em;
}

.sheet-heading p {
  margin: 2px 0 0;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #9A6A3A;
}

.sheet-wallet {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  height: 26px;
  padding: 0 8px 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFF6D9, #FFE4A6);
  border: 1px solid rgba(180, 122, 45, .28);
  color: #9A5A12;
  font-size: 10.5px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 #fff;
}

.sheet-wallet .mp-icon { width: 13px; height: 13px; color: #E79A12; }

.sheet-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(138, 91, 42, .24);
  background: linear-gradient(180deg, #FFFDF7, #F4E3C5);
  color: #8B5D30;
  box-shadow: 0 2px 0 rgba(138, 91, 42, .2);
  cursor: pointer;
}

.sheet-close .mp-icon { width: 16px; height: 16px; }
.sheet-close:active { transform: scale(.93); }

/* ---------- 种子选择 ---------- */
.seed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.seed-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 8px 4px 7px;
  border: 2px solid rgba(131, 83, 40, .32);
  border-radius: 15px;
  background: linear-gradient(180deg, #FFFDF6, #FFF3DB 62%, #F7E3BE);
  color: #5A3517;
  box-shadow: 0 3px 0 #D4A468, 0 5px 9px rgba(70, 40, 10, .14), inset 0 1px 0 #fff;
  cursor: pointer;
  transition: transform .13s ease, border-color .13s ease, box-shadow .13s ease;
}

.seed-card:active { transform: translateY(2px) scale(.985); }

.seed-card.is-selected {
  border-color: #FF9B3F;
  background: linear-gradient(180deg, #FFFDF2, #FFEFC7 58%, #FFDEA0);
  box-shadow:
    0 0 0 2px rgba(255, 138, 61, .28),
    0 3px 0 #E98028,
    0 7px 14px rgba(255, 138, 61, .28),
    inset 0 1px 0 #fff;
}

.seed-card.is-poor { opacity: .8; }

.seed-art {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 92%, #9A6135 0%, #7B4722 62%, #653817 100%);
  box-shadow: inset 0 2px 5px rgba(50, 24, 6, .42), inset 0 -1px 0 rgba(255, 213, 156, .18);
}

.seed-art svg {
  display: block;
  width: auto;
  height: 100%;
  margin: 0;
  filter: drop-shadow(0 2px 2px rgba(40, 18, 4, .26));
}

.seed-name {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.seed-owned {
  font-size: 8px;
  font-weight: 800;
  line-height: 1.1;
  color: #6E9450;
  white-space: nowrap;
}

.seed-price {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 8.6px;
  font-weight: 800;
  line-height: 1.1;
  color: #96632C;
  white-space: nowrap;
}

.seed-price .mini-coin,
.shop-price .mini-coin {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFE787, #FFB427);
  box-shadow: inset 0 1px 0 #FFF7BE, inset 0 -1px 0 #E28C0B;
}

.seed-action {
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 138, 61, .14);
  color: #C05D13;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.seed-card.is-selected .seed-action {
  background: linear-gradient(180deg, #FFB052, #EF6A1B);
  color: #fff;
  box-shadow: 0 1px 3px rgba(160, 70, 5, .3);
}

.seed-check {
  position: absolute;
  top: -5px;
  right: -4px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(180deg, #FFA94A, #EF6A1B);
  color: #fff;
  box-shadow: 0 2px 4px rgba(130, 60, 10, .3);
}

.seed-check .mp-icon { width: 10px; height: 10px; }

.sheet-tip {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 7px 9px;
  border-radius: 11px;
  background: rgba(130, 186, 78, .13);
  color: #6C8A47;
  font-size: 8.8px;
  font-weight: 700;
  line-height: 1.3;
}

.sheet-tip .mp-icon { width: 12px; height: 12px; flex: 0 0 12px; color: #7FA84F; }

.sheet-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 42px;
  margin-top: 9px;
  border: 2px solid #FFE3A2;
  border-radius: 14px;
  background: linear-gradient(180deg, #FFE06A, #FFAE2C);
  color: #7A3A08;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  box-shadow: 0 3px 0 #D17412, inset 0 1px 0 rgba(255, 255, 255, .56);
  cursor: pointer;
}

.sheet-link .mp-icon { width: 16px; height: 16px; }
.sheet-link:active { transform: translateY(2px); box-shadow: 0 1px 0 #D17412; }

/* ---------- 商店 ---------- */
.sheet-shop { max-height: 84%; }

.shop-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  flex: 0 0 auto;
  padding: 3px;
  margin-bottom: 10px;
  border-radius: 13px;
  background: rgba(142, 96, 47, .12);
  box-shadow: inset 0 1px 2px rgba(90, 54, 20, .1);
}

.shop-tab {
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #93683C;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.shop-tab.is-active {
  background: linear-gradient(180deg, #FFFDF5, #FFF0CF);
  color: #A65A12;
  box-shadow: 0 2px 0 rgba(159, 103, 42, .24), inset 0 1px 0 #fff;
}

.shop-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1px 1px 4px;
  scrollbar-width: none;
}

.shop-body::-webkit-scrollbar { display: none; }

.shop-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.shop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1.5px solid rgba(139, 97, 49, .2);
  border-radius: 14px;
  background: linear-gradient(180deg, #FFFDF7, #FFF5E2);
  box-shadow: 0 2px 0 rgba(168, 121, 63, .16), inset 0 1px 0 #fff;
}

.shop-art {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 92%, #9A6135 0%, #7B4722 62%, #653817 100%);
  box-shadow: inset 0 2px 5px rgba(50, 24, 6, .4);
}

.shop-art svg {
  display: block;
  width: auto;
  height: 100%;
  margin: 0;
  filter: drop-shadow(0 2px 2px rgba(40, 18, 4, .26));
}

.shop-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-copy b {
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.15;
  color: #5A3517;
  white-space: nowrap;
}

.shop-copy small {
  font-size: 8.6px;
  font-weight: 700;
  line-height: 1.2;
  color: #9A6A3A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-action {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  padding: 0 10px;
  border: 1.5px solid #FFE0A2;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE270, #FFAC2A);
  color: #793A06;
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 2px 0 #CF7412, inset 0 1px 0 rgba(255, 255, 255, .5);
  cursor: pointer;
}

.shop-action:active { transform: translateY(2px); box-shadow: 0 0 0 #CF7412; }
.shop-action:disabled { opacity: .48; box-shadow: 0 2px 0 #C9A16C; cursor: not-allowed; }

.shop-action .mp-icon { width: 12px; height: 12px; }

.shop-action.is-sell {
  border-color: #D6EFA8;
  background: linear-gradient(180deg, #9EDC61, #5EAE2B);
  color: #fff;
  text-shadow: 0 1px 1px rgba(34, 79, 8, .35);
  box-shadow: 0 2px 0 #3E7C1D, inset 0 1px 0 rgba(255, 255, 255, .45);
}

.shop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 26px 10px 18px;
  text-align: center;
  color: #A0784B;
}

.shop-empty .empty-ico {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(155, 111, 58, .11);
  color: #B58B57;
}

.shop-empty .empty-ico .mp-icon { width: 27px; height: 27px; }
.shop-empty b { font-size: 12px; font-weight: 900; color: #8A5E33; }
.shop-empty span { font-size: 9px; font-weight: 600; line-height: 1.35; }

.shop-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 13px;
  background: rgba(255, 180, 67, .1);
  border: 1px dashed rgba(213, 143, 42, .34);
}

.shop-total span {
  font-size: 9.5px;
  font-weight: 800;
  color: #8F5A22;
}

.shop-total span b { color: #C06A11; font-size: 12px; }

.shop-total button {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 31px;
  padding: 0 12px;
  border: 1.5px solid #D6EFA8;
  border-radius: 999px;
  background: linear-gradient(180deg, #9EDC61, #5EAE2B);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 2px 0 #3E7C1D, inset 0 1px 0 rgba(255, 255, 255, .45);
  cursor: pointer;
}

.shop-total button:active { transform: translateY(2px); box-shadow: 0 0 0 #3E7C1D; }

.buy-note {
  margin: 8px 2px 0;
  font-size: 8.6px;
  font-weight: 600;
  color: #A0784B;
  line-height: 1.35;
}

/* ================= 提示 / 特效 / 升级 ================= */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(142px + env(safe-area-inset-bottom));
  z-index: 80;
  max-width: 86%;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 222, 160, .3);
  background: rgba(54, 33, 15, .95);
  color: #FFF4DC;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px) scale(.96);
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .32);
}

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

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

.float-text {
  position: absolute;
  font-size: 15px;
  font-weight: 900;
  color: #FFF06A;
  text-shadow: 0 2px 0 #A85A0C, 0 0 12px rgba(255, 200, 40, .85);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  animation: floatUp .95s ease-out forwards;
}

.float-text.is-soft { color: #CFFFB0; text-shadow: 0 2px 0 #2F6D1B; font-size: 13px; }
.float-text.is-coin { color: #FFE36A; text-shadow: 0 2px 0 #A85A0C, 0 0 10px rgba(255, 210, 60, .8); }

.spark {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #FFE066;
  box-shadow: 0 0 7px #FFD54A;
  animation: sparkFly .72s ease-out forwards;
}

.coin-fly {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid #E3940C;
  background: radial-gradient(circle at 35% 30%, #FFF7C0, #FFD34D 45%, #FFA91F 100%);
  box-shadow: 0 0 10px rgba(255, 200, 50, .85);
  animation: coinFly .7s cubic-bezier(.2, .72, .3, 1) forwards;
}

.crop-fly {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: var(--crop-color, #FF8A3D);
  box-shadow: 0 0 12px rgba(255, 255, 255, .45), inset 0 2px 3px rgba(255, 255, 255, .55);
  animation: coinFly .72s cubic-bezier(.2, .72, .3, 1) forwards;
}

.levelup {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.levelup.show { animation: levelupShow 1.9s ease both; }

.levelup-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 34px 15px;
  border: 3px solid #fff;
  border-radius: 22px;
  background: linear-gradient(180deg, #FFFEF4 0%, #FFEFC2 55%, #FFDE8C 100%);
  color: #8A4A0C;
  text-align: center;
  box-shadow: 0 0 0 7px rgba(255, 219, 120, .22), 0 16px 40px rgba(80, 40, 0, .38);
}

.levelup-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .28em;
  color: #C0812D;
}

.levelup-card strong {
  margin: 1px 0 0;
  font-size: 31px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .02em;
  color: #F06A1F;
  text-shadow: 0 2px 0 #FFE3A2;
}

.levelup-sub {
  font-size: 11.5px;
  font-weight: 800;
  color: #9A6327;
}

.levelup.show .levelup-card { animation: levelupCard 1.9s cubic-bezier(.2, .9, .25, 1) both; }

/* ================= 动画 ================= */
@keyframes sceneBreathe {
  from { transform: scale(1.018) translateY(0); }
  to { transform: scale(1.055) translateY(-1.2%); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes petBounce {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-3px) rotate(1.4deg); }
}

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

@keyframes sway {
  from { transform: rotate(-1.6deg) scale(.99); }
  to { transform: rotate(1.6deg) scale(1.01); }
}

@keyframes ripeBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-4px) scale(1.035); }
  62% { transform: translateY(-1px) scale(1.005); }
}

@keyframes waterPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 0 #1F7BB8, 0 3px 7px rgba(6, 55, 92, .28), 0 0 0 0 rgba(100, 200, 255, .5); }
  50% { transform: scale(1.08); box-shadow: 0 2px 0 #1F7BB8, 0 3px 7px rgba(6, 55, 92, .28), 0 0 0 6px rgba(100, 200, 255, 0); }
}

@keyframes sparkleGlow {
  from { opacity: .35; transform: scale(.94); }
  to { opacity: 1; transform: scale(1.04); }
}

@keyframes hintPulse {
  0%, 100% { transform: scale(1); box-shadow: inset 0 2px 7px rgba(45, 22, 6, .32), 0 0 0 0 rgba(255, 231, 150, .3); }
  50% { transform: scale(1.09); box-shadow: inset 0 2px 7px rgba(45, 22, 6, .32), 0 0 0 7px rgba(255, 231, 150, 0); }
}

@keyframes splashFall {
  0% { opacity: 0; transform: translateY(-15px) scale(.9); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translateY(16px) scale(1.05); }
}

@keyframes cropPop {
  0% { opacity: .2; transform: scale(.6) translateY(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
  22% { opacity: 1; transform: translate(-50%, -62%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(.98); }
}

@keyframes sparkFly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -30px)) scale(.2); }
}

@keyframes coinFly {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  20% { opacity: 1; transform: translate(calc(var(--dx, 0) * .18), calc(var(--dy, 0) * .08)) scale(1.1); }
  100% { opacity: .15; transform: translate(var(--dx, 0), var(--dy, 0)) scale(.55); }
}

@keyframes levelupShow {
  0% { opacity: 0; }
  12% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes levelupCard {
  0% { transform: scale(.55) rotate(-5deg); }
  18% { transform: scale(1.08) rotate(1deg); }
  28% { transform: scale(1) rotate(0); }
  84% { transform: scale(1) rotate(0); }
  100% { transform: scale(1.04) translateY(-6px); }
}

/* ================= 适配 ================= */
@media (max-width: 370px) {
  .hud { padding-left: 8px; padding-right: 8px; }
  .avatar-wrap { flex-basis: 43px; width: 43px; height: 43px; }
  .player-block { max-width: 108px; }
  .player-line b { max-width: 66px; font-size: 10.8px; }
  .coin-pill { height: 30px; font-size: 11.5px; }
  .coin-pill b { min-width: 26px; font-size: 11.5px; }
  .coin-ico { width: 21px; height: 21px; flex-basis: 21px; }
  .round-btn { width: 31px; height: 31px; }
  .stage { padding-left: 11px; padding-right: 11px; }
  .field-card { border-radius: 22px; }
  .field-copy b { font-size: 11.8px; }
  .field-copy small { font-size: 8px; }
  .barn-chip { height: 26px; padding: 0 6px; }
  .barn-chip span { display: none; }
  .dock { padding-left: 7px; padding-right: 7px; }
  .dock-icon { width: 39px; height: 39px; border-radius: 13px; }
  .dock-icon .mp-icon { width: 23px; height: 23px; }
  .dock-label { font-size: 10.8px; }
  .seed-art { width: 42px; height: 42px; }
  .seed-name { font-size: 10.2px; }
  .seed-grid { gap: 5px; }
  .shop-row { padding: 6px; gap: 6px; }
  .shop-art { width: 38px; height: 38px; flex-basis: 38px; }
  .shop-action { padding: 0 8px; font-size: 9px; }
}

@media (max-height: 720px) {
  .stage { top: calc(58px + env(safe-area-inset-top)); bottom: calc(100px + env(safe-area-inset-bottom)); }
  .field-card { margin-top: clamp(70px, 15vh, 108px); }
  .field-pet { top: -46px; }
  .pet-photo { width: 50px; height: 50px; }
  .pet-bubble { margin-bottom: 16px; font-size: 8px; }
  .field-head { padding-bottom: 5px; }
  .field-ico { width: 27px; height: 27px; flex-basis: 27px; }
  .field-copy b { font-size: 11.8px; }
  .field-body { padding: 5px; }
  .plots { gap: 6px; }
  .plot { border-radius: 12px; }
  .crop-wrap { top: 16px; bottom: 13px; }
  .dock { padding-top: 6px; }
  .dock-icon { width: 40px; height: 40px; }
  .dock-btn { padding-top: 4px; }
  .toast { bottom: calc(132px + env(safe-area-inset-bottom)); }
}

@media (max-height: 600px) {
  .stage { top: calc(54px + env(safe-area-inset-top)); bottom: calc(94px + env(safe-area-inset-bottom)); }
  .field-card { margin-top: clamp(56px, 13vh, 80px); }
  .field-pet { top: -40px; }
  .pet-photo { width: 42px; height: 42px; border-width: 2.5px; }
  .pet-bubble { margin-bottom: 12px; padding: 4px 6px; font-size: 7.5px; }
  .field-copy small { display: none; }
  .field-head { padding: 3px 4px 4px; }
  .field-ico { width: 24px; height: 24px; flex-basis: 24px; border-radius: 8px; }
  .field-ico .mp-icon { width: 15px; height: 15px; }
  .field-foot { padding-top: 4px; }
  .dock { padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
  .dock-icon { width: 36px; height: 36px; border-radius: 12px; }
  .dock-icon .mp-icon { width: 21px; height: 21px; }
  .dock-label { font-size: 10px; }
  .dock-tip { margin-top: 2px; font-size: 8px; }
  .toast { bottom: calc(120px + env(safe-area-inset-bottom)); }
  .sheet { max-height: 88%; }
}

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