:root{--blue:#15458d;--blue-strong:#0c326c;--blue-soft:#eaf1fb;--ink:#172638;--muted:#627185;--line:#dce3ec;--soft:#f7f9fc;--warn:#9a5b00;--ok:#1f6f43}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",sans-serif;color:var(--ink);background:#fff;-webkit-font-smoothing:antialiased}
button,textarea,input{font:inherit;color:inherit}
.stage{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:radial-gradient(ellipse 80% 55% at 50% 18%,rgba(21,69,141,.045),transparent 70%),#fff}
.top{display:flex;align-items:center;justify-content:space-between;padding:28px 48px 0;flex:none}
.logo{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit}
.logo .word{font-size:22px;font-weight:750;letter-spacing:-.04em;color:var(--blue)}
.logo .word span{font-weight:500;letter-spacing:.03em}
.logo .sep{width:1px;height:14px;background:var(--line)}
.logo .desc{font-size:12px;color:var(--muted);letter-spacing:.04em;font-weight:500}
.ghost{border:1px solid var(--line);border-radius:6px;padding:8px 14px;font-weight:600;font-size:13px;background:#fff;cursor:pointer}
.ghost:hover{border-color:var(--blue);color:var(--blue)}
.home{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px 48px 48px;text-align:center}
.avatar-lg{display:block;margin-bottom:20px;line-height:0}
.avatar-lg .l52{height:128px;width:auto;filter:drop-shadow(0 12px 18px rgba(21,69,141,.18))}
.logo .mark{display:inline-flex;line-height:0}
.logo .mark .l52{height:34px;width:auto}
.headline{font-size:44px;font-weight:650;letter-spacing:-.045em;line-height:1.2;max-width:760px}
.headline em{font-style:normal;color:var(--blue)}
.sub{margin-top:14px;font-size:16px;color:var(--muted);margin-bottom:34px}
.composer{width:100%;max-width:680px;display:flex;align-items:flex-end;gap:12px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px 12px 12px 20px;box-shadow:0 18px 40px rgba(31,46,67,.06);transition:border-color .15s,box-shadow .15s}
.composer:focus-within{border-color:#3d75c7;box-shadow:0 0 0 3px rgba(61,117,199,.14),0 18px 40px rgba(31,46,67,.06)}
.composer textarea{flex:1;border:0;outline:none;resize:none;min-height:30px;max-height:140px;font-size:16px;line-height:1.5;background:transparent;padding:7px 0}
.composer textarea::placeholder{color:#9aa8b8}
.send{flex:none;height:44px;padding:0 18px;border:0;border-radius:10px;background:var(--blue);color:#fff;font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:8px}
.send:hover{background:var(--blue-strong)}
.send:disabled{background:#c5ced9;cursor:default}
.send svg{width:16px;height:16px}
.chips{margin-top:20px;display:flex;flex-wrap:wrap;gap:8px;justify-content:center;max-width:720px}
.chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 14px;font-size:13px;cursor:pointer;transition:border-color .15s,background .15s}
.chip:hover{border-color:var(--blue);background:var(--blue-soft);color:var(--blue-strong)}
.chat{display:none;flex:1;flex-direction:column;min-height:0;width:100%;max-width:860px;margin:0 auto;padding:12px 48px 18px}
.stage[data-view=chat] .home{display:none}
.stage[data-view=chat] .chat{display:flex}
.thread{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:18px;padding:16px 0 18px}
.msg-user{align-self:flex-end;max-width:72%;background:var(--blue);color:#fff;padding:11px 16px;border-radius:14px 14px 4px 14px;font-size:15px;line-height:1.55;white-space:pre-wrap;word-break:break-word}
.msg-bot{align-self:flex-start;max-width:82%;display:flex;gap:10px;align-items:flex-start}
.msg-bot .av{height:44px;width:20px;flex:none;margin:0 4px 0 2px}
.msg-bot .col{min-width:0}
.msg-bot .who{font-size:11px;font-weight:600;color:var(--muted);margin-bottom:5px;letter-spacing:.04em}
.msg-bot .body{background:var(--soft);border:1px solid var(--line);border-radius:4px 14px 14px 14px;padding:13px 16px;font-size:15px;line-height:1.65;white-space:pre-wrap;word-break:break-word}
.msg-bot .body.warn{border-color:#f0d8a8;background:#fffaf0;color:var(--warn)}
.typing span{display:inline-block;width:6px;height:6px;margin-right:4px;border-radius:50%;background:#9aa8b8;animation:b 1s infinite}
.typing span:nth-child(2){animation-delay:.15s}.typing span:nth-child(3){animation-delay:.3s}
@keyframes b{0%,80%,100%{opacity:.25}40%{opacity:1}}
.card{margin-top:10px;border:1px solid var(--line);background:#fff;border-radius:12px;padding:14px 16px;font-size:14px;line-height:1.55}
.card h4{font-size:14px;font-weight:650;margin-bottom:6px}
.card .meta{color:var(--muted);font-size:13px}
.card .tag{display:inline-block;font-size:12px;font-weight:600;color:var(--warn);background:#fff4dc;border-radius:4px;padding:2px 8px;margin:6px 0}
.card img{display:block;width:100%;max-width:420px;border:1px solid var(--line);border-radius:8px;margin-top:10px;background:#fafbfc}
.card .row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.btn{border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 14px;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;color:var(--ink);display:inline-block}
.btn:hover{border-color:var(--blue);color:var(--blue)}
.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}
.btn.primary:hover{background:var(--blue-strong)}
.btn:disabled{opacity:.6;cursor:default}
.lead label{display:block;font-size:13px;color:var(--muted);margin-top:8px}
.lead input{display:block;width:100%;margin-top:4px;border:1px solid var(--line);border-radius:8px;padding:9px 11px;font-size:15px;outline:none}
.lead input:focus{border-color:#3d75c7}
.status{font-size:13px;color:var(--muted);margin-top:8px}
.status.ok{color:var(--ok)}.status.err{color:#b42318}
.dock{flex:none}
.dock .composer{max-width:none;box-shadow:none;border-radius:14px}
.dock-row{display:flex;justify-content:flex-end;padding-top:8px}
.link{border:0;background:none;color:var(--muted);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.link:hover{color:var(--blue)}
.foot{flex:none;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 48px 22px;border-top:1px solid var(--line);font-size:11px;color:#8a97a8}
.foot .en{letter-spacing:.06em;text-transform:uppercase;font-weight:600;font-size:10px}
.stage[data-view=chat] .foot{border-top-color:transparent;padding-top:4px}
@media (max-width:720px){
  .top{padding:16px 18px 0}
  .logo .word{font-size:20px}
  .home{justify-content:flex-start;padding:12vh 18px 28px}
  .avatar-lg .l52{height:104px}.avatar-lg{margin-bottom:16px}
  .headline{font-size:29px;letter-spacing:-.035em}
  .sub{font-size:15px;margin-bottom:24px}
  .composer{padding:10px 10px 10px 16px;border-radius:14px}
  .send{height:42px;padding:0 14px}
  .send .send-t{display:none}
  .chips{gap:8px;justify-content:flex-start}
  .chip{font-size:13px;padding:9px 13px}
  .chat{padding:4px 14px calc(10px + env(safe-area-inset-bottom))}
  .msg-user{max-width:86%}
  .msg-bot{max-width:100%}
  .msg-bot .av{height:40px;width:18px}
  .foot{flex-direction:column;align-items:flex-start;gap:4px;padding:12px 18px calc(14px + env(safe-area-inset-bottom))}
  .stage[data-view=chat] .foot{display:none}
}
.stage[data-view=chat]{height:100vh;height:100dvh;min-height:0}
