:root{
  --bg:#F4F6F9; --card:#fff; --ink:#16202F; --sub:#5C6779; --line:#E6EAF2;
  --brand:#1F6FEB; --brand-dark:#0B3D71; --accent:#F4921E; --danger:#D64545;
  --radius:14px; --shadow:0 2px 10px rgba(16,32,64,.06);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size:15px;line-height:1.5;overscroll-behavior-y:contain}
img{display:block;max-width:100%}
button{font-family:inherit;cursor:pointer;border:0;background:none;color:inherit;font-size:inherit}
input,textarea,select{font-family:inherit;font-size:inherit;color:inherit}
a{color:var(--brand);text-decoration:none}

.app{max-width:520px;margin:0 auto;min-height:100vh;background:var(--bg);position:relative;display:flex;flex-direction:column}
.statusbar{height:calc(8px + env(safe-area-inset-top))}
.nav{height:52px;display:flex;align-items:center;gap:10px;padding:0 14px;background:#fff;position:sticky;top:0;z-index:20;border-bottom:1px solid var(--line)}
.nav .back{width:32px;height:32px;display:flex;align-items:center;justify-content:center;margin-left:-6px;font-size:20px;color:var(--ink)}
.nav h1{font-size:17px;font-weight:600;margin:0;flex:1;text-align:center;letter-spacing:.3px}
.nav .right{min-width:32px;text-align:right;font-size:13px;color:var(--brand)}
.page{flex:1;padding-bottom:70px}

/* 顶部品牌栏（首页） */
.brandbar{background:linear-gradient(135deg,#0B3D71,#1F6FEB);color:#fff;padding:calc(10px + env(safe-area-inset-top)) 16px 14px;
  display:flex;align-items:center;gap:10px}
.brandbar img{width:34px;height:34px;border-radius:9px;background:#fff}
.brandbar .t{flex:1}
.brandbar .t b{font-size:17px;letter-spacing:.5px}
.brandbar .t span{display:block;font-size:11px;opacity:.8;letter-spacing:1px}
.brandbar .bell{position:relative;font-size:19px}
.badge-dot{position:absolute;top:-3px;right:-6px;min-width:16px;height:16px;border-radius:8px;background:#FF4D4F;color:#fff;
  font-size:10px;line-height:16px;text-align:center;padding:0 4px}

.tabs{display:flex;gap:22px;padding:10px 16px 0;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:15}
.tabs button{padding:6px 0 10px;font-size:15px;color:var(--sub);position:relative}
.tabs button.on{color:var(--ink);font-weight:600}
.tabs button.on:after{content:"";position:absolute;left:50%;bottom:0;transform:translateX(-50%);width:20px;height:3px;border-radius:2px;background:var(--brand)}

/* 卡片 */
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);margin:10px 12px;overflow:hidden}
.pad{padding:14px}
.sec-title{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 6px}
.sec-title b{font-size:15px}
.sec-title span{font-size:12px;color:var(--sub)}

/* 用户头像 */
.ava{width:44px;height:44px;border-radius:12px;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;
  font-weight:600;font-size:16px;flex:none;overflow:hidden}
.ava img{width:100%;height:100%;object-fit:cover}
.ava.sm{width:34px;height:34px;border-radius:10px;font-size:13px}
.ava.lg{width:64px;height:64px;border-radius:18px;font-size:22px}
.vtag{display:inline-flex;align-items:center;gap:3px;background:#EAF1FF;color:#1F6FEB;font-size:10px;padding:1px 6px;border-radius:6px;vertical-align:middle}
.vtag.gray{background:#F0F2F6;color:#8A94A6}

/* 动态 */
.post{padding:14px 14px 6px}
.post-head{display:flex;gap:10px;align-items:flex-start}
.post-head .u{flex:1;min-width:0}
.post-head .u b{font-size:15px;font-weight:600}
.post-head .u>span:not(.vtag){display:block;font-size:11.5px;color:var(--sub);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.post-head .more{color:#9AA5B8;font-size:18px;padding:0 2px}
.post-body{margin-top:10px;font-size:15px;line-height:1.62;white-space:pre-wrap;word-break:break-word}
.post-topic{display:inline-block;margin-top:8px;color:var(--brand);font-size:12.5px}
.post-imgs{display:grid;gap:6px;margin-top:10px}
.post-imgs.n1{grid-template-columns:1fr}
.post-imgs.n2{grid-template-columns:1fr 1fr}
.post-imgs.n3{grid-template-columns:1fr 1fr 1fr}
.post-imgs img{border-radius:10px;aspect-ratio:4/3;object-fit:cover;width:100%;background:#EEF1F6}
.post-meta{display:flex;align-items:center;gap:22px;padding:10px 14px 12px;border-top:1px solid #F1F3F8;margin-top:10px;color:var(--sub);font-size:13px}
.post-meta button{display:flex;align-items:center;gap:5px;color:var(--sub)}
.post-meta button.on{color:var(--danger)}
.post-meta .right{margin-left:auto;font-size:12px;color:#9AA5B8}

/* 通用按钮 */
.btn{display:flex;align-items:center;justify-content:center;gap:6px;height:46px;border-radius:12px;background:var(--brand);color:#fff;
  font-weight:600;font-size:16px;width:100%}
.btn:disabled{opacity:.5}
.btn.ghost{background:#fff;color:var(--brand);border:1px solid #C9DBFF}
.btn.plain{background:#F2F5FA;color:var(--ink);font-weight:500}
.btn.sm{height:34px;font-size:13px;border-radius:9px;padding:0 14px;width:auto}
.btn.danger{background:#FDF0F0;color:var(--danger)}
.btn-row{display:flex;gap:10px}
.link-btn{color:var(--brand);font-size:13px}

/* 表单 */
.form{padding:6px 16px 16px}
.field{padding:12px 0;border-bottom:1px solid var(--line)}
.field label{display:block;font-size:12px;color:var(--sub);margin-bottom:4px}
.field input,.field textarea,.field select{width:100%;border:0;outline:none;background:transparent;font-size:15px;padding:2px 0}
.field textarea{min-height:90px;resize:vertical;line-height:1.6}
.field .row{display:flex;align-items:center;gap:10px}
.code-btn{flex:none;font-size:13px;color:var(--brand);padding:6px 12px;border:1px solid #C9DBFF;border-radius:8px;background:#F7FAFF}
.code-btn:disabled{color:#A6B0C0;border-color:var(--line);background:#F5F7FA}
.code-hint{margin:8px 0 0;font-size:12px;color:var(--accent);background:#FFF8EC;border:1px dashed #F6D5A5;border-radius:8px;padding:7px 10px}
.form-tip{font-size:12px;color:var(--sub);padding:10px 16px 0;line-height:1.6}

/* 登录页 */
.login-hero{background:linear-gradient(160deg,#0B3D71 0%,#1F6FEB 62%,#2E86F0 100%);color:#fff;padding:calc(46px + env(safe-area-inset-top)) 24px 60px;border-radius:0 0 28px 28px;position:relative;overflow:hidden}
.login-hero:after{content:"";position:absolute;right:-40px;top:-30px;width:180px;height:180px;border:1px solid rgba(255,255,255,.16);border-radius:50%}
.login-hero:before{content:"";position:absolute;right:20px;top:60px;width:110px;height:110px;border:1px solid rgba(255,255,255,.12);border-radius:50%}
.login-hero img{width:56px;height:56px;border-radius:14px;background:#fff;margin-bottom:14px}
.login-hero h2{font-size:24px;margin:0 0 6px;letter-spacing:.5px}
.login-hero p{margin:0;font-size:13px;opacity:.85}
.login-card{background:#fff;border-radius:18px;margin:-38px 16px 0;box-shadow:0 8px 24px rgba(11,61,113,.12);padding:18px 18px 22px;position:relative;z-index:2}
.login-tabs{display:flex;gap:24px;margin-bottom:6px}
.login-tabs button{font-size:15px;color:var(--sub);padding-bottom:8px;position:relative}
.login-tabs button.on{color:var(--ink);font-weight:600}
.login-tabs button.on:after{content:"";position:absolute;left:50%;transform:translateX(-50%);bottom:0;width:18px;height:3px;background:var(--brand);border-radius:2px}
.agree{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:var(--sub);margin-top:14px;line-height:1.6}
.agree .dot{width:16px;height:16px;border:1px solid #C4CEDD;border-radius:4px;flex:none;margin-top:2px;display:flex;align-items:center;justify-content:center;font-size:11px;color:#fff}
.agree .dot.on{background:var(--brand);border-color:var(--brand)}
.other-login{display:flex;align-items:center;gap:10px;padding:16px 16px 0;color:#A6B0C0;font-size:12px}
.other-login em{flex:1;height:1px;background:var(--line)}

/* 底部导航 */
.tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:520px;background:rgba(255,255,255,.97);
  backdrop-filter:blur(10px);border-top:1px solid var(--line);display:flex;padding-bottom:env(safe-area-inset-bottom);z-index:30}
.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:56px;color:#8A94A6;font-size:10.5px;position:relative}
.tabbar a.on{color:var(--brand)}
.tabbar a i{font-size:20px;font-style:normal;line-height:1}
.tabbar a .dot{position:absolute;top:7px;right:calc(50% - 18px);min-width:15px;height:15px;border-radius:8px;background:#FF4D4F;color:#fff;font-size:9px;line-height:15px;text-align:center;padding:0 3px}

/* 列表行 */
.row{display:flex;align-items:center;gap:12px;padding:14px 16px;background:#fff;border-bottom:1px solid #F1F3F8}
.row:last-child{border-bottom:0}
.row .u{flex:1;min-width:0}
.row .u b{font-size:15px;font-weight:600;display:flex;align-items:center;gap:6px}
.row .u>span{display:block;font-size:12px;color:var(--sub);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .chev{color:#C4CEDD;font-size:16px}
.row .val{font-size:12.5px;color:#9AA5B8}

/* 发现同行 */
.filters{display:flex;gap:8px;padding:10px 12px;overflow-x:auto;background:#fff;position:sticky;top:0;z-index:15;border-bottom:1px solid var(--line)}
.filters .chip{flex:none;padding:6px 12px;border-radius:16px;background:#F2F5FA;color:var(--sub);font-size:13px}
.filters .chip.on{background:#EAF1FF;color:var(--brand);font-weight:600}
.searchbar{margin:10px 12px;display:flex;align-items:center;gap:8px;background:#fff;border-radius:10px;padding:9px 12px;box-shadow:var(--shadow)}
.searchbar input{flex:1;border:0;outline:none;background:transparent;font-size:14px}
.searchbar span{color:#9AA5B8}

/* 会话列表 */
.chat-item{display:flex;gap:12px;padding:14px 16px;background:#fff;border-bottom:1px solid #F1F3F8;align-items:center}
.chat-item .u{flex:1;min-width:0}
.chat-item .u b{font-size:15px}
.chat-item .u p{margin:3px 0 0;font-size:12.5px;color:var(--sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-item .m{text-align:right;font-size:11px;color:#A6B0C0;flex:none}
.chat-item .m .un{display:inline-block;margin-top:6px;min-width:17px;height:17px;border-radius:9px;background:#FF4D4F;color:#fff;font-size:10px;line-height:17px;padding:0 4px}

/* 聊天页 */
.chat-body{flex:1;padding:12px 14px 90px;display:flex;flex-direction:column;gap:12px}
.msg{display:flex;gap:8px;align-items:flex-start}
.msg .bubble{max-width:74%;padding:9px 12px;border-radius:12px;background:#fff;box-shadow:var(--shadow);font-size:14.5px;line-height:1.55;word-break:break-word}
.msg.mine{flex-direction:row-reverse}
.msg.mine .bubble{background:var(--brand);color:#fff;box-shadow:none}
.chat-input{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:520px;display:flex;gap:8px;padding:8px 12px calc(8px + env(safe-area-inset-bottom));
  background:#fff;border-top:1px solid var(--line);z-index:30}
.chat-input input{flex:1;border:0;outline:none;background:#F2F5FA;border-radius:20px;padding:11px 14px;font-size:14.5px}
.chat-input button{width:64px;border-radius:20px;background:var(--brand);color:#fff;font-size:14px;font-weight:600}

/* 社区 */
.board-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:10px 12px}
.board-card{background:#fff;border-radius:12px;padding:12px;box-shadow:var(--shadow)}
.board-card .h{display:flex;align-items:center;gap:8px}
.board-card .h i{font-style:normal;font-size:20px}
.board-card .h b{font-size:14.5px}
.board-card p{margin:8px 0 0;font-size:11.5px;color:var(--sub);height:32px;overflow:hidden}
.board-card .f{margin-top:6px;font-size:11px;color:#A6B0C0;display:flex;justify-content:space-between}

.thread{background:#fff;padding:14px 16px;border-bottom:1px solid #F1F3F8}
.thread h3{margin:0;font-size:15px;font-weight:600;line-height:1.45}
.thread h3 .pin{color:var(--accent);font-size:11px;margin-right:4px;border:1px solid #F6D5A5;border-radius:4px;padding:0 3px}
.thread p{margin:6px 0 0;font-size:13px;color:var(--sub);line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.thread .f{display:flex;align-items:center;gap:10px;margin-top:8px;font-size:11.5px;color:#A6B0C0}
.thread .f .ava{width:22px;height:22px;border-radius:7px;font-size:10px}
.thread .f em{font-style:normal;color:var(--brand);background:#EAF1FF;border-radius:4px;padding:0 5px;font-size:10.5px}

/* 详情 */
.detail-body{background:#fff;padding:16px}
.detail-body h1{font-size:19px;margin:0 0 8px;line-height:1.45}
.detail-body .meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#9AA5B8;margin-bottom:14px}
.detail-body .text{font-size:15.5px;line-height:1.75;white-space:pre-wrap;word-break:break-word}
.detail-body img{border-radius:10px;margin-top:10px}
.reply{display:flex;gap:10px;padding:14px 16px;background:#fff;border-top:1px solid #F1F3F8}
.reply .c{flex:1;min-width:0}
.reply .c b{font-size:13.5px}
.reply .c p{margin:4px 0 0;font-size:14px;line-height:1.6;word-break:break-word}
.reply .c span{font-size:11px;color:#A6B0C0}
.floor{color:#C4CEDD;font-size:12px;flex:none}

/* 我的 */
.me-hero{background:linear-gradient(160deg,#0B3D71,#1F6FEB);color:#fff;padding:calc(20px + env(safe-area-inset-top)) 18px 24px}
.me-hero .top{display:flex;align-items:center;gap:14px}
.me-hero .top .ava{width:64px;height:64px;border-radius:18px;font-size:22px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.3)}
.me-hero .top .info{flex:1;min-width:0}
.me-hero .top .info b{font-size:19px;display:flex;align-items:center;gap:8px}
.me-hero .top .info p{margin:4px 0 0;font-size:12.5px;opacity:.88}
.me-hero .top .edit{font-size:12px;color:#fff;border:1px solid rgba(255,255,255,.5);border-radius:14px;padding:4px 10px}
.me-stats{display:flex;gap:0;margin:18px -18px 0;padding:0 6px}
.me-stats div{flex:1;text-align:center}
.me-stats b{font-size:18px;display:block;line-height:1.3}
.me-stats span{font-size:11px;opacity:.8}
.me-panel{background:#fff;border-radius:16px;margin:4px 12px 0;box-shadow:var(--shadow);position:relative;overflow:hidden}
.me-list .row{padding:15px 16px}
.me-list .row .ico{width:26px;text-align:center;font-size:17px}
.me-verify{margin:10px 12px;background:#fff;border-radius:var(--radius);padding:14px 16px;display:flex;align-items:center;gap:12px}
.me-verify .t{flex:1}
.me-verify .t b{font-size:14.5px;display:block}
.me-verify .t span{font-size:12px;color:var(--sub)}
.me-verify .st{font-size:12px;color:var(--accent);background:#FFF8EC;border-radius:12px;padding:3px 9px}

/* 空态 */
.empty{padding:60px 24px;text-align:center;color:#A6B0C0}
.empty i{font-size:40px;font-style:normal;display:block;margin-bottom:10px;opacity:.7}
.empty p{font-size:13.5px;margin:0}

/* 提示条 / toast */
.install-tip{position:fixed;left:12px;right:12px;bottom:68px;max-width:496px;margin:0 auto;background:#fff;border-radius:14px;
  box-shadow:0 8px 26px rgba(16,32,64,.18);padding:12px 14px;z-index:40;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.install-tip-main{display:flex;align-items:center;gap:10px;flex:1;min-width:200px}
.install-tip img{width:38px;height:38px;border-radius:10px}
.install-tip strong{display:block;font-size:13.5px}
.install-tip span{font-size:11.5px;color:var(--sub)}
.install-tip-actions{display:flex;gap:8px}
.btn-ghost{font-size:12.5px;color:#8A94A6;padding:6px 8px}
.toast{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(22,32,47,.9);color:#fff;font-size:13.5px;
  padding:10px 16px;border-radius:10px;z-index:60;max-width:80%;text-align:center;line-height:1.5}

/* 发布页 */
.publish{background:#fff;padding:16px;min-height:calc(100vh - 116px)}
.publish textarea{width:100%;border:0;outline:none;min-height:140px;font-size:16px;line-height:1.7;resize:none}
.img-picks{display:grid;grid-template-columns:repeat(3,86px);gap:8px;margin-top:10px}
.img-pick{width:86px;height:86px;border-radius:10px;overflow:hidden;position:relative;background:#F2F5FA;display:flex;align-items:center;justify-content:center;color:#A6B0C0;font-size:26px;border:1px dashed #D6DEEC}
.img-pick img{width:100%;height:100%;object-fit:cover}
.img-pick .rm{position:absolute;top:2px;right:2px;width:18px;height:18px;border-radius:9px;background:rgba(0,0,0,.55);color:#fff;font-size:11px;line-height:18px;text-align:center}
.publish-bar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:520px;background:#fff;border-top:1px solid var(--line);
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:12px;z-index:30}
.publish-bar .cnt{font-size:12px;color:#A6B0C0}
.publish-bar .btn{height:40px;width:auto;padding:0 24px;margin-left:auto}

/* 协议页 */
.doc{padding:20px 20px 40px;background:#fff;font-size:14.5px;line-height:1.8;color:#2A3546}
.doc h2{font-size:17px;margin:0 0 12px}
.doc h3{font-size:15px;margin:18px 0 6px}
.doc p{margin:0 0 10px;color:#41506A}
.doc ul{margin:0 0 10px;padding-left:18px;color:#41506A}
.doc .small{font-size:12.5px;color:#8A94A6}

/* 实名页 */
.verify-hero{background:linear-gradient(160deg,#0B3D71,#1F6FEB);color:#fff;padding:24px 20px 30px}
.verify-hero b{font-size:19px}
.verify-hero p{margin:8px 0 0;font-size:12.5px;opacity:.85;line-height:1.6}
.verify-steps{display:flex;gap:0;margin:14px 12px 0}
.verify-steps div{flex:1;text-align:center;font-size:11.5px;color:#8A94A6}
.verify-steps div b{display:block;width:24px;height:24px;line-height:24px;border-radius:50%;background:#E6EAF2;color:#8A94A6;margin:0 auto 5px;font-size:12px}
.verify-steps div.on b{background:var(--brand);color:#fff}
.verify-steps div.on{color:var(--brand)}

/* 菜单弹层 */
.sheet-mask{position:fixed;inset:0;background:rgba(12,20,34,.42);z-index:50;display:flex;align-items:flex-end}
.sheet{width:100%;max-width:520px;margin:0 auto;background:#fff;border-radius:18px 18px 0 0;padding:6px 0 calc(8px + env(safe-area-inset-bottom))}
.sheet h4{margin:0;padding:14px 18px 8px;font-size:13px;color:var(--sub);font-weight:500}
.sheet button{display:block;width:100%;text-align:center;padding:14px;font-size:16px;border-bottom:1px solid #F1F3F8}
.sheet button.danger{color:var(--danger)}
.sheet button.cancel{color:var(--sub);border-bottom:0;margin-top:6px;background:#F5F7FA}

/* 通知 */
.noti{display:flex;gap:10px;padding:14px 16px;background:#fff;border-bottom:1px solid #F1F3F8}
.noti .ico{width:34px;height:34px;border-radius:10px;background:#EAF1FF;color:var(--brand);display:flex;align-items:center;justify-content:center;font-size:16px;flex:none}
.noti .c{flex:1;font-size:13.5px;line-height:1.55}
.noti .c span{display:block;font-size:11px;color:#A6B0C0;margin-top:3px}
.noti .un{width:7px;height:7px;border-radius:50%;background:#FF4D4F;margin-top:6px;flex:none}

@media (min-width:560px){
  .app{box-shadow:0 0 40px rgba(16,32,64,.08);min-height:100vh}
}
