/* 生机农场 v2.0 —— 全新视觉系统：暖阳农场风 + 玻璃拟态 + 季节主题 */

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

:root {
  --green-1: #58b368; --green-2: #3f9a54;
  --gold-1: #f7c948; --gold-2: #e8a01a;
  --cream: #fdf8ee; --ink: #3a3226; --ink-2: #7a6f5c;
  --card: #ffffff; --card-r: 18px;
  --shadow-1: 0 2px 10px rgba(64, 50, 30, 0.10);
  --shadow-2: 0 8px 28px rgba(64, 50, 30, 0.16);
  --accent: var(--green-1);
  --sky: #a8ddf0;
}
body[data-season="spring"] { --accent: #6fc86a; --sky: #b4e3f5; }
body[data-season="summer"] { --accent: #58b368; --sky: #9bd7ef; }
body[data-season="autumn"] { --accent: #d9963a; --sky: #f2d9a8; }
body[data-season="winter"] { --accent: #7aa5c9; --sky: #dfe9f2; }

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky) 0%, #e8f4d8 42%, #d3e9bd 100%);
  overflow: hidden;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}

#app { height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; position: relative; }

/* ==================== 顶栏 ==================== */
#topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
  background: linear-gradient(160deg, rgba(255,255,255,0.92), rgba(255,252,242,0.85));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(120, 100, 60, 0.10);
  box-shadow: var(--shadow-1);
  z-index: 30;
}
.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.level-badge {
  background: linear-gradient(150deg, var(--gold-1), var(--gold-2));
  color: #5b3d00; font-weight: 800; font-size: 13px;
  padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(232, 160, 26, 0.4), inset 0 1px 0 rgba(255,255,255,0.6);
  white-space: nowrap;
}
.vitality-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vitality-icon { font-size: 15px; }
.vitality-bar {
  width: 74px; height: 9px; border-radius: 99px; overflow: hidden;
  background: rgba(120, 100, 60, 0.16); box-shadow: inset 0 1px 2px rgba(0,0,0,0.12);
}
.vitality-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #8ee06a, #f7c948);
  border-radius: 99px; transition: width 0.5s ease;
}
.vitality-num { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tb-right { display: flex; align-items: center; gap: 7px; }
.res {
  display: flex; align-items: center; gap: 4px;
  font-weight: 800; font-size: 13px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.9); box-shadow: var(--shadow-1);
  border: 1px solid rgba(120, 100, 60, 0.12);
  white-space: nowrap;
}
.res.coins::before { content: '🪙'; font-size: 14px; }
.res.gems { color: #8a5cd9; cursor: pointer; }
.icon-btn {
  width: 36px; height: 36px; border: none; border-radius: 12px;
  background: rgba(255,255,255,0.9); box-shadow: var(--shadow-1);
  font-size: 17px; cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s;
}
.icon-btn:active { transform: scale(0.92); }
.dot {
  position: absolute; top: 5px; right: 6px; width: 8px; height: 8px;
  background: #ff5a5a; border-radius: 50%; border: 1.5px solid #fff;
}
.hidden { display: none !important; }

/* 节气横幅 */
#term-banner {
  position: absolute; top: 68px; left: 50%; transform: translateX(-50%);
  background: rgba(58, 50, 38, 0.88); color: #ffe9a8;
  font-size: 13px; padding: 8px 18px; border-radius: 999px;
  z-index: 40; box-shadow: var(--shadow-2);
  animation: bannerIn 0.5s ease; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ==================== 主视图 ==================== */
#view { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
#view::-webkit-scrollbar { display: none; }

/* ---------- 农场页（Canvas） ---------- */
.farm-wrap {
  position: relative; width: 100%; height: 100%; min-height: 420px;
  overflow: hidden;
}
#farm-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: manipulation; cursor: pointer;
}
.farm-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.plot-timer {
  position: absolute; transform: translate(-50%, -100%);
  background: rgba(52, 40, 26, 0.82); color: #ffe9a8;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 4px 8px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.tool-btn {
  position: absolute; z-index: 5;
  border: none; cursor: pointer;
  background: rgba(255, 252, 242, 0.94); color: var(--ink);
  font-size: 13px; font-weight: 700;
  padding: 9px 14px; border-radius: 999px;
  box-shadow: var(--shadow-2); border: 1px solid rgba(120,100,60,0.14);
  transition: transform 0.12s;
}
.tool-btn:active { transform: scale(0.94); }
.tool-btn small { font-weight: 600; color: var(--ink-2); }
.tool-btn.inv-btn { left: 12px; bottom: 14px; }
.tool-btn.card-gift { right: 12px; bottom: 14px; background: linear-gradient(150deg, #ffe28a, #f7c948); color: #6b4a00; animation: giftPulse 2s infinite; }
.tool-btn.placing-hint { left: 50%; transform: translateX(-50%); bottom: 58px; background: linear-gradient(150deg, #a8e6a1, var(--green-1)); color: #fff; }
.farm-tools { position: absolute; top: 12px; right: 12px; z-index: 5; display: flex; gap: 8px; }
.farm-tools .tool-btn { position: static; padding: 9px 13px; }
.tool-btn.fest-btn { position: absolute; top: 12px; left: 12px; z-index: 5; background: linear-gradient(150deg, #2e3a5c, #4a5a8c); color: #ffe9a8; animation: giftPulse 2.4s infinite; }

/* ==================== 开屏日出动画 ==================== */
#splash {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: #fdf8ee;
  transition: opacity 0.55s ease;
}
#splash.gone { opacity: 0; pointer-events: none; }
.splash-scene { position: absolute; inset: 0; overflow: hidden; }
.sp-sky { position: absolute; inset: 0; background: linear-gradient(180deg, #7ec9f2 0%, #bfe9f7 46%, #ffe9b8 66%, #fdf8ee 78%); animation: skyBrighten 1.6s ease forwards; }
@keyframes skyBrighten { from { filter: brightness(0.82); } to { filter: brightness(1); } }
.sp-sun {
  position: absolute; left: 50%; top: 58%; width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle, #fffbe0, #ffe27a 55%, #ffc93d);
  box-shadow: 0 0 44px 14px rgba(255, 216, 122, 0.75);
  transform: translate(-50%, 0);
  animation: sunRise 1.5s cubic-bezier(0.22, 0.8, 0.3, 1) forwards;
}
@keyframes sunRise { from { transform: translate(-50%, 150px) scale(0.86); } to { transform: translate(-50%, -46px) scale(1); } }
.sp-sun-ray { position: absolute; left: 50%; top: 58%; width: 2.5px; height: 14px; background: #ffd94d; border-radius: 2px; opacity: 0; transform-origin: center -46px; animation: rayOut 0.9s 0.85s ease forwards; }
.sp-sun-ray.r1 { transform: translateX(-50%) rotate(0deg); }
.sp-sun-ray.r2 { transform: translateX(-50%) rotate(60deg); animation-delay: 0.95s; }
@keyframes rayOut { from { opacity: 0; } to { opacity: 0.85; } }
.sp-cloud { position: absolute; background: #fff; border-radius: 999px; opacity: 0.92; animation: cloudIn 1.7s ease forwards; }
.sp-cloud.c1 { width: 86px; height: 20px; left: 16%; top: 22%; }
.sp-cloud.c2 { width: 54px; height: 14px; right: 20%; top: 15%; opacity: 0.6; }
@keyframes cloudIn { from { transform: translateX(-40px); opacity: 0; } to { transform: translateX(0); opacity: 0.92; } }
.sp-hill { position: absolute; left: -6%; width: 112%; border-radius: 50% 50% 0 0; }
.sp-hill.far { height: 200px; background: #a8dd8e; bottom: -92px; animation: hillUp 1.1s 0.15s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.sp-hill.mid { height: 180px; background: #7fc45f; bottom: -112px; animation: hillUp 1.1s 0.3s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes hillUp { from { transform: translateY(120px); } to { transform: translateY(0); } }
.sp-field { position: absolute; left: 0; right: 0; bottom: 0; height: 15%; background: #4f9440; animation: fieldUp 0.9s 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes fieldUp { from { transform: translateY(90px); } to { transform: translateY(0); } }
.sp-sprout { position: absolute; bottom: 6%; font-size: 21px; opacity: 0; animation: sproutUp 0.7s cubic-bezier(0.3, 1.4, 0.5, 1) forwards; }
.sp-sprout.s1 { left: 26%; animation-delay: 1.0s; }
.sp-sprout.s2 { left: 52%; font-size: 25px; animation-delay: 1.15s; }
.sp-sprout.s3 { left: 74%; animation-delay: 1.3s; }
@keyframes sproutUp { from { opacity: 0; transform: translateY(18px) scale(0.5); } to { opacity: 1; transform: translateY(0) scale(1); } }
.sp-brand { position: relative; z-index: 2; text-align: center; animation: brandIn 0.7s 0.2s ease both; }
@keyframes brandIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.sp-logo { font-size: 54px; filter: drop-shadow(0 6px 14px rgba(60, 80, 30, 0.3)); }
.sp-title { font-size: 27px; font-weight: 800; color: #2e5a2e; margin-top: 6px; letter-spacing: 2px; }
.sp-sub { font-size: 13px; color: #6a7d5c; margin-top: 5px; }
.sp-bar { width: 148px; height: 5px; border-radius: 99px; background: rgba(90, 120, 60, 0.18); margin: 16px auto 0; overflow: hidden; }
.sp-bar i { display: block; height: 100%; width: 40%; border-radius: 99px; background: linear-gradient(90deg, #8ee06a, #f7c948); animation: barRun 1.5s ease-in-out infinite; }
@keyframes barRun { 0% { transform: translateX(-110%); } 100% { transform: translateX(280%); } }
@media (prefers-reduced-motion: reduce) { .sp-sun, .sp-hill, .sp-field, .sp-sprout, .sp-brand { animation-duration: 0.01s !important; animation-delay: 0s !important; } }

/* 皮肤预览色卡 */
.skin-swatch {
  display: block; width: 30px; height: 30px; border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.75), 0 2px 6px rgba(64,50,30,0.25);
}

/* 丰收券卡片 */
.voucher-card { background: linear-gradient(160deg, #f4ffe8, #e2f5cc); }
.voucher-card .wc-row b { color: #4a8c2c; }

/* 连续签到周历 */
.streak-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 12px 0 4px; }
.streak-cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(120,100,60,0.06); border-radius: 13px; padding: 9px 4px;
  opacity: 0.65;
}
.streak-cell small { font-size: 10.5px; color: var(--ink-2); }
.streak-cell b { font-size: 13px; }
.streak-cell.done { background: rgba(88,179,104,0.18); opacity: 1; }
.streak-cell.cur { background: linear-gradient(150deg, #ffe9a8, #ffd45e); opacity: 1; box-shadow: 0 3px 10px rgba(247,201,72,0.4); }

/* 线下农场意向 */
.lead-chips { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.lead-chip {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  border: 1.5px solid rgba(120,100,60,0.18); background: var(--card);
  border-radius: 14px; padding: 10px 13px; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.lead-chip b { font-size: 14px; color: var(--ink); }
.lead-chip small { font-size: 12px; color: var(--ink-2); }
.lead-chip.active { border-color: var(--green-1); background: rgba(88,179,104,0.10); box-shadow: 0 3px 10px rgba(88,179,104,0.18); }

/* 节庆 */
.fest-kv {
  width: calc(100% + 36px); margin: 2px -18px 10px; display: block;
  border-radius: 0 0 0 0;
}
.fest-tag {
  font-style: normal; font-size: 10.5px; font-weight: 700;
  color: #6b4a00; background: linear-gradient(150deg, #ffe9a8, #ffd45e);
  padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 2px;
}
.order-card.fest-order { border-color: rgba(232, 160, 26, 0.6); background: linear-gradient(165deg, #fffdf6, #fff6dd); }
.fest-progress { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; }
.fest-progress b { font-size: 14px; color: #b07818; white-space: nowrap; }

/* 每日任务 */
.task-row {
  display: flex; align-items: center; gap: 11px;
  background: var(--card); border-radius: var(--card-r);
  padding: 11px 13px; box-shadow: var(--shadow-1);
}
.task-row.done { border: 1.5px solid rgba(88, 179, 104, 0.45); }
.task-row.claimed { opacity: 0.62; }
.task-bar {
  width: 130px; height: 7px; border-radius: 99px; margin: 4px 0 3px;
  background: rgba(120, 100, 60, 0.14); overflow: hidden;
}
.task-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8ee06a, #f7c948); border-radius: 99px; transition: width 0.4s; }

/* 分段控件（邻居页） */
.seg-bar {
  display: flex; gap: 6px; margin: 12px 0 4px;
  background: rgba(255, 252, 242, 0.9); border-radius: 14px; padding: 4px;
  box-shadow: var(--shadow-1);
}
.seg {
  flex: 1; border: none; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  padding: 9px 4px; border-radius: 11px; background: transparent;
  transition: all 0.15s; white-space: nowrap;
}
.seg.active { background: linear-gradient(150deg, var(--green-1), var(--green-2)); color: #fff; box-shadow: 0 3px 8px rgba(88, 179, 104, 0.3); }

/* 排行榜 */
.rank-row.me { border: 1.5px solid rgba(247, 201, 72, 0.7); background: linear-gradient(150deg, #fff8e0, #fff3cf); }
.rank-medal { font-size: 18px; font-weight: 800; width: 40px; text-align: center; flex-shrink: 0; }
.rank-vit { font-weight: 800; font-size: 14px; color: #b07818; flex-shrink: 0; }
@keyframes giftPulse { 0%,100% { box-shadow: 0 4px 14px rgba(247,201,72,0.45); } 50% { box-shadow: 0 4px 22px rgba(247,201,72,0.8); } }

/* ==================== 通用页面 ==================== */
.page { padding: 16px 16px 28px; }
.page-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.muted { color: var(--ink-2); font-size: 13px; }
.muted.small, small.small { font-size: 12px; }
.center { text-align: center; }
h4 { margin: 18px 0 8px; font-size: 15px; }

/* 列表 */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex; align-items: center; gap: 11px;
  background: var(--card); border-radius: var(--card-r);
  padding: 11px 13px; border: none; width: 100%; text-align: left;
  box-shadow: var(--shadow-1); cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  font-family: inherit; color: var(--ink);
}
.list-item:active { transform: scale(0.98); }
.list-item.disabled { opacity: 0.55; cursor: default; }
.list-item:not(.disabled):hover { box-shadow: var(--shadow-2); }
.li-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; border-radius: 13px;
  background: linear-gradient(150deg, #f4ecd8, #eadfc4);
}
.li-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.li-body b { font-size: 14.5px; font-weight: 700; }
.li-body small { font-size: 12px; color: var(--ink-2); }
.li-go {
  flex-shrink: 0; font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(150deg, var(--green-1), var(--green-2));
  padding: 7px 13px; border-radius: 999px;
  box-shadow: 0 3px 8px rgba(88, 179, 104, 0.35);
}
.li-go.gem { background: linear-gradient(150deg, #b18cf2, #8a5cd9); box-shadow: 0 3px 8px rgba(138, 92, 217, 0.35); }
.li-lock { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--ink-2); background: rgba(120,100,60,0.12); padding: 6px 10px; border-radius: 999px; }

/* 按钮 */
.btn {
  border: none; cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 800;
  padding: 11px 18px; border-radius: 999px;
  transition: transform 0.12s, filter 0.12s;
}
.btn:active { transform: scale(0.95); }
.btn.primary {
  color: #fff;
  background: linear-gradient(150deg, var(--green-1), var(--green-2));
  box-shadow: 0 4px 12px rgba(88, 179, 104, 0.4);
}
.btn.ghost { background: rgba(120, 100, 60, 0.10); color: var(--ink); }
.btn.danger { background: linear-gradient(150deg, #ff8a7a, #e8564a); color: #fff; box-shadow: 0 4px 12px rgba(232, 86, 74, 0.35); }
.btn.disabled-btn, .disabled-btn { opacity: 0.5; pointer-events: none; }
.row-btns { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.row-btns .btn { flex: 1; min-width: 110px; }
.mini-btn {
  border: none; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 700;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(120, 100, 60, 0.12); color: var(--ink);
}
.mini-btn.primary { background: linear-gradient(150deg, var(--green-1), var(--green-2)); color: #fff; }

/* ==================== 订单页 ==================== */
.order-card {
  background: var(--card); border-radius: var(--card-r);
  padding: 14px; margin-top: 12px; box-shadow: var(--shadow-1);
  border: 1.5px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.order-card.can { border-color: rgba(88, 179, 104, 0.55); box-shadow: 0 4px 16px rgba(88, 179, 104, 0.22); }
.oc-head { display: flex; gap: 10px; align-items: center; }
.oc-avatar, .nc-avatar, .pc-avatar {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; border-radius: 50%;
  background: linear-gradient(150deg, #f4ecd8, #eadfc4);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7);
}
.oc-head b { font-size: 15px; }
.oc-head small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.oc-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0; }
.chip {
  font-size: 12.5px; font-weight: 700;
  background: rgba(120, 100, 60, 0.09); padding: 5px 10px; border-radius: 999px;
}
.chip.ok { background: rgba(88, 179, 104, 0.18); color: #2c7a3c; }
.chip.lack { color: #b0543a; }
.oc-foot { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.oc-reward { font-weight: 800; font-size: 14px; color: #b07818; }
.oc-expire { font-size: 11.5px; color: var(--ink-2); }
.card-note {
  margin-top: 14px; font-size: 13px; color: #6b4a00;
  background: linear-gradient(150deg, #fff3cf, #ffe9a8);
  padding: 11px 14px; border-radius: 14px;
}

/* ==================== 商店页 ==================== */
.decor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* 新人券横幅 */
.coupon-banner {
  background: linear-gradient(150deg, #ffefc2, #ffd45e);
  border: 1.5px dashed #e8a01a;
  color: #6b4a00; border-radius: 14px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 8px;
  animation: giftPulse 2.2s infinite;
}
.coupon-banner b { color: #b0543a; }

.gem-banner {
  background: linear-gradient(150deg, #f3ecff, #e5d9fa);
  border-radius: 14px; padding: 11px 14px; font-size: 13.5px; color: #5b3d9e;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px;
}
.inv-item .inv-btns { display: flex; gap: 6px; }

/* ==================== 邻居页 ==================== */
.neighbor-card {
  background: var(--card); border-radius: var(--card-r);
  padding: 14px; margin-top: 12px; box-shadow: var(--shadow-1);
}
.nc-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.nc-head b { font-size: 15px; }
.nc-head small { display: block; font-size: 12px; color: var(--ink-2); margin: 2px 0 5px; }
.mini-farm-canvas {
  width: 100%; height: 120px; border-radius: 14px; display: block;
  box-shadow: inset 0 0 0 1.5px rgba(120, 100, 60, 0.12);
}
.fr-bar { width: 130px; height: 7px; border-radius: 99px; background: rgba(120,100,60,0.14); overflow: hidden; }
.fr-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f2a1c2, #e8564a); border-radius: 99px; transition: width 0.4s; }
.gift-row { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }

/* ==================== 我的页 ==================== */
.profile-card, .wallet-card {
  background: var(--card); border-radius: var(--card-r);
  padding: 14px; box-shadow: var(--shadow-1);
  display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap;
}
.profile-card b { font-size: 16px; }
.profile-card small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.wallet-card { display: block; }
.wc-row { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; }
.wc-row b { font-size: 19px; color: #8a5cd9; }
.skin-row { display: flex; gap: 7px; flex-wrap: wrap; }
.skin-chip {
  border: 1.5px solid rgba(120,100,60,0.18); background: var(--card);
  font-size: 13px; font-weight: 700; color: var(--ink);
  padding: 8px 13px; border-radius: 999px; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.skin-chip.active { background: linear-gradient(150deg, var(--green-1), var(--green-2)); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(88,179,104,0.35); }
.skin-chip small { font-weight: 500; opacity: 0.7; }
.danger-item .li-body b { color: #c0543a; }

/* 生产槽 / 动物格 */
.prod-slot {
  display: flex; align-items: center; gap: 10px;
  background: rgba(120,100,60,0.06); border-radius: 13px;
  padding: 10px 12px; margin-bottom: 7px; font-size: 14px;
}
.prod-slot.ready { background: rgba(88, 179, 104, 0.16); cursor: pointer; }
.prod-slot span { font-size: 21px; }
.ps-body b { font-size: 14px; }
.ps-body small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.empty-slot { color: var(--ink-2); font-size: 13px; }
.animal-row { display: flex; gap: 8px; margin: 10px 0; }
.animal-cell {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: rgba(120,100,60,0.06); border-radius: 13px; padding: 10px 4px; font-size: 12px; color: var(--ink-2);
}
.animal-cell.ready { background: rgba(88, 179, 104, 0.18); cursor: pointer; }
.an-emoji { font-size: 26px; }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.form input {
  border: 1.5px solid rgba(120,100,60,0.2); border-radius: 13px;
  padding: 12px 14px; font-size: 15px; font-family: inherit;
  background: #fff; color: var(--ink); outline: none;
}
.form input:focus { border-color: var(--green-1); box-shadow: 0 0 0 3px rgba(88,179,104,0.15); }

/* ==================== 底部导航 ==================== */
#tabbar {
  display: flex; padding: 8px 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
  gap: 4px;
  background: rgba(255, 252, 242, 0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(120, 100, 60, 0.10);
  z-index: 30;
}
.tab {
  flex: 1; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: inherit; color: var(--ink-2); font-size: 11px; font-weight: 700;
  padding: 6px 2px; border-radius: 14px;
  transition: color 0.15s, background 0.15s, transform 0.12s;
}
.tab span { font-size: 22px; filter: grayscale(0.5); transition: filter 0.15s, transform 0.15s; }
.tab.active { color: #2c7a3c; background: rgba(88, 179, 104, 0.13); }
.tab.active span { filter: none; transform: translateY(-1px) scale(1.12); }
.tab:active { transform: scale(0.94); }

/* ==================== 弹层 ==================== */
#sheet-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
#sheet-root.open { pointer-events: auto; }
.sheet-backdrop {
  position: absolute; inset: 0; background: rgba(30, 24, 14, 0.45);
  opacity: 0; transition: opacity 0.25s;
}
#sheet-root.open .sheet-backdrop { opacity: 1; }
.sheet {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 105%);
  width: min(560px, 100vw);
  max-height: 82dvh; overflow-y: auto;
  background: var(--cream);
  border-radius: 26px 26px 0 0;
  padding: 18px 18px calc(env(safe-area-inset-bottom, 0px) + 20px);
  box-shadow: 0 -8px 40px rgba(30, 24, 14, 0.3);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.24, 1);
}
#sheet-root.open .sheet { transform: translate(-50%, 0); }
.sheet::before {
  content: ''; display: block;
  width: 44px; height: 5px; border-radius: 99px;
  background: rgba(120, 100, 60, 0.25); margin: 0 auto 12px;
}
.sheet h3 { font-size: 18px; margin-bottom: 6px; }
.sheet .list { margin-top: 10px; }

/* ==================== Toast / 特效 ==================== */
#toast-root {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 72px);
  left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 200; pointer-events: none;
}
.toast {
  background: rgba(58, 50, 38, 0.92); color: #fdf8ee;
  font-size: 13.5px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px;
  max-width: 86vw; text-align: center;
  opacity: 0; transform: translateY(-8px);
  transition: all 0.3s; box-shadow: var(--shadow-2);
}
.toast.show { opacity: 1; transform: translateY(0); }

#fx-root { position: fixed; inset: 0; z-index: 150; pointer-events: none; overflow: hidden; }
.float-fx {
  position: absolute; font-size: 19px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  animation: floatUp 1.4s ease-out forwards;
}
@keyframes floatUp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-46px); } }
.petal { position: absolute; top: -30px; animation: petalFall 3.2s ease-in forwards; }
@keyframes petalFall { to { transform: translateY(110vh) rotate(340deg); opacity: 0.4; } }

/* ==================== 新手引导 ==================== */
.tutorial-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20, 14, 6, 0.62); backdrop-filter: blur(3px);
  animation: fadeIn 0.3s ease;
}
.tutorial-card {
  position: fixed; z-index: 301; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: min(340px, 88vw);
  background: var(--cream); border-radius: 24px;
  padding: 26px 22px 18px; text-align: center;
  box-shadow: 0 18px 60px rgba(20, 14, 6, 0.4);
  animation: tutIn 0.35s cubic-bezier(0.34, 1.4, 0.44, 1);
}
@keyframes tutIn { from { opacity: 0; transform: translate(-50%, -46%) scale(0.9); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.tu-emoji { font-size: 52px; margin-bottom: 8px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }
.tutorial-card h3 { font-size: 19px; margin-bottom: 8px; }
.tutorial-card p { font-size: 13.5px; line-height: 1.65; }
.tu-dots { display: flex; justify-content: center; gap: 6px; margin: 14px 0 2px; }
.tu-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(120, 100, 60, 0.22); transition: all 0.25s; }
.tu-dots i.on { background: var(--green-1); width: 20px; border-radius: 99px; }
.tu-skip {
  margin-top: 10px; border: none; background: transparent; cursor: pointer;
  font-size: 12.5px; color: var(--ink-2); font-family: inherit; padding: 6px 10px;
}
.wc-row small { font-weight: 500; }
.li-go.primary-go { background: linear-gradient(150deg, #ffcf4d, #f2a51a); box-shadow: 0 3px 8px rgba(242, 165, 26, 0.4); }
a.list-item { text-decoration: none; }

/* ==================== 响应式 ==================== */
@media (min-width: 600px) {
  #app { box-shadow: 0 0 60px rgba(30, 24, 14, 0.12); }
}
@media (prefers-reduced-motion: reduce) {
  .petal, .float-fx { animation-duration: 0.6s; }
  .tool-btn.card-gift { animation: none; }
}
