/* ============================================================
   kin9 · 网站端样式 v2  ·  风格：月之暗面 / 极简高级
   规则：单一强调色（黑白），零渐变，大留白，发丝级描边
   未登录 = 纯黑（#000）  登录后 = 暖白（#F7F7F5）
   手机像 App（底部 Tab） / 电脑像网站（顶部导航 + 居中窄栏）
   ============================================================ */
:root{
  /* 深色（未登录） */
  --d-ink:#ffffff; --d-ink2:rgba(255,255,255,.62); --d-mut:rgba(255,255,255,.40);
  --d-line:rgba(255,255,255,.09); --d-surf:rgba(255,255,255,.05);
  --glow:#dce9ff;
  --radius:16px; --tab-h:64px;
  --ease:cubic-bezier(.2,0,0,1);
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue","Microsoft YaHei",sans-serif;
  min-height:100vh;color:var(--d-ink);line-height:1.6;-webkit-font-smoothing:antialiased;
  background:#000;background-attachment:fixed;transition:background .45s var(--ease);overflow-x:hidden;
}
body.light{
  --ink:#111111; --ink2:#6e6e6e; --mut:#9a9a9a; --line:rgba(0,0,0,.08); --card:#fff;
  color:var(--ink);background:#f7f7f5;
}
a{color:inherit;text-decoration:none}
img,video{display:block;max-width:100%}
svg.ic{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;opacity:.85}

/* ---------- 顶部导航 ---------- */
.topbar{position:sticky;top:0;z-index:40;display:none;align-items:center;gap:34px;height:72px;padding:0 48px;
  border-bottom:1px solid var(--d-line);background:rgba(0,0,0,.6);backdrop-filter:blur(18px)}
body.light .topbar{background:rgba(247,247,245,.82);border-bottom-color:var(--line)}
.topbar .brand{display:flex;align-items:center;gap:10px;font-weight:600;font-size:19px;letter-spacing:-.01em}
.brand .logo{width:26px;height:26px;border-radius:8px;background:#fff;color:#000;display:flex;align-items:center;
  justify-content:center;font-size:15px;font-weight:700}
body.light .brand .logo{background:#111;color:#fff}
.topnav{display:flex;gap:30px;margin-left:6px}
.topnav a{font-size:14.5px;color:var(--d-ink2);font-weight:400;cursor:pointer;transition:color .2s}
.topnav a:hover{color:var(--d-ink)}
.topnav a.on{color:var(--d-ink)}
body.light .topnav a{color:var(--ink2)} body.light .topnav a.on,body.light .topnav a:hover{color:var(--ink)}
.topbar .spacer{flex:1}
.topbar .actions{display:flex;align-items:center;gap:10px}

/* ---------- 按钮（只有两种：白/黑 实心 pill + 发丝幽灵） ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;cursor:pointer;font-family:inherit;
  padding:11px 22px;border-radius:9999px;font-size:14.5px;font-weight:600;letter-spacing:.01em;
  background:#fff;color:#000;transition:all .2s var(--ease)}
.btn:hover{background:#e6e6e6}
body.light .btn{background:#111;color:#fff}
body.light .btn:hover{background:#000}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn.ghost{background:transparent;color:var(--d-ink);border:1px solid var(--d-line)}
.btn.ghost:hover{background:rgba(255,255,255,.06)}
body.light .btn.ghost{background:transparent;color:var(--ink);border-color:var(--line)}
body.light .btn.ghost:hover{background:#f0f0ee}
.btn.sm{padding:8px 16px;font-size:13.5px}
.btn.block{width:100%}
.btn.inv{background:#fff;color:#000}

/* ---------- 布局 ---------- */
.container{position:relative;z-index:2;max-width:1120px;margin:0 auto;padding:34px 48px 90px;padding-bottom:calc(90px + env(safe-area-inset-bottom))}
.page{display:none}.page.on{display:block}

/* ---------- Hero ---------- */
.hero{position:relative;width:100vw;left:50%;transform:translateX(-50%);text-align:center;padding:128px 24px 96px;overflow:hidden}
.hero::before{content:"";position:absolute;inset:0;background:url('/img/hero.jpg') center 32%/cover no-repeat;opacity:.95}
.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.52) 0%,rgba(0,0,0,.12) 40%,rgba(0,0,0,.42) 70%,#000 100%)}
.hero>*{position:relative;z-index:1}
.hero .orb{display:none}
.hero .kick{font-size:12px;letter-spacing:.5em;color:var(--d-mut);font-weight:600;text-transform:uppercase}
.hero h1{color:#fff;font-size:clamp(38px,7vw,76px);font-weight:600;letter-spacing:.02em;line-height:1.12;margin:16px 0 18px}
.hero h1 .grad{color:#fff}
.hero p{font-size:16px;color:var(--d-ink2);max-width:560px;margin:0 auto;letter-spacing:.04em}
.hero .cta{margin-top:34px;display:flex;flex-wrap:wrap;gap:14px;justify-content:center}

/* ---------- 区块标题 ---------- */
.section-title{font-size:22px;font-weight:600;letter-spacing:.02em;margin:64px 0 6px;text-align:center}
.section-sub{font-size:13.5px;color:var(--d-mut);margin-bottom:26px;text-align:center;letter-spacing:.06em}

/* ---------- 功能三栏（极简，无卡片） ---------- */
.feats{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin-top:20px;border-top:1px solid var(--d-line)}
.feat{padding:30px 26px;border-right:1px solid var(--d-line)}
.feat:last-child{border-right:0}
.feat .ic{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;
  color:var(--d-ink);border:1px solid var(--d-line);margin-bottom:16px}
.feat h3{font-size:16px;font-weight:600;margin-bottom:7px}
.feat p{font-size:13.5px;color:var(--d-ink2);line-height:1.7}
body.light .feat p{color:var(--ink2)}

/* ---------- 卡片 / 表单 ---------- */
.card{background:var(--d-surf);border:1px solid var(--d-line);border-radius:var(--radius);padding:24px;margin-bottom:18px}
body.light .card{background:#fff;border-color:var(--line);box-shadow:0 1px 2px rgba(0,0,0,.03),0 8px 28px rgba(0,0,0,.05)}
.card h3.ct{font-size:15.5px;font-weight:600;margin-bottom:16px;display:flex;align-items:center;gap:9px}
label.fl{display:block;font-size:12.5px;color:var(--d-mut);margin:14px 0 7px;letter-spacing:.02em}
body.light label.fl{color:var(--mut)}
input,textarea,select{width:100%;padding:13px 15px;border:1px solid var(--d-line);border-radius:12px;font-size:15px;
  outline:none;background:rgba(255,255,255,.04);font-family:inherit;color:var(--d-ink);transition:border-color .2s,background .2s}
body.light input,body.light textarea,body.light select{background:#fafafa;color:var(--ink)}
input::placeholder,textarea::placeholder{color:var(--d-mut)}
body.light input::placeholder,body.light textarea::placeholder{color:#b3b3b3}
input:focus,textarea:focus,select:focus{border-color:rgba(255,255,255,.4);background:rgba(255,255,255,.06)}
body.light input:focus,body.light textarea:focus{border-color:#111;background:#fff}
textarea{min-height:88px;resize:vertical}
select option{color:#111}
.msg{margin-top:12px;font-size:13px;text-align:center;min-height:18px;color:var(--d-mut)}
body.light .msg{color:var(--mut)}
.msg.err{color:#ff6b6b} .msg.ok{color:#4ade80}
body.light .msg.err{color:#d9463f} body.light .msg.ok{color:#149a5a}
.auth-wrap{max-width:410px;margin:40px auto 0}
.tabs{display:flex;background:rgba(255,255,255,.05);border-radius:12px;padding:4px;margin-bottom:8px}
body.light .tabs{background:#f0f0ee}
.tabs button{flex:1;border:0;background:transparent;padding:11px;border-radius:9px;font-size:14.5px;color:var(--d-ink2);
  cursor:pointer;font-family:inherit;font-weight:500;transition:.2s}
body.light .tabs button{color:var(--ink2)}
.tabs button.on{background:#fff;color:#000}
body.light .tabs button.on{background:#111;color:#fff}

/* ---------- 创作 ---------- */
.mode-switch{display:flex;gap:6px;margin-bottom:18px}
.mode-switch button{border:1px solid var(--d-line);background:transparent;padding:9px 20px;border-radius:9999px;font-size:14px;
  font-weight:500;color:var(--d-ink2);cursor:pointer;font-family:inherit;transition:all .2s var(--ease)}
.mode-switch button:hover{color:var(--d-ink);border-color:rgba(255,255,255,.3)}
.mode-switch button.on{background:#fff;color:#000;border-color:#fff}
body.light .mode-switch button{color:var(--ink2)}
body.light .mode-switch button.on{background:#111;color:#fff;border-color:#111}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.chip{font-size:12.5px;padding:7px 14px;border-radius:9999px;cursor:pointer;
  background:transparent;color:var(--d-ink2);border:1px solid var(--d-line);transition:.2s}
.chip:hover{color:var(--d-ink);border-color:rgba(255,255,255,.3)}
body.light .chip{color:var(--ink2);border-color:var(--line)}
body.light .chip:hover{color:var(--ink);border-color:#111}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid-res{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
.grid-res img,.grid-res video{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px;border:1px solid var(--d-line)}
body.light .grid-res img,body.light .grid-res video{border-color:var(--line)}
.witem{aspect-ratio:1;border-radius:12px;border:1px solid var(--d-line);display:flex;align-items:center;justify-content:center;
  font-size:12.5px;color:var(--d-mut);text-align:center;padding:8px}
body.light .witem{border-color:var(--line);color:var(--mut);background:#fafafa}
.empty{color:var(--d-mut);font-size:13.5px;text-align:center;padding:26px 0}
body.light .empty{color:var(--mut)}

/* ---------- 灵感 / 作品 画廊（真实配图） ---------- */
.insp-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.insp{border:1px solid var(--d-line);border-radius:14px;overflow:hidden;cursor:pointer;position:relative;
  background:var(--d-surf);transition:transform .25s var(--ease),border-color .25s}
body.light .insp{background:#fff;border-color:var(--line);box-shadow:0 1px 2px rgba(0,0,0,.03),0 8px 24px rgba(0,0,0,.05)}
.insp:hover{transform:translateY(-3px);border-color:rgba(255,255,255,.28)}
body.light .insp:hover{border-color:#d8d8d4}
.insp .thumb{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;background:#141414}
.insp .cap{padding:11px 13px;font-size:12.5px;color:var(--d-ink2);display:flex;justify-content:space-between;gap:8px}
body.light .insp .cap{color:var(--ink2)}
.insp .cap .tag{color:var(--d-mut);flex-shrink:0}
body.light .insp .cap .tag{color:var(--mut)}

/* ---------- AI 对话 ---------- */
.chatbox{display:flex;flex-direction:column;gap:12px;max-height:440px;overflow-y:auto;padding:2px}
.bubble{max-width:80%;padding:11px 15px;border-radius:16px;font-size:14.5px;line-height:1.65;white-space:pre-wrap;word-break:break-word}
.bubble.ai{align-self:flex-start;background:rgba(255,255,255,.06);border:1px solid var(--d-line);border-bottom-left-radius:5px}
body.light .bubble.ai{background:#f5f5f3;border-color:var(--line);color:#1a1a1a}
.bubble.me{align-self:flex-end;background:#fff;color:#000;border-bottom-right-radius:5px}
body.light .bubble.me{background:#111;color:#fff}
.chat-input{display:flex;gap:10px;margin-top:16px}
.chat-input input{flex:1}
.chat-tip{font-size:12px;color:var(--d-mut);margin-top:12px;text-align:center;letter-spacing:.03em}
body.light .chat-tip{color:var(--mut)}

/* ---------- 我的 ---------- */
.profile{display:flex;align-items:center;gap:16px}
.profile .avatar{width:56px;height:56px;border-radius:50%;background:#fff;color:#000;display:flex;align-items:center;
  justify-content:center;font-size:22px;font-weight:700;flex-shrink:0}
body.light .profile .avatar{background:#111;color:#fff}
.kv{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid var(--d-line);font-size:14px}
body.light .kv{border-bottom-color:var(--line)}
.kv:last-child{border-bottom:0}
.kv .k{color:var(--d-mut)} .kv .v{font-weight:600}
body.light .kv .k{color:var(--mut)}
.stat-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-bottom:18px}
.stat{border:1px solid var(--d-line);border-radius:14px;padding:20px;text-align:center;background:var(--d-surf)}
body.light .stat{background:#fff;border-color:var(--line);box-shadow:0 1px 2px rgba(0,0,0,.03),0 8px 24px rgba(0,0,0,.04)}
.stat .n{font-size:24px;font-weight:600;letter-spacing:-.01em}
.stat .l{font-size:12.5px;color:var(--d-mut);margin-top:3px}
body.light .stat .l{color:var(--mut)}
.dlbox{border:1px solid var(--d-line);border-radius:var(--radius);padding:24px;background:var(--d-surf)}
body.light .dlbox{background:#fff;border-color:var(--line)}
.dlbox .t{font-weight:600;font-size:16px}
.dlbox .d{font-size:13.5px;color:var(--d-ink2);margin-top:6px;line-height:1.7}
body.light .dlbox .d{color:var(--ink2)}
.badge{display:inline-block;font-size:11.5px;padding:3px 11px;border-radius:9999px;font-weight:600;
  background:rgba(255,255,255,.08);color:var(--d-ink2);border:1px solid var(--d-line)}
body.light .badge{background:#f0f0ee;color:var(--ink2);border-color:var(--line)}

/* ---------- 底部 Tab ---------- */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;height:var(--tab-h);padding-bottom:env(safe-area-inset-bottom);
  background:rgba(0,0,0,.72);backdrop-filter:blur(20px);border-top:1px solid var(--d-line)}
body.light .tabbar{background:rgba(255,255,255,.92);border-top-color:var(--line)}
.tabbar .tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  color:var(--d-mut);font-size:10.5px;font-weight:500;cursor:pointer;transition:color .2s}
body.light .tabbar .tab{color:var(--mut)}
.tabbar .tab.on{color:var(--d-ink)}
body.light .tabbar .tab.on{color:var(--ink)}

/* ---------- 弹窗 / Toast ---------- */
.mask{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.6);display:none;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(6px)}
.mask.on{display:flex}
.modal{background:#fff;color:#111;border-radius:20px;padding:30px;max-width:388px;width:100%;text-align:center;
  box-shadow:0 40px 90px -40px rgba(0,0,0,.6)}
.modal h3{font-size:19px;font-weight:600;margin-bottom:8px}
.modal p{font-size:14px;color:#6e6e6e}
.modal .qr{width:150px;height:150px;margin:20px auto;border-radius:14px;border:1px solid #e6e6e2;display:flex;
  align-items:center;justify-content:center;color:#9a9a9a;font-size:13px;background:#fafafa;line-height:1.6}
/* App 卡片 */
.app-modal .app-icon{width:66px;height:66px;border-radius:19px;margin:0 auto 15px;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(140deg,#1b1b1b,#000);color:#fff;font-size:34px;font-weight:700;letter-spacing:-.02em;
  box-shadow:0 14px 34px -12px rgba(0,0,0,.5)}
.app-modal h3{margin-bottom:6px}
.app-tag{font-size:13.5px;color:#8a8a8a}
.app-feats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:22px 0 14px}
.app-feats .af{display:flex;flex-direction:column;align-items:center;gap:8px;padding:15px 8px;border:1px solid #ececea;
  border-radius:13px;font-size:13px;color:#2a2a2a;font-weight:500}
.app-feats .af .ic{width:20px;height:20px;color:#111;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.app-plat{display:flex;gap:10px;margin:0 0 16px}
.app-plat .plat{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;padding:14px;border:1px solid #ececea;
  border-radius:13px;font-size:13.5px;color:#2a2a2a;font-weight:600}
.app-plat .plat .ic{width:22px;height:22px;color:#111;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.app-plat .plat span{font-size:11px;color:#a2a2a2;font-weight:500}
.app-note{font-size:12.5px;color:#a2a2a2;margin-top:2px}
.app-modal .btn{background:#111;color:#fff}
.app-modal .btn:hover{background:#333}
.toast{position:fixed;left:50%;bottom:calc(var(--tab-h) + 24px);transform:translateX(-50%) translateY(10px);
  background:rgba(20,20,20,.94);color:#fff;border:1px solid rgba(255,255,255,.1);padding:12px 20px;border-radius:9999px;
  font-size:13.5px;z-index:80;opacity:0;transition:.3s var(--ease);pointer-events:none;max-width:90vw;text-align:center}
.toast.on{opacity:1;transform:translateX(-50%) translateY(0)}
.foot{text-align:center;font-size:12px;padding:40px 0 8px;color:var(--d-mut)}
body.light .foot{color:var(--mut)}
.hidden{display:none !important}

/* ---------- 响应式 ---------- */
@media(max-width:768px){
  .topbar{display:none}
  .container{padding:22px 20px calc(var(--tab-h) + 40px)}
  .hero{padding:84px 20px 64px}
  .hero .orb{width:104px;height:104px;margin-bottom:24px}
  .feats{grid-template-columns:1fr;border-top:0}
  .feat{border-right:0;border-top:1px solid var(--d-line);padding:24px 4px}
  .insp-grid{grid-template-columns:1fr 1fr;gap:12px}
  .row2{grid-template-columns:1fr}
  .bubble{max-width:88%}
}
@media(min-width:769px){
  .topbar{display:flex}
  .tabbar{display:none}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---------- 聊天社交（P4） ---------- */
.chat-app{display:flex;height:calc(100vh - 150px);min-height:520px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.chat-side{width:300px;flex:0 0 300px;border-right:1px solid var(--line);display:flex;flex-direction:column;background:#fbfbfa}
.chat-side-top{padding:12px 12px 8px;border-bottom:1px solid var(--line)}
.chat-tabs{display:flex;gap:6px;margin-bottom:10px}
.chat-tabs button{flex:1;padding:8px;border:0;border-radius:9px;background:#eeeeec;font-size:13.5px;cursor:pointer}
.chat-tabs button.on{background:#111;color:#fff}
.chat-search{display:flex;gap:8px}
.chat-search input{flex:1;padding:8px 10px;border:1px solid var(--line);border-radius:9px;font-size:13px}
.chat-list{flex:1;overflow-y:auto}
.chat-side-foot{padding:8px;border-top:1px solid var(--line)}
.chat-sub{font-size:12px;color:var(--mut);padding:10px 14px 4px;font-weight:600}
.chat-empty-tip{color:var(--mut);font-size:13px;text-align:center;padding:26px 14px;line-height:1.9}
.conv-item,.friend-item{display:flex;gap:10px;align-items:center;padding:10px 14px;cursor:pointer}
.conv-item:hover,.friend-item:hover{background:#f0f0ee}
.conv-item.on{background:#eef4ff}
.conv-av{width:42px;height:42px;flex:0 0 42px;border-radius:12px;background:linear-gradient(135deg,#7c5cff,#4f6ef7);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;overflow:hidden}
.conv-av img{width:100%;height:100%;object-fit:cover}
.conv-mid{flex:1;min-width:0}
.conv-name{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conv-last{font-size:12.5px;color:var(--mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conv-right{text-align:right;flex:0 0 auto}
.conv-time{font-size:11px;color:var(--mut)}
.unread{display:inline-block;min-width:18px;height:18px;line-height:18px;padding:0 5px;background:#ef4444;color:#fff;border-radius:9px;font-size:11px;margin-top:4px}
.pinmark{font-size:11px}
.nav-badge{display:none;background:#ef4444;color:#fff;border-radius:9px;font-size:10px;padding:1px 5px;margin-left:4px;vertical-align:middle}
.chat-main{flex:1;min-width:0;display:flex;flex-direction:column}
.chat-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--mut);font-size:14px;text-align:center;line-height:2}
.ce-ic{font-size:40px;margin-bottom:8px}
.chat-conv{flex:1;display:flex;flex-direction:column;min-height:0}
.chat-conv-top{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--line)}
.ct-title{font-size:15px;font-weight:700}.ct-sub{font-size:12px;color:var(--mut)}
.ct-actions{display:flex;gap:6px}
.chat-msgs{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;background:#fbfbfa}
.msg{display:flex;flex-direction:column;max-width:74%}
.msg.me{align-self:flex-end;align-items:flex-end}
.msg.other{align-self:flex-start}
.msg-who{font-size:11.5px;color:var(--mut);margin:0 0 3px 4px}
.bubble{padding:9px 13px;border-radius:14px;font-size:14px;line-height:1.55;word-break:break-word;white-space:normal}
.msg.me .bubble{background:linear-gradient(135deg,#7c5cff,#4f6ef7);color:#fff;border-bottom-right-radius:4px}
.msg.other .bubble{background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px}
.msg-system{align-self:center;font-size:12px;color:var(--mut);background:#eee;padding:3px 10px;border-radius:10px}
.msg-act{font-size:11px;margin-top:3px}
.msg-act a{color:var(--mut);cursor:pointer}
.recalled{color:var(--mut);font-style:italic;font-size:13px}
.rp{display:flex;gap:10px;align-items:center;background:#fff4e5;border:1px solid #f6d9b0;border-radius:12px;padding:8px 12px;cursor:pointer}
.msg.me .rp{background:#ffd9a8;border-color:#f2b877}
.rp-ic{font-size:22px}.rp-t{font-weight:700;font-size:13.5px;color:#8a4b00}.rp-s{font-size:11.5px;color:#a86a1e}
.gift-b{background:#fff0f6;border:1px solid #f7cfe0;border-radius:12px;padding:8px 12px;font-size:13.5px;color:#b0256a}
.msg.me .gift-b{background:#ffd9e8}
.chat-send{display:flex;gap:8px;padding:12px 14px;border-top:1px solid var(--line);align-items:center}
.chat-send input{flex:1;padding:11px 13px;border:1px solid var(--line);border-radius:11px;font-size:14px}
@media(max-width:768px){
  .chat-app{height:auto;flex-direction:column;min-height:70vh}
  .chat-side{width:100%;flex:0 0 auto;max-height:46vh;border-right:0;border-bottom:1px solid var(--line)}
  .chat-main{min-height:52vh}
}

/* 作品：卡片 / 下载 / 弹窗（2026-10-12） */
.grid-res{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
.wcell{position:relative;border-radius:12px;overflow:hidden;background:rgba(0,0,0,.25)}
.wcell img,.wcell video{width:100%;display:block;border-radius:12px}
.wcell .dl{position:absolute;right:6px;bottom:6px;background:rgba(0,0,0,.6);color:#fff;font-size:12px;padding:3px 9px;border-radius:8px;text-decoration:none}
.wmodal{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;align-items:center;justify-content:center;z-index:200;padding:20px}
.wmodal.on{display:flex}
.wmodal-inner{background:#fff;color:#111;border-radius:16px;max-width:820px;width:100%;max-height:82vh;overflow:auto;padding:18px}
.wmodal-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:16px}
.wmodal-top .x{cursor:pointer;opacity:.6;font-size:18px}

/* ---- 生成进度条 ---- */
.progwrap{margin-top:14px}
.progwrap .progtop{display:flex;justify-content:space-between;font-size:12.5px;color:var(--d-mut);margin-bottom:6px}
body.light .progwrap .progtop{color:var(--mut)}
.progbar{height:8px;border-radius:6px;background:rgba(127,127,127,.18);overflow:hidden}
.progbar i{display:block;height:100%;width:0;border-radius:6px;background:linear-gradient(90deg,#7c5cff,#4f6ef7);transition:width .25s ease}
.progwrap.ok .progbar i{background:linear-gradient(90deg,#34d399,#10b981)}
.progwrap.err .progbar i{background:#ef4444}
/* ---- 作品长按删除 ---- */
.wcell{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.wcell.pressing{outline:2px solid #4f6ef7;outline-offset:2px;transform:scale(.97);transition:transform .12s}
.works-tip{font-size:12px;color:var(--d-mut);margin-top:10px;text-align:center}
body.light .works-tip{color:var(--mut)}
