/* 反诈中心 · 访客端样式 */
:root{
  --red:#c8102e;--red-2:#a20c24;--red-soft:#fdeef1;
  --blue:#0b2c5a;--blue-soft:#eef3fb;
  --text:#1b2130;--muted:#7c828f;--line:#ebedf1;--bg:#f4f6f9;
  --radius:14px;
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  font:15px/1.65 -apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color:var(--text);background:var(--bg);
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button,input,textarea{font:inherit;color:inherit}

/* 顶部公告条 */
.notice-bar{
  background:linear-gradient(90deg,var(--red),var(--red-2));
  color:#fff;font-size:12.5px;height:34px;line-height:34px;overflow:hidden;
  display:flex;align-items:center;gap:8px;padding:0 14px;
}
.notice-bar .dot{width:6px;height:6px;border-radius:50%;background:#ffd24a;flex:0 0 auto;box-shadow:0 0 0 3px rgba(255,210,74,.25)}
.notice-bar .track{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.95}

/* 站点头部 */
.site-head{
  background:linear-gradient(135deg,#c8102e 0%,#a20c24 55%,#7d0a1c 100%);
  color:#fff;padding:20px 16px 26px;position:relative;overflow:hidden;
}
.site-head::after{
  content:"";position:absolute;right:-60px;top:-70px;width:220px;height:220px;
  border-radius:50%;background:rgba(255,255,255,.07);
}
.site-head .inner{max-width:720px;margin:0 auto;position:relative;z-index:1}
.brand{display:flex;align-items:center;gap:12px}
.brand .shield{
  width:46px;height:54px;flex:0 0 auto;background:#fff;
  clip-path:polygon(50% 0,100% 12%,100% 55%,50% 100%,0 55%,0 12%);
  display:flex;align-items:center;justify-content:center;color:var(--red);font-size:15px;font-weight:800;letter-spacing:-.5px
}
.brand h1{font-size:19px;font-weight:700;letter-spacing:.5px}
.brand p{font-size:12px;opacity:.8;margin-top:2px}
.head-actions{display:flex;gap:10px;margin-top:18px}
.btn-primary,.btn-ghost{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:44px;padding:0 20px;border-radius:10px;font-size:14.5px;font-weight:600;border:0;cursor:pointer;
}
.btn-primary{background:#fff;color:var(--red);box-shadow:0 6px 18px rgba(0,0,0,.12)}
.btn-ghost{background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.35)}
.btn-primary:active,.btn-ghost:active{transform:translateY(1px)}

/* 主体 */
.main{max-width:720px;margin:0 auto;padding:16px 14px 40px}
.card{background:#fff;border-radius:var(--radius);box-shadow:0 2px 14px rgba(21,28,45,.05);border:1px solid #f0f1f4}
.section-title{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700;margin:22px 2px 12px}
.section-title::before{content:"";width:3px;height:15px;border-radius:2px;background:var(--red)}
.section-title span{font-size:12px;color:var(--muted);font-weight:400;margin-left:auto}

/* 服务入口 */
.entries{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:-34px;position:relative;z-index:2}
.entry{background:#fff;border-radius:var(--radius);padding:15px 14px;box-shadow:0 6px 20px rgba(21,28,45,.07);display:flex;gap:11px;align-items:center;border:1px solid #f2f3f6}
.entry .ico{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px;flex:0 0 auto}
.entry .ico.r{background:var(--red-soft);color:var(--red)}
.entry .ico.b{background:var(--blue-soft);color:var(--blue)}
.entry .ico.g{background:#eaf7ef;color:#178a4c}
.entry .ico.y{background:#fff6e5;color:#c07d0a}
.entry b{display:block;font-size:14px;font-weight:600}
.entry small{color:var(--muted);font-size:11.5px}

/* 首页数据条 */
.stats{display:grid;grid-template-columns:repeat(3,1fr);text-align:center;padding:16px 0;margin-top:16px}
.stats div+div{border-left:1px solid var(--line)}
.stats b{display:block;font-size:17px;color:var(--red);font-weight:700}
.stats small{color:var(--muted);font-size:11.5px}

/* 提醒列表 */
.tips{padding:6px 16px 14px}
.tips li{list-style:none;position:relative;padding:10px 0 10px 18px;font-size:13.5px;border-bottom:1px dashed #f0f1f4;color:#3a4150}
.tips li:last-child{border-bottom:0}
.tips li::before{content:"";position:absolute;left:2px;top:18px;width:6px;height:6px;border-radius:50%;background:var(--red)}
.tips li b{color:var(--red)}

/* 热线 */
.hotline{display:flex;align-items:center;justify-content:space-between;padding:16px;margin-top:14px;background:linear-gradient(120deg,#0b2c5a,#123f7a);color:#fff;border-radius:var(--radius)}
.hotline b{font-size:22px;letter-spacing:1px}
.hotline small{display:block;font-size:12px;opacity:.75;margin-top:2px}
.hotline a{background:#fff;color:var(--blue);font-weight:700;font-size:13px;padding:8px 16px;border-radius:8px}
.foot{text-align:center;color:#9aa0ad;font-size:11.5px;line-height:2;margin-top:22px}
.foot a{color:#9aa0ad;text-decoration:underline}

/* ============ 聊天页 ============ */
body.chat-body{background:#eef1f5;height:100%;overflow:hidden}
.chat-wrap{height:100dvh;max-width:720px;margin:0 auto;display:flex;flex-direction:column;background:#f4f6f9}
.chat-head{
  flex:0 0 auto;background:linear-gradient(135deg,#c8102e,#8f0a1f);color:#fff;
  padding:calc(10px + env(safe-area-inset-top)) 14px 11px;display:flex;align-items:center;gap:11px;
  box-shadow:0 2px 10px rgba(0,0,0,.08);position:relative;z-index:5
}
.chat-head .back{width:26px;height:26px;display:flex;align-items:center;justify-content:center;font-size:20px;opacity:.9;flex:0 0 auto}
.chat-head .avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;border:1.5px solid rgba(255,255,255,.7);background:#fff;flex:0 0 auto}
.chat-head .info{flex:1;min-width:0}
.chat-head .info b{font-size:15px;font-weight:600;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-head .info span{font-size:11.5px;opacity:.85;display:flex;align-items:center;gap:5px;margin-top:1px}
.live-dot{width:6px;height:6px;border-radius:50%;background:#5ee08b;box-shadow:0 0 0 3px rgba(94,224,139,.25);display:inline-block}
.chat-head .shield-mini{width:24px;height:28px;background:rgba(255,255,255,.18);clip-path:polygon(50% 0,100% 12%,100% 55%,50% 100%,0 55%,0 12%);flex:0 0 auto}

.safety{
  margin:10px 12px 0;background:#fff8e8;border:1px solid #ffe2ac;border-radius:11px;padding:9px 12px;
  font-size:11.8px;color:#8a5b00;line-height:1.7;display:flex;gap:8px;flex:0 0 auto
}
.safety b{flex:0 0 auto;color:#b26b00}
.safety .more{color:#a8781f;text-decoration:underline;white-space:nowrap}

.chat-list{flex:1;overflow-y:auto;padding:14px 12px 6px;-webkit-overflow-scrolling:touch}
.day{text-align:center;font-size:11px;color:#a3a9b5;margin:6px 0 14px}
.msg{display:flex;gap:9px;margin-bottom:18px;align-items:flex-start}
.msg .ava{width:38px;height:38px;border-radius:50%;flex:0 0 auto;object-fit:cover;background:#fff;box-shadow:0 1px 4px rgba(21,28,45,.14)}
.msg .col{display:flex;flex-direction:column;min-width:0;max-width:78%}
.msg .mtime{font-size:11px;color:#9aa1ad;line-height:1.3;margin:0 0 5px 3px;letter-spacing:.2px}
.msg .bubble{max-width:100%;padding:10px 13px;border-radius:10px;font-size:14.5px;line-height:1.6;word-break:break-word;position:relative}
.msg.agent .bubble{background:#fff;color:#252b38;border-top-left-radius:3px;box-shadow:0 1px 4px rgba(21,28,45,.06)}
.msg.visitor{flex-direction:row-reverse}
.msg.visitor .col{align-items:flex-end}
.msg.visitor .mtime{margin:0 3px 5px 0}
.msg.visitor .bubble{background:linear-gradient(135deg,#c8102e,#a20c24);color:#fff;border-top-right-radius:3px;box-shadow:0 2px 8px rgba(200,16,46,.18)}
.msg .name{font-size:10.5px;color:#a9afba;margin-bottom:3px}
.msg .bubble img{max-width:190px;border-radius:8px;display:block}
.msg.system{justify-content:center}
.msg.system .bubble{background:#e9edf3;color:#6b7382;font-size:11.5px;padding:5px 12px;border-radius:20px;max-width:90%;text-align:center}
.msg-card{background:#fff;border-radius:12px;padding:13px 14px;max-width:86%;box-shadow:0 1px 4px rgba(21,28,45,.06);font-size:13px;color:#3a4150}
.msg-card h4{font-size:13.5px;color:var(--red);margin-bottom:6px;display:flex;align-items:center;gap:5px}
.msg-card p{font-size:12.5px;line-height:1.85;color:#5d6472}

.quicks{flex:0 0 auto;display:flex;gap:8px;padding:8px 12px 0;overflow-x:auto;scrollbar-width:none}
.quicks::-webkit-scrollbar{display:none}
.quicks button{
  flex:0 0 auto;background:#fff;border:1px solid #e3e7ee;color:#3d4453;border-radius:16px;
  padding:6px 13px;font-size:12.5px;cursor:pointer;white-space:nowrap
}
.quicks button:active{background:#f2f4f8}

.composer{
  flex:0 0 auto;display:flex;align-items:flex-end;gap:8px;padding:9px 12px calc(9px + env(safe-area-inset-bottom));
  background:#fff;border-top:1px solid #eaecf0;margin-top:8px
}
.composer .tool{width:36px;height:36px;flex:0 0 auto;border-radius:9px;background:#f3f5f8;display:flex;align-items:center;justify-content:center;border:0;cursor:pointer;font-size:17px;color:#6a7180}
.composer textarea{
  flex:1;resize:none;border:0;outline:none;background:#f3f5f8;border-radius:10px;
  padding:9px 12px;font-size:14.5px;line-height:1.5;max-height:100px;min-height:38px
}
.composer .send{
  width:60px;height:38px;flex:0 0 auto;border:0;border-radius:10px;background:var(--red);color:#fff;font-size:13.5px;font-weight:600;cursor:pointer
}
.composer .send:disabled{background:#e2c3c9;cursor:default}
.uploading{position:fixed;inset:0;background:rgba(15,20,30,.35);display:none;align-items:center;justify-content:center;z-index:99}
.uploading.show{display:flex}
.uploading div{background:#fff;border-radius:10px;padding:12px 20px;font-size:13px;color:#444}
.toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);background:rgba(25,30,42,.88);color:#fff;font-size:12.5px;padding:8px 16px;border-radius:20px;opacity:0;pointer-events:none;transition:.25s;z-index:120}
.toast.show{opacity:1}

/* 举报表单 */
.form{padding:18px 16px 22px}
.form .field{margin-bottom:15px}
.form label{display:block;font-size:12.5px;color:#666d7b;margin-bottom:6px}
.form label i{color:var(--red);font-style:normal}
.form input,.form select,.form textarea{
  width:100%;border:1px solid #e2e6ed;border-radius:9px;padding:11px 12px;font-size:14px;background:#fbfcfd;outline:none
}
.form input:focus,.form select:focus,.form textarea:focus{border-color:var(--red);background:#fff}
.form textarea{min-height:96px;resize:vertical}
.form .submit{width:100%;height:46px;border:0;border-radius:10px;background:var(--red);color:#fff;font-size:15px;font-weight:600;cursor:pointer;margin-top:4px}
.form .hint{font-size:11.5px;color:#9aa0ad;margin-top:10px;line-height:1.8}
.done-box{padding:36px 22px;text-align:center}
.done-box .ic{width:58px;height:58px;border-radius:50%;background:#eaf7ef;color:#178a4c;font-size:28px;line-height:58px;margin:0 auto 14px}
.done-box h3{font-size:17px;margin-bottom:6px}
.done-box p{font-size:13px;color:var(--muted);line-height:1.9}

/* 分享落地页 */
.landing{min-height:100dvh;background:linear-gradient(180deg,#c8102e 0%,#8f0a1f 42%,#f4f6f9 42%,#f4f6f9 100%);padding:30px 16px 40px}
.landing .poster{max-width:420px;margin:0 auto;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 16px 40px rgba(80,8,20,.22)}
.landing .ph{background:linear-gradient(135deg,#d0142f,#7e0a1c);color:#fff;padding:22px 20px 18px;position:relative}
.landing .ph .shield{width:40px;height:47px;background:#fff;clip-path:polygon(50% 0,100% 12%,100% 55%,50% 100%,0 55%,0 12%);display:flex;align-items:center;justify-content:center;color:var(--red);font-weight:800;font-size:13px;margin-bottom:10px}
.landing .ph h2{font-size:21px}
.landing .ph p{font-size:12.5px;opacity:.85;margin-top:4px}
.landing .pb{padding:20px 20px 24px;text-align:center}
.landing .pb .qr{width:180px;height:180px;margin:0 auto 12px;border:1px solid #eef0f4;border-radius:10px;padding:8px;background:#fff}
.landing .pb .btn{display:block;width:100%;height:46px;line-height:46px;border-radius:10px;background:var(--red);color:#fff;font-weight:600;font-size:15px;margin-top:14px}
.landing .pb small{display:block;color:#9aa0ad;font-size:11.5px;margin-top:12px;line-height:1.8}
.landing .meta{max-width:420px;margin:18px auto 0;text-align:center;color:rgba(255,255,255,.72);font-size:11.5px}
@media (max-width:360px){
  .entries{grid-template-columns:1fr}
  .brand h1{font-size:17px}
}

/* 桌面端：居中卡片，避免两侧大片留白 */
@media (min-width:760px){
  body.chat-body{background:radial-gradient(1100px 620px at 50% -8%,#e3ebf9 0%,#eef1f6 46%,#e6eaf2 100%)}
  .chat-wrap{max-width:560px;height:calc(100dvh - 44px);margin:22px auto;border-radius:16px;
    overflow:hidden;box-shadow:0 20px 54px rgba(21,28,45,.16),0 2px 8px rgba(21,28,45,.06);
    background:#f4f6f9}
  .chat-head{border-radius:16px 16px 0 0}
}
