/* ============================================================
   Lovart 首页 — 依据官网 100% 还原
   设计基准：1912px 视口；内容容器 ~1578px 居中
   ============================================================ */
:root{
  --c-banner:#e1ff67;
  --c-bg:#ffffff;
  --c-panel:#ffffff;
  --c-ink:#111111;
  --c-ink-soft:#1a1a1a;
  --c-muted:#a8a8a8;
  --c-placeholder:rgba(0,0,0,.3);
  --c-border:#e5e5e5;
  --c-sidebar-border:#ededed;
  --c-card:#f5f5f5;
  --c-card-border:rgba(0,0,0,.04);
  --c-hover:#f0f0f0;
  --c-purple:#7c3aed;
  --c-blue:#2563eb;
  --c-avatar:#3f8ce0;
  --font-ui:"Inter",system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --font-display:"Poppins","Noto Sans SC","Inter","PingFang SC","Microsoft YaHei",sans-serif;
  --banner-h:48px;
  --sidebar-w:60px;
  --container-w:1700px;
  --radius-card:14px;
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
html{scrollbar-width:none;}
html::-webkit-scrollbar{width:0;height:0;}
body{
  margin:0;
  font-family:var(--font-ui);
  color:var(--c-ink);
  background:var(--c-bg);
  padding-top:var(--banner-h);
  -webkit-font-smoothing:antialiased;
}
button{font-family:inherit;cursor:pointer;}
a{text-decoration:none;color:inherit;}

/* -------- 顶部横幅 -------- */
.promo-banner{
  position:fixed;top:0;left:0;right:0;height:var(--banner-h);
  background:var(--c-banner);z-index:100;
  display:flex;align-items:center;justify-content:center;
}
.promo-inner{display:flex;align-items:center;gap:14px;font-size:13px;color:#111;white-space:nowrap;}
.countdown{display:inline-flex;align-items:center;gap:7px;}
.cd-seg{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:34px;height:28px;padding:0 7px;margin:0;
  background:#fff;color:#111;border-radius:8px;
  font-weight:600;font-size:13px;font-variant-numeric:tabular-nums;letter-spacing:.5px;
}
.cd-colon{color:#111;font-weight:600;font-size:13px;margin:0 1px;}
.promo-icon{width:15px;height:15px;flex:none;}
.promo-text{display:inline-flex;align-items:center;gap:7px;font-weight:500;}
.promo-link{color:#111;font-weight:600;border-bottom:1px solid rgba(0,0,0,.4);padding-bottom:1px;}

/* -------- 侧边栏 -------- */
.sidebar{
  position:fixed;top:var(--banner-h);left:0;bottom:0;width:var(--sidebar-w);
  background:var(--c-bg);border-right:1px solid var(--c-sidebar-border);
  display:flex;flex-direction:column;align-items:center;z-index:90;
}
.sb-logo{padding:12px 0 14px;}
.logo-mark{width:32px;height:auto;display:block;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;aspect-ratio:410/222;}

/* 首页提交后的画布初始化过渡，与项目创建并行，至少保持 2.5 秒。 */
.home-transition{
  position:fixed;inset:0;z-index:10000;background:#fff;
  display:grid;place-items:center;opacity:0;
  transition:opacity 90ms linear;
}
.promo-close{position:absolute;right:16px;top:50%;width:28px;height:28px;transform:translateY(-50%);border:0;border-radius:7px;background:transparent;color:#222;font:20px/26px Arial,sans-serif;cursor:pointer;}
.promo-close:hover{background:rgba(0,0,0,.08);}
body.promo-hidden{--banner-h:0px;padding-top:0;}
body.promo-hidden .promo-banner{display:none!important;}
body.promo-hidden .sidebar{top:0;}
body.promo-hidden .topbar{top:0;}
.home-transition[hidden]{display:none;}
.home-transition.is-active{opacity:1;}
.canvas-transition.is-leaving{opacity:0;pointer-events:none;}
.home-transition-badge{
  position:relative;width:92px;height:52px;
}
.home-transition-logo{
  position:absolute;left:50%;top:50%;width:82px;height:44px;
  object-fit:contain;
  transform:translate(-50%,-50%);user-select:none;pointer-events:none;
}
@media (prefers-reduced-motion:reduce){
  .home-transition{transition:none;}
}
.sb-nav{display:flex;flex-direction:column;gap:8px;align-items:center;margin-top:2px;}
.sb-btn{
  width:36px;height:36px;border:0;background:transparent;border-radius:9px;
  display:flex;align-items:center;justify-content:center;color:#1a1a1a;
}
.sb-btn svg{width:19px;height:19px;}
.sb-btn:hover{background:#f6f6f6;}
.sb-btn.is-active{background:rgba(0,0,0,.05);}
.sb-help{margin-top:auto;margin-bottom:16px;}

/* -------- 主区域 -------- */
.main{margin-left:var(--sidebar-w);position:relative;}

/* 顶部工具栏 */
.topbar{
  position:fixed;top:var(--banner-h);left:var(--sidebar-w);right:0;height:52px;
  display:flex;align-items:center;justify-content:flex-end;
  padding:0 22px;background:var(--c-bg);z-index:85;
}
.topbar-actions{display:flex;align-items:center;gap:10px;}
.pill-btn{
  display:inline-flex;align-items:center;gap:7px;
  height:34px;padding:0 14px;border:1px solid var(--c-border);border-radius:999px;
  background:#fff;font-size:13px;font-weight:500;color:#111;
  transition:.15s;
}
.pill-btn:hover{background:#fafafa;}
.pill-btn .ic{width:15px;height:15px;}
.pill-btn .bolt{width:14px;height:14px;}
.credits-num{font-weight:600;}
.credits-sep{width:1px;height:14px;background:var(--c-border);margin:0 2px;}
.credits-up{color:var(--c-blue);font-weight:600;}
.avatar-btn{width:30px;height:30px;border:0;background:transparent;border-radius:50%;display:flex;align-items:center;justify-content:center;}
.avatar-btn svg{width:30px;height:30px;border-radius:50%;}
.avatar-btn img{width:30px;height:30px;border-radius:50%;object-fit:cover;display:block;}

/* -------- 内容容器 -------- */
.container{
  max-width:var(--container-w);
  margin:0 auto;
  padding:0 60px 120px;
  padding-top:64px;
}

/* -------- Hero -------- */
.hero{text-align:center;padding-top:154px;}
.hero-brand{display:inline-flex;align-items:center;gap:5px;}
.hero-arrow{width:56px;margin-right:2px;height:auto;display:block;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;aspect-ratio:410/222;}
.hero-wordmark{width:110px;height:auto;display:block;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;aspect-ratio:775/187;}
.hero-title{
  font-family:var(--font-display);
  font-size:30px;font-weight:600;color:#111;margin:0;letter-spacing:-.3px;
  display:inline-flex;align-items:center;gap:8px;
}
.hero-sub{color:var(--c-muted);font-size:16px;margin:12px 0 0;}
.hero-tagline{font-family:var(--font-display);font-size:30px;font-weight:600;color:#111;letter-spacing:-.3px;line-height:1;margin-left:9px;}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

/* ---- Hero 进场渐隐（JS 驱动，还原官网 transition 渐隐） ---- */
@keyframes hero-fade-in{0%{opacity:0}100%{opacity:1}}
@keyframes hero-chat-in{0%{opacity:0;transform:translateY(12px)}100%{opacity:1;transform:translateY(0)}}
.hero-brand{opacity:0;transition:opacity .55s ease;}
.hero-sub{opacity:0;transition:opacity .55s ease;}
.chat-box{animation:hero-chat-in .55s .42s both;}
.model-pills{animation:hero-fade-in .6s .58s both;}

/* ChatCanvas 输入框 */
.chat-box{
  max-width:728px;margin:30px auto 0;
  border:1px solid #ececec;border-radius:22px;background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.03),0 6px 24px rgba(0,0,0,.04);
  padding:15px 18px 14px;
  transition:.15s;
}
.chat-box:focus-within{border-color:#e2e2e2;box-shadow:0 1px 2px rgba(0,0,0,.03),0 8px 30px rgba(0,0,0,.06);}
.chat-input-wrap{position:relative;width:100%;}
.chat-text-field{position:relative;width:100%;min-width:0;}
.chat-input{
  display:block;width:100%;border:0;outline:none;resize:none;
  font-family:var(--font-ui);font-size:15px;line-height:1.5;color:#111;
  min-height:24px;max-height:180px;background:transparent;
}
.chat-input::placeholder{color:var(--c-placeholder);}
.home-refs{position:absolute;z-index:2;left:0;top:-3px;display:flex;align-items:center;gap:6px;width:max-content;max-width:55%;overflow-x:auto;margin:0;padding:1px;scrollbar-width:none;}
.home-refs[hidden]{display:none;}
.home-refs::-webkit-scrollbar{display:none;}
.home-ref-chip{position:relative;max-width:230px;height:32px;flex:0 0 auto;padding:3px 7px 3px 3px;border:1px solid #dedede;border-radius:10px;background:#fff;display:flex;align-items:center;gap:7px;overflow:hidden;}
.home-ref-chip img{display:block;width:24px;height:24px;flex:0 0 24px;object-fit:cover;border-radius:7px;background:#f3f3f3;}
.home-ref-name{min-width:0;max-width:154px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#292929;font-size:12px;line-height:1;}
.home-ref-spinner{width:14px;height:14px;flex:0 0 14px;border:1.5px solid rgba(0,0,0,.14);border-top-color:#222;border-radius:50%;animation:home-ref-spin .7s linear infinite;}
.home-ref-chip.is-error{border-color:#efb0b0;background:#fff1f1;}
.home-ref-remove{width:16px;height:16px;flex:0 0 16px;padding:0;border:0;border-radius:50%;background:#ededed;color:#555;font:13px/16px Arial,sans-serif;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .12s,background .12s;}
.home-ref-chip:hover .home-ref-remove,.home-ref-remove:focus-visible{opacity:1;}
.home-ref-remove:hover{background:#dedede;color:#111;}
.home-ref-chip.is-uploading .home-ref-remove{display:none;}
.home-ref-preview{position:fixed;z-index:420;width:184px;height:184px;padding:0;border:0;border-radius:11px;background:#fff;box-shadow:0 10px 28px rgba(0,0,0,.15);overflow:hidden;pointer-events:none;opacity:0;transform:translateY(4px) scale(.98);transition:opacity .12s ease,transform .12s ease;}
.home-ref-preview[hidden]{display:none;}
.home-ref-preview.is-visible{opacity:1;transform:none;}
.home-ref-preview[data-placement="bottom"]{transform:translateY(-4px) scale(.98);}
.home-ref-preview[data-placement="bottom"].is-visible{transform:none;}
.home-ref-preview img{display:block;width:100%;height:100%;object-fit:cover;}
@keyframes home-ref-spin{to{transform:rotate(360deg);}}
.home-upload-toast{position:fixed;z-index:500;top:calc(var(--banner-h) + 4px);left:50%;width:360px;max-width:calc(100vw - 32px);height:50px;padding:0 14px;display:flex;align-items:center;gap:10px;border:1px solid #e7e7e7;border-radius:12px;background:#fff;color:#191919;box-shadow:0 12px 30px rgba(0,0,0,.12);font-size:13px;line-height:18px;pointer-events:none;opacity:0;transform:translate(-50%,-8px);transition:opacity .18s ease,transform .18s ease;}
.home-upload-toast.is-visible{opacity:1;transform:translate(-50%,0);}
.home-upload-toast-icon{position:relative;width:15px;height:15px;flex:0 0 15px;border-radius:50%;background:#39cf82;}
.home-upload-toast-icon::after{content:"";position:absolute;left:4px;top:3px;width:6px;height:3px;border-left:1.5px solid #fff;border-bottom:1.5px solid #fff;transform:rotate(-45deg);}
.home-upload-toast.is-error .home-upload-toast-icon{background:#ef5350;}
.home-upload-toast.is-error .home-upload-toast-icon::after{content:"!";inset:0;width:auto;height:auto;border:0;transform:none;display:grid;place-items:center;color:#fff;font:700 10px/15px Arial,sans-serif;}
.home-upload-toast-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.chat-input-wrap.has-refs .chat-input{text-indent:var(--home-refs-indent,0px);}
.chat-input-wrap.has-refs .ph-overlay{left:var(--home-refs-indent,0px);}
.ph-overlay{
  position:absolute;top:0;left:0;right:0;
  display:flex;align-items:flex-start;
  pointer-events:none;
  color:var(--c-placeholder);
  font-family:var(--font-ui);font-size:15px;line-height:1.5;
  white-space:nowrap;overflow:hidden;
  transition:opacity .12s;
}
.ph-overlay.is-hidden{opacity:0;}
.ph-static{display:inline-block;white-space:pre;}
.ph-roll{
  display:inline-block;overflow:hidden;height:22.5px;vertical-align:bottom;
}
.ph-char{
  display:inline-block;
  transform:translateY(0);opacity:1;
  transition:transform .38s cubic-bezier(.4,0,.2,1), opacity .38s cubic-bezier(.4,0,.2,1);
}
.ph-char.is-out{transform:translateY(-100%);opacity:0;}
.ph-char.is-in{transform:translateY(100%);opacity:0;}
.chat-toolbar{display:flex;align-items:center;justify-content:space-between;margin-top:26px;}
.chat-tools-left,.chat-tools-right{display:flex;align-items:center;gap:8px;}
.tool-btn,.send-btn{
  width:32px;height:32px;border:0;background:transparent;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
}
.tool-btn svg{width:19px;height:19px;color:#333;}
.tool-btn:hover{background:#f5f5f5;}
.send-btn{background:rgba(0,0,0,.06);}
.send-btn:hover{background:rgba(0,0,0,.1);}
.send-btn svg{width:18px;height:18px;color:#333;}

/* -------- 模型 pills -------- */
.model-pills{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;max-width:730px;margin:24px auto 0;
}
.model-pill{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 8px;border:1px solid var(--c-border);border-radius:999px;
  background:#fff;font-size:12px;font-weight:400;color:#222;
  transition:.15s;
}
.model-pill:hover{background:#fafafa;}
.model-pill .mp-ic{width:14px;height:14px;}
.model-pill.is-active{background:#f4f3ff;border-color:var(--c-purple);color:var(--c-purple);}
.model-pill.is-active .mp-ic{stroke:var(--c-purple);}

/* 还原官网选中模型胶囊的文字流光 shimmer（仅作用于文字，不覆盖图标） */
@keyframes preset-chip-shimmer{
  0%{background-position-x:125%;}
  100%{background-position-x:-25%;}
}
.model-pill.is-active .mp-label{
  position:relative;
  display:inline-block;
  color:var(--c-purple);
}
.model-pill.is-active .mp-label::after{
  content:attr(data-label);
  position:absolute;inset:0;
  background-image:linear-gradient(105deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 30%, #dcc3f6 50%, rgba(0,0,0,0) 70%, rgba(0,0,0,0) 100%);
  background-size:200% 100%;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  -webkit-text-fill-color:transparent;
  animation:preset-chip-shimmer 1s linear infinite;
  pointer-events:none;
}
/* -------- 模型选择 chip（蓝色胶囊） -------- */
.model-chip[hidden]{display:none !important;}
.model-chip{
  display:inline-flex;align-items:center;gap:4px;height:32px;
  padding:0 8px;border:0.5px solid #147DFF;border-radius:999px;
  background:rgba(61,155,255,.10);color:#147DFF;font-size:12px;cursor:pointer;
  white-space:nowrap;
}
.model-chip .chip-ic{display:inline-flex;align-items:center;}
.model-chip .chip-ic svg{width:14px;height:14px;}
.model-chip .chip-label{white-space:nowrap;}
.model-chip .chip-x{
  width:14px;height:14px;display:inline-flex;align-items:center;justify-content:center;
  border:0;background:transparent;color:#147DFF;cursor:pointer;padding:0;
}
.model-chip .chip-x svg{width:14px;height:14px;}

/* -------- 模型预设提示卡片网格 -------- */
.model-pills[hidden],.preset-grid[hidden]{display:none !important;}
.preset-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:12px;
  max-width:730px;margin:24px auto 0;
}
.preset-card{border:0;background:transparent;text-align:left;padding:0;cursor:pointer;color:inherit;font-family:inherit;}

/* 单图版（Seedance）：图片在上，标题在下 */
.preset-single{display:flex;flex-direction:column;gap:8px;}
.preset-single .pc-media{
  position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;
  border-radius:12px;background:#F7F7F7;
}
.preset-single .pc-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:top;}
.preset-single .pc-title{
  font-size:12px;line-height:normal;color:#000;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;
}

/* 三图版：标题在上，堆叠旋转图片在下 */
.preset-stack{
  aspect-ratio:217/130;overflow:hidden;border-radius:12px;background:#F7F7F7;
  padding:16px 16px 0;display:block;
  transition:background .15s;
}
.preset-stack:hover{background:rgba(12,12,13,.08);}
.preset-stack:active{background:rgba(12,12,13,.14);}
.preset-stack .pc-title{
  font-size:12px;line-height:normal;color:#141414;margin-bottom:12px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.preset-stack .pc-stack{position:relative;width:100%;height:100%;margin-top:-12px;}
.preset-stack .pc-stack img{
  position:absolute;border-radius:4px;border:.5px solid #B0B0B0;object-fit:cover;
  transition:transform .3s ease-out;
}
.preset-stack .st-1{top:0;left:10%;aspect-ratio:7/8;width:38%;transform:rotate(-15deg);}
.preset-stack .st-2{top:-10%;left:25%;aspect-ratio:4/5;width:44%;transform:rotate(9deg);}
.preset-stack .st-3{top:10%;left:50%;aspect-ratio:7/8;width:38%;transform:rotate(25deg);}
.preset-stack:hover .st-1{transform:rotate(-15deg) translateY(-7px);}
.preset-stack:hover .st-2{transform:rotate(9deg) translateY(-9px);}
.preset-stack:hover .st-3{transform:rotate(25deg) translateY(-7px);}
.preset-card .pc-media{transition:transform .3s ease;}
.preset-single:hover .pc-media{transform:translateY(-4px);}
.preset-single:hover .pc-media img{transform:scale(1.03);}


/* -------- 通用 Section -------- */
.section{margin-top:56px;}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;}
.section-title{font-size:16px;font-weight:600;color:#111;margin:0;letter-spacing:.2px;}
.section-more{display:inline-flex;align-items:center;gap:4px;font-size:13px;color:#333;}
.section-more svg{width:16px;height:16px;}
.filter-btn{
  width:30px;height:30px;border:1px solid var(--c-border);border-radius:8px;background:#fff;
  display:flex;align-items:center;justify-content:center;
}
.filter-btn svg{width:17px;height:17px;}

/* -------- 最近项目 -------- */
.recent-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(266px,1fr));gap:12px;
}
.recent-card{
  border:0;background:transparent;padding:0;text-align:left;
  display:flex;flex-direction:column;gap:10px;
}
.recent-thumb{
  width:100%;height:172px;background:var(--c-card);border-radius:var(--radius-card);
}
.recent-thumb.has-cover{background-size:cover;background-position:center;background-repeat:no-repeat;}
.recent-empty-title{width:42px;height:42px;border-radius:8px;background:#fff;color:#999;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:600;box-shadow:0 1px 4px rgba(0,0,0,.06);}
.recent-project .recent-thumb:not(.has-cover){display:flex;align-items:center;justify-content:center;background:#f3f3f3;}
.recent-project{cursor:pointer;}
.recent-new{border:1px dashed #ddd;}
.recent-new .recent-plus{background:#f5f5f5;display:flex;align-items:center;justify-content:center;
  border-radius:var(--radius-card);
}
.recent-new .recent-plus svg{width:22px;height:22px;}
.recent-label{font-size:13px;color:#111;font-weight:500;padding:0 2px;}
.recent-project .recent-label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.recent-date{font-size:12px;color:#b0b0b0;padding:0 2px;margin-top:-6px;}

/* -------- 筛选 tabs -------- */
.filter-tabs{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:4px;position:sticky;top:calc(var(--banner-h) + 52px);z-index:20;background:var(--c-bg);padding:12px 0;}
.tab{
  height:32px;padding:0 14px;border:0;background:transparent;border-radius:9px;
  font-size:13px;color:#222;font-weight:500;
}
.tab:hover{background:#f6f6f6;}
.tab.is-active{background:#efefef;color:#111;font-weight:600;}

/* -------- 灵感发现 瀑布流 -------- */
.masonry{display:flex;gap:12px;align-items:flex-start;margin-top:16px;}
.card{
  break-inside:avoid;margin-bottom:0;background:#fff;border-radius:8px;overflow:hidden;
}
.card-media{
  width:100%;border-radius:8px;overflow:hidden;position:relative;
  display:flex;align-items:center;justify-content:center;
}
.card-media::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 60%,rgba(0,0,0,.04));}
.card-media img{width:100%;display:block;}
.card-meta{
  display:flex;align-items:center;justify-content:space-between;
  padding:9px 2px 2px;gap:8px;
}
.card-author{display:flex;align-items:center;gap:7px;min-width:0;}
.author-avatar{width:20px;height:20px;border-radius:50%;flex:none;box-shadow:0 0 0 1px rgba(0,0,0,.06);}
.author-name{font-size:12px;color:#222;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500;}
.card-stats{display:flex;align-items:center;gap:9px;flex:none;}
.stat{display:inline-flex;align-items:center;gap:3px;font-size:11px;color:#BCBCBC;font-variant-numeric:tabular-nums;}
.stat svg{width:13px;height:13px;}

/* -------- 悬浮回到顶部 / Lovart 助手头像 -------- */
.back-top,.mascot-avatar{position:fixed;z-index:80;}
.back-top{
  right:25px;bottom:101px;width:40px;height:40px;border-radius:50%;
  border:1px solid #f0f0f0;background:#fff;box-shadow:0 4px 16px rgba(0,0,0,.08);
  display:flex;align-items:center;justify-content:center;
  opacity:0;visibility:hidden;transform:translateY(8px);transition:.25s;
}
.back-top.is-visible{opacity:1;visibility:visible;transform:none;}
.back-top svg{width:20px;height:20px;}
.mascot-avatar{
  right:8px;top:74.5%;transform:translateY(-50%);
  width:42px;height:42px;border:0;background:transparent;border-radius:50%;
  display:none; /* 原平台首页无悬浮助手头像 */
}
.mascot-avatar svg{width:42px;height:42px;border-radius:50%;box-shadow:0 4px 14px rgba(0,0,0,.16);}

/* 助手头像轻微浮动 */
@keyframes mascot-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
.mascot-avatar svg{animation:mascot-float 3.2s ease-in-out infinite;}

/* 最近项目卡片 hover 轻微上浮 */
.recent-card .recent-thumb{transition:transform .25s ease, box-shadow .25s ease;}
.recent-card:hover .recent-thumb{transform:translateY(-4px);box-shadow:0 10px 24px rgba(0,0,0,.08);}
.recent-card:hover .recent-label{color:var(--c-purple);}

/* -------- 响应式 -------- */
@media (max-width:1500px){
  .recent-grid{grid-template-columns:repeat(auto-fill,minmax(266px,1fr));}
  .masonry{gap:12px;}
}
@media (max-width:1200px){
  .recent-card:nth-child(5){display:none;}
}
@media (max-width:920px){
  .hero{padding-top:40px;}
  .recent-card:nth-child(n+4){display:none;}
  .promo-banner{font-size:12px;}
}
@media (max-width:640px){
  .promo-text{max-width:46vw;overflow:hidden;text-overflow:ellipsis;}
  .hero-title{font-size:24px;}
  .recent-card:nth-child(n+3){display:none;}
  .topbar{padding:0 12px;}
  .pill-btn{padding:0 10px;}
}

/* 灵感卡片媒体 */
.card-media{background-size:cover;background-position:center;}
.card-media::after{content:"";position:absolute;inset:0;background:
  linear-gradient(180deg,rgba(0,0,0,0) 88%,rgba(0,0,0,.03));}/* ============================================================
   弹窗 / 悬浮菜单（升级套餐 · 创作类型 · 头像菜单 · 帮助）
   ============================================================ */
body.modal-open{overflow:hidden;}

.modal-backdrop{
  position:fixed;inset:0;z-index:200;
  background:rgba(20,20,20,.32);
  backdrop-filter:blur(2px);
  display:flex;align-items:flex-start;justify-content:center;
  overflow-y:auto;
  padding:52px 24px 60px;
}
.modal-backdrop[hidden]{display:none;}

.modal{
  position:relative;
  background:#fff;
  border-radius:20px;
  box-shadow:0 24px 64px rgba(0,0,0,.2);
  width:100%;
}
.modal-close{
  position:absolute;top:18px;right:20px;z-index:5;
  width:32px;height:32px;border:0;background:transparent;border-radius:8px;
  display:flex;align-items:center;justify-content:center;color:#999;
}
.modal-close:hover{background:#f5f5f5;}
.modal-close svg{width:18px;height:18px;}

/* -------- 付费升级弹窗 -------- */
.paywall-modal{max-width:1500px;margin-top:6px;padding:26px 40px 36px;}
.paywall-hero{
  position:relative;
  height:150px;border-radius:16px;overflow:hidden;
  background:
    radial-gradient(120% 180% at 85% 15%, rgba(255,196,120,.5), transparent 55%),
    radial-gradient(90% 160% at 8% 95%, rgba(70,45,28,.65), transparent 60%),
    linear-gradient(120deg,#3a2f26,#6b4a34 55%,#a87950);
  display:flex;align-items:center;justify-content:space-between;
  padding:0 34px;color:#fff;
}
.paywall-hero-title{display:flex;align-items:center;gap:8px;font-size:20px;font-weight:600;}
.pw-sparkle{width:22px;height:22px;}
.paywall-hero-sub{font-size:15px;opacity:.94;margin-top:7px;}
.paywall-hero-count{display:flex;align-items:center;gap:8px;}
.pw-cd-group{display:flex;flex-direction:column;align-items:center;gap:5px;}
.pw-cd-seg{
  display:inline-flex;align-items:center;justify-content:center;
  background:#fff;color:#111;border-radius:7px;
  min-width:26px;height:34px;padding:0 4px;
  font-weight:600;font-size:16px;font-variant-numeric:tabular-nums;
}
.pw-cd-unit{font-size:11px;color:rgba(255,255,255,.85);}
.pw-cd-colon{color:#fff;font-weight:600;font-size:16px;}

.paywall-title{text-align:center;font-size:28px;font-weight:650;margin:28px 0 8px;color:#111;}
.paywall-sub{text-align:center;font-size:14px;color:#666;margin:0 0 24px;}

.paywall-toggle-row{position:relative;display:flex;align-items:center;justify-content:center;margin-bottom:26px;}
.paywall-toggle{display:inline-flex;background:#f3f3f3;border-radius:999px;padding:4px;}
.toggle-btn{
  height:34px;padding:0 24px;border:0;background:transparent;border-radius:999px;
  font-size:14px;color:#666;display:inline-flex;align-items:center;gap:7px;
}
.toggle-btn.is-active{background:#fff;color:#111;font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.06);}
.toggle-badge{font-size:11px;color:#c7254e;font-weight:600;}
.team-btn{
  position:absolute;right:0;height:34px;padding:0 18px;border:1px solid var(--c-border);
  border-radius:999px;background:#fff;font-size:13px;color:#333;
}
.team-btn:hover{background:#fafafa;}

.plans{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
.plan-card{
  position:relative;border:1px solid #ececec;border-radius:16px;
  padding:24px 22px 22px;background:#fff;
  display:flex;flex-direction:column;
}
.plan-card.popular{border-color:#c9ef5b;box-shadow:0 0 0 1px #c9ef5b inset;}
.plan-popular-tag{
  position:absolute;top:-1px;left:-1px;right:-1px;height:30px;
  background:#dbf65e;color:#000;font-size:12px;font-weight:600;
  display:flex;align-items:center;justify-content:center;
  border-radius:16px 16px 0 0;
}
.plan-card.popular{padding-top:46px;}
.plan-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;}
.plan-name{font-size:18px;font-weight:600;color:#111;}
.plan-badge{font-size:11px;background:#eef2ff;color:#3b5bff;border-radius:6px;padding:2px 8px;font-weight:600;}
.plan-price{display:flex;align-items:baseline;gap:5px;}
.plan-price .cur{font-size:16px;font-weight:600;color:#111;}
.plan-price .num{font-size:30px;font-weight:700;color:#111;}
.plan-price .period{font-size:13px;color:#888;}
.plan-price .orig{font-size:14px;color:#b0b0b0;text-decoration:line-through;}
.plan-bill{font-size:12px;color:#888;margin:8px 0 16px;}
.plan-feats{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px;flex:1;}
.plan-feats li{font-size:12.5px;color:#444;display:flex;align-items:flex-start;gap:7px;line-height:1.4;}
.plan-feats li::before{content:"";flex:none;width:5px;height:5px;border-radius:50%;background:#d0d0d0;margin-top:6px;}
.plan-btn{
  margin-top:18px;height:40px;width:100%;border:0;border-radius:10px;
  background:#111;color:#fff;font-size:14px;font-weight:600;
}
.plan-btn:hover{background:#000;}
.plan-btn.popular{background:#111;}
.paywall-foot{text-align:center;font-size:12px;color:#999;margin-top:22px;}
.paywall-foot .dot{margin:0 6px;}

/* -------- 创作类型弹窗 -------- */
.create-modal{max-width:1040px;margin-top:40px;padding:40px 40px 32px;}
.create-title{text-align:center;font-size:24px;font-weight:650;margin:0 0 30px;color:#111;}
.create-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
.create-card{
  border:1px solid #ececec;border-radius:12px;background:#fff;padding:14px;
  text-align:left;transition:box-shadow .15s;
}
.create-card:hover{box-shadow:0 6px 20px rgba(0,0,0,.08);}
.create-card.is-selected{border-color:#111;box-shadow:0 0 0 2px rgba(17,17,17,.12);}
.create-label{font-size:14px;font-weight:500;color:#111;margin-bottom:12px;}
.create-thumb{height:150px;border-radius:8px;background-size:cover;background-position:center;}
.create-continue{
  display:block;margin:26px auto 0;width:100%;max-width:480px;height:44px;
  border:0;border-radius:10px;background:#f1f1f1;color:#333;
  font-size:14px;font-weight:500;
}
.create-continue:hover{background:#e8e8e8;}

/* -------- 头像用户菜单 -------- */
.popover{
  position:fixed;z-index:300;background:#fff;
  border:1px solid #ececec;border-radius:14px;
  box-shadow:0 12px 32px rgba(0,0,0,.12);
  padding:8px;
}
.popover[hidden]{display:none;}
.avatar-popover{top:calc(var(--banner-h) + 52px + 8px);right:20px;width:250px;}
.avatar-pop-head{padding:10px 12px 10px;border-bottom:1px solid #f0f0f0;}
.avatar-pop-id{font-size:15px;font-weight:600;color:#111;}
.avatar-pop-email{font-size:12px;color:#999;margin-top:3px;}
.avatar-pop-plan{
  display:flex;align-items:center;gap:9px;padding:11px 12px;margin:8px 0;
  background:#f7f7f7;border-radius:10px;
}
.av-plan-name{font-size:13px;font-weight:600;color:#111;}
.av-plan-points{font-size:13px;color:#333;}
.av-plan-upgrade{margin-left:auto;height:26px;padding:0 14px;border:0;border-radius:7px;background:#111;color:#fff;font-size:12px;font-weight:600;}
.av-plan-upgrade:hover{background:#000;}
.avatar-pop-items{display:flex;flex-direction:column;}
.av-item{
  height:36px;padding:0 12px;border:0;background:transparent;border-radius:8px;
  font-size:13px;color:#222;text-align:left;display:flex;align-items:center;gap:8px;
}
.av-item:hover{background:#f5f5f5;}
.av-item-caret .av-caret{margin-left:auto;color:#999;font-size:12px;}
.av-item-danger{color:#e5484d;}

/* -------- 帮助弹窗 -------- */
.help-popover{bottom:18px;left:calc(var(--sidebar-w) + 8px);width:224px;}
.help-items{display:flex;flex-direction:column;}
.help-item{height:36px;padding:0 12px;border:0;background:transparent;border-radius:8px;font-size:13px;color:#222;text-align:left;display:flex;align-items:center;gap:8px;}
.help-item .help-ic{width:18px;height:18px;flex:0 0 auto;color:#333;}
.help-item:hover{background:#f5f5f5;}


/* -------- 添加内容弹层（+） -------- */
.add-popover{position:fixed;z-index:350;width:200px;padding:6px;display:flex;flex-direction:column;gap:2px;
  background:#fff;border:1px solid #e7e7e7;border-radius:12px;box-shadow:0 10px 28px rgba(0,0,0,.12);}
.add-popover[hidden]{display:none;}
.add-item{width:100%;min-height:34px;padding:6px 8px;border:0;background:transparent;border-radius:8px;
  display:flex;align-items:center;gap:8px;font-size:13px;color:#222;text-align:left;cursor:pointer;}
.add-item:hover{background:#f5f5f5;}
.add-item .ai-ic{width:18px;height:18px;flex:none;color:#333;}
.add-item-row{justify-content:space-between;}
.add-item-label{display:flex;align-items:center;gap:8px;}
.lo-switch{position:relative;display:inline-flex;flex:none;width:32px;height:18px;cursor:pointer;}
.lo-switch input{position:absolute;opacity:0;width:0;height:0;}
.sw-track{position:absolute;inset:0;border-radius:999px;background:#d9d9d9;transition:.18s;}
.sw-track::after{content:"";position:absolute;left:2px;top:2px;width:14px;height:14px;border-radius:50%;background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.2);transition:.18s;}
.lo-switch input:checked + .sw-track{background:#111;}
.lo-switch input:checked + .sw-track::after{transform:translateX(14px);}

/* -------- 模型偏好弹层（灵感） -------- */
.model-pref-panel{position:fixed;z-index:350;width:300px;background:#fff;border:1px solid #ececec;border-radius:16px;
  box-shadow:0 16px 48px rgba(0,0,0,.14);display:flex;flex-direction:column;overflow:hidden;}
.model-pref-panel[hidden]{display:none;}
.mp-head{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 10px;}
.mp-title{font-size:13px;font-weight:600;color:#222;}
.mp-auto{display:flex;align-items:center;gap:8px;font-size:12px;color:#333;}
.mp-tabs{display:flex;align-items:center;justify-content:center;gap:4px;padding:0 12px 10px;}
.mp-tab{flex:1;height:28px;border:0;border-radius:8px;background:transparent;font-size:12px;color:#666;
  display:flex;align-items:center;justify-content:center;cursor:pointer;transition:.15s;}
.mp-tab:hover{background:#f5f5f5;}
.mp-tab.is-active{background:#f0f0f0;color:#111;font-weight:500;}
.mp-body{flex:1;min-height:0;overflow-y:auto;padding:0 10px 12px;scrollbar-width:thin;max-height:340px;}
.mp-body::-webkit-scrollbar{width:6px;}
.mp-body::-webkit-scrollbar-thumb{background:#e2e2e2;border-radius:3px;}
.mp-cat{font-size:11px;color:#999;margin:6px 2px 8px;}
.mp-list{display:flex;flex-direction:column;}
.mp-row{display:flex;align-items:flex-start;gap:10px;padding:9px 8px;border-radius:10px;cursor:pointer;}
.mp-row:hover{background:#f7f7f7;}
.mp-row-icon{width:22px;height:22px;flex:none;margin-top:1px;}
.mp-row-icon svg{width:22px;height:22px;}
.mp-row-main{flex:1;min-width:0;}
.mp-row-name{font-size:13px;font-weight:600;color:#111;display:flex;align-items:center;}
.mp-row-name .mp-badge{font-size:9px;font-weight:600;color:#8a5bff;background:#efeafe;border-radius:999px;padding:1px 5px;margin-left:6px;}
.mp-row-desc{font-size:12px;color:#999;line-height:1.4;margin-top:2px;}
.mp-row-time{font-size:12px;color:#333;margin-top:6px;}
.mp-row-mark{flex:none;width:18px;height:18px;margin-top:2px;display:flex;align-items:center;justify-content:center;color:#111;}
.mp-row-mark .mk-check{color:#111;}
.mp-row-mark .mk-chev{color:#888;}

/* -------- 响应式：套餐卡片 -------- */
@media (max-width:1200px){
  .plans{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:720px){
  .plans{grid-template-columns:1fr;}
  .create-grid{grid-template-columns:repeat(2,1fr);}
}


/* -------- Lovart 助手悬浮窗口 -------- */
.assistant-panel{
  position:fixed;z-index:280;right:58px;top:74.5%;transform:translateY(-50%);
  width:340px;max-height:min(560px, calc(100vh - 80px));
  background:#fff;border:1px solid #ececec;border-radius:18px;
  box-shadow:0 20px 56px rgba(0,0,0,.16);
  display:flex;flex-direction:column;overflow:hidden;
  animation:asst-in .18s ease-out;
}
.assistant-panel[hidden]{display:none;}
@keyframes asst-in{from{opacity:0;transform:translateY(-50%) translateY(8px)}to{opacity:1;transform:translateY(-50%)}}
.assistant-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #f0f0f0;}
.assistant-title{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:600;color:#111;}
.assistant-dot{width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.18);}
.assistant-close{width:28px;height:28px;border:0;background:transparent;border-radius:7px;display:flex;align-items:center;justify-content:center;color:#999;}
.assistant-close:hover{background:#f5f5f5;}
.assistant-close svg{width:16px;height:16px;}
.assistant-body{
  padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:10px;
  background:linear-gradient(180deg,#fafbfe,#fff);min-height:220px;max-height:340px;
}
.assistant-msg{display:flex;}
.assistant-bot .assistant-bubble{background:#f0f4ff;color:#223;padding:9px 12px;border-radius:12px 12px 12px 4px;font-size:13px;line-height:1.5;max-width:85%;}
.assistant-msg.assistant-user{justify-content:flex-end;}
.assistant-user .assistant-bubble{background:#111;color:#fff;padding:9px 12px;border-radius:12px 12px 4px 12px;font-size:13px;line-height:1.5;max-width:85%;}
.assistant-suggests{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px;}
.assistant-suggest{height:30px;padding:0 12px;border:1px solid #e6e6e6;border-radius:999px;background:#fff;font-size:12px;color:#333;}
.assistant-suggest:hover{background:#f7f7f7;}
.assistant-foot{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;border-top:1px solid #f0f0f0;background:#fff;}
.assistant-input{flex:1;border:1px solid #e6e6e6;border-radius:12px;padding:9px 12px;font-size:13px;line-height:1.4;resize:none;max-height:96px;color:#111;font-family:inherit;}
.assistant-input:focus{outline:none;border-color:#111;}
.assistant-send{width:38px;height:38px;flex:0 0 auto;border:0;border-radius:12px;background:#111;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;}
.assistant-send:hover{background:#000;}
.assistant-send svg{width:16px;height:16px;}
@media (max-width:640px){
  .assistant-panel{width:calc(100vw - 24px);right:12px;}
}

