/* 水果店 · 共享样式（收银台 / 图鉴 / 小店） */
:root {
  --orange: #FF8A3D;
  --orange-deep: #E96A1F;
  --orange-dark: #C95512;
  --orange-soft: #FFB877;
  --cream: #FFF7EC;
  --cream-2: #FFF1DC;
  --ink: #432817;
  --ink-2: #6E4B33;
  --muted: #A08772;
  --green: #5FB865;
  --line: rgba(120, 80, 40, .12);
  --shadow: 0 10px 26px rgba(120, 70, 20, .13);
  --shadow-sm: 0 4px 12px rgba(120, 70, 20, .10);
  --nav-h: 58px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  background: #FFF1DF;
}

button, input { font-family: inherit; }
button { border: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 15px;
  font-weight: 800;
  font-size: 15px;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s;
}
.btn:active { transform: translateY(2px) scale(.99); }
.btn-primary {
  background: linear-gradient(160deg, #FFA45B 0%, #FF7A2F 60%, #F0671B 100%);
  color: #fff;
  box-shadow: 0 6px 0 #D9611D, 0 10px 20px rgba(230, 110, 30, .28);
}
.btn-primary:active { box-shadow: 0 3px 0 #D9611D, 0 6px 12px rgba(230, 110, 30, .24); }
.btn:disabled { opacity: .5; box-shadow: none; transform: none; }

/* 底部导航 */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  z-index: 60;
  display: flex;
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 0 10px var(--safe-b);
  background: rgba(255, 252, 246, .97);
  border-top: 1px solid rgba(140, 90, 40, .10);
  box-shadow: 0 -8px 24px rgba(120, 70, 20, .07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: #B3987F;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  padding-top: 4px;
}
.tab-icon {
  width: 38px;
  height: 27px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  transition: background .18s ease, transform .18s ease, color .18s ease;
}
.tab-icon .mp-icon { width: 22px; height: 22px; }
.tabbar a.active { color: var(--orange-deep); }
.tabbar a.active .tab-icon {
  background: linear-gradient(160deg, #FFE7CE, #FFD7B2);
  transform: translateY(-1px);
  color: var(--orange-deep);
}
.tabbar a:active .tab-icon { transform: scale(.92); }

/* 二级页通用 */
.page-body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 4%, rgba(255, 190, 132, .38), transparent 32%),
    radial-gradient(circle at 96% 16%, rgba(255, 224, 180, .55), transparent 30%),
    linear-gradient(180deg, #FFF3E3 0%, #FFF9EF 45%, #FFF4E6 100%);
  padding-bottom: calc(var(--nav-h) + 34px + var(--safe-b));
}
.page-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-t)) 16px 18px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 20px 18px 16px;
  background: linear-gradient(140deg, #FF9D57 0%, #FF7B30 55%, #F0661A 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(224, 106, 26, .28);
}
.page-hero::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}
.page-hero::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  left: -50px;
  bottom: -70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.hero-copy { position: relative; z-index: 2; max-width: 74%; }
.hero-kicker {
  margin: 0 0 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .75);
}
.page-hero h1 {
  margin: 0 0 6px;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: .5px;
  text-shadow: 0 2px 0 rgba(170, 70, 10, .18);
}
.hero-sub {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .92);
}
.hero-fruits {
  position: absolute;
  right: -8px;
  top: -12px;
  width: 150px;
  height: 150px;
  z-index: 1;
  pointer-events: none;
}
.hero-fruits .fruit-art { position: absolute; filter: drop-shadow(0 8px 10px rgba(120, 50, 10, .22)); }
.hero-fruits .fruit-art:nth-child(1) { width: 82px; height: 82px; right: 4px; top: 8px; transform: rotate(9deg); }
.hero-fruits .fruit-art:nth-child(2) { width: 58px; height: 58px; right: 64px; top: 46px; transform: rotate(-14deg); }
.hero-fruits .fruit-art:nth-child(3) { width: 50px; height: 50px; right: 16px; top: 84px; transform: rotate(12deg); }

.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 7px;
  margin-top: 14px;
}
.hero-stat {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .26);
}
.hero-stat b {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-stat span { font-size: 9px; color: rgba(255, 255, 255, .82); }
.hero-progress {
  position: relative;
  z-index: 2;
  height: 7px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(110, 40, 0, .20);
  overflow: hidden;
}
.hero-progress i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFE08A, #FFF7D6);
  transition: width .5s ease;
}
.hero-next {
  position: relative;
  z-index: 2;
  margin: 6px 0 0;
  font-size: 9.5px;
  color: rgba(255, 255, 255, .82);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 2px 9px;
}
.section-head h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: .3px;
}
.section-head span {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(180, 130, 80, .14);
  border-radius: 999px;
  padding: 3px 9px;
}

/* 水果图鉴 */
.fruit-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fruit-card {
  position: relative;
  padding: 12px 11px 10px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF5 100%);
  border: 1px solid #FFE7CE;
  border-radius: 19px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.fruit-card::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  right: -34px;
  bottom: -38px;
  border-radius: 50%;
  background: #FFF1DE;
}
.fc-art {
  width: 68px;
  height: 68px;
  margin: 0 auto 5px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 8px rgba(140, 60, 20, .13));
}
.fc-art .fruit-art { width: 100%; height: 100%; }
.fc-price, .fc-lock {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}
.fc-price { background: #FFF1D8; color: #B56706; }
.fc-price .mp-icon { width: 12px; height: 12px; color: #F2A400; }
.fc-lock { background: #F2E9DE; color: #9C8069; }
.fc-lock .mp-icon { width: 11px; height: 11px; }
.fruit-card h3 {
  position: relative;
  z-index: 2;
  margin: 0 0 3px;
  text-align: center;
  font-size: 13.5px;
}
.fruit-card p {
  position: relative;
  z-index: 2;
  margin: 0 0 8px;
  min-height: 30px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}
.fc-foot {
  position: relative;
  z-index: 2;
  padding-top: 7px;
  border-top: 1px dashed #F0DFC9;
  font-size: 9px;
  font-weight: 700;
  color: #B18355;
}
.fruit-card.locked {
  background: linear-gradient(180deg, #FBF6EE 0%, #F8F1E6 100%);
  border-color: #EEE2D2;
}
.fruit-card.locked .fc-art { filter: grayscale(1); opacity: .32; }
.fruit-card.locked h3 { color: #9E8875; }
.fruit-card.locked .fc-foot { color: #B7A28D; }

/* 小店升级 */
.balance-card {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
}
.balance-card .mp-icon { width: 22px; height: 22px; color: #FFE28A; }
.balance-card b { font-size: 21px; line-height: 1; letter-spacing: .5px; }
.balance-card span { font-size: 9.5px; color: rgba(255, 255, 255, .82); margin-left: 2px; }

.up-list { display: flex; flex-direction: column; gap: 10px; }
.up-card {
  display: flex;
  gap: 11px;
  padding: 13px 12px;
  background: #fff;
  border: 1px solid #FFE8D2;
  border-radius: 19px;
  box-shadow: var(--shadow-sm);
}
.up-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #FFF1E4;
  color: var(--c, var(--orange));
}
.up-icon .mp-icon { width: 25px; height: 25px; }
.up-body { flex: 1; min-width: 0; }
.up-title { display: flex; align-items: center; gap: 7px; }
.up-title h3 { margin: 0; font-size: 14px; }
.up-lv {
  font-size: 9px;
  font-weight: 800;
  color: var(--orange-deep);
  background: #FFEEDC;
  border-radius: 999px;
  padding: 2px 7px;
}
.up-body p { margin: 3px 0 5px; font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.up-body p.up-effect {
  margin: 0 0 7px;
  font-size: 9.5px;
  font-weight: 700;
  color: #C07A3B;
  background: #FFF6EA;
  border-radius: 7px;
  padding: 3px 7px;
  display: inline-block;
}
.up-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.up-dots { display: flex; gap: 4px; }
.up-dot {
  width: 15px;
  height: 6px;
  border-radius: 999px;
  background: #F0E2D2;
}
.up-dot.on { background: linear-gradient(90deg, #FFB168, #FF8A3D); }
.up-btn {
  padding: 7px 12px;
  border-radius: 11px;
  background: linear-gradient(160deg, #FFA45B, #FF7A2F);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 0 #D9611D;
  transition: transform .12s, box-shadow .12s, opacity .12s;
  white-space: nowrap;
}
.up-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #D9611D; }
.up-btn:disabled {
  background: #EDE2D5;
  color: #B4A18E;
  box-shadow: none;
  cursor: default;
}
.up-card.maxed { background: #FFFBF4; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #FFE8D2;
  box-shadow: var(--shadow-sm);
}
.stat-card .mp-icon { width: 21px; height: 21px; color: var(--orange); flex: 0 0 21px; }
.stat-card b { display: block; font-size: 17px; line-height: 1.15; }
.stat-card span { font-size: 9.5px; color: var(--muted); }

.nick-card {
  padding: 14px;
  background: #fff;
  border: 1px solid #FFE8D2;
  border-radius: 19px;
  box-shadow: var(--shadow-sm);
}
.nick-row { display: flex; align-items: center; gap: 10px; }
.nick-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #FFE7CB;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(150, 80, 20, .15);
  overflow: hidden;
}
.nick-avatar .animal-svg { width: 40px; height: 44px; margin-top: 8px; }
.nick-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; }
.nick-info { flex: 1; min-width: 0; }
.nick-info b { display: block; font-size: 14px; margin-bottom: 1px; }
.nick-info span { font-size: 10px; color: var(--muted); }
.nick-form { display: flex; gap: 8px; margin-top: 11px; }
.nick-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid #F5E1C9;
  background: #FFFBF5;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  outline: none;
}
.nick-form input:focus { border-color: var(--orange-soft); background: #fff; }
.nick-form button {
  flex: 0 0 auto;
  padding: 0 16px;
  border-radius: 12px;
  background: #FFE9D4;
  color: var(--orange-deep);
  font-size: 12px;
  font-weight: 800;
}
.nick-form button:active { background: #FFDCBE; }
.nick-tip { margin: 8px 0 0; font-size: 9.5px; color: var(--muted); }

.page-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 22px + var(--safe-b));
  transform: translateX(-50%) translateY(10px);
  z-index: 80;
  max-width: 86%;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(67, 40, 23, .93);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.page-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 560px) {
  .page-wrap { padding-top: calc(26px + var(--safe-t)); }
}
