* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { height:100%; }
body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans", sans-serif;
  background:#f6f3ee; color:#3a3530; -webkit-font-smoothing:antialiased;
}
#app { max-width:520px; margin:0 auto; min-height:100%; background:#f6f3ee; position:relative; padding-bottom:96px; }

/* 顶栏 */
.top { position:sticky; top:0; z-index:10; background:rgba(246,243,238,0.94); backdrop-filter:blur(8px);
  padding:calc(env(safe-area-inset-top) + 12px) 18px 12px; display:flex; align-items:center; justify-content:space-between; }
.logo { font-size:22px; font-weight:800; letter-spacing:1px; }
.logo .ou { color:#c25e3a; }
.tagline { font-size:11px; color:#9a938a; margin-top:2px; }
.avatar { width:34px; height:34px; border-radius:50%; background:linear-gradient(135deg,#e8a050,#c25e3a);
  color:#fff; font-size:15px; font-weight:700; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.avatar.default { background:#d8d2c8; color:#8a8378; }

/* 底栏 */
.bottom-bar { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:520px;
  background:rgba(255,255,255,0.96); border-top:1px solid #e8e2d8; display:flex; z-index:20;
  padding-bottom:env(safe-area-inset-bottom); }
.tab { flex:1; text-align:center; padding:10px 0 9px; color:#9a938a; font-size:11px; cursor:pointer; }
.tab .ticon { font-size:20px; display:block; margin-bottom:2px; }
.tab.active { color:#c25e3a; font-weight:700; }
.tab-fab { flex:1.1; display:flex; align-items:center; justify-content:center; }
.fab { width:52px; height:52px; border-radius:50%; background:#c25e3a; color:#fff; font-size:28px; font-weight:300;
  display:flex; align-items:center; justify-content:center; margin-top:-24px; box-shadow:0 4px 14px rgba(194,94,58,0.4);
  border:3px solid #f6f3ee; cursor:pointer; }

/* 通用 */
.screen { display:none; padding:0 18px; }
.screen.active { display:block; }
.sect-title { font-size:16px; font-weight:800; margin:20px 0 12px; display:flex; align-items:center; gap:6px; }
.sect-title .sub { font-size:11px; color:#9a938a; font-weight:400; margin-left:auto; }
.card { background:#fff; border-radius:14px; padding:14px; margin-bottom:10px; box-shadow:0 1px 4px rgba(58,53,48,0.05); }
.muted { color:#9a938a; font-size:12px; }
.empty { text-align:center; padding:44px 20px; color:#b5aea3; font-size:13px; line-height:1.8; }
.empty .big { font-size:36px; margin-bottom:8px; }
.btn-primary { width:100%; padding:14px; border:none; border-radius:12px; background:#c25e3a; color:#fff; font-size:16px;
  font-weight:700; cursor:pointer; font-family:inherit; }
.btn-primary:disabled { background:#d8d2c8; }
.btn-ghost { width:100%; padding:12px; border:1px solid #d8d2c8; border-radius:12px; background:#fff; color:#6b645a;
  font-size:14px; cursor:pointer; font-family:inherit; margin-top:4px; }

/* 榜单 */
.rank-row { display:flex; align-items:flex-start; gap:12px; background:#fff; border-radius:14px; padding:13px 14px;
  margin-bottom:9px; cursor:pointer; box-shadow:0 1px 4px rgba(58,53,48,0.05); }
.rank-num { min-width:26px; height:26px; border-radius:8px; background:#f0ebe2; color:#8a8378; font-size:13px; font-weight:800;
  display:flex; align-items:center; justify-content:center; margin-top:2px; }
.rank-num.top1 { background:#c25e3a; color:#fff; }
.rank-num.top2 { background:#e8a050; color:#fff; }
.rank-num.top3 { background:#d4a373; color:#fff; }
.rank-body { flex:1; min-width:0; }
.rank-name { font-size:15px; font-weight:700; margin-bottom:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rank-one { font-size:12px; color:#6b645a; margin-bottom:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rank-meta { font-size:11px; color:#9a938a; display:flex; gap:10px; flex-wrap:wrap; }
.verdict-pills { display:flex; gap:5px; margin-top:6px; }
.vpill { font-size:10px; padding:2px 7px; border-radius:8px; }
.vpill.buy { background:#e6f0e6; color:#5a8a5a; }
.vpill.wait { background:#fdf3e0; color:#b08a3e; }
.vpill.no { background:#f7e8e4; color:#b05c48; }
.rank-side { text-align:center; min-width:40px; }
.like-num { font-size:16px; font-weight:800; color:#c25e3a; }
.like-lbl { font-size:10px; color:#b5aea3; }

/* 话题页 */
.back-row { margin-top:14px; }
.back-btn { font-size:14px; color:#6b645a; cursor:pointer; background:none; border:none; font-family:inherit; padding:6px 0; }
.topic-head { background:#fff; border-radius:16px; padding:16px; margin-top:8px; box-shadow:0 1px 4px rgba(58,53,48,0.05); }
.t-product { font-size:20px; font-weight:800; margin-bottom:6px; }
.t-meta { font-size:11px; color:#9a938a; display:flex; gap:10px; }
.t-content { font-size:14px; line-height:1.7; color:#5a544c; margin-top:12px; white-space:pre-wrap; }
.ai-box { background:#fff; border-radius:16px; padding:16px; margin-top:12px; box-shadow:0 1px 4px rgba(58,53,48,0.05); }
.ai-badge { display:inline-flex; align-items:center; gap:5px; font-size:10px; color:#c25e3a; background:#fdeee6;
  padding:3px 9px; border-radius:8px; font-weight:700; margin-bottom:10px; }
.ai-receive { font-size:16px; font-weight:700; line-height:1.5; margin-bottom:12px; }
.ai-row { display:flex; gap:8px; margin-bottom:10px; }
.ai-row-label { min-width:60px; font-size:12px; color:#b08a3e; font-weight:700; padding-top:1px; flex-shrink:0; }
.ai-row-text { flex:1; font-size:13px; line-height:1.6; color:#5a544c; }
.ai-verdict-line { display:flex; align-items:center; gap:8px; margin-top:12px; padding-top:12px; border-top:1px dashed #e8e2d8; }
.ai-verdict-tag { font-size:13px; font-weight:800; padding:5px 14px; border-radius:10px; flex-shrink:0; }
.ai-verdict-tag.buy { background:#e6f0e6; color:#5a8a5a; }
.ai-verdict-tag.wait { background:#fdf3e0; color:#b08a3e; }
.ai-verdict-tag.no { background:#f7e8e4; color:#b05c48; }
.ai-one-liner { flex:1; font-size:13px; color:#6b645a; font-weight:600; }
.action-row { display:flex; gap:8px; margin:14px 0; }
.act-btn { flex:1; padding:12px 0; border-radius:12px; border:1.5px solid #d8d2c8; background:#fff; font-size:14px; font-weight:700;
  color:#6b645a; cursor:pointer; font-family:inherit; }
.act-btn.on { border-color:#c25e3a; color:#c25e3a; background:#fdeee6; }
.comment-item { display:flex; gap:10px; padding:12px 0; border-bottom:1px solid #f0ebe2; }
.c-avatar { width:30px; height:30px; border-radius:50%; background:#e8e2d8; color:#8a8378; font-size:13px; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.c-body { flex:1; min-width:0; }
.c-name { font-size:12px; font-weight:700; color:#8a8378; }
.c-text { font-size:14px; line-height:1.6; margin-top:3px; white-space:pre-wrap; word-break:break-all; }
.c-foot { display:flex; gap:12px; margin-top:5px; font-size:11px; color:#b5aea3; }
.c-like { cursor:pointer; }
.c-like.on { color:#c25e3a; font-weight:700; }
.comment-input-row { display:flex; gap:8px; margin-top:12px; }
.comment-input { flex:1; border:1px solid #e8e2d8; border-radius:10px; padding:10px 12px; font-size:14px; font-family:inherit;
  background:#faf8f4; outline:none; min-width:0; }
.comment-input:focus { border-color:#c25e3a; }
.comment-send { padding:0 16px; border:none; border-radius:10px; background:#c25e3a; color:#fff; font-size:14px; font-weight:700;
  cursor:pointer; font-family:inherit; flex-shrink:0; }

/* 发起剖 */
.form-card { background:#fff; border-radius:16px; padding:16px; margin-top:16px; box-shadow:0 1px 4px rgba(58,53,48,0.05); }
.f-label { font-size:13px; font-weight:700; margin:14px 0 8px; display:flex; align-items:center; gap:6px; }
.f-label:first-child { margin-top:0; }
.f-label .opt { font-size:11px; color:#b5aea3; font-weight:400; }
.f-input { width:100%; border:1px solid #e8e2d8; border-radius:10px; padding:12px 14px; font-size:15px; font-family:inherit;
  background:#faf8f4; outline:none; }
.f-input:focus { border-color:#c25e3a; background:#fff; }
textarea.f-input { min-height:90px; resize:none; line-height:1.6; }
.match-box { margin-top:10px; border-radius:10px; padding:12px; font-size:13px; }
.match-box.has { background:#e6f0e6; }
.match-box.none { background:#f0ebe2; }
.match-top { font-weight:700; margin-bottom:4px; }
.match-topic-line { padding:8px 0 2px; border-top:1px dashed rgba(0,0,0,0.08); margin-top:8px; font-size:12px; color:#5a544c;
  display:flex; justify-content:space-between; gap:8px; align-items:center; }
.match-topic-line .mtxt { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.match-topic-line .go { color:#c25e3a; font-weight:700; cursor:pointer; flex-shrink:0; }
.preview-box { margin-top:10px; border-radius:12px; background:#faf8f4; padding:14px; }
.ai-loading { text-align:center; padding:22px 0; color:#9a938a; font-size:13px; }
.spin { display:inline-block; width:24px; height:24px; border:3px solid #e8e2d8; border-top-color:#c25e3a;
  border-radius:50%; animation:spin 0.8s linear infinite; margin-bottom:8px; }
@keyframes spin { to { transform:rotate(360deg); } }
.ai-err { background:#f7e8e4; color:#b05c48; font-size:13px; text-align:center; line-height:1.7; }

/* 弹层 */
.mask { position:fixed; inset:0; background:rgba(40,35,30,0.45); z-index:50; display:none; align-items:flex-end; justify-content:center; }
.mask.show { display:flex; }
.sheet { background:#fff; border-radius:20px 20px 0 0; width:100%; max-width:520px; padding:24px 20px calc(20px + env(safe-area-inset-bottom)); }
.sheet-title { font-size:18px; font-weight:800; margin-bottom:4px; }
.sheet-sub { font-size:12px; color:#9a938a; margin-bottom:16px; }
.sheet input { width:100%; border:1px solid #e8e2d8; border-radius:12px; padding:13px 14px; font-size:16px; font-family:inherit;
  outline:none; margin-bottom:12px; }
.sheet input:focus { border-color:#c25e3a; }

.toast { position:fixed; left:50%; bottom:120px; transform:translateX(-50%); background:rgba(40,35,30,0.85); color:#fff;
  padding:10px 18px; border-radius:10px; font-size:13px; z-index:99; opacity:0; transition:opacity 0.25s; pointer-events:none;
  max-width:80%; text-align:center; }
.toast.show { opacity:1; }

/* v2 申购单/审批意见书 */
.doc-title { font-size:17px; font-weight:800; letter-spacing:1px; }
.doc-sub { font-size:11px; color:#b5aea3; margin:3px 0 6px; }
.chips { display:flex; flex-wrap:wrap; gap:8px; }
.chip { padding:8px 13px; border-radius:18px; background:#faf8f4; border:1.5px solid #e8e2d8;
  font-size:13px; color:#6b645a; cursor:pointer; transition:all 0.15s; user-select:none; -webkit-user-select:none; }
.chip.on { background:#fdeee6; border-color:#c25e3a; color:#c25e3a; font-weight:700; }
.form-table { background:#faf8f4; border-radius:10px; padding:10px 12px; margin-bottom:12px; border:1px dashed #e8e2d8; }
.ft-row { display:flex; gap:10px; padding:3px 0; font-size:12px; }
.ft-k { color:#b5aea3; min-width:60px; flex-shrink:0; }
.ft-v { color:#5a544c; font-weight:600; }
.stamp-mini { display:inline-block; font-size:9px; padding:1px 6px; border-radius:6px; font-weight:800; vertical-align:2px; }
.stamp-mini.buy { background:#e6f0e6; color:#5a8a5a; }
.stamp-mini.wait { background:#fdf3e0; color:#b08a3e; }
.stamp-mini.no { background:#f7e8e4; color:#b05c48; }
.doc-stamp-area { text-align:right; margin-top:-34px; margin-bottom:14px; pointer-events:none; }
.stamp { display:inline-block; padding:6px 14px; border:2.5px solid; border-radius:8px; font-size:15px;
  font-weight:900; letter-spacing:3px; transform:rotate(-8deg); opacity:0.85; }
.stamp-big { font-size:22px; padding:8px 18px; border-width:3.5px; letter-spacing:6px; }
.stamp.buy { color:#5a8a5a; border-color:#5a8a5a; background:rgba(90,138,90,0.06); }
.stamp.wait { color:#b08a3e; border-color:#b08a3e; background:rgba(176,138,62,0.06); }
.stamp.no { color:#b05c48; border-color:#b05c48; background:rgba(176,92,72,0.06); }
.ai-badge-no { font-weight:400; opacity:0.75; margin-left:4px; }

/* home fab */
.home-fab { position:fixed; left:14px; bottom:calc(70px + env(safe-area-inset-bottom)); width:44px; height:44px;
  border-radius:50%; background:rgba(40,35,30,.82); color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:20px; text-decoration:none; box-shadow:0 2px 8px rgba(0,0,0,.25); z-index:90; }
