/* ============ 识卡路里 · 主页高保真原型（iOS 风格） ============ */
:root{
  --accent:#22c55e; --accent-2:#10b981; --accent-dark:#16a34a;
  --danger:#ef4444; --warning:#f59e0b;
  --bg:#f2f2f7; --card:#ffffff;
  --text:#111827; --text-2:#6b7280; --text-3:#9ca3af;
  --line:#f3f4f6;
  --radius:18px;
  --safe-b:26px;
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue","Microsoft YaHei",sans-serif;
  background:radial-gradient(1200px 800px at 50% -10%,#dbeafe,transparent),linear-gradient(160deg,#eef2ff,#f8fafc);
  min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px 12px;
  color:var(--text);
}
button{font-family:inherit;border:none;background:none;cursor:pointer;color:inherit}

/* ---------- 手机画框 ---------- */
.phone{
  width:393px;height:852px;background:var(--bg);border-radius:54px;overflow:hidden;
  box-shadow:0 30px 80px rgba(30,41,59,.35),0 0 0 10px #1f2937,0 0 0 12px #111827;
  position:relative;flex:none;
}
.statusbar{
  height:56px;display:flex;align-items:center;justify-content:space-between;
  padding:0 30px;position:relative;z-index:5;background:var(--bg);
}
.sb-time{font-size:15px;font-weight:600;width:64px}
.sb-island{position:absolute;left:50%;transform:translateX(-50%);width:120px;height:34px;background:#000;border-radius:20px;top:10px}
.sb-icons{font-size:12px;letter-spacing:1px}

/* ---------- 页面 ---------- */
.screen{position:absolute;top:56px;left:0;right:0;bottom:82px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
.screen::-webkit-scrollbar{display:none}
.page{display:none;padding:10px 16px 26px;min-height:100%}
.page.active{display:block;animation:fadeIn .22s ease}
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---------- 顶栏 ---------- */
.topbar{display:flex;align-items:center;justify-content:space-between;padding:8px 2px 14px}
.brand{display:flex;align-items:center;gap:8px}
.brand-logo{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,var(--accent),var(--accent-2));display:flex;align-items:center;justify-content:center;font-size:20px;box-shadow:0 6px 14px rgba(34,197,94,.35)}
.brand-name{font-size:19px;font-weight:800;letter-spacing:.5px}
.top-actions{display:flex;gap:8px}
.pill{display:flex;align-items:center;gap:4px;background:#fff;border-radius:999px;padding:7px 12px;font-size:13px;font-weight:700;box-shadow:0 2px 8px rgba(15,23,42,.06);border:1px solid #f1f5f9}
.pill-coin .pill-ico{color:#f59e0b}
.pill-free .pill-ico{color:var(--accent)}

/* ---------- 通用卡片 ---------- */
.card{background:var(--card);border-radius:var(--radius);padding:16px;margin-bottom:14px;box-shadow:0 2px 10px rgba(15,23,42,.05);border:1px solid rgba(255,255,255,.6)}

/* ---------- 大尺寸拍照识别框 ---------- */
.scan-card{
  position:relative;border-radius:28px;overflow:hidden;margin-bottom:16px;padding:34px 20px 26px;text-align:center;
  background:linear-gradient(150deg,#065f46,#059669 55%,#10b981);
  box-shadow:0 18px 36px rgba(5,150,105,.35);cursor:pointer;color:#fff;
}
.scan-card:active{transform:scale(.985)}
.scan-glow{position:absolute;width:280px;height:280px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.22),transparent 65%);top:-120px;left:50%;transform:translateX(-50%)}
.scan-camera{
  width:92px;height:92px;margin:0 auto 14px;border-radius:50%;font-size:40px;display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.22);border:2px solid rgba(255,255,255,.5);backdrop-filter:blur(4px);
  animation:breathe 2.4s ease-in-out infinite;
}
@keyframes breathe{0%,100%{box-shadow:0 0 0 0 rgba(255,255,255,.35)}50%{box-shadow:0 0 0 14px rgba(255,255,255,0)}}
.scan-title{font-size:24px;font-weight:800;letter-spacing:1px}
.scan-sub{font-size:13px;opacity:.9;margin-top:6px}
.scan-tags{display:flex;justify-content:center;gap:8px;margin-top:18px;flex-wrap:wrap}
.tag{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.35);padding:5px 12px;border-radius:999px;font-size:12.5px}
.scan-hint{font-size:11.5px;opacity:.75;margin-top:16px}

/* ---------- 个人信息卡 ---------- */
.profile-card{display:flex;align-items:center;gap:13px;cursor:pointer}
.profile-card:active{background:#fafafa}
.avatar{width:54px;height:54px;border-radius:50%;flex:none;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-size:24px;font-weight:700;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 14px rgba(99,102,241,.3)}
.profile-main{flex:1;min-width:0}
.profile-name{font-size:17px;font-weight:700}
.profile-meta{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.chip{background:#f3f4f6;color:#4b5563;font-size:12px;padding:3px 9px;border-radius:999px}
.chevron{color:#cbd5e1;font-size:26px;font-weight:300}

/* ---------- 今日热量卡 ---------- */
.today-head{display:flex;align-items:center;justify-content:space-between}
.today-title{font-size:16px;font-weight:700}
.today-badge{font-size:12px;font-weight:700;padding:4px 12px;border-radius:999px}
.badge-ok{background:#dcfce7;color:#15803d}
.badge-over{background:#fee2e2;color:#b91c1c}
.today-nums{display:flex;align-items:flex-end;justify-content:center;gap:10px;margin:16px 0 4px}
.num-block{text-align:center;min-width:96px}
.num-value{font-size:34px;font-weight:800;line-height:1;letter-spacing:-.5px}
.num-value.dim{color:var(--text-2)}
.num-label{font-size:11.5px;color:var(--text-3);margin-top:6px}
.num-sep{font-size:26px;color:#d1d5db;padding-bottom:2px}
.bar{height:12px;border-radius:999px;background:#eef2f7;overflow:hidden;margin:14px 0 12px}
.bar-fill{height:100%;width:0%;border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-2));transition:width .6s cubic-bezier(.2,.8,.2,1)}
.bar-fill.over{background:linear-gradient(90deg,#f97316,var(--danger))}
.today-status{font-size:14px;font-weight:700;text-align:center;padding:9px;border-radius:12px}
.today-status.ok{color:#15803d;background:#f0fdf4}
.today-status.over{color:#b91c1c;background:#fef2f2}

/* ---------- 历史记录 ---------- */
.history-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.history-title{font-size:16px;font-weight:700}
.link-btn{color:var(--accent-dark);font-size:13px;font-weight:600}
.history-item{display:flex;align-items:center;gap:10px;padding:11px 2px;border-bottom:1px solid var(--line)}
.history-item:last-child{border-bottom:none}
.hi-date{font-size:14px;font-weight:600;width:86px;flex:none}
.hi-nums{flex:1;font-size:12.5px;color:var(--text-2)}
.hi-nums b{color:var(--text);font-size:14px}
.hi-status{font-size:11.5px;font-weight:700;padding:3px 10px;border-radius:999px}
.hi-status.ok{background:#dcfce7;color:#15803d}
.hi-status.over{background:#fee2e2;color:#b91c1c}
.hi-arrow{color:#cbd5e1;font-size:18px}

/* ---------- 免责声明 ---------- */
.disclaimer{font-size:11px;color:#94a3b8;text-align:center;padding:6px 8px 10px;line-height:1.6}
.disclaimer.small{margin-top:14px}

/* ---------- 子页顶栏 ---------- */
.subbar{display:flex;align-items:center;justify-content:space-between;padding:8px 2px 12px}
.back-btn{font-size:16px;color:var(--accent-dark);font-weight:600;width:64px;text-align:left}
.subbar-title{font-size:17px;font-weight:700}
.subbar-spacer{width:64px}

/* ---------- 表单 ---------- */
.form-wrap{padding-top:4px}
.field{margin-bottom:16px}
.field label{display:block;font-size:13px;color:var(--text-2);margin-bottom:8px;font-weight:600}
.field input{
  width:100%;border:1px solid #e5e7eb;background:#f9fafb;border-radius:12px;padding:12px 14px;
  font-size:16px;outline:none;transition:.2s;
}
.field input:focus{border-color:var(--accent);background:#fff;box-shadow:0 0 0 3px rgba(34,197,94,.15)}
.seg{display:flex;gap:8px;flex-wrap:wrap}
.seg-3 .seg-btn{flex:1;min-width:70px}
.seg-btn{border:1px solid #e5e7eb;background:#f9fafb;border-radius:12px;padding:10px 6px;font-size:14px;font-weight:600;color:var(--text-2);transition:.15s}
.seg-btn.active{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:0 4px 10px rgba(34,197,94,.3)}
.calc-preview{background:#f0fdf4;border:1px dashed #86efac;color:#15803d;border-radius:12px;padding:12px;font-size:12.5px;text-align:center;margin-bottom:18px;line-height:1.7}
.primary-btn{
  width:100%;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;border-radius:14px;
  padding:15px;font-size:16px;font-weight:700;box-shadow:0 10px 20px rgba(34,197,94,.3);margin-top:4px;
}
.primary-btn:active{transform:scale(.98)}

/* ---------- 充值页 ---------- */
.wallet-card{background:linear-gradient(135deg,#f59e0b,#f97316);border-radius:20px;padding:22px;text-align:center;color:#fff;margin-bottom:18px;box-shadow:0 14px 28px rgba(245,158,11,.3)}
.wallet-ico{font-size:30px}
.wallet-balance{font-size:34px;font-weight:800;margin:8px 0 4px}
.wallet-balance span{font-size:44px}
.wallet-note{font-size:11.5px;opacity:.95}
.pkg-list{display:flex;gap:12px}
.pkg{flex:1;background:#fff;border-radius:18px;padding:18px 8px;text-align:center;border:2px solid transparent;position:relative;cursor:pointer;box-shadow:0 2px 10px rgba(15,23,42,.05)}
.pkg.hot{border-color:var(--accent);box-shadow:0 8px 20px rgba(34,197,94,.18)}
.pkg-flag{position:absolute;top:-11px;left:50%;transform:translateX(-50%);background:var(--accent);color:#fff;font-size:10.5px;font-weight:700;padding:3px 12px;border-radius:999px;white-space:nowrap}
.pkg-name{font-size:14px;font-weight:700}
.pkg-coin{font-size:13px;color:var(--text-2);margin:8px 0}
.pkg-price{font-size:22px;font-weight:800;color:var(--text)}
.pkg.hot .pkg-price{color:var(--accent-dark)}
.pay-sim{font-size:12px;color:var(--text-3);text-align:center;margin-top:18px}

/* ---------- 底部 Tab ---------- */
.tabbar{
  position:absolute;left:0;right:0;bottom:0;height:82px;background:rgba(255,255,255,.92);backdrop-filter:blur(14px);
  display:flex;align-items:flex-start;justify-content:space-around;padding:10px 20px 0;border-top:1px solid #f1f5f9;
}
.tab{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11px;color:#9ca3af;font-weight:600;padding-top:6px}
.tab-ico{font-size:22px;filter:grayscale(.8);opacity:.85}
.tab.active{color:var(--accent-dark)}
.tab.active .tab-ico{filter:none;opacity:1}

/* ---------- 弹层 ---------- */
.overlay{position:absolute;inset:0;background:rgba(15,23,42,.45);backdrop-filter:blur(3px);display:none;align-items:flex-end;justify-content:center;z-index:20}
.overlay.show{display:flex;animation:ovIn .18s ease}
@keyframes ovIn{from{opacity:0}to{opacity:1}}
.sheet{width:100%;background:#fff;border-radius:24px 24px 0 0;padding:14px 16px calc(var(--safe-b) + 10px);animation:sheetUp .25s cubic-bezier(.2,.8,.2,1)}
@keyframes sheetUp{from{transform:translateY(60px);opacity:.4}to{transform:none;opacity:1}}
.sheet-title{text-align:center;font-size:15px;font-weight:600;color:var(--text-2);padding:6px 0 12px}
.sheet-btn{width:100%;padding:15px;font-size:17px;font-weight:600;border-radius:14px;margin-bottom:10px;background:#f3f4f6;text-align:center}
.sheet-btn:active{background:#e5e7eb}
.sheet-btn.cancel{background:#fff;color:var(--text-2);font-weight:500}

/* 识别 loading */
#loadingOverlay{align-items:center}
.loading-box{text-align:center;color:#fff}
.scanning-ring{width:110px;height:110px;margin:0 auto 22px;border-radius:50%;border:4px solid rgba(255,255,255,.3);border-top-color:#fff;animation:spin 1s linear infinite;display:flex;align-items:center;justify-content:center}
.scanning-lens{font-size:40px;animation:spin 1s linear infinite reverse}
@keyframes spin{to{transform:rotate(360deg)}}
.loading-text{font-size:19px;font-weight:700}
.loading-sub{font-size:13px;opacity:.85;margin-top:8px}

/* 识别结果次级按钮：不计入今日摄入 */
.skip-btn{
  width:100%;margin-top:10px;padding:14px;font-size:15px;font-weight:600;color:#6b7280;
  background:#fff;border:1.5px solid #e5e7eb;border-radius:14px;text-align:center;transition:.15s;
}
.skip-btn:active{background:#f9fafb;border-color:#d1d5db}

/* 识别结果 */
.result-sheet{text-align:center}
.result-img{width:120px;height:120px;border-radius:24px;background:#f0fdf4;font-size:56px;display:flex;align-items:center;justify-content:center;margin:0 auto 12px}
.result-food{font-size:20px;font-weight:800}
.result-cat{font-size:13px;color:var(--text-2);margin-top:4px}
.result-kcal{font-size:44px;font-weight:800;color:var(--accent-dark);margin:10px 0 2px}
.result-kcal small{font-size:16px;font-weight:600}
.result-cost{font-size:12.5px;color:var(--text-2);background:#f3f4f6;border-radius:10px;padding:8px;margin:10px 0 14px}
.detail-list{max-height:260px;overflow-y:auto;text-align:left;margin-bottom:8px}
.detail-item{display:flex;align-items:center;gap:10px;padding:10px 2px;border-bottom:1px solid var(--line)}
.detail-emoji{font-size:24px}
.detail-name{flex:1;font-size:14px;font-weight:600}
.detail-time{font-size:11px;color:var(--text-3)}
.detail-kcal{font-size:14px;font-weight:700;color:var(--accent-dark)}

/* toast */
.toast{position:absolute;top:70px;left:50%;transform:translateX(-50%) translateY(-20px);background:rgba(17,24,39,.92);color:#fff;font-size:13px;padding:10px 18px;border-radius:999px;opacity:0;transition:.3s;z-index:40;pointer-events:none;white-space:nowrap}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* 演示角标 */
.demo-flag{position:absolute;bottom:-2px;right:14px;font-size:10px;color:#94a3b8;letter-spacing:1px}



/* ============ AI 饮食助手页 ============ */
.ai-head{display:flex;align-items:center;gap:10px;padding:6px 2px 12px}
.ai-avatar{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#8b5cf6,#6366f1);display:flex;align-items:center;justify-content:center;font-size:20px;box-shadow:0 6px 14px rgba(99,102,241,.3)}
.ai-title{font-size:18px;font-weight:800;flex:1}
.ai-online{font-size:11px;color:#16a34a;background:#dcfce7;padding:3px 10px;border-radius:999px;font-weight:700}
.chat-body{display:flex;flex-direction:column;gap:10px;padding-bottom:6px}
.chat-msg{display:flex}
.chat-msg.user{justify-content:flex-end}
.chat-msg .bubble{max-width:82%;padding:11px 14px;font-size:14.5px;line-height:1.65;border-radius:16px;white-space:pre-wrap;word-break:break-word}
.chat-msg.assistant .bubble{background:#fff;border:1px solid #eef2f7;border-top-left-radius:4px;box-shadow:0 2px 8px rgba(15,23,42,.05)}
.chat-msg.user .bubble{background:linear-gradient(135deg,#22c55e,#10b981);color:#fff;border-bottom-right-radius:4px}
.chat-msg.typing .bubble{color:#9ca3af;font-style:italic}
.ai-tag{display:inline-block;margin-top:8px;font-size:10.5px;color:#a78bfa;background:#f5f3ff;border-radius:6px;padding:2px 7px;font-style:normal}
.chat-quick{display:flex;gap:8px;overflow-x:auto;padding:8px 0 10px;scrollbar-width:none}
.chat-quick::-webkit-scrollbar{display:none}
.q-chip{flex:none;font-size:12.5px;color:#6d28d9;background:#ede9fe;border:1px solid #ddd6fe;padding:7px 13px;border-radius:999px;font-weight:600;white-space:nowrap}
.q-chip:active{background:#ddd6fe}
.chat-inputbar{display:flex;gap:8px;align-items:center;background:#fff;border:1px solid #e5e7eb;border-radius:999px;padding:6px 6px 6px 16px;margin-top:2px}
.chat-inputbar input{flex:1;border:none;outline:none;font-size:15px;background:transparent}
.chat-send{flex:none;background:linear-gradient(135deg,#8b5cf6,#6366f1);color:#fff;border-radius:999px;padding:10px 20px;font-size:14px;font-weight:700;box-shadow:0 6px 14px rgba(99,102,241,.3)}
.chat-send:active{transform:scale(.96)}

/* ============ 记录页 ============ */
.seg-full{display:flex;gap:8px;background:#eef2f7;border-radius:14px;padding:5px;margin-bottom:12px}
.seg-full .seg-btn{flex:1;border:none;background:transparent;border-radius:10px;padding:9px 0;font-size:14px}
.seg-full .seg-btn.active{background:#fff;color:var(--accent-dark);box-shadow:0 2px 8px rgba(15,23,42,.1)}
.records-body{padding-bottom:8px}
.empty{text-align:center;color:#9ca3af;font-size:13px;padding:36px 0}
.food-list{display:flex;flex-direction:column;gap:10px}
.food-item{display:flex;align-items:center;gap:12px;background:#fff;border-radius:16px;padding:12px 14px;box-shadow:0 2px 8px rgba(15,23,42,.05)}
.food-emoji{width:46px;height:46px;border-radius:14px;background:#f0fdf4;display:flex;align-items:center;justify-content:center;font-size:24px;flex:none}
.food-info{flex:1;min-width:0}
.food-name{font-size:14.5px;font-weight:700}
.food-time{font-size:11.5px;color:var(--text-3);margin-top:3px}
.food-kcal{font-size:15px;font-weight:800;color:var(--accent-dark);flex:none}
.food-flag{font-size:10.5px;color:var(--text-3);text-align:right;margin-top:2px}

/* ============ 我的页 ============ */
.mine-head{display:flex;align-items:center;gap:14px;background:linear-gradient(135deg,#1e293b,#334155);border-radius:20px;padding:20px;margin-bottom:12px;color:#fff;box-shadow:0 12px 24px rgba(15,23,42,.25)}
.mine-avatar{width:62px;height:62px;border-radius:50%;background:linear-gradient(135deg,#22c55e,#0ea5e9);display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:800;flex:none;border:2px solid rgba(255,255,255,.4)}
.mine-info{flex:1;min-width:0}
.mine-name{font-size:19px;font-weight:800}
.mine-phone{font-size:12.5px;color:#cbd5e1;margin-top:5px}
.mine-edit{color:#fbbf24;font-size:13px;font-weight:700}
.mine-assets{display:flex;align-items:center;background:#fff;border-radius:18px;padding:16px 10px;margin-bottom:14px;box-shadow:0 2px 10px rgba(15,23,42,.05)}
.asset{flex:1;text-align:center}
.asset-ico{font-size:22px}
.asset-num{font-size:22px;font-weight:800;margin-top:4px}
.asset-label{font-size:11.5px;color:var(--text-3);margin-top:4px}
.asset-divider{width:1px;height:42px;background:#f1f5f9}
.menu{padding:6px 16px}
.menu-item{display:flex;align-items:center;gap:10px;width:100%;padding:15px 0;font-size:15px;font-weight:600;border-bottom:1px solid var(--line);text-align:left}
.menu-item:last-child{border-bottom:none}
.mi-ico{font-size:19px}
.mi-arrow{margin-left:auto;color:#cbd5e1;font-size:20px;font-weight:300}
.logout-btn{width:100%;margin-top:16px;padding:14px;font-size:15px;font-weight:700;color:#dc2626;background:#fff;border:1px solid #fecaca;border-radius:14px;text-align:center}
.logout-btn:active{background:#fef2f2}

/* ============ 账号设置 / 充值记录弹层 ============ */
.account-row{display:flex;align-items:center;justify-content:space-between;padding:13px 4px;font-size:14.5px;border-bottom:1px solid var(--line)}
.account-row b{font-weight:700}
.acc-bound{color:#16a34a}
#rechargeEmpty{display:none}


/* ============ 广场（社区） ============ */
.square-post-btn{color:#fff;font-size:13px;font-weight:700;background:linear-gradient(135deg,#f59e0b,#f97316);border-radius:999px;padding:8px 16px;box-shadow:0 6px 14px rgba(245,158,11,.3)}
.feed{display:flex;flex-direction:column;gap:12px;padding-bottom:10px}
.post-card{background:#fff;border-radius:18px;padding:15px 16px;box-shadow:0 2px 10px rgba(15,23,42,.05)}
.post-head{display:flex;align-items:center;gap:10px;margin-bottom:9px}
.post-avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#22c55e,#0ea5e9);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:17px;flex:none}
.post-author{font-size:14px;font-weight:700}
.post-time{font-size:11px;color:var(--text-3);margin-top:2px}
.post-badge{margin-left:auto;font-size:10.5px;font-weight:700;padding:3px 10px;border-radius:999px;flex:none}
.post-badge.life{background:#dcfce7;color:#15803d}
.post-badge.recipe{background:#ffedd5;color:#c2410c}
.post-badge.danger{background:#fee2e2;color:#b91c1c}
.post-body{font-size:14.5px;line-height:1.7;white-space:pre-wrap;word-break:break-word}
.post-emoji-big{font-size:40px;line-height:1.4}
.post-foot{display:flex;gap:26px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.post-act{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-2);font-weight:600}
.post-act.liked{color:#ef4444}
.post-act.liked .pa-heart{color:#ef4444}

/* 发布弹层 */
.post-tip{font-size:12.5px;color:#a78bfa;background:#f5f3ff;border-radius:10px;padding:8px 12px;margin-bottom:12px;text-align:left}
#postText{width:100%;border:1px solid #e5e7eb;background:#f9fafb;border-radius:14px;padding:12px 14px;font-size:15px;font-family:inherit;line-height:1.6;resize:none;outline:none}
#postText:focus{border-color:var(--accent);background:#fff}
.post-emojis{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 16px}
.pe{font-size:20px;background:#f3f4f6;border-radius:10px;padding:6px 9px}
.pe:active{background:#e5e7eb}


/* ============ 返回/关闭增强 ============ */
.icon-btn{width:34px;height:34px;border-radius:50%;background:#fff;border:1px solid #f1f5f9;display:flex;align-items:center;justify-content:center;font-size:16px;box-shadow:0 2px 8px rgba(15,23,42,.06);flex:none}
.icon-btn:active{transform:scale(.93);background:#f8fafc}
.sheet{position:relative}
.sheet-x{position:absolute;top:10px;right:14px;width:32px;height:32px;border-radius:50%;background:#f3f4f6;color:#6b7280;font-size:14px;display:flex;align-items:center;justify-content:center;z-index:2}
.sheet-x:active{background:#e5e7eb}


/* ============ 发布照片九宫格（微信风格） ============ */
.post-imgs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:10px 0 2px}
.post-img-cell{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;background:#f3f4f6}
.post-img-cell img{width:100%;height:100%;object-fit:cover;display:block}
.post-img-del{position:absolute;top:4px;right:4px;width:20px;height:20px;border-radius:50%;background:rgba(0,0,0,.62);color:#fff;font-size:12px;line-height:20px;text-align:center;z-index:2}
.post-img-add{aspect-ratio:1;border:1.5px dashed #d1d5db;border-radius:10px;background:#fafafa;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#9ca3af;gap:2px}
.post-img-add b{font-size:26px;font-weight:300;line-height:1}
.post-img-add span{font-size:10.5px}
.post-img-add:active{background:#f3f4f6}
.post-img-count{font-size:11px;color:#9ca3af;text-align:right;margin:2px 0 0}

/* feed 帖子内九宫格 */
.feed .post-imgs{margin-top:10px}
.feed .post-img-cell img{cursor:zoom-in}

/* 大图预览 */
.lightbox-overlay{align-items:center;justify-content:center;background:rgba(0,0,0,.88);z-index:30}
.lightbox-overlay img{max-width:90%;max-height:78%;border-radius:10px;object-fit:contain}
.lb-close{position:absolute;top:18px;right:18px;width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;font-size:15px;z-index:2}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;font-size:24px;line-height:38px;z-index:2}
.lb-prev{left:12px}
.lb-next{right:12px}
.lb-nav:disabled{opacity:.25}
.lb-count{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);color:#fff;font-size:13px;background:rgba(0,0,0,.45);padding:4px 14px;border-radius:999px}


/* ============ 有用/没用 + 送礼物 ============ */
.post-foot{justify-content:space-around;gap:4px}
.post-act{font-size:12.5px}
.post-act.up{color:#16a34a}
.post-act.down{color:#64748b}
.post-act.down.voted{color:#ef4444}
.post-act.up.voted{background:#f0fdf4;border-radius:999px;padding:3px 10px;margin:-3px 0}
.post-act.down.voted{background:#fef2f2;border-radius:999px;padding:3px 10px;margin:-3px 0}
.post-act.gift{color:#d97706}
.post-gifts{display:flex;align-items:center;gap:6px;margin-top:8px;padding:6px 10px;background:#fffbeb;border-radius:10px;font-size:12px;color:#92400e;width:fit-content}
.gift-balance{font-size:13px;color:var(--text-2);background:#fffbeb;border-radius:10px;padding:8px 12px;margin-bottom:12px;text-align:center}
.gift-balance b{color:#d97706;font-size:16px}
.gift-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:10px}
.gift-item{border:1px solid #f1f5f9;background:#fafafa;border-radius:14px;padding:12px 4px;text-align:center}
.gift-item:active{background:#f3f4f6;border-color:#e5e7eb}
.gift-item .ge{font-size:30px;line-height:1.2}
.gift-item .gn{font-size:12px;font-weight:700;margin-top:4px}
.gift-item .gp{font-size:11.5px;color:#d97706;font-weight:700;margin-top:2px}


/* ============ 热门动态 ============ */
.hot-rank{flex:none;font-size:11px;font-weight:800;color:#fff;background:linear-gradient(135deg,#f97316,#ef4444);border-radius:8px;padding:3px 8px;margin-left:6px}
.post-head .hot-rank{margin-left:0}
.hot-rank.top1{background:linear-gradient(135deg,#f59e0b,#ef4444);box-shadow:0 3px 8px rgba(239,68,68,.35)}


/* ============ 评论功能 ============ */
.comment-sheet{height:72%;display:flex;flex-direction:column;padding-bottom:12px}
.comment-list{flex:1;overflow-y:auto;text-align:left;padding:4px 2px}
.comment-item{display:flex;gap:10px;padding:11px 2px;border-bottom:1px solid var(--line)}
.c-avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#22c55e,#0ea5e9);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;flex:none}
.c-main{flex:1;min-width:0}
.c-head{display:flex;align-items:baseline;gap:8px;margin-bottom:4px}
.c-author{font-size:13px;font-weight:700}
.c-time{font-size:11px;color:var(--text-3)}
.c-text{font-size:14px;line-height:1.6;word-break:break-word}
.c-text.me{color:var(--text)}
.comment-empty{text-align:center;color:#9ca3af;font-size:13px;padding:36px 0}
.comment-inputbar{display:flex;gap:8px;align-items:center;border-top:1px solid var(--line);padding-top:10px;margin-top:6px}
.comment-inputbar input{flex:1;border:1px solid #e5e7eb;background:#f9fafb;border-radius:999px;padding:10px 16px;font-size:14px;outline:none}
.comment-inputbar input:focus{border-color:var(--accent);background:#fff}
.comment-send{flex:none;background:linear-gradient(135deg,#22c55e,#10b981);color:#fff;border-radius:999px;padding:10px 18px;font-size:14px;font-weight:700}
.comment-send:active{transform:scale(.95)}


/* ============ 热门动态独立页 + 5 Tab 适配 ============ */
.hot-intro{font-size:12px;color:#b45309;background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:7px 12px;margin-bottom:12px;text-align:center}
.tab{font-size:10px}
.tab-ico{font-size:20px}
.tabbar{padding-left:6px;padding-right:6px}


/* ============ AI 每小时自动发布 ============ */
.ai-post-hint{font-size:12px;color:#6d28d9;background:#f5f3ff;border:1px solid #e9d5ff;border-radius:10px;padding:8px 12px;margin-bottom:12px;text-align:center}
.post-avatar.ai{background:linear-gradient(135deg,#8b5cf6,#6366f1)}
.ai-chip{display:inline-block;font-size:10px;font-weight:700;color:#6d28d9;background:#ede9fe;border-radius:6px;padding:1px 6px;vertical-align:1px;margin-left:4px}


/* 发布弹层内容超高时可滚动，避免按钮被顶出屏幕 */
#postOverlay .sheet{max-height:90%;overflow-y:auto}


/* 发布弹层内容超高时可滚动，避免按钮被顶出屏幕 */
#postOverlay .sheet{max-height:90%;overflow-y:auto}


/* 发布弹层内容超高时可滚动，避免按钮被顶出屏幕 */
#postOverlay .sheet{max-height:90%;overflow-y:auto}


/* ============ 头像功能 ============ */
.avatar img,.mine-avatar img,.post-avatar img,.c-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.avatar-lg{width:72px;height:72px;font-size:30px}
.avatar-field{display:flex;align-items:center;gap:14px;background:#fff;border-radius:18px;padding:16px;margin-bottom:14px;box-shadow:0 2px 10px rgba(15,23,42,.05);cursor:pointer}
.af-main{flex:1}
.af-title{font-size:15px;font-weight:700}
.af-sub{font-size:12px;color:var(--text-3);margin-top:3px}
.avatar-current{text-align:center;margin-bottom:12px}
.avatar-current .avatar{width:84px;height:84px;font-size:38px;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(135deg,#22c55e,#0ea5e9);color:#fff;overflow:hidden}
.avatar-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-bottom:14px}
.avatar-opt{aspect-ratio:1;border-radius:50%;font-size:26px;display:flex;align-items:center;justify-content:center;background:#f3f4f6;border:2px solid transparent;padding:0}
.avatar-opt:active{background:#e5e7eb}
.avatar-opt.sel{border-color:var(--accent);background:#f0fdf4}
.avatar-upload{width:100%;padding:13px;font-size:14px;font-weight:700;color:var(--accent-dark);background:#f0fdf4;border:1.5px dashed #86efac;border-radius:14px;margin-bottom:12px}
.avatar-upload:active{background:#dcfce7}

/* ============ 我的动态管理 ============ */
.my-dyn-tip{font-size:12px;color:#0369a1;background:#e0f2fe;border-radius:10px;padding:8px 12px;margin-bottom:12px}
.my-dyn-item{background:#fff;border-radius:16px;padding:13px 14px;margin-bottom:10px;box-shadow:0 2px 8px rgba(15,23,42,.05)}
.myd-head{display:flex;align-items:center;gap:8px;margin-bottom:7px}
.myd-text{font-size:14px;line-height:1.6;color:var(--text);white-space:pre-wrap;word-break:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.myd-meta{font-size:11.5px;color:var(--text-3);margin-top:7px}
.myd-actions{display:flex;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.myd-act{flex:1;padding:9px 0;font-size:13px;font-weight:700;border-radius:10px;text-align:center}
.myd-edit{color:#2563eb;background:#eff6ff}
.myd-del{color:#dc2626;background:#fef2f2}


/* ============ 作者动态管理（⋯） ============ */
.post-more{flex:none;width:26px;height:26px;border-radius:50%;color:#9ca3af;font-size:15px;line-height:26px;text-align:center}
.post-more:active{background:#f3f4f6;color:#4b5563}
.sheet-btn.danger{background:#fef2f2;color:#dc2626}
.sheet-btn.danger:active{background:#fee2e2}


/* ============ 细节完善 ============ */
.c-del{flex:none;width:22px;height:22px;border-radius:50%;background:#f3f4f6;color:#9ca3af;font-size:11px;line-height:22px;text-align:center;margin-left:6px;align-self:flex-start}
.c-del:active{background:#fee2e2;color:#dc2626}


/* ============ 会员卡（无限识别） ============ */
.section-title{font-size:15px;font-weight:800;margin:4px 0 10px;display:flex;align-items:center;gap:6px}
.vip-banner{display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#7c3aed,#6d28d9);border-radius:18px;padding:15px 16px;margin-bottom:12px;color:#fff;box-shadow:0 10px 22px rgba(124,58,237,.28)}
.vip-ico{font-size:30px}
.vip-main{flex:1}
.vip-txt{font-size:16px;font-weight:800}
.vip-sub{font-size:11.5px;opacity:.9;margin-top:4px;line-height:1.5}
.vip-list{display:flex;gap:10px;margin-bottom:6px}
.vip-pkg{flex:1;background:#fff;border-radius:18px;padding:16px 6px 14px;text-align:center;border:2px solid #f3f4f6;position:relative;cursor:pointer}
.vip-pkg:active{border-color:#c4b5fd;background:#faf5ff}
.vip-pkg.hot{border-color:#8b5cf6;box-shadow:0 8px 18px rgba(139,92,246,.16)}
.vp-flag{position:absolute;top:-10px;left:50%;transform:translateX(-50%);background:linear-gradient(135deg,#8b5cf6,#7c3aed);color:#fff;font-size:10px;font-weight:700;padding:3px 10px;border-radius:999px;white-space:nowrap}
.vp-name{font-size:14px;font-weight:700}
.vp-price{font-size:21px;font-weight:800;margin:7px 0 3px}
.vip-pkg.hot .vp-price{color:#7c3aed}
.vp-sub{font-size:10.5px;color:var(--text-3)}
.vip-row{display:flex;align-items:center;gap:10px;width:100%;background:linear-gradient(135deg,#f5f3ff,#ede9fe);border:1px solid #ddd6fe;border-radius:16px;padding:12px 16px;margin-bottom:12px;text-align:left}
.vip-row:active{background:#e9d5ff}
.vr-ico{font-size:20px}
.vr-txt{flex:1;font-size:14px;font-weight:700;color:#6d28d9}


/* ============ 登录 / 注册 ============ */
.auth-screen{position:absolute;inset:0;z-index:45;display:none;align-items:center;justify-content:center;padding:24px;background:linear-gradient(165deg,#022c22 0%,#064e3b 55%,#047857 100%);overflow:hidden}
.auth-screen.show{display:flex}
.auth-deco{position:absolute;width:360px;height:360px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.14),transparent 68%);top:-130px;right:-110px}
.auth-deco::after{content:'';position:absolute;width:240px;height:240px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.1),transparent 70%);bottom:-230px;left:-60px}
.auth-box{position:relative;width:100%;background:#fff;border-radius:26px;padding:30px 24px 22px;text-align:center;box-shadow:0 24px 60px rgba(0,0,0,.35);animation:sheetUp .3s cubic-bezier(.2,.8,.2,1)}
.auth-logo{width:74px;height:74px;margin:0 auto 10px;border-radius:22px;background:linear-gradient(135deg,#22c55e,#0ea5e9);display:flex;align-items:center;justify-content:center;font-size:40px;box-shadow:0 14px 28px rgba(34,197,94,.4)}
.auth-title{font-size:24px;font-weight:800;letter-spacing:1px}
.auth-title.small{font-size:19px;margin-bottom:16px;text-align:left;padding-left:6px}
.auth-slogan{font-size:13px;color:#6b7280;margin:6px 0 24px}
.auth-btn{width:100%;padding:14px;font-size:16px;font-weight:700;border-radius:16px;margin-bottom:12px}
.auth-btn.wx{background:#07c160;color:#fff;box-shadow:0 8px 18px rgba(7,193,96,.3)}
.auth-btn.phone{background:#f0fdf4;color:#166534;border:1.5px solid #bbf7d0}
.auth-btn.primary{background:linear-gradient(135deg,#22c55e,#10b981);color:#fff;margin-top:6px}
.auth-btn:active{transform:scale(.98)}
.auth-guest{width:100%;padding:8px;font-size:13px;color:#6b7280;background:transparent}
.auth-guest:active{color:#111827}
.auth-clear{width:100%;padding:6px;font-size:11px;color:#cbd5e1}
.auth-clear:active{color:#94a3b8}
.auth-agree{font-size:11px;color:#9ca3af;margin:2px 0 10px;line-height:1.7}
.auth-agree a{color:#22c55e}
.auth-agree input{vertical-align:-2px;margin-right:4px}
.auth-back{position:absolute;top:18px;left:16px;font-size:17px;color:#9ca3af;font-weight:600}
.auth-input{width:100%;border:1px solid #e5e7eb;background:#f9fafb;border-radius:13px;padding:13px 14px;font-size:16px;outline:none;margin-bottom:12px}
.auth-input:focus{border-color:var(--accent);background:#fff}
.auth-code-row{display:flex;gap:8px;align-items:center}
.auth-code-row .auth-input{margin-bottom:0;flex:1}
.auth-code-btn{flex:none;border:1px solid #bbf7d0;background:#f0fdf4;color:#166534;font-size:13px;font-weight:700;border-radius:13px;padding:12px 12px}
.auth-code-btn:disabled{opacity:.5;background:#f3f4f6;color:#9ca3af;border-color:#e5e7eb}
.auth-hint{font-size:11.5px;color:#b45309;background:#fffbeb;border-radius:8px;padding:7px;margin:12px 0 4px}

.acc-unbound{color:#9ca3af;font-weight:600}



/* ============ 登录页 v2（简洁清爽） ============ */
.auth-screen{background:linear-gradient(180deg,#ffffff 0%,#eefaf2 100%);flex-direction:column;align-items:center;justify-content:flex-start;padding:0}
.auth-head{text-align:center;padding-top:13vh}
.auth-logo{width:66px;height:66px;margin:0 auto 14px;border-radius:20px;background:linear-gradient(135deg,#22c55e,#10b981);display:flex;align-items:center;justify-content:center;font-size:36px;box-shadow:0 12px 26px rgba(34,197,94,.28)}
.auth-name{font-size:30px;font-weight:800;letter-spacing:3px;color:#111827}
.auth-slogan{font-size:13px;color:#6b7280;margin-top:8px;letter-spacing:.5px}
.auth-body{flex:1;width:100%;display:flex;flex-direction:column;justify-content:flex-end;padding:0 30px 34px;position:relative}
.auth-btn{width:100%;height:50px;border-radius:16px;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:center;margin-bottom:14px;letter-spacing:1px}
.auth-btn.wx{background:#07c160;color:#fff;box-shadow:0 8px 18px rgba(7,193,96,.25)}
.auth-btn.phone{background:#ffffff;color:#1f2937;border:1px solid #e5e7eb;box-shadow:0 2px 8px rgba(15,23,42,.04)}
.auth-btn.primary{background:linear-gradient(135deg,#22c55e,#10b981);color:#fff;box-shadow:0 8px 18px rgba(34,197,94,.25)}
.auth-btn:active{transform:scale(.985);opacity:.92}
.auth-agree{text-align:center;font-size:11px;color:#9ca3af;margin-top:2px}
.auth-agree a{color:#10b981}
.auth-agree input{vertical-align:-2px;margin-right:4px}
.auth-links{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:22px}
.auth-link{font-size:13px;color:#94a3b8;background:none;padding:4px 2px}
.auth-link:active{color:#22c55e}
.auth-dot{color:#d1d5db}
/* 手机号视图 */
#authPhoneView{justify-content:center}
.auth-back{position:absolute;top:-6px;left:4px;font-size:17px;color:#9ca3af;font-weight:600;padding:8px}
.auth-ptitle{font-size:21px;font-weight:800;margin:14px 0 22px;color:#111827}
.auth-input{width:100%;border:1px solid #e5e7eb;background:#f9fafb;border-radius:14px;padding:14px 15px;font-size:16px;outline:none;margin-bottom:13px;color:#111827}
.auth-input:focus{border-color:#22c55e;background:#fff;box-shadow:0 0 0 3px rgba(34,197,94,.12)}
.auth-code-row{display:flex;gap:10px;align-items:center}
.auth-code-row .auth-input{margin-bottom:13px;flex:1}
.auth-code-btn{flex:none;border:1px solid #bbf7d0;background:#f0fdf4;color:#15803d;font-size:13px;font-weight:700;border-radius:14px;padding:14px 10px;margin-bottom:13px}
.auth-code-btn:disabled{opacity:.5;background:#f3f4f6;color:#9ca3af;border-color:#e5e7eb}
.auth-hint{font-size:11.5px;color:#9ca3af;background:#f3f4f6;border-radius:10px;padding:9px 12px;margin-bottom:18px;text-align:center}
.auth-hint b{color:#15803d}
.auth-link.fill{width:100%;text-align:center;font-size:13px;color:#10b981;margin-top:6px}
.auth-clear{width:100%;padding:6px;font-size:11px;color:#cbd5e1;background:none}


/* ============ 登录页 v3（合并为整块居中，消除上下割裂） ============ */
.auth-screen{align-items:stretch;justify-content:center;padding:20px 0}
.auth-head{padding-top:0}
.auth-body{flex:0 0 auto;width:auto;justify-content:flex-start;padding:0 34px;margin-top:46px}
#authPhoneView{justify-content:flex-start}

/* 关键修复：display:flex 不得覆盖 hidden，保证视图切换生效 */
.auth-body[hidden]{display:none !important}



/* 返回按钮固定在登录页左上角（状态栏下方） */
.auth-back{position:absolute;top:62px;left:16px;font-size:18px;font-weight:600;color:#374151;background:rgba(255,255,255,.7);border-radius:999px;width:34px;height:34px;display:flex;align-items:center;justify-content:center;z-index:3}
.auth-back:active{background:#e5e7eb}
.auth-back[hidden]{display:none}

/* 返回按钮：横向一行文字，不换行竖排 */
.auth-back{width:auto;height:auto;padding:6px 14px 6px 8px;border-radius:10px;background:transparent;display:inline-flex;align-items:center;gap:2px;font-size:16px;color:#1f2937;white-space:nowrap;top:58px;left:10px}


/* ============ 广场/热门 频道切换（区分底色） ============ */
.channel-bar{gap:8px}
.channel-tabs{flex:1;display:flex;gap:4px;background:#eef2f7;border-radius:999px;padding:4px;min-width:0}
.channel-btn{flex:1;padding:7px 4px;border-radius:999px;font-size:14px;font-weight:700;color:#6b7280;white-space:nowrap;text-align:center;transition:.15s}
.channel-btn:active{transform:scale(.96)}
/* 广场：激活绿底白字 */
.channel-btn[data-ch="square"].active{background:linear-gradient(135deg,#22c55e,#10b981);color:#fff;box-shadow:0 4px 10px rgba(34,197,94,.3)}
/* 热门：总是带底色区分，激活时深紫白字 */
.channel-btn[data-ch="hot"]{background:#ede9fe;color:#6d28d9}
.channel-btn[data-ch="hot"].active{background:linear-gradient(135deg,#8b5cf6,#6d28d9);color:#fff;box-shadow:0 4px 10px rgba(109,40,217,.3)}

/* 热门频道：与热榜一致的红色系 */
.channel-btn[data-ch="hot"]{background:#fee2e2;color:#dc2626}
.channel-btn[data-ch="hot"].active{background:linear-gradient(135deg,#f97316,#ef4444);color:#fff;box-shadow:0 4px 10px rgba(239,68,68,.35)}

/* ============ 送礼数量 + 充值入口 ============ */
.gift-balance{display:flex;align-items:center;justify-content:center;gap:8px}
.gift-recharge{flex:none;font-size:12px;font-weight:700;color:#fff;background:linear-gradient(135deg,#f59e0b,#f97316);border-radius:999px;padding:4px 12px}
.gift-recharge:active{opacity:.85}
.gift-pick{margin-top:8px;padding:14px;background:#fafafa;border:1px solid #f1f5f9;border-radius:16px}
.gp-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.gp-name{font-size:16px;font-weight:800}
.gp-unit{font-size:12.5px;color:#d97706;font-weight:700}
.gp-qty{display:flex;align-items:center;justify-content:center;gap:16px;margin-bottom:12px}
.gp-qty-label{font-size:13px;color:var(--text-2)}
.qty-btn{width:32px;height:32px;border-radius:10px;background:#fff;border:1px solid #e5e7eb;font-size:18px;color:#374151;line-height:1}
.qty-btn:active{background:#f3f4f6}
.qty-num{font-size:20px;font-weight:800;min-width:30px;text-align:center}
.gp-total{text-align:center;font-size:14px;color:var(--text-2);margin-bottom:14px}
.gp-total b{font-size:20px;color:var(--accent-dark)}


/* ============ 达人等级 ============ */
.creator-card{display:flex;align-items:center;gap:14px;background:linear-gradient(135deg,#fff7ed,#ffedd5);border:1px solid #fed7aa;border-radius:18px;padding:14px 16px;margin-bottom:12px}
.cc-lv{flex:none;width:56px;height:56px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:16px;color:#fff;background:linear-gradient(135deg,#f59e0b,#f97316);box-shadow:0 6px 14px rgba(249,115,22,.3)}
.cc-main{flex:1;min-width:0}
.cc-title{font-size:16px;font-weight:800;color:#9a3412}
.cc-sub{font-size:11.5px;color:#b45309;margin:3px 0 7px}
.cc-bar{height:7px;border-radius:99px;background:#ffedd5;overflow:hidden}
.cc-fill{height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#f59e0b,#ef4444);transition:width .5s}
.lvl-tag{display:inline-block;font-size:10px;font-weight:800;border-radius:6px;padding:1px 6px;margin-left:4px;vertical-align:1px;color:#fff;background:#f59e0b}
.lvl-tag.lv1{background:#22c55e}.lvl-tag.lv2{background:#3b82f6}.lvl-tag.lv3{background:#8b5cf6}.lvl-tag.lv4{background:#ec4899}
.lvl-tag.lv5{background:#f59e0b}.lvl-tag.lv6{background:#ef4444}.lvl-tag.lv7{background:#f97316}.lvl-tag.lv8{background:#a855f7}
.lvl-tag.lv9{background:linear-gradient(90deg,#f59e0b,#ef4444)}.lvl-tag.lv10{background:linear-gradient(90deg,#f59e0b,#d946ef)}

/* ============ 达人等级：10 级各不同色（绿→青→蓝→靛→紫→粉→红→橙→金→黑金） ============ */
.lvl-tag.lv1{background:#16a34a}
.lvl-tag.lv2{background:#0d9488}
.lvl-tag.lv3{background:#2563eb}
.lvl-tag.lv4{background:#4f46e5}
.lvl-tag.lv5{background:#9333ea}
.lvl-tag.lv6{background:#db2777}
.lvl-tag.lv7{background:#dc2626}
.lvl-tag.lv8{background:#ea580c}
.lvl-tag.lv9{background:#ca8a04}
.lvl-tag.lv10{background:linear-gradient(135deg,#fbbf24,#d97706);box-shadow:0 0 0 1px rgba(255,255,255,.5),0 0 6px rgba(217,119,6,.5);color:#fff}
.cc-lv{transition:background .3s}

/* ============ 达人等级色板 v3（无粉红、拉大区分）+ 等级后显示称号 ============ */
/* ===== 动态头部两行排版（名字+会员 / 等级称号+时间），信息块永不掉到头像下面 ===== */
.post-head{flex-wrap:wrap;align-items:center}
.post-meta{flex:1 1 40%;min-width:0;overflow:hidden}
/* 第1行：昵称 + 会员/AI 标识，昵称过长自动省略号 */
.post-author{display:flex;align-items:center;gap:4px;min-width:0;line-height:1.35}
.post-author .pa-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.post-author .svip,.post-author .ai-chip{flex:none;margin-left:0}
/* 第2行：达人等级称号 + 发布时间 */
.post-sub{display:flex;align-items:center;gap:5px;min-width:0;margin-top:3px}
.post-sub .lvl-tag{flex:none;margin-left:0}
.post-sub .post-time{flex:0 1 auto;min-width:0;margin-top:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.post-time{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 等级徽标压紧一档，给第二行腾出时间的位置 */
.post-sub .lvl-tag{font-size:10px;padding:2px 6px;border-radius:6px}
.lvl-tag{white-space:nowrap;padding:2px 8px;font-size:11px;border-radius:8px}
.lvl-tag.lv1{background:#16a34a}
.lvl-tag.lv2{background:#0891b2}
.lvl-tag.lv3{background:#1d4ed8}
.lvl-tag.lv4{background:#7c3aed}
.lvl-tag.lv5{background:#ea580c}
.lvl-tag.lv6{background:#dc2626}
.lvl-tag.lv7{background:#ca8a04}
.lvl-tag.lv8{background:#0f766e}
.lvl-tag.lv9{background:#1e40af}
.lvl-tag.lv10{background:linear-gradient(135deg,#fbbf24,#d97706);box-shadow:0 0 0 1px rgba(255,255,255,.5)}

/* ============ 收藏功能 ============ */
.post-foot{gap:2px;justify-content:space-between;padding-left:2px;padding-right:2px}
.post-act{font-size:12px;display:flex;align-items:center;gap:3px}
.post-act.collected{color:#d97706}
.post-act.collected .pa-star{color:#d97706}
.my-fav-tip{font-size:12px;color:#92400e;background:#fffbeb;border-radius:10px;padding:8px 12px;margin-bottom:12px}


/* 发布字数统计 */
.post-count{text-align:right;font-size:11px;color:#9ca3af;margin:4px 2px 0}
.post-count.hot span{color:#ef4444;font-weight:700}

/* 收藏按钮放动态右上角（带文字） */
.post-card{position:relative}
.post-head{padding-right:100px}
.fav-top{position:absolute;top:12px;right:12px;z-index:4;display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:700;color:#d97706;background:#fffbeb;border:1px solid #fde68a;border-radius:999px;padding:3px 8px;white-space:nowrap}
.fav-top:active{background:#fef3c7}
.fav-top.collected{background:#fef3c7;border-color:#fcd34d;color:#b45309}

/* 类型标签移到「加入收藏」下方（右上角信息组，随卡片流不遮正文） */
.post-head{padding-right:0;align-items:flex-start}
.head-right{margin-left:auto;flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.fav-top{position:static;width:auto}

/* 恢复：收藏右上角 absolute、类型标签回头部 */
.post-head{padding-right:100px;align-items:center}
.head-right{display:none}
.fav-top{position:absolute;top:12px;right:12px}

/* ⋯ 与「加入收藏」并排（右上角） */
.head-actions{position:absolute;top:10px;right:12px;z-index:4;display:flex;align-items:center;gap:5px}
.head-actions .fav-top{position:static}
.head-actions .post-more{background:#fff;border:1px solid #f1f5f9;box-shadow:0 2px 8px rgba(15,23,42,.06)}
.post-head{padding-right:0}
/* 顶部只剩「举报」，按需预留一小块空间；无举报（自己的动态）时名字可用整行 */
.post-head.has-report{padding-right:70px}

/* 提示居中显示 */
.toast{top:50%;left:50%;transform:translate(-50%,-50%) scale(.96);padding:12px 22px;font-size:14px}
.toast.show{transform:translate(-50%,-50%) scale(1)}


/* 送礼弹窗：去充值入口放底部 */
.gift-recharge-bottom{width:100%;margin-top:10px;padding:13px;font-size:14px;font-weight:700;color:#b45309;background:#fffbeb;border:1px dashed #fcd34d;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:4px}
.gift-recharge-bottom:active{background:#fef3c7}
.gift-recharge-bottom b{color:#d97706}


/* ============ 会员专属头像边框（金/白金/黑金） ============ */
.mine-avatar.ring-gold,.avatar.ring-gold,.post-avatar.ring-gold,.c-avatar.ring-gold{border:2.5px solid #f59e0b;box-shadow:0 0 0 2px #fff7ed,0 0 14px rgba(245,158,11,.55)}
.mine-avatar.ring-platinum,.avatar.ring-platinum,.post-avatar.ring-platinum,.c-avatar.ring-platinum{border:2.5px solid #e2e8f0;box-shadow:0 0 0 2px #94a3b8,0 0 14px rgba(226,232,240,.9)}
.mine-avatar.ring-blackgold,.avatar.ring-blackgold,.post-avatar.ring-blackgold,.c-avatar.ring-blackgold{border:3px solid #1f2937;box-shadow:0 0 0 2.5px #d4af37,0 0 16px rgba(212,175,55,.65)}

/* ============ 个人信息编辑页 v2（iOS 分组质感） ============ */
.subbar-save{width:64px;text-align:right;font-size:15px;font-weight:700;color:var(--accent-dark)}
.profile-hero{display:flex;align-items:center;gap:16px;background:linear-gradient(135deg,#ffffff,#f0fdf4);border:1px solid #dcfce7;border-radius:20px;padding:18px;margin-bottom:12px;box-shadow:0 8px 20px rgba(34,197,94,.08)}
.ph-avatar-wrap{position:relative;flex:none}
.ph-cam{position:absolute;right:-2px;bottom:-2px;width:26px;height:26px;border-radius:50%;background:#22c55e;color:#fff;font-size:13px;display:flex;align-items:center;justify-content:center;border:2px solid #fff;box-shadow:0 3px 8px rgba(15,23,42,.2)}
.ph-info{flex:1;min-width:0}
.ph-name{font-size:22px;font-weight:800}
.ph-sub{font-size:13px;color:var(--text-2);margin-top:4px}
.ph-hint{font-size:11px;color:#22c55e;margin-top:6px}
.ph-stats{display:flex;gap:8px;margin-bottom:18px}
.ph-stat{flex:1;background:#fff;border:1px solid #f1f5f9;border-radius:14px;padding:10px 6px;text-align:center}
.ph-stat b{display:block;font-size:17px;font-weight:800;color:#16a34a}
.ph-stat span{font-size:10.5px;color:var(--text-3)}
.grp-title{font-size:13px;font-weight:700;color:var(--text-3);margin:2px 10px 8px;letter-spacing:.5px}
.pf-card{background:#fff;border-radius:18px;padding:2px 16px;margin-bottom:18px;box-shadow:0 2px 10px rgba(15,23,42,.04)}
.pf-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}
.pf-row:last-child{border-bottom:none}
.pf-row label{font-size:15px;font-weight:600;color:#1f2937;flex:none}
.pf-input{display:flex;align-items:center;gap:6px}
.pf-input input{width:96px;text-align:right;border:none;outline:none;background:transparent;font-size:16px;font-weight:600;color:#111827;padding:2px 0}
.pf-input input::placeholder{color:#d1d5db;font-weight:400}
.pf-unit{font-size:13px;color:#9ca3af;font-weight:500}
.mini-seg{display:flex;gap:6px;flex:none}
.mini-btn{width:58px;padding:7px 0;border-radius:12px;background:#f3f4f6;font-size:14px;font-weight:600;color:#6b7280}
.mini-btn.active{background:linear-gradient(135deg,#22c55e,#10b981);color:#fff;box-shadow:0 4px 10px rgba(34,197,94,.25)}
.pf-block{padding:14px 0;border-bottom:1px solid var(--line)}
.pf-block:last-child{border-bottom:none}
.pf-block>label{display:block;font-size:14px;font-weight:700;color:#374151;margin-bottom:10px}
.pf-card .calc-preview{margin:14px 0}
.pc-edit{flex:none;font-size:12px;font-weight:700;color:var(--accent-dark);background:#f0fdf4;border-radius:999px;padding:5px 12px}

/* 昵称内联编辑 */
.ph-name-input{width:100%;font-size:22px;font-weight:800;color:#111827;border:none;outline:none;background:transparent;padding:0;border-bottom:1.5px dashed transparent}
.ph-name-input:focus{border-bottom-color:#86efac}
.ph-name-input::placeholder{color:#9ca3af;font-weight:600}
.ph-hint{font-size:11px;color:#22c55e;margin-top:6px}

/* 仅头像圈触发换头像 */
.ph-avatar-wrap{cursor:pointer}

/* 分类标签可点击（点任意分类都进入识别，覆盖所有食物） */
.scan-tags .tag{cursor:pointer;transition:transform .12s,background .2s}
.scan-tags .tag:active{transform:scale(.93);background:rgba(255,255,255,.42)}

/* SVIP 标识（会员显示在名字后） */
.svip{display:inline-block;font-size:10px;font-weight:800;font-style:normal;color:#fff;background:linear-gradient(135deg,#f59e0b,#ef4444);border-radius:6px;padding:1.5px 6px;margin-left:5px;vertical-align:2px;letter-spacing:.5px;box-shadow:0 2px 6px rgba(239,68,68,.35)}


/* 礼物兑换热量币 */
.gift-wallet{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #f1f5f9;border-radius:16px;padding:13px 16px;margin-bottom:12px}
.gw-ico{font-size:26px;flex:none}
.gw-main{flex:1;min-width:0}
.gw-title{font-size:14px;font-weight:800}
.gw-sub{font-size:12px;color:#d97706;margin-top:3px;font-weight:700}
.gw-btn{flex:none;font-size:13px;font-weight:700;color:#fff;background:linear-gradient(135deg,#22c55e,#10b981);border-radius:999px;padding:8px 14px}
.gw-btn:disabled{background:#d1d5db;color:#f9fafb}


.gw-sub div{margin-top:2px}
.gw-sub b{color:#d97706}
.gw-sub{line-height:1.5}

/* ============ AI 助手 v2（精致对话） ============ */
.page-ai{background:linear-gradient(180deg,#f5f3ff 0%,#f8fafc 40%,#f0fdf4 100%);display:flex;flex-direction:column;min-height:100%}
.ai-head{display:flex;align-items:center;gap:10px;background:#fff;border-radius:18px;padding:12px 14px;margin-bottom:12px;box-shadow:0 4px 14px rgba(109,40,217,.08)}
.ai-avatar{width:40px;height:40px;border-radius:13px;background:linear-gradient(135deg,#8b5cf6,#6366f1);display:flex;align-items:center;justify-content:center;font-size:21px;flex:none;box-shadow:0 6px 14px rgba(99,102,241,.3)}
.ai-title{font-size:17px;font-weight:800;flex:1}
.ai-online{font-size:11px;color:#16a34a;background:#dcfce7;padding:4px 10px;border-radius:999px;font-weight:700}
.chat-body{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:14px;padding:8px 2px 12px}
.chat-msg{display:flex;align-items:flex-end;gap:8px}
.chat-msg.assistant{padding-right:28px}
.chat-msg.user{justify-content:flex-end;padding-left:40px}
.chat-msg .bubble{max-width:86%;padding:11px 15px;font-size:14.5px;line-height:1.75;border-radius:18px;box-shadow:0 3px 10px rgba(15,23,42,.05)}
.chat-msg.assistant .bubble{background:#fff;border:1px solid #ede9fe;border-bottom-left-radius:6px}
.chat-msg.user .bubble{background:linear-gradient(135deg,#22c55e,#10b981);color:#fff;border-bottom-right-radius:6px;box-shadow:0 6px 14px rgba(34,197,94,.22)}
.chat-msg.assistant::before{content:'🤖';flex:none;width:30px;height:30px;border-radius:10px;background:linear-gradient(135deg,#ede9fe,#ddd6fe);display:flex;align-items:center;justify-content:center;font-size:16px;margin-bottom:2px}
.ai-tag{display:block;margin-top:9px;font-size:10.5px;color:#7c3aed;background:#f5f3ff;border-radius:7px;padding:3px 8px;font-style:normal;width:fit-content}
.chat-quick{display:block;background:#fff;border-radius:16px;padding:10px 12px;margin:2px 0 10px;box-shadow:0 2px 10px rgba(15,23,42,.04)}
.cq-hint{font-size:11.5px;color:#9ca3af;margin:0 2px 8px}
.cq-chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.cq-chips::-webkit-scrollbar{display:none}
.q-chip{flex:none;font-size:12.5px;color:#6d28d9;background:#f5f3ff;border:1px solid #e9d5ff;padding:7px 13px;border-radius:999px;font-weight:600}
.chat-inputbar{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #ede9fe;border-radius:999px;padding:6px 6px 6px 18px;box-shadow:0 6px 18px rgba(109,40,217,.1)}
.chat-inputbar input{flex:1;border:none;outline:none;font-size:15px;background:transparent;color:#1f2937}
.chat-inputbar input::placeholder{color:#c4b5fd}
.chat-send{flex:none;background:linear-gradient(135deg,#8b5cf6,#6d28d9);color:#fff;border-radius:999px;padding:11px 22px;font-size:14px;font-weight:700;box-shadow:0 6px 14px rgba(109,40,217,.32)}
.chat-send:active{transform:scale(.96)}

/* AI 页内部滚动，输入固定底部 */
.page-ai{height:100%;min-height:0}
.chat-body{flex:1 1 auto;min-height:0;overflow-y:auto}

/* AI 助手页：独立固定区域 + 消息区内部滚动 */
.page-ai{position:absolute;top:56px;left:0;right:0;bottom:82px;height:auto;padding:12px 16px 12px;overflow:hidden}
.page-ai.active{display:flex;flex-direction:column}
.page-ai .chat-body{flex:1 1 auto;min-height:0;overflow-y:auto}

/* ============ AI 助手 v3（参考豆包：干净极简） ============ */
.page-ai{background:#f6f7f9}
.ai-head{background:transparent;box-shadow:none;padding:8px 2px 10px;border-radius:0}
.ai-avatar{width:34px;height:34px;border-radius:10px;font-size:18px;background:linear-gradient(135deg,#10b981,#06b6d4);box-shadow:none}
.ai-title{font-size:18px;font-weight:700;color:#111827}
.ai-online{background:transparent;color:#10b981;font-size:11px;padding:0;display:inline-flex;align-items:center;gap:3px}
.ai-online::before{content:'';width:6px;height:6px;border-radius:50%;background:#10b981}
.chat-body{background:#f6f7f9;gap:10px;padding:2px 0 10px}
.chat-msg.assistant{padding-right:18px}
.chat-msg.user{padding-left:48px}
.chat-msg .bubble{max-width:88%;padding:10px 14px;font-size:14.5px;line-height:1.7;border-radius:16px;box-shadow:none}
.chat-msg.assistant .bubble{background:#fff;border:none;border-top-left-radius:4px}
.chat-msg.user .bubble{background:#d9f7e5;color:#111827;border-top-right-radius:4px}
.chat-msg.assistant::before{content:none}
.ai-tag{background:#f3f4f6;color:#6b7280;border-radius:6px}
.chat-quick{background:transparent;box-shadow:none;padding:0 2px;margin:2px 0 8px}
.cq-hint{font-size:11px;color:#9ca3af;margin:0 2px 8px}
.q-chip{color:#374151;background:#fff;border:1px solid #e5e7eb;padding:6px 12px;font-weight:500}
.chat-inputbar{background:#fff;border:1px solid #e5e7eb;border-radius:24px;padding:6px 6px 6px 18px;box-shadow:0 4px 14px rgba(15,23,42,.05)}
.chat-inputbar input{color:#111827}
.chat-inputbar input::placeholder{color:#9ca3af}
.chat-send{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 10px rgba(16,185,129,.3)}

/* 修复：未激活时 AI 页必须隐藏，避免覆盖其它页 */
.page-ai:not(.active){display:none}

/* 修正：AI 页绝对定位改为覆盖整个内容可视区（避免底部留白） */
.page-ai{top:0;bottom:0}


/* 识别结果：手动修正 */
.fix-link{width:100%;margin-top:2px;padding:8px;font-size:12.5px;color:#6d28d9;background:#f5f3ff;border-radius:10px;font-weight:600}
.fix-link:active{background:#ede9fe}
.fix-panel{background:#fafafa;border:1px solid #f1f5f9;border-radius:14px;padding:12px;margin-top:8px;text-align:left}
.fix-row{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.fix-row label{font-size:13px;color:#6b7280;font-weight:600;width:86px;flex:none}
.fix-row input{flex:1;border:1px solid #e5e7eb;background:#fff;border-radius:10px;padding:9px 12px;font-size:14px;outline:none}
.fix-row input:focus{border-color:#8b5cf6}
.fix-actions{display:flex;gap:8px;margin-top:2px}
.fix-apply{flex:1;background:linear-gradient(135deg,#8b5cf6,#6d28d9);color:#fff;border-radius:10px;padding:10px;font-size:14px;font-weight:700}
.fix-cancel{flex:1;background:#f3f4f6;color:#6b7280;border-radius:10px;padding:10px;font-size:14px;font-weight:600}


/* ===== 识别结果可修正：多食物列表（2026-09-09 新增） ===== */
.result-list{max-height:250px;overflow:auto;margin:6px 0 2px;text-align:left;width:100%}
.result-item{display:flex;align-items:center;gap:8px;padding:9px 4px;border-bottom:1px solid var(--line,#eef2f7)}
.result-item.edited{background:#fffbeb;border-radius:10px;padding:9px 6px}
.ri-emoji{font-size:24px;width:32px;text-align:center;flex:0 0 auto}
.ri-main{flex:1;min-width:0}
.ri-name{font-size:14px;font-weight:700;color:#0f172a;display:flex;align-items:center;gap:6px}
.ri-fixed{font-style:normal;font-size:10px;color:#b45309;background:#fef3c7;border-radius:6px;padding:1px 5px;white-space:nowrap}
.ri-sub{font-size:11px;color:#94a3b8;margin-top:2px}
.ri-kcal{font-size:14px;font-weight:800;color:var(--accent-dark,#dc2626);white-space:nowrap;flex:0 0 auto}
.ri-kcal small{font-size:10px;font-weight:600;color:#9ca3af}
.ri-ops{display:flex;gap:4px;flex:0 0 auto}
.ri-btn{width:26px;height:26px;border-radius:8px;border:1px solid #e2e8f0;background:#fff;color:#64748b;font-size:13px;line-height:1;display:inline-flex;align-items:center;justify-content:center;padding:0}
.ri-btn.danger{color:#ef4444}
.ri-btn:active{background:#f1f5f9}
.result-empty{text-align:center;color:#9ca3af;font-size:13px;padding:18px 0}
.result-kcal{font-size:18px;font-weight:800;color:var(--accent-dark,#dc2626);margin:8px 0 2px;display:flex;align-items:baseline;justify-content:center;gap:4px}
.result-kcal small{font-size:13px;font-weight:600;color:#9ca3af}
.result-actions{display:flex;gap:10px;margin:10px 0 2px;width:100%}
.res-act-btn{flex:1;padding:9px 0;border-radius:12px;border:1px solid #e2e8f0;background:#fff;font-size:13px;font-weight:700;color:#475569}
.res-act-btn:active{background:#f1f5f9}
.fix-title{font-size:14px;font-weight:800;color:#0f172a;margin-bottom:8px}
#confirmAdd:disabled{opacity:.55}
.food-info{flex:1;min-width:0}
.food-ops{margin-left:auto;display:flex;gap:6px;flex:0 0 auto}
.food-ops .ri-btn{width:28px;height:28px}
.detail-ops{margin-left:auto;display:flex;gap:6px;flex:0 0 auto}
.detail-ops .ri-btn{width:26px;height:26px;border:none;background:#f1f5f9}


/* ===== 无法识别 / 手动输入（2026-09-09 产品逻辑调整） ===== */
.fail-ico{font-size:52px;text-align:center;margin:6px 0 2px}
.fail-text{font-size:14px;color:#64748b;line-height:1.7;text-align:center;padding:6px 8px 12px}
.manual-select{flex:1;width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;font-size:15px;color:#0f172a}
.result-actions .res-act-btn{flex:1}


/* ===== 热量币图标：金币底 + 火焰（2026-09-09） ===== */
.cal-coin{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;
  background:radial-gradient(circle at 32% 28%,#ffe08a,#fbbf24 48%,#f59e0b 72%,#d97706);
  box-shadow:inset 0 -1px 2px rgba(124,45,18,.4),0 1px 2px rgba(217,119,6,.3);
  border:1px solid rgba(180,83,9,.28);
  font-size:0;line-height:1;flex:0 0 auto;vertical-align:-3px}
.cal-coin::before{content:'🔥';font-size:10px}
.cal-coin.sm{width:15px;height:15px}
.cal-coin.sm::before{font-size:8px}
.cal-coin.lg{width:24px;height:24px}
.cal-coin.lg::before{font-size:13px}
.cal-coin.xl{width:36px;height:36px}
.cal-coin.xl::before{font-size:20px}
.pill-coin .pill-ico{display:inline-flex}
.detail-emoji .cal-coin{margin-top:2px}


/* ===== 我的页：充值热量币入口（2026-09-09） ===== */
.coin-row{background:linear-gradient(135deg,#fb923c,#ea580c);border-color:rgba(234,88,12,.35)}
.coin-row:active{background:linear-gradient(135deg,#f97316,#c2410c)}
.coin-row .vr-txt{color:#fff}
.coin-row .mi-arrow{color:#fff}
.coin-row .vr-ico{filter:drop-shadow(0 1px 1px rgba(120,53,15,.35))}



/* ===== 我的页 UI 优化：钱包卡 + 分组菜单（2026-09-09） ===== */
.mine-wallet{background:#fff;border-radius:20px;overflow:hidden;box-shadow:0 6px 18px rgba(15,23,42,.06);margin-bottom:18px}
.mw-charge{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:16px;background:linear-gradient(135deg,#ffedd5,#fed7aa);border-bottom:1px dashed #fdba74}
.mw-charge:active{background:linear-gradient(135deg,#fed7aa,#fdba74)}
.mw-coin{width:46px;height:46px;border-radius:50%;background:radial-gradient(circle at 32% 28%,#fff7ed,#f59e0b 70%,#d97706);display:flex;align-items:center;justify-content:center;flex:0 0 auto;box-shadow:0 4px 10px rgba(217,119,6,.35)}
.mw-coin .cal-coin{width:auto;height:auto;border:none;background:none;box-shadow:none}
.mw-info{flex:1;min-width:0}
.mw-info b{display:block;font-size:16px;font-weight:800;color:#9a3412}
.mw-info i{display:block;font-style:normal;font-size:11.5px;color:#c2410c;margin-top:3px}
.mw-go{font-size:13px;font-weight:800;color:#ea580c;background:#fff;border-radius:999px;padding:7px 14px;box-shadow:0 2px 6px rgba(234,88,12,.2);flex:0 0 auto}
.mw-assets{display:flex;align-items:center;padding:14px 10px;background:#fff}
.mg-title{font-size:12px;font-weight:800;color:#94a3b8;letter-spacing:1px;padding:0 6px 8px;margin-top:4px}
.mg-card{background:#fff;border-radius:18px;box-shadow:0 2px 10px rgba(15,23,42,.05);padding:2px 14px;margin-bottom:14px;overflow:hidden}
.mg-card .menu-item{padding:13px 2px;border-bottom:1px solid #f1f5f9}
.mg-card .menu-item:last-child{border-bottom:none}
.menu-item .mi-ico{width:32px;height:32px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;font-size:16px;flex:0 0 auto}
.mi-ico.i-profile{background:#eff6ff;color:#2563eb}
.mi-ico.i-dyn{background:#fdf4ff;color:#c026d3}
.mi-ico.i-fav{background:#fffbeb;color:#d97706}
.mi-ico.i-rec{background:#ecfdf5;color:#059669}
.mi-ico.i-days{background:#f0f9ff;color:#0284c7}
.mi-ico.i-bill{background:#fff7ed;color:#ea580c}
.mi-ico.i-acc{background:#f8fafc;color:#64748b}


/* ===== 年度历史记录（年→月→日） ===== */
.yr-nav{display:flex;align-items:center;gap:10px;padding:2px 4px 10px}
.yr-back{font-size:14px;font-weight:700;color:#6b7280;background:#f1f5f9;border-radius:999px;padding:5px 13px}
.yr-back:active{background:#e2e8f0}
.yr-crumb{font-size:13px;color:#94a3b8;font-weight:600}
.yr-row .hi-date.yr-date{min-width:78px}
.yr-sub{display:block;font-size:11px;color:#94a3b8;font-weight:500;margin-top:3px}
.year-list .history-item .hi-nums{line-height:1.5}


/* ===== 王小贱头像 / App 图标资源 ===== */
.auth-logo,.brand-logo{display:flex;align-items:center;justify-content:center;overflow:hidden}
.auth-logo img,.brand-logo img{width:100%;height:100%;object-fit:cover;display:block}
.ai-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.post-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}


/* ===== 登录语言切换 ===== */
.lang-switch{display:flex;justify-content:center;gap:8px;margin-bottom:22px}
.lang-btn{font-size:13px;font-weight:700;color:#9ca3af;background:rgba(255,255,255,.65);border:1px solid #e2e8f0;border-radius:999px;padding:6px 16px;min-width:56px}
.lang-btn.on{color:#fff;background:linear-gradient(135deg,#10b981,#059669);border-color:transparent}

.acc-lang{display:flex;gap:6px}
.acc-lang .lang-btn{padding:5px 12px;font-size:12px}

/* ===== UGC 合规：举报入口 + AI 生成标识 ===== */
.report-top{font-size:10.5px;color:#94a3b8;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:4px 8px}
.report-top:active{background:#fee2e2;color:#dc2626;border-color:#fecaca}
.ai-label{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:#7c3aed;background:#f5f3ff;border:1px solid #ddd6fe;border-radius:8px;padding:4px 10px;margin:2px 0 8px}
.report-tip{font-size:12.5px;color:#64748b;margin:4px 0 10px;text-align:center}
#reportOverlay .report-reason{text-align:left}

#aiModeRow[hidden]{display:none !important}
.account-row .acc-link{cursor:pointer}


.auth-btn.apple{background:#000;color:#fff;border:1px solid #000}
.auth-btn.apple:active{background:#1f2937}

#authWx[hidden]{display:none !important}


/* ===== 其他登录方式折叠 ===== */
.auth-more-toggle{width:100%;text-align:center;font-size:13px;color:#64748b;padding:10px 0 6px;background:transparent}
.auth-more-toggle:active{color:#10b981}
#authMoreBox{display:flex;flex-direction:column}
#authMoreBox[hidden]{display:none !important}

/* ===== 卡片操作栏改版：取消点赞，收藏与「⋯」下移到底部 ===== */
.post-foot{align-items:center}
.post-foot .fav-foot{color:#b45309;font-weight:700}
.post-foot .fav-foot.collected{color:#d97706}
.post-foot .fav-foot{white-space:nowrap}
.post-foot .post-more{width:auto;height:auto;min-width:22px;border-radius:8px;color:#9ca3af;font-size:15px;line-height:1;padding:2px 4px}
.post-foot .post-more:active{background:#f3f4f6;color:#4b5563}
/* 第二行可容纳「榜单徽标 + 等级 + 时间」，放不下时优先压缩时间 */
.post-sub .hot-rank{flex:none;font-size:10px;padding:2px 6px;border-radius:6px;margin-left:0}
/* ===== 名字行收成一行：昵称 + SVIP + 等级称号 + 时间（不再换行） ===== */
.post-meta{flex:1 1 40%;min-width:0;overflow:hidden}
.post-author{display:flex;flex-wrap:nowrap;align-items:center;gap:5px;min-width:0;white-space:nowrap}
.post-author .pa-name{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.post-author .svip,.post-author .lvl-tag,.post-author .ai-chip{flex:none;margin-left:0}
.post-author .lvl-tag{font-size:10px;line-height:1.5;padding:2px 6px;border-radius:6px}
.post-author .post-time{flex:none;margin-top:0;overflow:visible;text-overflow:clip}
/* 头像容器：热门榜角标挂在头像右下角，不占名字行宽度 */
.post-avatar-wrap{position:relative;flex:none}
.hot-rank{position:absolute;right:-5px;bottom:-5px;z-index:2;flex:none;font-size:9px;font-weight:800;line-height:1.5;color:#fff;background:linear-gradient(135deg,#f97316,#ef4444);border-radius:7px;padding:1px 5px;margin-left:0;white-space:nowrap;box-shadow:0 1px 4px rgba(239,68,68,.4)}
.hot-rank.top1{background:linear-gradient(135deg,#f59e0b,#ef4444);box-shadow:0 1px 5px rgba(239,68,68,.5)}
/* 收紧：举报按钮实测 56.5px，预留 56px 即可；间距 4px，等级徽标再压一档 */
.post-head.has-report{padding-right:56px}
.post-author{gap:4px}
.post-author .lvl-tag{font-size:9.5px;padding:2px 5px;border-radius:6px}
/* 最后微调：时间字号与间距各收一点，让 5 字昵称也能完整显示 */
.post-author{gap:3px}
.post-author .post-time{font-size:10.5px}
/* ===== 发布时间移到卡片右上角（与举报同排） ===== */
.head-actions{position:absolute;top:10px;right:12px;z-index:4;display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.head-actions .post-time{font-size:10px;color:var(--text-3);white-space:nowrap;line-height:1}
.post-head{padding-right:58px}          /* 仅时间 */
.post-head.has-report{padding-right:76px}   /* 举报在上、时间在下（竖排） */
/* ===== 发布时间回到最初位置：名字下面一行，与名字左对齐 ===== */
.post-meta .post-time{font-size:11px;color:var(--text-3);margin-top:2px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.head-actions{flex-direction:row;align-items:center;gap:5px}
.post-head{padding-right:0}
.post-head.has-report{padding-right:72px}
/* ===== 注销账号弹层 ===== */
.acc-danger{color:#dc2626}
.delete-warn{background:#fef2f2;border:1px solid #fecaca;border-radius:14px;padding:12px 14px;margin-bottom:14px;text-align:left}
.delete-warn p{margin:0;font-size:13px;line-height:1.65}
.dw-lead{font-weight:700;color:#991b1b}
.dw-list{margin:8px 0;padding-left:18px}
.dw-list li{font-size:13px;color:#991b1b;line-height:1.75}
.dw-note{color:#b91c1c;font-size:12.5px;margin-top:6px}
.dw-agree{display:flex;align-items:center;justify-content:center;gap:8px;font-size:13px;color:#374151;margin:2px 0 12px}
.sheet-btn.danger{background:#dc2626;color:#fff}
.sheet-btn.danger:disabled{background:#fca5a5;color:#fff;opacity:.85}
/* ===== 拉黑名单 ===== */
.block-list{max-height:320px;overflow:auto;margin-bottom:10px}
.block-item{display:flex;align-items:center;justify-content:space-between;padding:11px 4px;border-bottom:1px solid var(--line);font-size:14px}
.block-item .btn-unblock{font-size:12px;font-weight:700;color:#dc2626;background:#fef2f2;border:1px solid #fecaca;border-radius:999px;padding:5px 12px}
.block-empty{color:var(--text-3);font-size:13px;padding:20px 0;text-align:center}

/* ===== 变现开关关闭时：隐藏充值/会员/送礼物入口（合规模式） ===== */
body.monetization-off #pillCoin,
body.monetization-off #coinRechargeRow,
body.monetization-off #openRechargeList,
body.monetization-off #giftRecharge,
body.monetization-off [data-gift],
body.monetization-off .vip-plans,
body.monetization-off #vipSim { display:none !important; }

/* ===== 真机移动端适配：手机打开时铺满全屏，不再显示桌面手机外框 ===== */
@media (max-width: 600px), (pointer: coarse) {
  html, body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: var(--bg);
    overscroll-behavior: none;
  }
  body {
    display: block;
    padding: 0;
  }
  .phone {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg);
  }
  .statusbar { display: none; }
  .screen {
    top: 0;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  .page { padding: 12px 14px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .tabbar {
    height: calc(74px + env(safe-area-inset-bottom, 0px));
    padding: 8px 12px env(safe-area-inset-bottom, 0px);
    align-items: flex-start;
  }
  .tab { padding-top: 4px; min-width: 64px; }
  .tab-ico { font-size: 24px; }

  .auth-screen {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .auth-head { padding-top: max(9vh, env(safe-area-inset-top, 0px)); }
  .auth-body { padding-left: 24px; padding-right: 24px; }
  .auth-input, input, select, textarea { font-size: 16px; }
  button, .tab, .scan-card, .sheet-btn { touch-action: manipulation; }

  .overlay { position: fixed; }
  .sheet {
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 12px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .result-img { width: 108px; height: 108px; }
  .profile-card, .card { border-radius: 16px; }
}
/* ===== 首页：今日热量摄入后的删除入口 ===== */
.today-left{display:flex;align-items:center;gap:8px;min-width:0}
.today-del{width:30px;height:30px;border-radius:50%;background:#fef2f2;color:#dc2626;font-size:14px;display:flex;align-items:center;justify-content:center;border:1px solid #fecaca;flex:none}
.today-del:active{transform:scale(.94);background:#fee2e2}

/* ===== 识别结果：照片上逐项显示名称与热量 ===== */
.result-img{width:100%;height:auto;aspect-ratio:4/3;border-radius:18px;background:#e2e8f0;font-size:56px;display:flex;align-items:center;justify-content:center;margin:0 auto 12px;position:relative;overflow:hidden}
.result-img img{width:100%;height:100%;object-fit:cover;display:block}
.food-bbox-layer,.food-fallback{position:absolute;inset:0;pointer-events:none}
.food-box{position:absolute;border:2px solid #22c55e;border-radius:10px;background:rgba(34,197,94,.10);box-shadow:0 2px 8px rgba(15,23,42,.16)}
.food-box-label{position:absolute;left:-2px;bottom:100%;max-width:190px;background:rgba(15,23,42,.90);color:#fff;border-radius:8px;padding:4px 7px;font-size:11px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:700;box-sizing:border-box}
.food-box-label b{color:#86efac;margin-left:4px}
.food-box-label.inside{top:2px;bottom:auto}
.food-fallback{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:4px;padding:8px;background:linear-gradient(to top,rgba(15,23,42,.78),transparent)}
.food-fallback .food-box-label{position:static;max-width:100%;max-width:min(100%,320px)}
/* ===== 识别结果列表：逐项删除误识别 ===== */
.ri-del{width:28px;height:28px;border-radius:50%;background:#fef2f2;color:#dc2626;font-size:18px;line-height:1;display:flex;align-items:center;justify-content:center;flex:none;border:1px solid #fecaca;margin-left:6px}
.ri-del:active{transform:scale(.94);background:#fee2e2}
/* 识别照片只显示名称和热量标签，不显示绿色方框 */
.food-box{border:0 !important;background:transparent !important;box-shadow:none !important}
/* ===== 识别结果列表：修改误识别 ===== */
.ri-edit{width:28px;height:28px;border-radius:50%;background:#eff6ff;color:#2563eb;font-size:15px;line-height:1;display:flex;align-items:center;justify-content:center;flex:none;border:1px solid #bfdbfe;margin-left:4px}
.ri-edit:active{transform:scale(.94);background:#dbeafe}
.edit-kcal-preview{font-size:15px;color:#374151;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:12px;padding:10px;margin:4px 0 14px}
.edit-kcal-preview b{font-size:22px;color:#16a34a}


/* 广场显示/隐藏由 app.js 的 SQUARE_HIDDEN / SQUARE_READONLY 开关控制，
   这里不再写死 display:none，避免隐藏了不该隐藏的入口。 */


/* ============================================================
 * 广场只读模式（SQUARE_READONLY = true）
 * 可浏览内容；发布 / 评论 / 送礼 / 投票入口全部不渲染
 * ============================================================ */
body.square-readonly .square-post-btn,
body.square-readonly #squarePostBtn { display: none !important; }
.post-act.static { pointer-events: none; opacity: .72; }
