/* MySite · 手机优先 */
:root {
  --brand: #ff5c7a;
  --brand-dark: #e8435f;
  --brand-grad: linear-gradient(135deg, #ff7d92 0%, #ff5c7a 55%, #f43f5e 100%);
  --bg: #f6f4f6;
  --card: #ffffff;
  --text: #22222b;
  --muted: #9aa0ae;
  --line: #f0eef2;
  --radius: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #fff;
  box-shadow: 0 0 40px rgba(244, 63, 94, .07); position: relative; }

/* 顶栏 */
.topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px; position: sticky; top: 0; background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); z-index: 20; }
.brand { font-weight: 800; font-size: 19px; letter-spacing: .3px; }
.cart-btn { font-size: 21px; position: relative; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: #fff1f3; border-radius: 14px; }
.cart-btn i { position: absolute; top: -6px; right: -6px; background: var(--brand);
  color: #fff; font-style: normal; font-size: 11px; min-width: 19px; height: 19px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  padding: 0 5px; font-weight: 700; }

.page { padding: 4px 16px 96px; }

/* 首页 hero */
.hero { background: var(--brand-grad); color: #fff; border-radius: 24px;
  padding: 26px 22px; margin-top: 6px; position: relative; overflow: hidden; }
.hero::after { content: "✦"; position: absolute; right: 18px; top: 14px;
  font-size: 44px; opacity: .25; }
.hero-kicker { font-size: 11px; letter-spacing: 2px; opacity: .85; font-weight: 700; }
.hero h1 { margin: 10px 0 2px; font-size: 27px; letter-spacing: 1px; }
.hero-sub { margin: 0; font-size: 17px; font-weight: 600; }
.hero-desc { margin: 8px 0 0; font-size: 13px; opacity: .9; }
.chips { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chips span { background: rgba(255,255,255,.22); font-size: 12px; padding: 6px 12px;
  border-radius: 999px; font-weight: 600; }

/* 通用 */
.sec { margin-top: 22px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sec-head h2 { margin: 0; font-size: 18px; }
.muted { color: var(--muted); }
.muted.sm, .sm { font-size: 12.5px; }
.page-head h1 { margin: 6px 0 2px; font-size: 24px; }
.page-head p { margin: 0 0 4px; }
.back { color: var(--brand-dark); font-weight: 600; font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: 0 4px 18px rgba(20, 10, 30, .04); }
.card h3 { margin: 0 0 10px; font-size: 15px; }
.card.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.card.empty a { color: var(--brand-dark); font-weight: 700; }
.divide { height: 1px; background: var(--line); margin: 12px 0; }
.warn { color: #b45309; background: #fef3c7; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.ok-line { color: #15803d; font-weight: 600; font-size: 14px; }

/* 推荐卡片 */
.rec-list { display: flex; flex-direction: column; gap: 12px; }
.rec-card { display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: 0 4px 18px rgba(20, 10, 30, .04); }
.rec-icon { width: 56px; height: 56px; border-radius: 16px; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8f7ee, #d3f0ff); flex-shrink: 0; }
.rec-info { flex: 1; min-width: 0; }
.rec-sub { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.rec-name { font-size: 17px; font-weight: 700; margin: 1px 0; }
.rec-price { color: var(--brand-dark); font-weight: 800; font-size: 15px; }
.rec-go { color: var(--muted); font-size: 22px; }

/* 分类 */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 14px; position: relative; box-shadow: 0 4px 18px rgba(20, 10, 30, .04); }
.cat-card:nth-child(odd) .cat-icon { background: #e7f8ef; }
.cat-card:nth-child(even) .cat-icon { background: #fff4e0; }
.cat-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 25px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.cat-name { font-weight: 800; font-size: 16px; }
.cat-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cat-arrow { position: absolute; top: 14px; right: 14px; color: var(--brand); font-weight: 700; }

/* 商品行 */
.prod-row { display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.prod-icon { width: 52px; height: 52px; border-radius: 15px; font-size: 28px;
  display: flex; align-items: center; justify-content: center; background: #f4f6ff; flex-shrink: 0; }
.prod-icon.sm { width: 44px; height: 44px; font-size: 24px; }
.prod-info { flex: 1; min-width: 0; }
.prod-sub { font-size: 11px; color: var(--muted); }
.prod-name { font-weight: 700; font-size: 16px; }
.prod-price { color: var(--brand-dark); font-weight: 800; }

/* 商品详情 */
.p-hero { text-align: center; padding: 10px 0 4px; }
.p-icon { width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 28px; font-size: 52px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ffe3ea, #ffd0da); }
.p-sub { color: var(--muted); font-size: 13px; }
.p-name { margin: 2px 0 6px; font-size: 24px; }
.p-price { color: var(--brand-dark); font-size: 22px; font-weight: 800; }
.p-stock { color: var(--muted); font-size: 13px; margin-top: 4px; }
.desc { margin: 0; color: #4b4b57; white-space: pre-wrap; }
.buy-card .qty-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: #f6f4f6; border-radius: 999px; padding: 4px; }
.stepper button { width: 32px; height: 32px; border: none; border-radius: 50%;
  background: #fff; font-size: 17px; font-weight: 700; cursor: pointer; color: var(--brand-dark); }
.stepper input { width: 44px; text-align: center; border: none; background: transparent;
  font-size: 15px; font-weight: 700; }
.stepper span { min-width: 34px; text-align: center; font-weight: 700; }
.stepper.sm button { width: 28px; height: 28px; font-size: 15px; }
.buy-btns { display: flex; gap: 12px; }
/* 购买卡里连续几组按钮纵向留白（之前组间 0 间距，看着挤） */
.buy-card .buy-btns + .buy-card .buy-btns { margin-top: 14px; }
.buy-card .btn { padding: 15px 18px; }
.buy-card .qty-row { margin-bottom: 16px; }

/* 按钮 */
.btn { border: none; border-radius: 14px; padding: 13px 18px; font-size: 15px;
  font-weight: 700; cursor: pointer; flex: 1; text-align: center; display: inline-block; }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 6px 16px rgba(244, 63, 94, .3); }
.btn-ghost { background: #fff1f3; color: var(--brand-dark); border: 1px solid #ffd9e1; }
.btn.big { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .5; }

/* 表单 */
.fld { display: block; margin-bottom: 12px; }
.fld span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.fld input, .fld select, .fld textarea { width: 100%; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 11px 13px; font-size: 15px; font-family: inherit; background: #fbfafc; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--brand); background: #fff; }
.kv { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; }
.kv span:first-child { color: var(--muted); }
.total-row { display: flex; justify-content: space-between; align-items: center;
  font-size: 16px; margin: 12px 0; }
.total-row strong { color: var(--brand-dark); font-size: 20px; }
.off { color: #15803d; font-weight: 700; }

/* 购物车行 */
.cart-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.cart-row + .cart-row { border-top: 1px solid var(--line); }

/* 订单 */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-row { display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; }
.order-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.order-no { font-weight: 700; font-size: 14px; }
.order-name { font-size: 15px; margin-bottom: 6px; }
.order-meta { display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--muted); }
.order-total { color: var(--brand-dark); font-size: 16px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.b-pending { background: #fef3c7; color: #b45309; }
.b-expired { background: #eef2f0; color: #6b7a6f; }
.b-paid { background: #dcfce7; color: #15803d; }
.b-done { background: #e0f2fe; color: #0369a1; }
.b-cancel { background: #f1f1f4; color: #9aa0ae; }

/* 我的 */
.me-card { background: linear-gradient(135deg, #123, #1f3a4d); color: #fff;
  border-radius: 22px; padding: 22px 18px; display: flex; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 18px; background: #8ea6c1;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #0f2233; flex-shrink: 0; }
.me-name { font-size: 18px; font-weight: 800; }
.me-sub { font-size: 13px; opacity: .75; }
.menu-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin-top: 14px; overflow: hidden; }
.menu-row { display: flex; justify-content: space-between; align-items: center;
  padding: 15px 16px; font-weight: 600; }
.menu-row + .menu-row { border-top: 1px solid var(--line); }
.tg-card { margin-top: 14px; }
button.menu-row { background: transparent; border: none; font: inherit; color: inherit;
  width: 100%; text-align: left; cursor: pointer; }

/* 直购支付弹窗（停留商品页，不跳订单页） */
#pay-modal { position: fixed; inset: 0; z-index: 100; }
.pay-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.pay-modal-card { position: absolute; left: 12px; right: 12px; bottom: 12px; max-height: 85vh;
  overflow-y: auto; background: var(--card); border-radius: 20px; padding: 18px; }
.pay-modal-card h3 { margin: 0 0 12px; }

/* 底部导航 */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: flex; background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom)); z-index: 30; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center;
  font-size: 11px; color: var(--muted); gap: 2px; padding: 4px 0; border-radius: 12px; }
.tabbar a span { font-size: 20px; }
.tabbar a.on { color: var(--brand-dark); font-weight: 700; background: #fff1f3; }

/* toast */
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(20, 20, 28, .92); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 99;
  max-width: 86%; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 桌面端 */
@media (min-width: 520px) {
  body { background: linear-gradient(160deg, #ffeef2, #f6f4f6 60%); padding: 26px 0; }
  .app { border-radius: 30px; overflow: hidden; min-height: calc(100vh - 52px); }
  .tabbar { border-radius: 0 0 30px 30px; }
}

.stars-amount { color: #e8a100; font-size: 1.15em; }
.b-review { background: #ede9fe; color: #7c3aed; }

.pay-tabs { display: flex; gap: 8px; margin: 10px 0 14px; }
.pay-tab { flex: 1; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 15px; cursor: pointer; }
.pay-tab.on { border-color: var(--brand); background: #fff0f4; font-weight: 700; }
.pay-pane.hidden { display: none; }
.usdt-box { text-align: center; }
.usdt-qr { width: 180px; height: 180px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 10px; }
.usdt-amount { color: #0a9d58; font-size: 1.15em; }
.addr-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.addr { flex: 1; font-size: 11px; word-break: break-all; background: #f6f7f9; border-radius: 8px; padding: 8px; text-align: left; }
.countdown { margin: 10px 0; padding: 8px; border-radius: 10px; background: #fef3c7; color: #b45309; font-weight: 600; }
.ok-line { color: #15803d; font-weight: 600; margin: 8px 0; }
