*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
:root{
  --bg:#fff; --bg2:#eef2f7; --card:#fff; --card2:#f9fbfd;
  --text:#0b1a2f; --text2:#5e6f88; --text3:#98a7bd;
  --border:#e9eef3; --hover:#f6f9fe;
  --accent:#3b82f6; --accent2:#8b5cf6;
  --green:#10b981; --red:#ef4444; --gold:#f59e0b;
  --grad:linear-gradient(135deg,#3b82f6,#8b5cf6);
  --grad-gold:linear-gradient(135deg,#f59e0b,#f97316);
  --shadow:0 8px 30px rgba(0,0,0,.05);
  --shadow-lg:0 12px 40px rgba(0,0,0,.12);
  --glow-blue:0 0 0 4px rgba(59,130,246,.12);
  --mask:rgba(0,0,0,.45);
  --topbar-bg:rgba(255,255,255,.86);
  --hero-bg:linear-gradient(180deg,rgba(59,130,246,.065),rgba(139,92,246,.035) 58%,rgba(255,255,255,0));
  --header-h:56px;
  --page-max:820px;
  color-scheme:light;
}
html.dark{
  --bg:#0c121e; --bg2:#0a0f1a; --card:#141b2b; --card2:#1a2439;
  --text:#f0f4fa; --text2:#94a3b8; --text3:#64748b;
  --border:#1e2a3d; --hover:#1a2439;
  --accent:#3b82f6; --accent2:#a78bfa;
  --green:#34d399; --red:#f87171; --gold:#fbbf24;
  --grad:linear-gradient(135deg,#3b82f6,#a78bfa);
  --grad-gold:linear-gradient(135deg,#f59e0b,#fb923c);
  --shadow:0 8px 30px rgba(0,0,0,.3);
  --shadow-lg:0 12px 40px rgba(0,0,0,.4);
  --glow-blue:0 0 0 4px rgba(59,130,246,.18);
  --mask:rgba(0,0,0,.6);
  --topbar-bg:rgba(20,27,43,.86);
  --hero-bg:linear-gradient(180deg,rgba(59,130,246,.13),rgba(139,92,246,.06) 58%,rgba(20,27,43,0));
  color-scheme:dark;
}

html,body{min-height:100%}
body{
  background:var(--bg);color:var(--text);
  font:14px/1.75 system-ui,-apple-system,'Segoe UI',Roboto,'PingFang SC','Microsoft YaHei',sans-serif;
  -webkit-font-smoothing:antialiased;
  display:flex;flex-direction:column;min-height:100vh;
  transition:background .25s,color .25s;
}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
::-webkit-scrollbar-thumb:hover{background:var(--text3)}
::selection{background:rgba(59,130,246,.22)}

.topbar{
  position:sticky;top:0;z-index:60;
  display:flex;align-items:center;gap:8px;
  padding:10px 14px;
  padding-top:calc(10px + env(safe-area-inset-top,0px));
  min-height:var(--header-h);
  background:var(--topbar-bg);
  border-bottom:1px solid var(--border);
  backdrop-filter:saturate(1.6) blur(12px);
  -webkit-backdrop-filter:saturate(1.6) blur(12px);
}
.brand{display:flex;align-items:center;gap:8px;min-width:0;color:var(--text)}
.brand:hover{text-decoration:none}
.brand-logo{
  width:28px;height:28px;border-radius:8px;flex-shrink:0;
  background:var(--grad);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:900;
  box-shadow:0 1px 3px rgba(59,130,246,.2);
}
.brand-name{
  font-size:14px;font-weight:700;letter-spacing:-.2px;white-space:nowrap;
  transition:color .16s;
}
.brand-name em{color:var(--accent);font-style:normal}
.brand:hover .brand-name{color:var(--accent)}
.brand-badge{
  font-size:9px;font-weight:700;letter-spacing:.2px;
  padding:1px 6px;border-radius:20px;
  background:var(--hover);color:var(--text3);
  border:1px solid var(--border);
  white-space:nowrap;
}
.sp{flex:1;min-width:4px}

.ico-btn{
  width:34px;height:34px;border-radius:9px;flex-shrink:0;
  border:1px solid var(--border);background:var(--card);
  color:var(--text2);cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:all .15s;
}
.ico-btn:hover{color:var(--accent);border-color:var(--accent);background:var(--hover)}
.ico-btn:active{transform:scale(.95)}
.ico-btn svg{width:16px;height:16px;display:block}
.ico-btn .i-sun{display:none}
html.dark .ico-btn .i-sun{display:block}
html.dark .ico-btn .i-moon{display:none}

.btn{
  height:34px;padding:0 13px;border-radius:9px;cursor:pointer;flex-shrink:0;
  border:1px solid var(--border);background:var(--card);color:var(--text2);
  font-size:13px;font-weight:700;font-family:inherit;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  transition:all .16s;white-space:nowrap;
}
.btn:hover{color:var(--accent);border-color:var(--accent);background:var(--hover);text-decoration:none}
.btn:active{transform:scale(.98)}
.btn svg{width:15px;height:15px;display:block}
.btn.primary{
  background:var(--grad);color:#fff;border:0;
  box-shadow:0 6px 18px rgba(59,130,246,.28);
}
.btn.primary:hover{filter:brightness(1.06);transform:translateY(-1px);color:#fff}
.btn.lg{height:38px;padding:0 18px;border-radius:11px;font-size:13.5px}

.wrap{
  flex:1;width:100%;max-width:var(--page-max);
  margin:0 auto;padding:20px 16px calc(34px + env(safe-area-inset-bottom,0px));
}

.hero{
  position:relative;overflow:hidden;
  margin:0 0 20px;padding:18px 20px 16px;
  background:var(--card);
  background-image:var(--hero-bg);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow);
}
.hero::after{
  content:'';position:absolute;right:-52px;top:-70px;
  width:190px;height:190px;pointer-events:none;
  background:radial-gradient(circle at center,rgba(139,92,246,.20),rgba(59,130,246,0) 68%);
}
html.dark .hero::after{
  background:radial-gradient(circle at center,rgba(139,92,246,.26),rgba(59,130,246,0) 68%);
}
.hero-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:10px;position:relative}
.chip{
  display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 9px;
  border-radius:20px;font-size:11px;font-weight:700;letter-spacing:.2px;
  color:var(--text2);background:var(--hover);border:1px solid var(--border);
}
.chip.live{color:var(--green);background:rgba(16,185,129,.10);border-color:rgba(16,185,129,.22)}
.chip.live .dot{
  width:5px;height:5px;border-radius:50%;background:currentColor;
  animation:pulse 1.5s infinite;
}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}
.hero h1{
  position:relative;
  font-size:19px;line-height:1.55;font-weight:800;
  letter-spacing:-.2px;word-break:break-word;
}
.meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  margin-top:10px;font-size:12px;color:var(--text2);
}
.meta .sep{width:3px;height:3px;border-radius:50%;background:var(--text3);opacity:.7;flex-shrink:0}
.meta b{color:var(--text);font-weight:700}

.msg{
  width:100%;max-width:100%;
  margin:0 auto 16px;
  animation:fadein .3s;
}
@keyframes fadein{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.msg.user{display:flex;flex-direction:column;align-items:flex-end}
.msg.bot{display:block}

.bubble{
  padding:13px 17px;border-radius:16px;
  font-size:14px;line-height:1.75;
  word-break:break-word;
  max-width:100%;
}
.msg.user .bubble{
  background:var(--grad);color:#fff;
  border-radius:16px 16px 6px 16px;
  max-width:78%;
  padding:11px 16px;line-height:1.7;
  box-shadow:0 6px 18px rgba(59,130,246,.22);
}
.msg.bot .bubble{
  background:var(--card);border:1px solid var(--border);
  border-radius:16px 16px 16px 6px;
  padding:16px 19px;line-height:1.78;
  box-shadow:0 6px 24px rgba(15,35,75,.05);
}
html.dark .msg.bot .bubble{box-shadow:0 6px 24px rgba(0,0,0,.26)}

/* ===== 长消息折叠：展开 / 收起 ===== */
.bubble{position:relative}
.fold-in{position:relative}
.msg.foldable .bubble{padding-bottom:40px}
.msg.foldable .fold-in{
  overflow:hidden;
  transition:max-height .28s cubic-bezier(.22,.61,.36,1);
}
.msg.foldable .fold-in.fold-fade{
  -webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 44px),rgba(0,0,0,0));
          mask-image:linear-gradient(180deg,#000 calc(100% - 44px),rgba(0,0,0,0));
}
.fold-btn{
  position:absolute;right:9px;bottom:9px;z-index:3;
  width:26px;height:26px;padding:0;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--border);background:var(--card);color:var(--text2);
  cursor:pointer;line-height:1;
  box-shadow:0 2px 10px rgba(15,35,75,.10);
  transition:color .15s,border-color .15s,background .15s;
}
.fold-btn svg{width:14px;height:14px;display:block;transition:transform .28s cubic-bezier(.22,.61,.36,1)}
.fold-btn:hover{color:var(--accent);border-color:var(--accent);background:var(--hover)}
.msg.fold-open .fold-btn svg{transform:rotate(180deg)}
html.dark .fold-btn{background:var(--card2);box-shadow:0 2px 10px rgba(0,0,0,.32)}
.msg.user .fold-btn{
  background:rgba(255,255,255,.94);border-color:rgba(255,255,255,.55);color:#3b82f6;
  box-shadow:0 2px 10px rgba(30,60,140,.20);
}
.msg.user .fold-btn:hover{background:#fff;color:#2563eb;border-color:#fff}

.who{
  display:flex;align-items:center;gap:7px;
  margin:0 0 7px 2px;font-size:11.5px;font-weight:700;color:var(--text2);
  letter-spacing:.2px;
}
.who .av{
  width:20px;height:20px;border-radius:6px;flex-shrink:0;
  background:var(--grad);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:10px;font-weight:900;
}

.msg-tools{
  display:flex;gap:5px;margin-top:6px;
  opacity:0;pointer-events:none;
  transition:opacity .16s ease;
}
.msg:focus-within > .msg-tools{opacity:1;pointer-events:auto}
@media (hover:hover){
  .msg:hover > .msg-tools{opacity:1;pointer-events:auto}
}
@media (hover:none){
  .msg-tools{opacity:1;pointer-events:auto}
}
.msg-tool{
  display:inline-flex;align-items:center;gap:4px;
  height:24px;padding:0 9px;border-radius:7px;
  border:1px solid var(--border);background:var(--card);
  color:var(--text2);font-size:11px;font-weight:700;font-family:inherit;
  line-height:1;cursor:pointer;
  transition:color .15s,border-color .15s,background .15s;
  box-shadow:0 2px 8px rgba(15,35,75,.06);
}
html.dark .msg-tool{box-shadow:0 2px 8px rgba(0,0,0,.28)}
.msg-tool:hover{color:var(--accent);border-color:var(--accent);background:var(--hover)}
.msg-tool.done{color:var(--green);border-color:rgba(16,185,129,.45);background:rgba(16,185,129,.08)}
.msg-tool svg{width:12px;height:12px;display:block}

.msg-atts{
  align-self:stretch;
  display:flex;flex-wrap:wrap;gap:8px;
  justify-content:flex-end;align-items:flex-start;
  max-width:100%;margin:0 0 7px;
}
.msg-att-img{
  flex:0 0 auto;width:68px;height:68px;border-radius:13px;overflow:hidden;line-height:0;
  background:var(--bg2);
  box-shadow:0 1px 4px rgba(9,20,40,.14);
  user-select:none;-webkit-user-select:none;
  cursor:zoom-in;
  transition:box-shadow .16s,transform .12s;
}
.msg-att-img img{
  width:100%;height:100%;display:block;object-fit:cover;
  pointer-events:none;-webkit-user-drag:none;
  transition:transform .2s;
}
.msg-att-img:hover{box-shadow:0 0 0 2px var(--accent),0 4px 12px rgba(9,20,40,.16)}
.msg-att-img:hover img{transform:scale(1.04)}
.msg-att-img:active{transform:scale(.97)}
.msg-att-img:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.msg-att-file{
  flex:0 0 auto;display:flex;align-items:center;gap:8px;cursor:pointer;
  background:var(--card);border:1px solid var(--border);
  border-radius:14px;padding:5px 13px 5px 5px;max-width:min(214px,100%);
  font-family:inherit;text-align:left;
  box-shadow:0 1px 3px rgba(15,35,75,.06);
  transition:box-shadow .16s,transform .16s,border-color .16s;
}
.msg-att-file:hover{
  box-shadow:0 6px 16px rgba(15,35,75,.13);
  border-color:rgba(59,130,246,.45);transform:translateY(-1px);
}
.msg-att-file:active{transform:none}
.msg-att-file:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.msg-att-file .att-ic{width:30px;height:30px;border-radius:8px;filter:none}
.msg-att-file .att-meta{gap:0}
.msg-att-file .att-nm{color:var(--text);font-size:12.5px;max-width:146px}

.att-ic{
  width:34px;height:34px;flex-shrink:0;display:block;
  color:var(--accent);border-radius:9px;overflow:hidden;
  filter:drop-shadow(0 1px 2px rgba(15,35,75,.10));
}
.att-ic svg{width:100%;height:100%;display:block}
.att-meta{min-width:0;display:flex;flex-direction:column;gap:1px}
.att-nm{
  font-size:13px;color:var(--text);font-weight:600;line-height:1.32;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:132px;
}
.att-sz{
  font-size:10.5px;color:var(--text2);line-height:1.32;
  display:flex;align-items:center;gap:4px;white-space:nowrap;
  letter-spacing:.1px;
}

.md{overflow-wrap:anywhere}
.md p{margin:0 0 10px}
.md p:last-child{margin-bottom:0}


.md h3,.md h4{
  position:relative;padding-left:11px;font-weight:800;line-height:1.4;
  letter-spacing:.2px;color:var(--text);
}
.md h3{font-size:16px;margin:16px 0 8px}
.md h4{
  font-size:14.5px;margin:14px 0 7px;color:var(--accent);padding-left:9px;
}
.md h3::before,.md h4::before{
  content:'';position:absolute;left:0;top:.22em;bottom:.22em;width:3px;
  border-radius:3px;background:var(--grad);
}
.md h4::before{width:2px}
.md h3:first-child,.md h4:first-child{margin-top:0}

.md ul,.md ol{margin:8px 0;padding-left:0;list-style:none}
.md ul ul,.md ul ol,.md ol ul,.md ol ol{margin:4px 0 2px}
.md li{position:relative;margin:4px 0;padding-left:18px;line-height:1.7}
.md li:last-child{margin-bottom:0}
.md ul > li::before{
  content:'';position:absolute;left:4px;top:.62em;
  width:5px;height:5px;border-radius:50%;
  background:var(--accent);opacity:.85;
}
.md ol{counter-reset:mdo}
.md ol > li{counter-increment:mdo;padding-left:23px}
.md ol > li::before{
  content:counter(mdo);
  position:absolute;left:0;top:3px;
  min-width:16px;height:16px;line-height:16px;
  border-radius:5px;text-align:center;
  font-size:10px;font-weight:800;
  font-family:'SF Mono','JetBrains Mono','Consolas',monospace;
  color:var(--accent);background:rgba(59,130,246,.13);
}

.md strong{
  font-weight:800;color:var(--text);padding:0 1px;border-radius:3px;
  background-image:linear-gradient(transparent 58%,rgba(245,158,11,.30) 58%,rgba(245,158,11,.30) 94%,transparent 94%);
}
html.dark .md strong{
  background-image:linear-gradient(transparent 58%,rgba(251,191,36,.26) 58%,rgba(251,191,36,.26) 94%,transparent 94%);
}
.md em{font-style:italic;color:var(--text2)}
.md del{color:var(--text3);text-decoration:line-through}

.md a{
  color:var(--accent);font-weight:600;text-decoration:none;
  border-bottom:1px solid rgba(59,130,246,.35);
  word-break:break-all;
  transition:background .15s,border-color .15s;
}
.md a:hover{border-bottom-color:var(--accent);background:rgba(59,130,246,.09);text-decoration:none}

.md code{
  background:rgba(59,130,246,.1);color:var(--accent);
  padding:2px 6px;border-radius:5px;font-size:.88em;
  border:1px solid rgba(59,130,246,.16);
  font-family:'SF Mono','JetBrains Mono','Consolas',monospace;
}
html.dark .md code{
  background:rgba(96,165,250,.14);color:#93c5fd;
  border-color:rgba(96,165,250,.22);
}

.md blockquote{
  margin:11px 0;padding:9px 14px;border-radius:0 10px 10px 0;
  border-left:3px solid var(--accent);
  background:linear-gradient(90deg,rgba(59,130,246,.09),rgba(59,130,246,.02));
  color:var(--text2);font-size:13.5px;
}
.md blockquote p:last-child{margin-bottom:0}

.md pre.code{
  margin:11px 0;padding:12px 14px;
  background:var(--card2);border:1px solid var(--border);border-radius:12px;
  overflow-x:auto;-webkit-overflow-scrolling:touch;
}
.md pre.code code{
  background:none;border:0;border-radius:0;padding:0;
  color:var(--text);font-size:12.5px;line-height:1.65;
  white-space:pre;
}
.md-code{
  margin:11px 0;border:1px solid var(--border);border-radius:12px;
  overflow:hidden;background:var(--card2);
}
.md-code-head{
  display:flex;align-items:center;gap:8px;
  padding:7px 9px 7px 12px;
  background:linear-gradient(180deg,rgba(59,130,246,.07),rgba(59,130,246,0));
  border-bottom:1px solid var(--border);
}
.md-dots{display:flex;gap:4px;flex-shrink:0}
.md-dots i{width:8px;height:8px;border-radius:50%;background:#ff5f57;display:block}
.md-dots i:nth-child(2){background:#febc2e}
.md-dots i:nth-child(3){background:#28c840}
.md-lang{
  font-size:10px;font-weight:800;letter-spacing:.8px;
  text-transform:uppercase;color:var(--text2);
}
.md-copy{
  margin-left:auto;flex-shrink:0;
  font-family:inherit;font-size:10.5px;font-weight:700;
  color:var(--text2);background:var(--card);
  border:1px solid var(--border);border-radius:7px;
  padding:3px 10px;cursor:pointer;transition:all .15s;
}
.md-copy:hover{color:var(--accent);border-color:var(--accent);background:var(--hover)}
.md-copy.done{color:var(--green);border-color:rgba(16,185,129,.45);background:rgba(16,185,129,.08)}
.md-code pre.code{
  margin:0;border:0;border-radius:0;background:transparent;padding:12px 14px;
}

.md-table-wrap{
  margin:12px 0;overflow-x:auto;-webkit-overflow-scrolling:touch;
  border:1px solid var(--border);border-radius:12px;background:var(--card);
}
.md table{border-collapse:collapse;width:100%;font-size:13px}
.md th,.md td{padding:9px 12px;text-align:left;white-space:nowrap}
.md thead th{
  font-size:11.5px;font-weight:800;color:var(--text);
  background:var(--bg);letter-spacing:.3px;
  border-bottom:1px solid var(--border);
}
.md tbody td{
  color:var(--text2);border-bottom:1px solid var(--border);
  font-variant-numeric:tabular-nums;
}
.md tbody tr:last-child td{border-bottom:0}
.md tbody tr:nth-child(even) td{background:rgba(59,130,246,.035)}
.md tbody tr:hover td{background:var(--hover)}

.md hr{
  border:0;height:1px;margin:16px 0;
  background:linear-gradient(90deg,transparent,var(--border) 18%,var(--border) 82%,transparent);
}

.msg.user .bubble .md strong{color:#fff;background-image:none}
.msg.user .bubble .md em{color:rgba(255,255,255,.9)}
.msg.user .bubble .md code{
  background:rgba(255,255,255,.2);color:#fff;
  border-color:rgba(255,255,255,.25);
}
.msg.user .bubble .md a{color:#fff;border-bottom-color:rgba(255,255,255,.5)}
.msg.user .bubble .md a:hover{background:rgba(255,255,255,.16)}
.msg.user .bubble .md hr{
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.5) 18%,rgba(255,255,255,.5) 82%,transparent);
}
.msg.user .bubble .md h3,.msg.user .bubble .md h4{color:#fff}
.msg.user .bubble .md h3::before,.msg.user .bubble .md h4::before{
  background:rgba(255,255,255,.75);
}
.msg.user .bubble .md blockquote{
  border-left-color:rgba(255,255,255,.7);
  background:rgba(255,255,255,.12);color:rgba(255,255,255,.92);
}
.msg.user .bubble .md ul > li::before{background:rgba(255,255,255,.85)}
.msg.user .bubble .md ol > li::before{
  color:#fff;background:rgba(255,255,255,.22);
}

.fv-mask{
  position:fixed;inset:0;z-index:3900;background:rgba(9,20,40,.34);
  opacity:0;pointer-events:none;transition:opacity .22s ease;
}
html.dark .fv-mask{background:rgba(0,0,0,.55)}
.fv-mask.show{opacity:1;pointer-events:auto}
.fv-panel{
  position:fixed;top:0;right:0;bottom:0;z-index:3910;
  width:min(560px,100vw);max-width:100vw;
  background:var(--card);border-left:1px solid var(--border);
  box-shadow:-10px 0 40px rgba(9,20,40,.22);
  display:flex;flex-direction:column;
  padding-top:env(safe-area-inset-top,0px);
  transform:translateX(102%);
  transition:transform .26s cubic-bezier(.4,0,.2,1);
}
.fv-panel.show{transform:none}
html.dark .fv-panel{background:var(--card2)}
.fv-head{
  display:flex;align-items:center;gap:9px;flex-shrink:0;
  padding:12px 12px 12px 14px;border-bottom:1px solid var(--border);
}
.fv-ic{
  width:32px;height:32px;border-radius:8px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
}
.fv-ic .att-ic{width:32px;height:32px;border-radius:8px;filter:none}
.fv-title{min-width:0;flex:1}
.fv-title b{
  display:block;font-size:13px;font-weight:700;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.fv-title span{font-size:10.5px;color:var(--text2)}
.fv-btn{
  width:30px;height:30px;border-radius:8px;border:0;background:transparent;
  color:var(--text2);cursor:pointer;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  transition:background .16s,color .16s;
}
.fv-btn:hover{background:var(--hover);color:var(--accent)}
.fv-body{
  flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;
  padding:14px;font-size:13px;line-height:1.7;color:var(--text);
}
.fv-body pre{
  margin:0;white-space:pre-wrap;word-break:break-word;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12.5px;line-height:1.6;color:var(--text);
}
.fv-body iframe{
  width:100%;height:100%;min-height:70vh;border:0;display:block;
  background:#fff;border-radius:8px;
}
.fv-body img{max-width:100%;height:auto;display:block;margin:0 auto;border-radius:10px}
.fv-empty{
  color:var(--text2);font-size:12.5px;text-align:center;
  padding:48px 12px;line-height:1.9;
}
.fv-empty .ico{font-size:26px;display:block;margin-bottom:8px;opacity:.7}

.empty{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:16px;padding:64px 20px;text-align:center;
  animation:fadein .3s;
}
.empty-logo{
  width:64px;height:64px;border-radius:18px;
  background:var(--grad);
  display:flex;align-items:center;justify-content:center;
  font-size:30px;color:#fff;
  box-shadow:0 12px 32px rgba(59,130,246,.35);
  animation:float 3s ease-in-out infinite;
}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.empty h2{font-size:20px;font-weight:800;letter-spacing:-.5px;color:var(--text)}
.empty h2 em{
  background:var(--grad);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;
  background-clip:text;font-style:normal;
}
.empty p{font-size:13px;color:var(--text2);max-width:380px;line-height:1.7}

.cta{
  position:relative;overflow:hidden;
  margin-top:22px;padding:18px;
  background:var(--card);background-image:var(--hero-bg);
  border:1px solid var(--border);border-radius:18px;
  box-shadow:var(--shadow);
  display:flex;flex-wrap:wrap;align-items:center;gap:14px;
}
.cta-main{display:flex;align-items:center;gap:12px;flex:1;min-width:210px}
.cta-logo{
  width:40px;height:40px;border-radius:12px;flex-shrink:0;
  background:var(--grad);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:19px;font-weight:900;
  box-shadow:0 8px 20px rgba(59,130,246,.3);
}
.cta-main b{display:block;font-size:14px;font-weight:800;color:var(--text);line-height:1.4}
.cta-main b em{
  font-style:normal;
  background:var(--grad);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;
  background-clip:text;
}
.cta-main span{display:block;font-size:12px;color:var(--text3);margin-top:2px;line-height:1.6}
.qa-row{display:flex;flex-wrap:wrap;gap:7px;width:100%}
.qa{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 12px;border-radius:10px;font-size:12px;font-weight:600;
  background:var(--card);border:1px solid var(--border);color:var(--text2);
  transition:all .18s;
}
.qa:hover{
  color:var(--accent);border-color:var(--accent);background:var(--hover);
  transform:translateY(-1px);text-decoration:none;
}
.qa:active{transform:scale(.97)}
.qa .ico{font-size:13px;line-height:1}

.foot{
  margin-top:22px;padding-top:14px;border-top:1px solid var(--border);
  font-size:11.5px;line-height:1.9;color:var(--text2);text-align:center;
}

#shareToast{
  position:fixed;left:50%;top:calc(14px + env(safe-area-inset-top,0px));
  transform:translateX(-50%) translateY(-14px);
  opacity:0;pointer-events:none;z-index:9999;
  display:flex;align-items:center;gap:7px;
  background:var(--card);color:var(--text);
  border:1px solid var(--border);
  font-size:12.5px;font-weight:700;
  padding:9px 15px;border-radius:11px;
  box-shadow:var(--shadow-lg);
  transition:opacity .22s,transform .22s;
}
#shareToast .t-ic{
  width:16px;height:16px;border-radius:50%;flex-shrink:0;
  background:rgba(16,185,129,.14);color:var(--green);
  display:flex;align-items:center;justify-content:center;
  font-size:10px;font-weight:900;
}
#shareToast.show{opacity:1;transform:translateX(-50%) translateY(0)}

@media (max-width:600px){
  .wrap{padding:16px 12px calc(28px + env(safe-area-inset-bottom,0px))}
  .hero{padding:16px 15px 14px;border-radius:16px}
  .hero h1{font-size:17px}
  .msg.user .bubble{max-width:88%}
  .msg.bot .bubble{padding:14px 15px}
  .msg.foldable .bubble{padding-bottom:34px}
  .fold-btn{width:24px;height:24px;right:8px;bottom:7px}
  .fold-btn svg{width:13px;height:13px}
  .md h3{font-size:15px}
  .md h4{font-size:14px}
  .msg-att-img{width:60px;height:60px;border-radius:12px}
  .msg-att-file .att-nm{max-width:118px}
  .cta{flex-direction:column;align-items:stretch;padding:16px}
  .cta .btn.lg{width:100%}
  .empty{padding:48px 16px}
  .empty h2{font-size:18px}
}
@media (max-width:520px){
  .brand-name,.brand-badge{display:none}
  #copyTop .bt{display:none}
  #copyTop{width:34px;padding:0}
}
@media (max-width:380px){
  .topbar .btn.primary .bt{display:none}
  .topbar .btn.primary{width:34px;padding:0}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important;transition:none !important}
}
