/* ============================================================
 *  五灿聊天 · 界面样式
 *  移动端优先，桌面端自动收成手机卡片
 * ============================================================ */
:root{
	--brand:#12B7F5;
	--brand-2:#4F7BFF;
	--brand-grad:linear-gradient(135deg,#12B7F5 0%,#4F7BFF 100%);
	--bg:#F4F7FC;
	--card:#FFFFFF;
	--line:#EDF1F7;
	--text:#0F1826;
	--text-2:#7C8798;
	--text-3:#AEB7C4;
	--red:#FF5A5F;
	--green:#22C55E;
	--shadow:0 10px 30px rgba(20,60,120,.08);
	--radius:16px;
	--bar-h:52px;
	--safe-b:env(safe-area-inset-bottom,0px);
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
	margin:0;
	font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",Roboto,"Helvetica Neue",Arial,sans-serif;
	background:
		radial-gradient(1000px 600px at 15% -10%,rgba(18,183,245,.18),transparent 60%),
		radial-gradient(900px 500px at 100% 0%,rgba(79,123,255,.16),transparent 55%),
		#E9EFF8;
	color:var(--text);
	display:flex;align-items:center;justify-content:center;
	font-size:15px;line-height:1.5;
	overscroll-behavior:none;
}
button,input,textarea{font-family:inherit;font-size:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
a{color:var(--brand-2);text-decoration:none}
::-webkit-scrollbar{width:0;height:0}

/* ---------------- 手机外壳 ---------------- */
.phone{
	position:relative;width:100%;max-width:440px;height:100%;
	background:var(--bg);overflow:hidden;
	display:flex;flex-direction:column;
}
@media (min-width:560px){
	.phone{
		height:min(880px,96vh);border-radius:32px;
		box-shadow:0 30px 80px rgba(20,50,110,.22),0 0 0 1px rgba(255,255,255,.6) inset;
	}
}

/* ---------------- 登录 / 注册 ---------------- */
.auth{
	position:absolute;inset:0;z-index:30;
	background:
		radial-gradient(120% 70% at 8% -8%,rgba(18,183,245,.22),transparent 60%),
		radial-gradient(100% 60% at 100% 0%,rgba(79,123,255,.18),transparent 55%),
		linear-gradient(165deg,#F7FBFF,#EAF2FF 55%,#F7FBFF);
	display:flex;flex-direction:column;overflow-y:auto;
	padding:calc(28px + env(safe-area-inset-top,0px)) 22px calc(24px + var(--safe-b));
	transition:opacity .3s,transform .3s;
}
.auth.hide{opacity:0;transform:scale(.98);pointer-events:none}
.auth-glow{position:absolute;border-radius:50%;filter:blur(50px);pointer-events:none}
.auth-glow.g1{width:220px;height:220px;left:-60px;top:60px;background:rgba(18,183,245,.30)}
.auth-glow.g2{width:260px;height:260px;right:-90px;top:-40px;background:rgba(79,123,255,.22)}

.brand{display:flex;flex-direction:column;align-items:center;gap:10px;margin:22px 0 26px;position:relative}
.logo{
	width:76px;height:76px;border-radius:22px;background:var(--brand-grad);
	color:#fff;display:flex;align-items:center;justify-content:center;
	font-size:34px;font-weight:800;letter-spacing:.5px;
	box-shadow:0 14px 30px rgba(24,140,235,.35),inset 0 -6px 14px rgba(0,0,0,.12);
}
.brand h1{margin:0;font-size:22px;font-weight:800;letter-spacing:.5px}
.brand p{margin:0;color:var(--text-2);font-size:12px;letter-spacing:1.6px;text-transform:uppercase}

.auth-card{
	position:relative;background:rgba(255,255,255,.92);backdrop-filter:blur(14px);
	border-radius:22px;padding:8px 18px 18px;box-shadow:0 24px 60px rgba(30,70,140,.14);
	border:1px solid rgba(255,255,255,.9);
}
.auth-tabs{display:flex;gap:6px;padding:6px 0 10px}
.auth-tab{
	flex:1;padding:10px 0;border-radius:12px;font-size:15px;font-weight:600;color:var(--text-2);
	transition:.2s;
}
.auth-tab.on{color:var(--brand-2);background:rgba(18,183,245,.10)}

.field{display:flex;align-items:center;gap:10px;padding:12px 14px;margin:9px 0;background:#F3F7FE;border-radius:14px;border:1px solid #E6EEFA;transition:.2s}
.field:focus-within{border-color:rgba(18,183,245,.55);background:#fff;box-shadow:0 0 0 3px rgba(18,183,245,.12)}
.field .fi{width:18px;height:18px;flex:0 0 18px;opacity:.55}
.field input{flex:1;border:0;background:transparent;outline:none;font-size:15px;min-width:0}
.field input::placeholder{color:var(--text-3)}
.field .suffix{font-size:12px;color:var(--text-3);white-space:nowrap}

.avatar-pick{display:flex;align-items:center;gap:12px;margin:14px 2px 6px}
.avatar-pick .av{width:54px;height:54px;border-radius:16px;font-size:26px;flex:0 0 54px}
.avatar-pick .txt{flex:1;font-size:13px;color:var(--text-2);line-height:1.4}
.avatar-pick .pick-btn{font-size:12px;color:var(--brand-2);background:rgba(18,183,245,.10);padding:7px 12px;border-radius:10px;font-weight:600}

.emoji-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:10px 0 4px}
.emoji-grid span{
	aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:22px;
	border-radius:12px;background:#F3F7FE;border:2px solid transparent;transition:.15s;
}
.emoji-grid span.on{border-color:var(--brand);background:#fff;transform:scale(1.04)}

.btn-main{
	width:100%;padding:13px 0;margin-top:14px;border-radius:14px;background:var(--brand-grad);
	color:#fff;font-weight:700;font-size:16px;letter-spacing:1px;
	box-shadow:0 12px 24px rgba(24,140,235,.28);transition:.2s;
}
.btn-main:active{transform:scale(.98)}
.btn-main:disabled{opacity:.6;box-shadow:none}
.auth-tip{margin:14px 0 0;text-align:center;font-size:12px;color:var(--text-3);line-height:1.7}

/* ---------------- 顶部栏 ---------------- */
.app{position:absolute;inset:0;display:flex;flex-direction:column;background:var(--bg)}
.app.hide{display:none}

.topbar{
	flex:0 0 auto;padding:calc(8px + env(safe-area-inset-top,0px)) 14px 8px;
	display:flex;align-items:center;gap:10px;
	background:rgba(244,247,252,.86);backdrop-filter:blur(14px);
	border-bottom:1px solid var(--line);z-index:5;
}
.topbar .title{flex:1;font-size:17px;font-weight:800;letter-spacing:.3px}
.topbar .sub{font-size:11px;color:var(--text-3);font-weight:500;margin-left:6px}
.icon-btn{
	width:36px;height:36px;border-radius:12px;display:flex;align-items:center;justify-content:center;
	color:var(--text-2);transition:.2s;
}
.icon-btn:active{background:#E9EFF9}
.icon-btn.pin{opacity:.55}
.icon-btn.pin[data-on="1"]{opacity:1;background:rgba(18,183,245,.12)}
.pin-tag{display:inline-block;margin-left:5px;padding:1px 6px;border-radius:6px;background:rgba(18,183,245,.14);color:var(--brand-2);font-size:10.5px;font-weight:700;vertical-align:middle}

.icon-btn.badge{position:relative}
.icon-btn .dot{position:absolute;top:5px;right:5px;width:8px;height:8px;border-radius:50%;background:var(--red);box-shadow:0 0 0 2px #fff}

/* ---------------- 标签页 ---------------- */
.tabs{flex:0 0 auto;display:flex;padding:2px 10px 6px;background:rgba(244,247,252,.86);backdrop-filter:blur(14px)}
.tab{flex:1;padding:6px 0 8px;display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--text-3);font-size:11.5px;font-weight:600;border-radius:12px}
.tab.on{color:var(--brand-2)}
.tab .ti{width:22px;height:22px}
.tab .pill{position:relative}
.tab .dot{position:absolute;top:-3px;right:-8px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:var(--red);color:#fff;font-size:10px;line-height:16px;font-weight:700}

.pages{flex:1;min-height:0;position:relative;overflow:hidden}
.page{position:absolute;inset:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:12px}
.page.hide{display:none}

/* ---------------- 会话列表 ---------------- */
.search-wrap{padding:8px 14px 4px}
.search-box{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:9px 12px;box-shadow:0 2px 8px rgba(20,60,120,.04)}
.search-box input{flex:1;border:0;outline:none;background:transparent;font-size:13.5px}
.search-box input::placeholder{color:var(--text-3)}

.chat-row{display:flex;align-items:center;gap:12px;padding:11px 16px;transition:.15s;cursor:pointer}
.chat-row:active{background:#EAF0FA}
.chat-row .av{width:48px;height:48px;border-radius:15px;font-size:23px;flex:0 0 48px}
.chat-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.chat-name{font-size:15.5px;font-weight:700;display:flex;align-items:center;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-name .offi{font-size:10px;font-weight:700;color:#fff;background:var(--brand-grad);padding:1px 5px;border-radius:6px;letter-spacing:.5px}
.chat-preview{font-size:12.5px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-meta{display:flex;flex-direction:column;align-items:flex-end;gap:5px;flex:0 0 auto}
.chat-time{font-size:11px;color:var(--text-3)}
.unread{min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--red);color:#fff;font-size:11px;font-weight:700;line-height:19px;text-align:center}
.unread.mute{background:#C7CFDB}
.pin-tag{font-size:10px;color:var(--brand-2);background:rgba(18,183,245,.1);padding:1px 5px;border-radius:5px}

.empty{padding:70px 30px;text-align:center;color:var(--text-3);font-size:13px;line-height:1.9}
.empty .big{font-size:44px;display:block;margin-bottom:10px;opacity:.55}

/* ---------------- 通讯录 ---------------- */
.me-bar{
	margin:10px 14px;padding:14px;border-radius:18px;background:linear-gradient(135deg,#0FB4F2,#4C7BFF);
	color:#fff;display:flex;align-items:center;gap:12px;box-shadow:0 14px 26px rgba(20,120,220,.24);
}
.me-bar .av{width:52px;height:52px;border-radius:16px;font-size:25px;flex:0 0 52px;box-shadow:0 4px 12px rgba(0,0,0,.15)}
.me-bar h3{margin:0;font-size:16.5px}
.me-bar p{margin:2px 0 0;font-size:11.5px;opacity:.85}

.entries{margin:8px 12px;background:var(--card);border-radius:16px;overflow:hidden;box-shadow:0 3px 14px rgba(20,60,120,.05)}
.entry{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid var(--line);cursor:pointer}
.entry:last-child{border-bottom:0}
.entry:active{background:#F5F9FF}
.entry .ico{width:38px;height:38px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:18px;background:#EEF5FF;flex:0 0 38px}
.entry .name{flex:1;font-size:14.5px;font-weight:600}
.entry .val{font-size:12px;color:var(--text-3)}
.entry .arrow{color:var(--text-3);font-size:14px}

.letter{font-size:12px;font-weight:700;color:var(--text-2);padding:12px 20px 6px;letter-spacing:.5px}
.friend-row{display:flex;align-items:center;gap:12px;padding:10px 16px;cursor:pointer}
.friend-row:active{background:#EAF0FA}
.friend-row .av{width:44px;height:44px;border-radius:14px;font-size:22px;flex:0 0 44px}
.friend-row .fn{flex:1;font-size:14.5px;font-weight:600}
.friend-row .on{width:7px;height:7px;border-radius:50%;background:var(--green)}

/* ---------------- 动态 ---------------- */
.moment{padding:14px 16px 12px;border-bottom:1px solid var(--line)}
.moment-head{display:flex;align-items:center;gap:10px}
.moment-head .av{width:40px;height:40px;border-radius:13px;font-size:20px;flex:0 0 40px}
.mh{flex:1;min-width:0}
.mh b{font-size:14.5px;font-weight:700}
.mh .t{display:block;font-size:11px;color:var(--text-3)}
.moment-text{margin:9px 0 0;font-size:14.5px;line-height:1.65;white-space:pre-wrap;word-break:break-word}
.moment-imgs{display:grid;gap:5px;margin-top:10px}
.moment-imgs.one{grid-template-columns:1fr;}
.moment-imgs.two{grid-template-columns:1fr 1fr}
.moment-imgs.many{grid-template-columns:repeat(3,1fr)}
.moment-imgs img{width:100%;height:100%;object-fit:cover;border-radius:10px;aspect-ratio:1;background:#EEF2F8;display:block}
.moment-acts{display:flex;align-items:center;gap:18px;margin-top:10px;font-size:12.5px;color:var(--text-2)}
.moment-acts button{display:flex;align-items:center;gap:5px;font-size:12.5px;color:var(--text-2)}
.moment-acts .liked{color:#FF5A7A;font-weight:700}
.comments{margin-top:10px;padding:10px 12px;background:#F6F9FE;border-radius:12px}
.comments .c{font-size:13px;line-height:1.6;margin-bottom:6px}
.comments .c b{color:var(--brand-2);font-weight:600}
.comments .c:last-child{margin-bottom:0}
.comment-input{display:flex;gap:8px;margin-top:8px}
.comment-input input{flex:1;padding:9px 12px;border-radius:11px;border:1px solid var(--line);background:#fff;outline:none;font-size:13px}

/* 发布按钮 */
.fab{
	position:absolute;right:18px;bottom:18px;width:52px;height:52px;border-radius:17px;
	background:var(--brand-grad);color:#fff;font-size:26px;display:flex;align-items:center;justify-content:center;
	box-shadow:0 12px 26px rgba(24,140,235,.35);z-index:8;
}
.fab:active{transform:scale(.96)}

/* ---------------- 我的 ---------------- */
.profile-head{
	margin:12px 14px 0;padding:20px 16px;border-radius:20px;background:#fff;box-shadow:var(--shadow);
	display:flex;align-items:center;gap:14px;
}
.profile-head .av{width:64px;height:64px;border-radius:20px;font-size:30px;flex:0 0 64px}
.ph{flex:1;min-width:0}
.ph h2{margin:0;font-size:19px;font-weight:800}
.ph .line{font-size:12px;color:var(--text-2);margin-top:3px}
.ph .tags{display:flex;gap:6px;margin-top:7px;flex-wrap:wrap}
.tag{font-size:10.5px;padding:2px 7px;border-radius:7px;background:#EEF5FF;color:var(--brand-2);font-weight:600}
.tag.gray{background:#F1F4F9;color:var(--text-2)}

.set-group{margin:12px 14px;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 3px 14px rgba(20,60,120,.05)}
.set-item{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);cursor:pointer}
.set-item:last-child{border-bottom:0}
.set-item:active{background:#F5F9FF}
.set-item .si{width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:#EEF5FF;font-size:15px;flex:0 0 30px}
.set-item .st{flex:1;font-size:14.5px;font-weight:600}
.set-item .sv{font-size:12.5px;color:var(--text-3)}
.set-item.danger .st{color:var(--red);text-align:center;justify-content:center}

.footer-note{padding:18px;text-align:center;font-size:11.5px;color:var(--text-3);line-height:1.9}

/* ---------------- 聊天页 ---------------- */
.chat-page{position:absolute;inset:0;z-index:20;background:var(--bg);display:flex;flex-direction:column;transform:translateX(100%);transition:transform .26s ease}
.chat-page.on{transform:none}
.chat-head{
	flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:calc(8px + env(safe-area-inset-top,0px)) 10px 8px;
	background:rgba(255,255,255,.92);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);
}
.chat-head .back{width:36px;height:36px;display:flex;align-items:center;justify-content:center;color:var(--text-2)}
.chat-title{flex:1;min-width:0}
.chat-title b{display:block;font-size:16px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-title span{font-size:11px;color:var(--text-3)}

.chat-body{flex:1;min-height:0;overflow-y:auto;padding:12px 14px 6px;background:
	radial-gradient(600px 300px at 100% 0%,rgba(79,123,255,.05),transparent 60%),var(--bg)}
.msg-time{text-align:center;font-size:11px;color:var(--text-3);margin:10px 0 8px}
.msg{display:flex;gap:8px;margin-bottom:12px;align-items:flex-start}
.msg .av{width:36px;height:36px;border-radius:11px;font-size:18px;flex:0 0 36px}
.msg .bubble-wrap{max-width:72%;min-width:0}
.msg .who{font-size:11px;color:var(--text-3);margin:0 0 3px 3px}
.bubble{
	display:inline-block;padding:9px 13px;border-radius:14px;background:#fff;font-size:14.5px;line-height:1.55;
	word-break:break-word;white-space:pre-wrap;box-shadow:0 2px 8px rgba(20,60,120,.06);border:1px solid #F1F5FB;
}
.msg.mine{flex-direction:row-reverse}
.msg.mine .bubble-wrap{text-align:right}
.msg.mine .who{text-align:right;margin-right:3px}
.msg.mine .bubble{background:var(--brand-grad);color:#fff;border:0;box-shadow:0 6px 16px rgba(24,140,235,.22);text-align:left}
.bubble.img-only{background:none;border:0;box-shadow:none;padding:0}
.bubble.img-only img{max-width:200px;max-height:270px;border-radius:12px;display:block;cursor:pointer}
.msg.sys{justify-content:center}
.msg.sys .bubble{background:rgba(0,0,0,.045);color:var(--text-3);box-shadow:none;border:0;font-size:12px;padding:5px 10px;border-radius:8px;max-width:80%;text-align:center}
.msg-err{font-size:11px;color:var(--red);text-align:right;margin-top:2px}
.read-tip{font-size:11px;color:var(--text-3);text-align:right;margin:-8px 4px 10px}

.chat-input{
	flex:0 0 auto;display:flex;align-items:flex-end;gap:8px;padding:8px 10px calc(8px + var(--safe-b));
	background:rgba(255,255,255,.95);backdrop-filter:blur(14px);border-top:1px solid var(--line);
}
.chat-input .tool{width:34px;height:38px;display:flex;align-items:center;justify-content:center;color:var(--text-2)}
.chat-input textarea{
	flex:1;resize:none;max-height:110px;min-height:38px;padding:9px 12px;border-radius:12px;border:1px solid #E7EDF7;
	background:#F6F9FE;outline:none;font-size:14.5px;line-height:1.45;
}
.send-btn{
	height:38px;padding:0 16px;border-radius:12px;background:var(--brand-grad);color:#fff;font-weight:700;font-size:14px;
	box-shadow:0 6px 14px rgba(24,140,235,.26);
}
.send-btn:disabled{opacity:.45;box-shadow:none}

/* ---------------- 弹层 ---------------- */
.mask{position:absolute;inset:0;background:rgba(12,22,40,.42);backdrop-filter:blur(2px);z-index:40;opacity:0;pointer-events:none;transition:.22s}
.mask.on{opacity:1;pointer-events:auto}
.sheet{
	position:absolute;left:0;right:0;bottom:0;z-index:41;background:#fff;border-radius:22px 22px 0 0;
	padding:14px 16px calc(16px + var(--safe-b));transform:translateY(100%);transition:transform .26s cubic-bezier(.2,.8,.2,1);
	max-height:88%;overflow-y:auto;box-shadow:0 -10px 40px rgba(10,30,60,.18);
}
.sheet.on{transform:none}
.sheet h3{margin:0 0 12px;font-size:16px;font-weight:800;text-align:center}
.sheet .close{position:absolute;right:12px;top:10px;font-size:14px;color:var(--text-3)}
.sheet-actions{display:flex;gap:10px;margin-top:14px}
.sheet-actions button{flex:1;padding:12px 0;border-radius:13px;font-weight:700;font-size:14.5px}
.sheet-actions .ghost{background:#F1F5FB;color:var(--text-2)}
.sheet-actions .primary{background:var(--brand-grad);color:#fff}

.toast{
	position:absolute;left:50%;top:44%;transform:translate(-50%,-50%) scale(.94);z-index:60;
	background:rgba(18,24,36,.9);color:#fff;font-size:13.5px;padding:10px 16px;border-radius:12px;
	max-width:80%;text-align:center;opacity:0;pointer-events:none;transition:.2s;line-height:1.5;white-space:pre-wrap;
}
.toast.on{opacity:1;transform:translate(-50%,-50%) scale(1)}

/* 头像组件 */
.av{background:#EEF2F8 center/cover no-repeat;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}
.av img{width:100%;height:100%;object-fit:cover;display:block}

.spinner{
	width:18px;height:18px;border-radius:50%;border:2px solid rgba(18,183,245,.25);border-top-color:var(--brand);
	animation:spin .8s linear infinite;display:inline-block;vertical-align:middle;
}
@keyframes spin{to{transform:rotate(360deg)}}

.skeleton{height:64px;margin:10px 14px;border-radius:16px;background:linear-gradient(90deg,#EEF2F8,#F7FAFE,#EEF2F8);background-size:200% 100%;animation:sk 1.4s infinite}
@keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* 官方 / 官方认证 徽章 */
.vbadge{display:inline-block;padding:1px 6px;border-radius:6px;font-size:10.5px;font-weight:700;
	line-height:1.5;vertical-align:middle;white-space:nowrap;
	background:linear-gradient(135deg,#4EA8FF,#12B7F5);color:#fff;box-shadow:0 1px 3px rgba(18,183,245,.25)}
.vbadge.off{background:linear-gradient(135deg,#FFC44D,#F5A623);box-shadow:0 1px 3px rgba(245,166,35,.28)}

/* 账号管理 */
.cur-tag{font-size:10.5px;font-weight:700;color:#fff;background:linear-gradient(135deg,#4EA8FF,#12B7F5);
	padding:1px 7px;border-radius:6px}
.acc-row:active{background:#F5F9FF}

/* 个人主页卡片 */
.ucard{border-radius:18px;overflow:hidden;background:#fff;margin:-4px -2px 0}
.ucover{height:150px;background:#DDE6F2 center/cover no-repeat;position:relative}
.ucover-mask{position:absolute;inset:0;background:linear-gradient(180deg,rgba(12,22,44,.05),rgba(12,22,44,.35))}
.uavatar{margin:-40px 0 0 18px;position:relative;z-index:2;width:74px;height:74px;border-radius:24px;
	overflow:hidden;background:#fff;box-shadow:0 6px 18px rgba(20,60,120,.18)}
.uavatar .av{width:74px;height:74px;border-radius:24px;font-size:34px}
.ubody{padding:10px 18px 18px}
.uname{font-size:19px;font-weight:800;display:flex;align-items:center;gap:2px;flex-wrap:wrap}
.uidline{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;align-items:center}
.utag{font-size:10.5px;padding:2px 8px;border-radius:7px;font-weight:600;background:#EEF5FF;color:var(--brand-2)}
.utag.id{background:#F3F6FB;color:var(--text-2);font-family:inherit}
.utag.gold{background:linear-gradient(135deg,#FFD466,#F5A623);color:#fff}
.utag.blue{background:linear-gradient(135deg,#4EA8FF,#12B7F5);color:#fff}
.utag.gray{background:#F1F4F9;color:var(--text-2)}
.usign{font-size:13px;color:var(--text-2);margin-top:12px;line-height:1.7}
.ubtns{display:flex;gap:12px;margin-top:16px}
.ubtn{flex:1;height:44px;border:none;border-radius:12px;font-size:15px;font-weight:600;
	background:#EEF3FA;color:var(--text-1);cursor:pointer}
.ubtn.main{background:linear-gradient(135deg,#39A6FF,#1276F0);color:#fff;box-shadow:0 6px 16px rgba(18,118,240,.25)}

/* 我的页带封面 */
.profile-head.has-cover{color:#fff}
.profile-head.has-cover .ph .line,
.profile-head.has-cover .ph h2{color:#fff}
.profile-head.has-cover .tag{background:rgba(255,255,255,.22);color:#fff}

/* 渐变昵称（含官方） */
.gname{font-weight:800;background-size:100% 100%;background-repeat:no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
/* ============ 全局防复制 / 手机端适配 ============ */
html,body{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none}
*,*::before,*::after{-webkit-touch-callout:none}
input,textarea,select,[contenteditable="true"],.allow-select{-webkit-user-select:text;-moz-user-select:text;user-select:text;-webkit-touch-callout:default}
img,a{ -webkit-user-drag:none;user-drag:none}
a,button,[role="button"]{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
/* 手机端尺寸与安全区 */
@media (max-width:520px){
	body{font-size:14px}
	input,textarea,select{font-size:16px} /* 防止 iOS/安卓聚焦自动放大 */
	.btn-main,.btn-ghost,button{min-height:40px}
}
@supports (padding:env(safe-area-inset-bottom)){
	.tabbar,.bottom-bar,.composer{padding-bottom:calc(6px + env(safe-area-inset-bottom))}
}

/* ============ 低端机省电/流畅模式（html.lite 由 app.js 自动判定或手动开启） ============ */
html.lite *{
	-webkit-backdrop-filter:none !important; backdrop-filter:none !important;
	animation:none !important;
	box-shadow:none !important;
	text-shadow:none !important;
	transition-duration:.01s !important;
}
html.lite .auth-glow{display:none !important}
html.lite .toast{transition:none !important}
html.lite .mask{background:rgba(12,22,40,.55) !important}
html.lite img{image-rendering:auto}
/* 渐变昵称在低端机上退化为纯色，避免逐帧重绘 */
html.lite .nm-grad,html.lite .grad{background:none !important;-webkit-background-clip:initial !important;background-clip:initial !important;color:#2B6CB0 !important;-webkit-text-fill-color:#2B6CB0 !important}

/* 管理员徽章（非官方） */
.vbadge.adm{background:linear-gradient(135deg,#7A6CF5,#5B8DEF);box-shadow:0 1px 3px rgba(91,141,239,.28);color:#fff}

/* ===== 长按消息菜单 / 引用条 ===== */
.msg[data-mid]{position:relative}
.msg .bubble{transition:background .15s}
.msg.bp-hold .bubble{background:#E8F1FF}
.msg.bp-hold:not(.mine) .bubble{background:#E8F1FF}
.qbar{display:flex;align-items:center;gap:8px;padding:7px 10px;margin:0 10px 6px;border-radius:10px;
	background:#EEF5FF;font-size:12.5px;color:var(--text-2);border-left:3px solid var(--brand-2)}
.qbar .qtx{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qbar .qx{width:22px;height:22px;line-height:20px;text-align:center;border-radius:50%;background:#fff;color:var(--text-3);font-size:14px}
.quote-box{background:#F3F6FB;border-radius:8px;padding:5px 8px;margin-bottom:5px;font-size:12px;
	color:var(--text-2);border-left:2px solid var(--brand-2);line-height:1.4;max-width:100%}
.quote-box .qn{font-weight:600;color:var(--brand-2);margin-right:4px}
.mmsg{display:flex;flex-direction:column;gap:2px;padding:4px 2px}
.mmsg button{border:none;background:#fff;color:var(--text);font-size:14px;padding:11px 14px;border-radius:10px;
	text-align:left;box-shadow:0 1px 4px rgba(20,40,80,.08)}
.mmsg button.danger{color:var(--red)}

/* 引用块：自己的蓝色气泡里用深色字，别人气泡里保持灰底 */
.msg.mine .quote-box{background:rgba(255,255,255,.9);border-left-color:#fff;color:#22324A}
.msg.mine .quote-box .qn{color:#0B78C9}
.quote-box{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-all}


/* ---------------- 娱乐页 ---------------- */
.fun-seg{display:flex;gap:8px;padding:12px 14px 8px}
.fun-seg button{flex:1;height:38px;border-radius:12px;font-size:13.5px;font-weight:600;color:var(--text-2);background:#fff;box-shadow:0 2px 10px rgba(18,40,80,.06)}
.fun-seg button.on{color:#fff;background:linear-gradient(135deg,#4EA8FF,#12B7F5);box-shadow:0 6px 16px rgba(18,183,245,.28)}
.fun-body{padding:0 14px 92px}
.fun-search{display:flex;gap:8px;margin:4px 0 10px}
.fun-search input{flex:1;height:42px;padding:0 14px;border-radius:12px;border:1px solid #E6EBF3;background:#fff;font-size:14px;outline:none}
.fun-search button{height:42px;padding:0 18px;border-radius:12px;color:#fff;font-size:14px;font-weight:600;background:linear-gradient(135deg,#4EA8FF,#12B7F5)}
.fun-tip{font-size:12px;color:var(--text-3);padding:2px 2px 8px}
.fun-list{background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 2px 12px rgba(18,40,80,.05)}
.fun-row{display:flex;align-items:center;gap:10px;padding:11px 12px;border-bottom:1px solid #F1F4F9}
.fun-row:last-child{border-bottom:0}
.fun-row.on{background:rgba(18,183,245,.07)}
.fun-row .fr-ico{width:34px;height:34px;flex:0 0 34px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:rgba(18,183,245,.10);color:var(--brand-2);font-size:15px}
.fun-row .fr-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.fun-row .fr-main b{font-size:14px;font-weight:600;color:var(--text-1);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fun-row .fr-main span{font-size:11.5px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fun-row .fr-time{font-size:11.5px;color:var(--text-3)}
.fun-vwrap{background:#000;border-radius:14px;overflow:hidden}
.fun-vwrap video{width:100%;max-height:62vh;display:block;background:#000}
.fun-vacts{display:flex;align-items:center;gap:10px;margin-top:10px}
.fun-vacts button{height:38px;padding:0 18px;border-radius:12px;color:#fff;font-size:13.5px;font-weight:600;background:linear-gradient(135deg,#4EA8FF,#12B7F5)}
.fun-vacts span{font-size:11.5px;color:var(--text-3)}

/* 娱乐页播放控制条 */
.fun-bar{
	position:fixed;left:12px;right:12px;z-index:60;
	bottom:calc(68px + env(safe-area-inset-bottom,0px));
	display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:16px;
	background:rgba(255,255,255,.94);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
	box-shadow:0 10px 28px rgba(18,40,80,.16);border:1px solid rgba(255,255,255,.7);
	animation:funBarIn .22s ease;
}
@keyframes funBarIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.fun-bar.hide{display:none}
.fun-bar .fb-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.fun-bar .fb-main b{font-size:14px;font-weight:600;color:var(--text-1);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fun-bar .fb-main span{font-size:11.5px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fun-bar .fb-btns{display:flex;align-items:center;gap:6px}
.fun-bar .fb-btns button{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--text-2);background:#F3F6FB}
.fun-bar .fb-btns button:active{background:#E7EEF9}
.fun-bar .fb-play{width:44px;height:44px;color:#fff;background:linear-gradient(135deg,#4EA8FF,#12B7F5);box-shadow:0 6px 16px rgba(18,183,245,.3)}

/* 强制更新弹窗 */

/* ---------------- 下载最新版本面板 ---------------- */
.dl-url{font-size:11.5px;color:var(--text-3);word-break:break-all;margin:2px 0 10px;line-height:1.5}
.dl-state{font-size:12.5px;color:var(--text-2);margin-bottom:8px}
.dl-pct{font-size:26px;font-weight:800;color:var(--text-1);line-height:1.15}
.dl-pct small{font-size:13px;font-weight:700;color:var(--text-3);margin-left:1px}
.dl-track{height:7px;border-radius:999px;background:rgba(18,183,245,.12);overflow:hidden;margin:8px 0 6px}
.dl-fill{height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,#4EA8FF,#12B7F5);transition:width .18s linear}
.dl-meta{display:flex;justify-content:space-between;font-size:11.5px;color:var(--text-3);margin-bottom:14px}
.dl-go{width:100%;height:46px;border-radius:14px;font-size:15px;font-weight:700;color:#fff;
	background:linear-gradient(135deg,#4EA8FF,#12B7F5);box-shadow:0 10px 24px rgba(18,183,245,.28)}
.dl-go:disabled{opacity:.7}
.dl-tip{font-size:11.5px;color:var(--text-3);margin-top:10px;line-height:1.6;word-break:break-all}
.dl-acts{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.dl-act{flex:1;min-width:96px;height:40px;border-radius:12px;font-size:13px;font-weight:600;color:#fff;
	background:linear-gradient(135deg,#12B7F5,#4EA8FF)}
.dl-act.ghost{background:#F1F5FA;color:var(--text-2)}

/* ================= 自定义主题背景（html.themed 由 app.js 挂上） ================= */
html.themed .app{
	background:var(--theme-img,#E9EFF8) center center / cover no-repeat;
}
html.themed .app::before{
	content:'';position:absolute;inset:0;pointer-events:none;z-index:0;
	background:linear-gradient(180deg,rgba(255,255,255,.28),rgba(255,255,255,.10));
}
html.themed .topbar{background:rgba(255,255,255,.72)}
html.themed .tabs{background:rgba(255,255,255,.78)}
html.themed .page{background:transparent}

/* 主题设置面板 */
.th-preview{
	height:150px;border-radius:14px;border:1px solid var(--line);
	display:flex;align-items:center;justify-content:center;overflow:hidden;
	box-shadow:0 6px 20px rgba(20,60,120,.08);margin:4px 0 10px;
}
.th-empty{font-size:12.5px;color:var(--text-3)}
.th-hint{font-size:12px;color:var(--text-3);line-height:1.6;margin-bottom:12px}
.th-btns{display:flex;gap:8px}
.th-btn{flex:1;height:44px;border-radius:13px;font-size:14px;font-weight:700;color:var(--text-2);background:#F1F5FA}
.th-btn.go{color:#fff;background:linear-gradient(135deg,#4EA8FF,#12B7F5);box-shadow:0 10px 22px rgba(18,183,245,.26)}

/* ================= 液态玻璃（html.themed 开启自定义背景时生效） =================
   --glass-a / --glass-blur 由「可见度」滑杆写入，0% 时只剩边框和文字 */
html.themed{--glass-a:.32;--glass-blur:11px;--glass-line:rgba(255,255,255,.62)}
html.themed .phone{background:var(--theme-img,#E9EFF8) center center / cover no-repeat}
html.themed .app{background:transparent}
html.themed .app::before{background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.02))}
/* 聊天页是 .app 的兄弟层，且 z-index:20 盖在主界面上。
   这里必须自己铺一遍壁纸（不能透明），否则背后的会话列表会透上来 */
html.themed .chat-page{
	background-image:
		linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.02)),
		var(--theme-img,#E9EFF8);
	background-size:cover,cover;
	background-position:center center,center center;
	background-repeat:no-repeat,no-repeat;
}
html.themed .chat-body{background:transparent}
html.themed .chat-head{background:rgba(255,255,255,calc(var(--glass-a) * .85));-webkit-backdrop-filter:blur(var(--glass-blur)) saturate(160%);backdrop-filter:blur(var(--glass-blur)) saturate(160%);border-bottom:1px solid var(--glass-line)}
html.themed .chat-title b,
html.themed .chat-title span,
html.themed .msg-time{text-shadow:0 1px 2px rgba(255,255,255,.72)}
html.themed .chat-body .bubble{background:rgba(255,255,255,calc(var(--glass-a) + .16)) !important}

/* 卡片 / 列表 / 面板：只留一层很薄的玻璃，几乎只剩边框和文字 */
html.themed .search-box,
html.themed .entries,
html.themed .profile-head,
html.themed .set-group,
html.themed .fun-list,
html.themed .ucard,
html.themed .uavatar,
html.themed .sheet,
html.themed .card,
html.themed .field,
html.themed .chat-row,
html.themed .fun-search input,
html.themed .comment-input input,
html.themed .chat-input textarea{
	background:rgba(255,255,255,var(--glass-a)) !important;
	-webkit-backdrop-filter:blur(var(--glass-blur)) saturate(160%) !important;
	backdrop-filter:blur(var(--glass-blur)) saturate(160%) !important;
	border:1px solid var(--glass-line) !important;
	box-shadow:0 6px 22px rgba(18,40,80,.08), inset 0 1px 0 rgba(255,255,255,.5) !important;
}
html.themed .chat-row{box-shadow:none !important;border:0 !important;border-bottom:1px solid rgba(255,255,255,.28) !important;border-radius:0 !important;background:rgba(255,255,255,var(--glass-a)) !important}
html.themed .chat-row:active{background:rgba(255,255,255,calc(var(--glass-a) + .18)) !important}

/* 顶栏 / 底栏 / 输入条 */
html.themed .topbar{background:rgba(255,255,255,calc(var(--glass-a) * .8));-webkit-backdrop-filter:blur(var(--glass-blur)) saturate(160%);backdrop-filter:blur(var(--glass-blur)) saturate(160%);border-bottom:1px solid var(--glass-line)}
html.themed .tabs{background:rgba(255,255,255,calc(var(--glass-a) * .9));-webkit-backdrop-filter:blur(var(--glass-blur)) saturate(160%);backdrop-filter:blur(var(--glass-blur)) saturate(160%)}
html.themed .chat-input{background:rgba(255,255,255,calc(var(--glass-a) * .8));-webkit-backdrop-filter:blur(var(--glass-blur)) saturate(160%);backdrop-filter:blur(var(--glass-blur)) saturate(160%);border-top:1px solid var(--glass-line)}

/* 按钮：只显示边框和文字 */
html.themed .th-btn,
html.themed .dl-go,
html.themed .dl-act,
html.themed .send-btn,
html.themed .fun-seg button,
html.themed .sheet-actions button{
	background:transparent !important;
	border:1.5px solid var(--glass-line) !important;
	color:var(--text) !important;
	box-shadow:none !important;
	-webkit-backdrop-filter:blur(var(--glass-blur)) !important;
	backdrop-filter:blur(var(--glass-blur)) !important;
}
html.themed .th-btn.go,
html.themed .dl-go,
html.themed .send-btn,
html.themed .sheet-actions .primary{
	border-color:var(--brand) !important;
	color:var(--brand) !important;
	font-weight:700;
	background:rgba(255,255,255,calc(var(--glass-a) * .5)) !important;
}
html.themed .fun-seg button.on{border-color:var(--brand) !important;color:var(--brand) !important}

/* 聊天气泡 */
html.themed .bubble{
	background:rgba(255,255,255,calc(var(--glass-a) + .16)) !important;
	-webkit-backdrop-filter:blur(var(--glass-blur));
	backdrop-filter:blur(var(--glass-blur));
	border:1px solid var(--glass-line) !important;
	box-shadow:0 4px 14px rgba(18,40,80,.08) !important;
}
html.themed .msg.mine .bubble{
	background:var(--brand-grad) !important;color:#fff;border:0 !important;
	-webkit-backdrop-filter:none;backdrop-filter:none;
	box-shadow:0 6px 16px rgba(24,140,235,.24) !important;
}
html.themed .msg.sys .bubble{
	background:rgba(255,255,255,calc(var(--glass-a) + .1)) !important;
	border:0 !important;box-shadow:none !important;
}
html.themed .bubble.img-only{background:transparent !important;border:0 !important;box-shadow:none !important}

/* 文字：壁纸很亮时给一点描边，别糊成一片 */
html.themed .set-item .st,
html.themed .profile-head .line{text-shadow:0 1px 2px rgba(255,255,255,.72)}

/* 渐变昵称靠 background-clip:text 上色，文字本身是透明的。
   一旦父级继承了白色 text-shadow，阴影就会从透明字形里透出来，
   把渐变糊成一片灰白 —— 所以渐变名必须显式关掉阴影 */
html.themed .gname,
html.themed .profile-head h2,
html.themed .moment-head b,
html.themed .chat-row .nick{text-shadow:none !important}
html.themed .gname{
	-webkit-text-fill-color:transparent !important;
	color:transparent !important;
	background-size:100% 100% !important;
	background-repeat:no-repeat !important;
	-webkit-background-clip:text !important;
	background-clip:text !important;
}
/* 英文/数字渐变名在超浅色壁纸上不够醒目时，用一层极淡的深色底托 */
html.themed .gname{-webkit-text-stroke:0.2px rgba(255,255,255,.55)}
html.themed .tab{color:#41506A}
html.themed .footer-note{text-shadow:0 1px 2px rgba(255,255,255,.8)}

/* 头像卡有封面时原来是白字，主题下改回深色，否则在壁纸上完全看不清 */
html.themed .profile-head.has-cover .ph .line,
html.themed .profile-head.has-cover .ph h2{color:var(--text)}
html.themed .profile-head.has-cover .tag{background:rgba(255,255,255,.5);color:var(--brand-2)}
html.themed .tag{background:rgba(255,255,255,.45)}
html.themed .set-item .si{background:rgba(255,255,255,.55)}

/* 0% 可见度时连描边都淡一点，纯玻璃边 */
html.themed.low-glass .set-item{border-bottom-color:rgba(255,255,255,.35)}

/* 低端机 / 流畅模式：关模糊，玻璃直接变实心白，保证可读也不卡 */
html.themed.lite *{-webkit-backdrop-filter:none !important;backdrop-filter:none !important}
html.themed.lite .search-box,html.themed.lite .entries,html.themed.lite .profile-head,
html.themed.lite .set-group,html.themed.lite .fun-list,html.themed.lite .ucard,
html.themed.lite .sheet,html.themed.lite .card,html.themed.lite .field,
html.themed.lite .chat-row,html.themed.lite .fun-search input,
html.themed.lite .comment-input input,html.themed.lite .chat-input textarea{
	background:rgba(255,255,255,calc(var(--glass-a) * .5 + .55)) !important;
}
html.themed.lite .bubble{background:rgba(255,255,255,.88) !important}

/* 可见度滑杆 */
.th-range{margin:2px 0 12px}
.th-range-l{display:flex;justify-content:space-between;font-size:12.5px;color:var(--text-2);font-weight:600;margin-bottom:6px}
.th-range-l b{color:var(--brand-2)}
.th-slider{-webkit-appearance:none;appearance:none;width:100%;height:6px;border-radius:999px;
	background:linear-gradient(90deg,#12B7F5,#4F7BFF);outline:none}
.th-slider::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:50%;
	background:#fff;border:2px solid var(--brand);box-shadow:0 3px 10px rgba(18,183,245,.35);cursor:pointer}
