:root{
  --bg:#f5f6f7;
  --card:#fff;
  --pri:#3cc9a4;
  --pri-d:#2fb894;
  --pri-l:#e8f8f3;
  --txt:#1a1a1a;
  --txt2:#666;
  --txt3:#999;
  --txt4:#bbb;
  --line:#f0f1f2;
  --vip:#a855f7;
  --red:#ff3b30;
  --blue:#1a7cf5;
  --gold:#f6e7d2;
  --gold-t:#c99a5b;
  --r:12px;
  --safe-b:env(safe-area-inset-bottom,0px);
}

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  background:var(--bg);
  color:var(--txt);
  font:15px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue","Noto Sans CJK SC",sans-serif;
  overscroll-behavior-y:none;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
input,textarea,select,button{font:inherit;color:inherit;background:none;border:none;outline:none}
img{display:block;max-width:100%}
.mono{font-family:ui-monospace,Menlo,Consolas,monospace;font-variant-numeric:tabular-nums}

/* ============ shell ============ */
#app{max-width:560px;margin:0 auto;min-height:100%;position:relative;padding-bottom:0}
body.has-tabbar #app{padding-bottom:calc(66px + var(--safe-b))}
body:not(.has-tabbar) .tabbar{display:none}
#v-post.on{padding-bottom:calc(72px + var(--safe-b))}
#v-chat.on{padding-bottom:0}

/* ============ topbar ============ */
.topbar{
  position:sticky;top:0;z-index:40;
  display:flex;align-items:center;gap:10px;
  padding:9px 12px;
  background:rgba(245,246,247,.94);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid rgba(0,0,0,.04);
}
.topbar .tabs{display:flex;gap:16px;flex:0 0 auto}
.topbar .tabs button{
  font-size:16px;color:var(--txt2);padding:2px 0;position:relative;transition:.15s;
}
.topbar .tabs button.on{color:var(--txt);font-weight:700}
.topbar .tabs button.on::after{
  content:"";position:absolute;left:50%;bottom:-3px;transform:translateX(-50%);
  width:16px;height:3px;border-radius:2px;background:var(--pri);
}
.searchbox{
  flex:1;min-width:0;height:34px;display:flex;align-items:center;gap:6px;
  padding:0 12px;border-radius:999px;background:#eceeef;
}
.searchbox svg{width:14px;height:14px;stroke:#b3b8bd;fill:none;stroke-width:2.2;flex:0 0 auto}
.searchbox input{flex:1;min-width:0;font-size:13px;color:var(--txt);background:none}
.searchbox input::placeholder{color:#a9aeb3}
.avatar-btn{flex:0 0 auto;width:34px;height:34px;border-radius:50%;overflow:hidden;background:#e3e5e7}

/* ============ bottom nav ============ */
.tabbar{
  position:fixed;bottom:0;left:0;right:0;z-index:50;
  max-width:560px;margin:0 auto;
  display:grid;grid-template-columns:repeat(5,1fr);
  align-items:end;
  height:calc(56px + var(--safe-b));
  padding-bottom:var(--safe-b);
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(18px);
  border-top:1px solid rgba(0,0,0,.05);
}
.tabbar a{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  height:56px;font-size:10.5px;color:#9aa0a6;transition:.15s;
}
.tabbar a svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tabbar a.on{color:var(--pri)}
.tabbar a.on svg{stroke-width:2}
.tabbar .plus{position:relative}
.tabbar .plus i{
  position:absolute;top:-16px;left:50%;transform:translateX(-50%);
  width:52px;height:52px;border-radius:50%;
  background:linear-gradient(135deg,#4ad6b0,var(--pri));
  display:grid;place-items:center;
  box-shadow:0 6px 16px -4px rgba(60,201,164,.6);
}
.tabbar .plus i svg{width:26px;height:26px;stroke:#fff;stroke-width:2.6}
.tabbar .plus span{margin-top:38px}

/* ============ views ============ */
.view{display:none;padding:10px 12px 24px}
.view.on{display:block}
.pagebar{
  display:flex;align-items:center;gap:10px;
  height:50px;padding:0 12px;margin:-10px -12px 10px;
  background:rgba(245,246,247,.96);
  backdrop-filter:blur(14px);
  position:sticky;top:0;z-index:39;
}
.pagebar .back{width:30px;height:30px;display:grid;place-items:center;color:#555}
.pagebar .back svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.pagebar h1{flex:1;font-size:16px;font-weight:600;text-align:center;margin-right:30px}
.pagebar .act{font-size:14px;font-weight:600;color:var(--pri);padding:6px 2px}

/* ============ card ============ */
.card{
  background:var(--card);border-radius:var(--r);
  padding:12px;margin-bottom:10px;
  box-shadow:0 1px 2px rgba(0,0,0,.025);
  transition:.15s;
}
.card:active{background:#fbfcfc}

.phead{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.avatar{
  width:34px;height:34px;border-radius:50%;flex:0 0 auto;
  background:linear-gradient(135deg,#b9e7d8,#8dd5c0);
  display:grid;place-items:center;font-weight:600;font-size:14px;color:#fff;
  overflow:hidden;
}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar.sm{width:28px;height:28px;font-size:12px}
.avatar.lg{width:60px;height:60px;font-size:22px}
.pname{display:flex;align-items:center;gap:5px;min-width:0;flex:1}
.pname b{font-size:14px;font-weight:600;color:#222;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:9em}
.badge{
  font-size:10px;line-height:1;padding:3px 6px;border-radius:99px;
  letter-spacing:.2px;white-space:nowrap;
  background:#f2c6ff;color:#9a3dd4;
}
.badge.vip{background:#f2c6ff;color:#9a3dd4}
.badge.role{background:#222;color:#fff}
.badge.lv{background:#e8f2ff;color:#3b7ddd}
.ptime{margin-left:auto;font-size:11px;color:var(--txt4);flex:0 0 auto}

.ptxt{font-size:15px;line-height:1.6;color:#222;white-space:pre-wrap;word-break:break-word}
.pimgs{display:grid;gap:5px;margin-top:9px}
.pimgs.n1{grid-template-columns:1fr}
.pimgs.n2{grid-template-columns:1fr 1fr}
.pimgs.n3{grid-template-columns:repeat(3,1fr)}
.pimgs img{width:100%;height:100%;object-fit:cover;aspect-ratio:1;border-radius:8px;background:#eef0f1}
.pimgs.n1 img{aspect-ratio:4/3;object-fit:cover}

.ptag{
  display:inline-block;margin-top:9px;padding:5px 11px;border-radius:99px;
  background:#f2f3f4;font-size:12px;color:#5a6066;
}

.plink{
  display:flex;gap:9px;align-items:center;margin-top:9px;padding:9px 10px;
  background:#f7f8f9;border-radius:9px;
}
.plink div{min-width:0;flex:1}
.plink b{display:block;font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#222}
.plink span{display:block;font-size:11px;color:var(--txt3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.plink .dom{font-size:11px;color:var(--pri);margin-left:auto;padding-left:8px;flex:0 0 auto}

.pfoot{display:flex;align-items:center;gap:26px;margin-top:10px;color:#8d939a}
.pfoot button{display:flex;align-items:center;gap:5px;transition:.12s;font-size:13px}
.pfoot button:active{transform:scale(.92)}
.pfoot svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.pfoot button.liked{color:#ff5a7a}
.pfoot button.liked svg{fill:#ff5a7a;stroke:#ff5a7a}
.pfoot .time{margin-left:auto;font-size:11px;color:var(--txt4)}

/* ============ chips / tabs ============ */
.chips{display:flex;gap:8px;overflow-x:auto;padding:0 0 10px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{
  white-space:nowrap;padding:6px 13px;border-radius:99px;font-size:13px;
  background:#fff;color:#666;transition:.15s;
}
.chip.on{background:var(--pri);color:#fff;font-weight:500}

.sec-title{display:flex;align-items:center;gap:8px;margin:16px 2px 10px;font-size:14px;font-weight:600;color:#222}
.sec-title span{font-weight:400;font-size:12px;color:var(--txt3)}

/* ============ buttons ============ */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:12px 20px;border-radius:99px;font-size:15px;font-weight:600;
  background:#f2f3f4;color:#333;transition:.15s;
}
.btn:active{transform:scale(.97)}
.btn.pri{background:linear-gradient(135deg,#4ad6b0,var(--pri));color:#fff;box-shadow:0 4px 12px -4px rgba(60,201,164,.55)}
.btn.dark{background:#2b2f33;color:#fff}
.btn.ghost{background:#fff;color:#555}
.btn.wide{width:100%}
.btn:disabled{opacity:.5}
.btn.sm{padding:8px 16px;font-size:13px}

/* ============ inputs ============ */
.field{margin-bottom:12px}
.field label{display:block;font-size:13px;color:var(--txt3);margin-bottom:6px}
.input,.textarea{
  width:100%;padding:12px 14px;border-radius:10px;
  background:#f5f6f7;color:var(--txt);font-size:15px;transition:.15s;
}
.input:focus,.textarea:focus{background:#eef0f1}
.textarea{min-height:120px;resize:vertical;line-height:1.6}

/* ============ misc ============ */
.empty{padding:50px 0;text-align:center;color:var(--txt3);font-size:13px}
.empty b{display:block;font-size:15px;color:#555;margin-bottom:6px;font-weight:600}

.row{
  display:flex;align-items:center;gap:12px;padding:14px;
  border-radius:var(--r);background:#fff;margin-bottom:9px;
}
.row:active{background:#fbfcfc}
.row .sp{flex:1;min-width:0}
.row b{font-size:15px;font-weight:500;color:#222}
.row small{display:block;font-size:12px;color:var(--txt3);margin-top:2px}
.row .arrow{color:var(--txt4);font-size:16px}

.stat{display:flex;background:#fff;border-radius:var(--r);padding:16px 0}
.stat div{flex:1;text-align:center;position:relative}
.stat div+div::before{content:"";position:absolute;left:0;top:4px;bottom:4px;width:1px;background:var(--line)}
.stat b{display:block;font-size:18px;font-weight:600;color:#222}
.stat span{font-size:11.5px;color:var(--txt3)}

/* ============ profile ============ */
.profile{background:#fff;border-radius:var(--r);padding:16px 14px;margin-bottom:10px}
.profile .top{display:flex;align-items:center;gap:12px}
.profile h2{font-size:18px;font-weight:600;margin-bottom:3px}
.profile p{font-size:12.5px;color:var(--txt3)}

.vipcard{
  position:relative;overflow:hidden;border-radius:var(--r);
  padding:16px;margin-bottom:10px;
  background:linear-gradient(115deg,#f9e9d4,#f6dfc2);
}
.vipcard h3{font-size:15px;color:#8a6b45;font-weight:600;margin-bottom:4px}
.vipcard p{font-size:12.5px;color:#a98b66}
.vipcard .vipmark{
  position:absolute;right:-6px;bottom:-14px;font-size:56px;font-weight:800;
  color:rgba(255,255,255,.55);letter-spacing:2px;font-style:italic;
}

/* ============ post detail ============ */
.detail{background:#fff;border-radius:var(--r);padding:14px;margin-bottom:10px}
.detail h1{font-size:18px;font-weight:600;line-height:1.45;margin-bottom:12px;color:#111}
.detail .meta{display:flex;align-items:center;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--line);margin-bottom:12px}
.detail .meta .who{flex:1;min-width:0}
.detail .meta .who b{display:flex;align-items:center;gap:5px;font-size:14px;font-weight:600}
.detail .meta .who span{font-size:11.5px;color:var(--txt4)}

/* ============ comment ============ */
.cm{display:flex;gap:9px;padding:12px 0;border-bottom:1px solid var(--line)}
.cm:last-child{border-bottom:none}
.cm .body{flex:1;min-width:0}
.cm .body b{font-size:13px;color:#333;font-weight:600}
.cm .body p{font-size:14.5px;margin-top:3px;word-break:break-word;white-space:pre-wrap;color:#222}
.cm .body time{font-size:11px;color:var(--txt4);margin-top:4px;display:block}

.cmbar{
  position:fixed;left:0;right:0;bottom:0;z-index:60;
  max-width:560px;margin:0 auto;
  padding:8px 12px calc(8px + var(--safe-b));
  background:rgba(255,255,255,.97);
  backdrop-filter:blur(16px);
  border-top:1px solid rgba(0,0,0,.05);
  display:flex;gap:9px;align-items:center;
}
.cmbar .fake{
  flex:1;height:38px;border-radius:99px;background:#f2f3f4;
  display:flex;align-items:center;padding:0 14px;font-size:13px;color:#a9aeb3;
}
.cmbar textarea{
  flex:1;height:38px;max-height:96px;padding:9px 14px;border-radius:19px;
  background:#f2f3f4;font-size:14px;resize:none;line-height:1.4;
}
.cmbar .ic{width:34px;height:34px;display:grid;place-items:center;color:#7d848b;flex:0 0 auto}
.cmbar .ic svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.cmbar .send{
  width:38px;height:38px;border-radius:50%;flex:0 0 auto;
  background:linear-gradient(135deg,#4ad6b0,var(--pri));
  display:grid;place-items:center;color:#fff;
}
.cmbar .send svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* ============ composer ============ */
.compose-tools{display:flex;gap:18px;padding:12px 2px;color:#7d848b;overflow-x:auto;scrollbar-width:none}
.compose-tools::-webkit-scrollbar{display:none}
.compose-tools svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}

/* ============ chat ============ */
.conv{display:flex;gap:10px;align-items:center;padding:12px 13px;border-radius:var(--r);background:#fff;margin-bottom:9px}
.conv .sp{flex:1;min-width:0}
.conv b{font-size:14px;font-weight:600}
.conv p{font-size:12.5px;color:var(--txt3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.conv time{font-size:11px;color:var(--txt4)}
.conv .dot{width:17px;height:17px;border-radius:50%;background:#ff5a7a;color:#fff;font-size:10px;display:grid;place-items:center;margin-top:4px}

.msgwrap{display:flex;flex-direction:column;gap:9px;padding:6px 0 90px}
.msg{display:flex;gap:8px;max-width:80%}
.msg.me{align-self:flex-end;flex-direction:row-reverse}
.msg .b{padding:10px 13px;border-radius:14px;font-size:14.5px;background:#fff;word-break:break-word;color:#222}
.msg.me .b{background:linear-gradient(135deg,#4ad6b0,var(--pri));color:#fff}
.chatbar{
  position:fixed;left:0;right:0;bottom:0;z-index:60;max-width:560px;margin:0 auto;
  padding:8px 12px calc(8px + var(--safe-b));
  background:rgba(255,255,255,.97);backdrop-filter:blur(16px);
  border-top:1px solid rgba(0,0,0,.05);display:flex;gap:9px;align-items:flex-end;
}
.chatbar textarea{flex:1;min-height:38px;max-height:96px;padding:9px 14px;border-radius:19px;background:#f2f3f4;font-size:14.5px;resize:none;line-height:1.4}
.chatbar button{width:38px;height:38px;border-radius:50%;flex:0 0 auto;background:linear-gradient(135deg,#4ad6b0,var(--pri));color:#fff;display:grid;place-items:center}
.chatbar button svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* ============ service ============ */
.svc-hero{padding:20px 16px;border-radius:var(--r);background:linear-gradient(135deg,#e8f8f3,#dff3ff);margin-bottom:10px}
.svc-hero h2{font-size:19px;font-weight:700;margin-bottom:8px;color:#12433a}
.svc-hero p{font-size:13px;color:#3d7a6c;line-height:1.65}
.svc-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.svc-item{padding:13px;border-radius:var(--r);background:#fff}
.svc-item b{font-size:13.5px;display:block;margin-bottom:4px;color:#222;font-weight:600}
.svc-item span{font-size:11.5px;color:var(--txt3);line-height:1.5}

.cta{margin-top:10px;padding:18px 16px;border-radius:var(--r);background:#fff;text-align:center}
.cta b{display:block;font-size:15px;font-weight:600;margin-bottom:6px}
.cta p{font-size:12.5px;color:var(--txt3);margin-bottom:14px}

/* ============ wallet ============ */
.wallet{background:#fff;border-radius:var(--r);padding:24px 16px;text-align:center;margin-bottom:10px}
.wallet .num{font-size:36px;font-weight:700;letter-spacing:-1px;color:#111}
.wallet .num small{font-size:13px;font-weight:400;color:var(--txt3);margin-left:4px}
.wallet .acts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.wallet .acts a{display:flex;flex-direction:column;align-items:center;gap:8px;padding:20px 0;border-radius:var(--r);color:#fff;font-size:14px;font-weight:500}
.wallet .acts a:first-child{background:linear-gradient(135deg,#3d8bff,#1a7cf5)}
.wallet .acts a:last-child{background:linear-gradient(135deg,#ff6b5e,#ff3b30)}
.wallet .acts svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

.paygrid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.paygrid button{padding:16px 6px;border-radius:var(--r);background:#fff;text-align:center;transition:.15s}
.paygrid button.on{background:#fff8ef;box-shadow:inset 0 0 0 1.5px #f0c893}
.paygrid b{display:block;font-size:15px;font-weight:600;color:#222}
.paygrid span{display:block;font-size:12px;color:var(--txt3);margin-top:3px}

/* ============ fap ============ */
.fab{display:none}

/* ============ sheet ============ */
.mask{position:fixed;inset:0;background:rgba(0,0,0,.42);z-index:80;display:none}
.mask.on{display:block}
.sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:90;max-width:560px;margin:0 auto;
  background:#fff;border-radius:18px 18px 0 0;
  padding:18px 16px calc(20px + var(--safe-b));
  max-height:86vh;overflow-y:auto;
  transform:translateY(100%);transition:transform .26s cubic-bezier(.3,.9,.3,1);
}
.sheet.on{transform:none}
.sheet .bar{width:36px;height:4px;border-radius:4px;background:#e3e5e7;margin:0 auto 16px}
.sheet h3{font-size:16px;font-weight:600;margin-bottom:14px;text-align:center}

/* ============ toast ============ */
#toast{
  position:fixed;left:50%;bottom:110px;transform:translate(-50%,12px);z-index:200;
  padding:10px 18px;border-radius:10px;font-size:13.5px;
  background:rgba(40,44,48,.92);color:#fff;
  opacity:0;pointer-events:none;transition:.22s;max-width:80vw;text-align:center;
}
#toast.on{opacity:1;transform:translate(-50%,0)}

/* ============ auth ============ */
.authwrap{padding:34px 0 0}
.authwrap .logo{text-align:center;font-size:26px;font-weight:800;letter-spacing:-1px;margin-bottom:6px;color:var(--pri)}
.authwrap .sub{text-align:center;font-size:12.5px;color:var(--txt3);margin-bottom:28px}
.authwrap .field label{font-size:13px;color:#666}
.authwrap .input{background:#fff;padding:13px 14px;box-shadow:inset 0 0 0 1px #e6e8ea}
.seg{display:flex;gap:6px;background:#eceeef;padding:4px;border-radius:11px;margin-bottom:18px}
.seg button{flex:1;padding:9px;border-radius:8px;font-size:14px;color:#777;transition:.15s}
.seg button.on{background:#fff;color:#111;font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.06)}
