:root {
  --purple: #6C4DF8;
  --purple-l: #8E7BFF;
  --bg: #f7f7fb;
  --card: #fff;
  --text: #26232e;
  --muted: #9b96a8;
  --line: #ecebf2;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  font-size: 15px; line-height: 1.6;
}
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 24px; }

/* 通用 */
.nav { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--bg); }
.nav-back { font-size: 20px; width: 32px; }
.nav-title { font-size: 17px; font-weight: 700; }
.card { background: var(--card); border-radius: 16px; padding: 16px; margin: 0 14px 14px; }
.sec-label { font-size: 15px; font-weight: 700; margin: 20px 14px 10px; }
.sec-val { color: var(--purple); }
.chip { display: inline-block; font-size: 13px; background: #f3f1f9; color: #4a4653;
  border-radius: 999px; padding: 6px 16px; cursor: pointer; user-select: none; }
.chip.active { background: var(--purple); color: #fff; font-weight: 700; }
.chip-mini { display: inline-block; font-size: 12px; color: var(--purple); background: #f1edff;
  border-radius: 999px; padding: 5px 12px; cursor: pointer; }

/* 首页 header */
.header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.logo { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg,var(--purple-l),var(--purple));
  display: flex; align-items: center; justify-content: center; font-size: 24px; }
.title-box { flex: 1; }
.title { font-size: 19px; font-weight: 700; }
.slogan { font-size: 12px; color: var(--muted); }
.credit { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 14px; color: var(--purple); cursor: pointer; }
.credit-unit { font-size: 11px; color: var(--muted); font-weight: 400; }

/* banner */
.banner { margin: 0 14px; height: 150px; border-radius: 16px; padding: 22px;
  background: linear-gradient(120deg,#4f8cff,#6C4DF8 60%,#9a55ff); color: #fff; position: relative; overflow: hidden; }
.banner::before { content: ''; position: absolute; right: -30px; top: -20px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255,255,255,.12); filter: blur(22px); }
.banner::after { content: ''; position: absolute; left: -20px; bottom: -30px; width: 110px; height: 110px;
  border-radius: 50%; background: rgba(255,255,255,.08); filter: blur(18px); }
.banner-tag { font-size: 11px; letter-spacing: 2px; opacity: .85; font-weight: 600; position: relative; z-index: 1; }
.banner-title { font-size: 22px; font-weight: 700; margin-top: 8px; position: relative; z-index: 1; }
.banner-sub { font-size: 12px; opacity: .85; margin-top: 6px; position: relative; z-index: 1; }
/* 模型标签：右上角横向胶囊，清晰可读 */
.banner-models { position: absolute; right: 20px; top: 18px; display: flex; gap: 8px; z-index: 1; }
.banner-model { background: rgba(255,255,255,.18); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); white-space: nowrap; }
.banner-btn { position: absolute; right: 20px; bottom: 22px; background: rgba(255,255,255,.95);
  color: #5b3df5; font-size: 14px; font-weight: 700; padding: 8px 20px; border-radius: 999px; cursor: pointer; z-index: 1; }

.notice { display: flex; align-items: center; gap: 8px; background: #fff8e6; border-radius: 12px;
  padding: 10px 14px; margin: 14px; }
.notice-tag { color: #b7791f; font-weight: 700; font-size: 12px; }
.notice-text { font-size: 12px; color: #9a8352; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 14px; }
.entry { border-radius: 16px; padding: 16px; position: relative; overflow: hidden; cursor: pointer; }
.entry-title { font-size: 18px; font-weight: 700; }
.entry-sub { font-size: 11px; opacity: .7; margin-top: 4px; }
.entry-icon { position: absolute; right: 10px; bottom: 6px; font-size: 36px; }
.entry-text2img { background: linear-gradient(135deg,#efe9ff,#dcd2ff); }
.entry-img2img { background: linear-gradient(135deg,#e0f7ec,#c2ecd9); }
.entry-t2v { background: linear-gradient(135deg,#e9ecff,#d5dcff); }
.entry-i2v { background: linear-gradient(135deg,#fff2e4,#ffe1c2); }

.assistant { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px;
  padding: 14px; margin: 14px; }
.assistant-avatar { width: 40px; height: 40px; border-radius: 12px; background: #efe9ff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; }
.assistant-body { flex: 1; min-width: 0; }
.assistant-title { font-size: 14px; font-weight: 700; }
.assistant-tag { font-size: 10px; color: var(--purple); background: #efe9ff; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.assistant-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-btn { background: linear-gradient(135deg,var(--purple-l),var(--purple)); color: #fff; font-size: 12px;
  font-weight: 700; padding: 6px 16px; border-radius: 999px; }

.vip { display: flex; align-items: center; background: linear-gradient(135deg,#2b2350,#4a3a8a);
  border-radius: 16px; padding: 16px; margin: 14px; color: #fff; }
.vip-left { flex: 1; }
.vip-title { font-size: 16px; font-weight: 700; }
.vip-sub { font-size: 11px; opacity: .75; }
.vip-tags { display: flex; gap: 6px; margin-top: 8px; }
.vip-tags span { font-size: 10px; background: rgba(255,255,255,.14); border-radius: 6px; padding: 2px 8px; }
.vip-btn { background: linear-gradient(135deg,#ffd76e,#ffb84d); color: #5a3d00; font-size: 13px;
  font-weight: 700; padding: 9px 18px; border-radius: 999px; cursor: pointer; }

.func-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 14px; }
.func-item { background: #fff; border-radius: 14px; padding: 12px 0 10px; text-align: center; cursor: pointer; }
.func-icon { width: 40px; height: 40px; border-radius: 12px; margin: 0 auto; display: flex;
  align-items: center; justify-content: center; font-size: 21px; }
.func-name { font-size: 11px; margin-top: 6px; color: #4a4653; }

/* 创作页 */
.counter { font-size: 12px; color: #b6b2c0; }
.quick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.prompt-input { width: 100%; min-height: 110px; border: none; outline: none; resize: none;
  font-size: 15px; line-height: 1.6; font-family: inherit; color: var(--text); background: transparent; }
.prompt-input::placeholder { color: #b6b2c0; }
.clear-btn { font-size: 12px; color: #b6b2c0; cursor: pointer; text-align: right; }

.ref-list { display: flex; flex-wrap: wrap; gap: 10px; }
.ref-item { width: 76px; height: 76px; border-radius: 10px; position: relative; overflow: hidden; }
.ref-item img { width: 100%; height: 100%; object-fit: cover; }
.ref-del { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%;
  background: #26232e; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; }
.ref-add { width: 76px; height: 76px; border: 1px dashed #cfcbe0; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.ref-plus { font-size: 28px; color: var(--purple); line-height: 1; }
.ref-add-text { font-size: 10px; color: var(--purple); }
.ref-add-sub { font-size: 9px; color: #b6b2c0; }

.style-scroll { overflow-x: auto; display: flex; gap: 10px; padding: 4px 14px; -webkit-overflow-scrolling: touch; }
.style-scroll::-webkit-scrollbar { display: none; }
.style-item { flex: 0 0 auto; width: 88px; text-align: center; border: 2px solid transparent;
  border-radius: 12px; padding: 6px; cursor: pointer; }
.style-item.active { border-color: var(--purple); background: #f6f3ff; }
.style-cover { width: 76px; height: 56px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 26px; }
.style-name { font-size: 11px; margin-top: 6px; color: #4a4653; }

.select-bar { background: #fff; border-radius: 12px; padding: 13px 16px; margin: 0 14px;
  display: flex; justify-content: space-between; align-items: center; font-size: 15px; cursor: pointer; }
.arrow { color: #b6b2c0; }

.size-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin: 0 14px; }
.size-item { background: #fff; border-radius: 10px; padding: 10px 0 8px; text-align: center;
  border: 2px solid transparent; cursor: pointer; }
.size-item.active { border-color: var(--purple); background: #f6f3ff; }
.size-shape { border: 2px solid var(--purple); border-radius: 4px; margin: 0 auto; }
.size-name { font-size: 10px; margin-top: 6px; color: #4a4653; }
.size-ratio { font-size: 9px; color: #b6b2c0; }

input[type=range] { width: 100%; accent-color: var(--purple); }
.count-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 14px; }
.opt-row { display: flex; gap: 8px; flex-wrap: wrap; }

.footer { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  background: #fff; border-radius: 20px 20px 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; box-shadow: 0 -6px 24px rgba(0,0,0,.06); z-index: 20; }
.footer-pad { height: 100px; }
.cost { flex: 1; min-width: 0; }
.cost-main { font-size: 14px; }
.cost-num { color: #ff6b35; font-weight: 700; font-size: 18px; }
.cost-sub { font-size: 11px; color: #b6b2c0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go-btn { background: linear-gradient(135deg,var(--purple-l),var(--purple)); color: #fff; font-size: 15px;
  font-weight: 700; padding: 12px 30px; border-radius: 999px; cursor: pointer; border: none; }
.go-btn:disabled { opacity: .5; }

/* 结果页 */
.img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 14px; }
.img-item { border-radius: 14px; overflow: hidden; background: #fff; }
.img-item img { width: 100%; height: 170px; object-fit: cover; display: block; background: #f7f6fb; }
.btn-row { display: flex; gap: 12px; margin: 20px 14px; }
.btn { flex: 1; text-align: center; padding: 12px 0; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn.ghost { background: #f1edff; color: var(--purple); }
.btn.solid { background: linear-gradient(135deg,var(--purple-l),var(--purple)); color: #fff; }

.empty { text-align: center; padding-top: 120px; color: var(--muted); }
.empty-icon { font-size: 48px; }
.empty-title { font-size: 17px; font-weight: 700; color: var(--text); margin-top: 12px; }

/* 弹层 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center;
  justify-content: center; z-index: 99; }
.mask.show { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 22px; width: 300px; max-width: 80%; text-align: center; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-text { font-size: 13px; color: var(--muted); margin-top: 8px; }
.modal-btn { margin-top: 18px; background: var(--purple); color: #fff; border: none; border-radius: 999px;
  padding: 10px 30px; font-size: 14px; font-weight: 700; cursor: pointer; }

/* ===== 套餐介绍（积分兑换弹窗 / 套餐页共用）=====
   设计要点：
   - 单价「每千积分 ¥x.x」显式算出来放在主价格下方，用户最容易比较的就是这个
   - 最低单价的那档自动标「最划算」，不写死在配置里，管理员改价后仍然正确
   - 卡片不写死列数，用 repeat(auto-fit, minmax(min(100%,132px),1fr))，320px 窄屏自动单列 */
.pf-plan-note { font-size: 12px; color: var(--muted); line-height: 1.65; text-align: left; }
/* padding-top 给悬出的角标留位，否则第一行角标会被裁 */
.pf-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr)); gap: 8px; padding-top: 7px; }
.pf-plan { position: relative; background: #f8f7fc; border: 1.5px solid transparent; border-radius: 12px;
  padding: 12px 6px 11px; text-align: center; display: flex; flex-direction: column; justify-content: center;
  transition: .15s; }
.pf-plan.best { border-color: #ff6b35; background: #fff8f4; }
.pf-plan-tag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  background: var(--purple); color: #fff; font-size: 9px; font-weight: 700; border-radius: 999px;
  padding: 2px 7px; white-space: nowrap; }
.pf-plan.best .pf-plan-tag { background: #ff6b35; }
.pf-plan-name { font-size: 12px; font-weight: 700; color: var(--text); }
.pf-plan-credits { font-size: 10px; color: var(--muted); margin-top: 2px; }
.pf-plan-credits b { color: var(--purple); font-size: 13px; }
.pf-plan.best .pf-plan-credits b { color: #ff6b35; }
.pf-plan-price { font-size: 18px; font-weight: 800; color: #ff6b35; margin: 4px 0 1px; line-height: 1.1; }
.pf-plan-price small { font-size: 11px; font-weight: 700; }
.pf-plan-unit { font-size: 9px; color: #b6b2c0; }
.pf-plan-btn { margin: 9px 0 0; padding: 6px 0; width: 100%; border: none; border-radius: 999px;
  background: var(--purple); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; transition: .12s; }
.pf-plan-btn:active { opacity: .8; }
.pf-plan.best .pf-plan-btn { background: #ff6b35; }
/* 卡密兑换区：与上方套餐用分隔线区隔，视觉上明确是「另一件事」 */
.pf-divider { display: flex; align-items: center; gap: 10px; margin: 15px 0 11px;
  font-size: 11px; color: #b6b2c0; }
.pf-divider::before, .pf-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
/* 窄屏：下限压到 96px，保证 320px 下仍是 2 列（单列会拉成扁长条） */
@media (max-width: 380px) {
  .pf-plans { grid-template-columns: repeat(auto-fit, minmax(min(100%, 96px), 1fr)); gap: 7px; }
  .pf-plan { padding: 11px 4px 10px; }
  .pf-plan-price { font-size: 16px; }
}

/* 底部 tab */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 20; }
.tabbar-item { flex: 1; text-align: center; padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  font-size: 11px; color: var(--muted); }
.tabbar-item.active { color: var(--purple); font-weight: 700; }
.tabbar-icon { font-size: 20px; display: block; margin-bottom: 2px; }
.has-tabbar { padding-bottom: 70px; }

/* ===== 表单 ===== */
.ipt { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
  font-size: 14px; margin: 6px 0; outline: none; background: #fafafc; }
.ipt:focus { border-color: var(--purple); background: #fff; }

/* ===== 首页扩展 ===== */
.sec-more { font-size: 12px; color: var(--muted); cursor: pointer; }
.hot-prompts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 14px; }
.hot-card { background: #fff; border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.hot-title { font-size: 14px; font-weight: 700; }
.hot-text { font-size: 11px; color: var(--muted); margin-top: 4px; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hot-use { font-size: 11px; color: var(--purple); margin-top: 6px; font-weight: 600; }

/* ===== 瀑布流 ===== */
/* 双列瀑布流：由 JS 按图片真实高度分配到较矮的一列（两列底部更平齐） */
.masonry { display: flex; gap: 10px; padding: 0 14px; align-items: flex-start; }
.masonry-col { flex: 1; min-width: 0; }
.masonry-col > .masonry-item:last-child { margin-bottom: 0; }   /* 去掉列尾空隙，两列底部对齐 */
.masonry .empty { flex: 1 1 100%; }   /* 空状态占满整行，图标/文字真正居中 */
.masonry-item { break-inside: avoid; background: #fff; border-radius: 12px; overflow: hidden;
  margin-bottom: 10px; position: relative; cursor: pointer; }
.masonry-item img { width: 100%; display: block; min-height: 100px; background: #f1eff7; }
.masonry-cover { position: absolute; inset: 0; }
.masonry-info { font-size: 11px; padding: 6px 8px 8px; color: #4a4653; }
.masonry-badge { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 10px; border-radius: 999px; padding: 2px 8px; }

/* ===== 提示词卡片 ===== */
.prompt-list { padding: 0 14px; }
.prompt-card-title { font-size: 15px; font-weight: 700; }
.prompt-card-text { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.tag-fire { font-size: 11px; color: #ff6b35; background: #fff2e8; border-radius: 999px; padding: 2px 10px; }

/* ===== 套餐 / 订单 ===== */
.plan-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin: 0 14px; }
.plan-card { background: #fff; border-radius: 14px; padding: 16px 14px; text-align: center; position: relative; }
.plan-tag { position: absolute; top: -8px; right: 10px; background: #ff6b35; color: #fff; font-size: 10px;
  border-radius: 999px; padding: 2px 10px; }
.plan-name { font-size: 14px; font-weight: 700; }
.plan-credits { font-size: 12px; color: var(--muted); margin-top: 4px; }
.plan-price { font-size: 20px; font-weight: 700; color: #ff6b35; margin-top: 6px; }
.order-item { display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; border-bottom: 1px solid #f3f1f9; font-size: 14px; }
.order-item:last-child { border-bottom: none; }

/* ===== 作品详情 ===== */
.detail-panel { background: #fff; border-radius: 18px; width: 92%; max-width: 440px;
  max-height: 84vh; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.detail-close { position: absolute; right: 12px; top: 8px; font-size: 26px; color: #fff; z-index: 5;
  text-shadow: 0 1px 4px rgba(0,0,0,.5); cursor: pointer; }
.detail-imgs { background: #1a1822; flex: 1 1 auto; min-height: 120px;
  position: relative; overflow: hidden; }
.di-wrap { position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px; overflow-x: auto; }
.di-wrap img { flex: 0 0 auto; width: 100%; height: 100%;
  object-fit: contain; display: block; }
.di-wrap .wk-ph { flex: 0 0 auto; }
.detail-body { padding: 14px 16px 18px; flex: 0 0 auto; }
.detail-meta { font-size: 12px; color: var(--muted); }
.detail-prompt { font-size: 13px; margin-top: 8px; line-height: 1.7; background: #f7f6fb;
  border-radius: 10px; padding: 10px 12px; max-height: 96px; overflow-y: auto; }

/* ===== AI Agent 面板 ===== */
.agent-panel { background: #fff; border-radius: 18px; width: 92%; max-width: 440px; height: 70vh;
  display: flex; flex-direction: column; overflow: hidden; }
.agent-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
  font-weight: 700; border-bottom: 1px solid var(--line); }
.agent-close { font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; }
.agent-msgs { flex: 1; overflow-y: auto; padding: 14px; background: #f7f7fb; }
.agent-msg { max-width: 82%; font-size: 13px; line-height: 1.6; padding: 9px 12px; border-radius: 12px;
  margin-bottom: 8px; white-space: pre-wrap; word-break: break-word; }
.agent-msg.bot { background: #fff; border: 1px solid var(--line); }
.agent-msg.me { background: var(--purple); color: #fff; margin-left: auto; }
.agent-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.agent-input-row input { flex: 1; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; font-size: 14px; outline: none; }
.agent-input-row button { background: var(--purple); color: #fff; border: none; border-radius: 999px;
  padding: 0 20px; font-size: 14px; font-weight: 700; cursor: pointer; }

/* ===== tab 创作按钮（居中大按钮） ===== */
.tab-cta { position: relative; }
.tab-cta-btn { width: 44px; height: 44px; border-radius: 50%; margin: -18px auto 0;
  background: linear-gradient(135deg,var(--purple-l),var(--purple)); color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(108,77,248,.4); font-weight: 700; }
.tab-cta { color: var(--purple); font-weight: 700; }

/* ===== 个人中心（参考新版 UI） ===== */
.pf-page { background: #f2f0f9; }
.pf-top {
  background: linear-gradient(180deg,#e9e2ff 0%,#f2eefc 55%,#f2f0f9 100%);
  padding: 18px 14px 16px;
}
.pf-user { display: flex; align-items: center; gap: 12px; padding: 4px 4px 0; }
.pf-avatar { width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(108,77,248,.18); display: flex; align-items: center; justify-content: center;
  font-size: 28px; cursor: pointer; flex: 0 0 auto; }
.pf-user-info { flex: 1; min-width: 0; }
.pf-user-name { font-size: 17px; font-weight: 700; }
.pf-user-sub { font-size: 12px; color: #8d88a0; margin-top: 2px; }
.pf-balance { display: inline-block; font-size: 12px; color: #6C4DF8; background: rgba(255,255,255,.85);
  border-radius: 999px; padding: 3px 12px; margin-top: 6px; }
.pf-balance b { font-size: 13px; }
/* 签到按钮：跟在「积分 N」胶囊后面同一行，与它视觉成对 */
.pf-signbtn { display: inline-block; margin-top: 6px; margin-left: 6px; font-size: 12px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #ff8a4c, #ff6b35); border: none;
  border-radius: 999px; padding: 4px 14px; cursor: pointer; transition: .12s;
  box-shadow: 0 2px 8px rgba(255,107,53,.28); }
.pf-signbtn b { font-size: 12px; }
.pf-signbtn:active { transform: scale(.96); opacity: .9; }
/* 已签到：灰掉且不可点，明确告诉用户今天到此为止 */
.pf-signbtn.done { color: #8d88a0; background: rgba(255,255,255,.9); box-shadow: none;
  cursor: default; border: 1px solid #e8e4f2; padding: 3px 13px; }
/* 极窄屏：按钮换行也不撑破（用户名区允许收缩） */
@media (max-width: 340px) {
  .pf-signbtn { margin-left: 4px; padding: 4px 11px; }
}

.pf-stats { display: flex; gap: 0;
  background: #fff; border-radius: 18px; padding: 16px 4px 12px; margin-top: 14px;
  box-shadow: 0 4px 16px rgba(80,60,160,.06); }
.pf-stat { flex: 1; text-align: center; cursor: pointer; }
.pf-stat-icon { width: 42px; height: 42px; border-radius: 14px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 21px; }
.pf-stat-num { font-size: 17px; font-weight: 700; margin-top: 6px; }
.pf-stat-label { font-size: 11px; color: #8d88a0; margin-top: 1px; }

.pf-vip { display: flex; align-items: center; gap: 10px; margin-top: 12px;
  background: linear-gradient(120deg,#efe6ff,#e3d6ff 60%,#d9ccff);
  border-radius: 18px; padding: 14px 16px; cursor: pointer; }
.pf-vip-left { flex: 1; min-width: 0; }
.pf-vip-title { font-size: 15px; font-weight: 700; color: #3c2f6e; display: flex; align-items: center; }
.pf-vip-badge { font-size: 10px; font-style: italic; color: #fff; background: linear-gradient(135deg,#8a63ff,#6C4DF8);
  border-radius: 6px; padding: 1px 7px; margin-right: 6px; letter-spacing: 1px; }
.pf-vip-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pf-vip-tags span { font-size: 10px; color: #7a5cc9; background: rgba(255,255,255,.75);
  border-radius: 999px; padding: 2px 10px; }
.pf-vip-btn { background: linear-gradient(135deg,#8a63ff,#6C4DF8); color: #fff; font-size: 13px;
  font-weight: 700; padding: 9px 18px; border-radius: 999px; flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(108,77,248,.35); }

.pf-card { background: #fff; border-radius: 18px; padding: 16px; margin: 12px 14px 0;
  box-shadow: 0 4px 16px rgba(80,60,160,.05); }
.pf-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pf-card-title { font-size: 16px; font-weight: 700; }
.pf-card-more { font-size: 12px; color: #8d88a0; cursor: pointer; }

.pf-works-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; }
.pf-works-scroll::-webkit-scrollbar { display: none; }
.pf-work { flex: 0 0 auto; width: 108px; }
.pf-work img { width: 108px; height: 108px; object-fit: cover; border-radius: 12px; display: block;
  background: #f1eff7; cursor: pointer; }
.pf-work-gen { width: 108px; height: 108px; border-radius: 12px; background: #f3f1f9; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  font-size: 11px; color: #7b71c9; flex: 0 0 auto; }
.pf-work-gen.err { background: linear-gradient(135deg,#fdeaea,#f8dcdc); color: #b0453f; }
.pf-work-name { font-size: 12px; font-weight: 600; margin-top: 6px; line-height: 18px; height: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-work-tag { display: inline-block; font-size: 10px; line-height: 16px; border-radius: 5px;
  padding: 0 5px; font-weight: 400; color: #1faf6d; background: #e2f7ec; }
.pf-work-tag.pending { color: #6a5fc0; background: #ece9fb; }
.pf-work-tag.failed  { color: #c0392b; background: #fdeaea; }

.pf-cell { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-size: 15px;
  font-weight: 600; cursor: pointer; border-bottom: 1px solid #f3f1f9; }
.pf-cell:last-child { border-bottom: none; border-radius: 0 0 18px 18px; }
.pf-cell-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 17px; flex: 0 0 auto; }
.pf-cell-arrow { margin-left: auto; color: #c3bfce; font-size: 18px; font-weight: 400; }

.pf-footer { text-align: center; font-size: 11px; color: #b3aec2; padding: 22px 0 8px; }

/* ===== 作品历史页（参考新版 UI） ===== */
.wk-page { background: #f7f7fb; }
.wk-nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  position: sticky; top: 0; z-index: 20; background: rgba(247,247,251,.92);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); }
.wk-back { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: #4a4653; cursor: pointer;
  line-height: 1; padding-bottom: 2px; transition: transform .15s, box-shadow .15s; flex: 0 0 auto; }
.wk-back:active { transform: scale(.9); box-shadow: 0 0 0 6px rgba(123,113,201,.1); }
.wk-nav-title { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.wk-nav-count { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.wk-search { display: flex; gap: 8px; padding: 0 14px 10px; align-items: center; }
.wk-search .ipt { border-radius: 12px; }
.wk-search-btn { width: 42px; height: 42px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 17px; cursor: pointer; flex: 0 0 auto;
  transition: transform .15s, background .15s; }
.wk-search-btn:active { transform: scale(.94); background: #f1eff9; }

/* 顶部统计条 */
.wk-stats { display: flex; margin: 0 14px 12px; padding: 12px 4px; background: #fff;
  border-radius: 14px; box-shadow: 0 3px 10px rgba(80,60,160,.05); }
.wk-stat { flex: 1; text-align: center; position: relative; }
.wk-stat + .wk-stat::before { content: ''; position: absolute; left: 0; top: 12%; height: 76%;
  width: 1px; background: #eeecf4; }
.wk-stat-n { font-size: 17px; font-weight: 800; color: #2f2b3a; line-height: 1.2;
  font-variant-numeric: tabular-nums; }
.wk-stat-l { font-size: 11px; color: #9b96a8; margin-top: 2px; }

/* 存储保留提示条（可关闭，当天不再出现） */
.wk-keep { margin: 0 14px 12px; padding: 11px 12px 11px 13px; border-radius: 13px; display: flex;
  align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.5;
  background: linear-gradient(135deg,#fff6e8,#ffeed6); color: #8a5a12;
  border: 1px solid #f7dfb4; }
.wk-keep-ico { flex: 0 0 auto; width: 19px; height: 19px; border-radius: 50%; font-size: 11px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg,#f0a63c,#dd8520); margin-top: 1px; }
.wk-keep-txt { flex: 1; min-width: 0; }
.wk-keep-txt b { font-weight: 700; }
.wk-keep-txt .sub { display: block; font-size: 11.5px; opacity: .78; margin-top: 1px; }
.wk-keep-x { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center; color: #a97a34; cursor: pointer;
  opacity: .55; transition: opacity .15s, background .15s; }
.wk-keep-x:hover { opacity: 1; background: rgba(255,255,255,.7); }
.wk-keep[hidden] { display: none; }

/* 生成中提示条 */
.wk-tip { margin: 0 14px 12px; padding: 10px 14px; border-radius: 12px; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg,#f0ecff,#e6e0fb); color: #6a5fc0; font-size: 12.5px; font-weight: 600; }
.wk-tip .wk-spinner { border-color: rgba(106,95,192,.25); border-top-color: #6a5fc0; flex: 0 0 auto; }

.wk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 14px; }
.wk-grid .empty { grid-column: 1 / -1; }   /* 空状态横跨整行，图标/文字真正居中 */
.wk-card { background: #fff; border-radius: 14px; overflow: hidden; cursor: pointer;
  box-shadow: 0 3px 10px rgba(80,60,160,.05); transition: transform .16s, box-shadow .16s; }
.wk-card:active { transform: scale(.975); box-shadow: 0 1px 4px rgba(80,60,160,.08); }
.wk-imgbox { position: relative; background: #f1eff7; }
.wk-imgbox img { width: 100%; height: 150px; object-fit: cover; display: block; background: #f1eff7;
  transition: transform .3s ease; }
.wk-card:active .wk-imgbox img { transform: scale(1.03); }
.wk-done { position: absolute; top: 8px; right: 8px; font-size: 10px; color: #fff;
  background: linear-gradient(135deg,#3ecf8e,#1faf6d); border-radius: 999px; padding: 2px 9px;
  box-shadow: 0 2px 6px rgba(0,0,0,.14); font-weight: 600; }
/* 多图角标：一张提示词出了几张 */
.wk-nimg { position: absolute; left: 8px; bottom: 8px; font-size: 10px; color: #fff; font-weight: 600;
  background: rgba(30,26,40,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border-radius: 999px; padding: 2px 8px; }
.wk-name { font-size: 13px; font-weight: 700; padding: 8px 10px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-time { font-size: 11px; color: #9b96a8; padding: 2px 10px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wk-like { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.wk-like.has { color: #e05252; }

/* 作品状态：生成中 / 失败 */
.wk-done.pending { background: linear-gradient(135deg,#8b7cf6,#6c5ce7); }
.wk-done.failed  { background: linear-gradient(135deg,#e05252,#c0392b); }
.wk-ph { height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(135deg,#efeaff,#e2dcf7); color: #7b71c9; font-size: 12px; }
.wk-ph.err { background: linear-gradient(135deg,#fdeaea,#f8dcdc); color: #b0453f; }

/* 作品详情：生成参数标签 */
.d-params { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.d-param { font-size: 11px; line-height: 16px; color: #5b5570; background: #f3f1f9;
  border-radius: 6px; padding: 3px 8px; }
.wk-spinner { width: 26px; height: 26px; border: 3px solid rgba(123,113,201,.25); border-top-color: #7b71c9;
  border-radius: 50%; animation: wkspin .9s linear infinite; }
@keyframes wkspin { to { transform: rotate(360deg); } }
.wk-ph-bar { width: 62%; height: 4px; border-radius: 4px; background: rgba(123,113,201,.2); overflow: hidden; }
.wk-ph-bar i { display: block; width: 40%; height: 100%; border-radius: 4px; background: #7b71c9;
  animation: wkbar 1.4s ease-in-out infinite; }
@keyframes wkbar { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

.wk-end { display: flex; align-items: center; gap: 12px; color: #c3bfce; font-size: 12px;
  padding: 22px 30px 8px; }
.wk-end::before, .wk-end::after { content: ''; flex: 1; height: 1px; background: #e6e4ee; }

/* ===== AI生图 创作页（参考新版 UI） ===== */
.cr-page { background: #f2f0f9; }
.cr-card { background: #fff; border-radius: 18px; padding: 16px; margin: 12px 14px 0;
  box-shadow: 0 4px 16px rgba(80,60,160,.05); }
.cr-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cr-title { font-size: 16px; font-weight: 700; }
.cr-title-sub { font-size: 12px; color: #9b96a8; font-weight: 400; margin-left: 6px; }
.cr-head-right { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #b6b2c0;
  min-width: 0; flex-wrap: wrap; word-break: break-word; }
.cr-clear { cursor: pointer; color: #6C4DF8; font-weight: 600; }
.cr-sub { font-size: 12px; color: #9b96a8; margin-top: 2px; }

.cr-btn-row { display: flex; gap: 10px; margin-top: 12px; }
.cr-btn { flex: 1; text-align: center; padding: 11px 0; border-radius: 12px; font-size: 14px;
  font-weight: 700; cursor: pointer; user-select: none; }
.cr-btn.ghost { background: #fff; border: 1px solid #e2ddf2; color: #3c3847; }
.cr-btn.solid { background: linear-gradient(135deg,#8a63ff,#6C4DF8); color: #fff;
  box-shadow: 0 4px 12px rgba(108,77,248,.3); }
.cr-btn.inspi { display: block; margin-top: 10px; background: #efe9ff; color: #6C4DF8;
  padding: 10px 0; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; }

.cr-textarea { width: 100%; min-height: 150px; border: none; outline: none; resize: none;
  font-size: 15px; line-height: 1.7; font-family: inherit; color: var(--text);
  background: #f7f6fb; border-radius: 12px; padding: 14px; margin-top: 12px; }
.cr-textarea::placeholder { color: #b6b2c0; }

.cr-refbox { border: 1.5px dashed #d8d0f2; border-radius: 14px; padding: 14px; margin-top: 12px;
  background: #fbfaff; }
.cr-ref-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.cr-ref-list:not(:empty) + .cr-ref-add { border-top: 1px solid #f0edf9; padding-top: 12px; }
.cr-ref-add { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.cr-ref-plus { width: 40px; height: 40px; border-radius: 50%; background: #fff;
  border: 1.5px solid #d8d0f2; color: #6C4DF8; font-size: 22px; display: flex; align-items: center;
  justify-content: center; flex: 0 0 auto; }
.cr-ref-mid { flex: 1; min-width: 0; }
.cr-ref-name { font-size: 14px; font-weight: 700; }
.cr-ref-sub { font-size: 11px; color: #9b96a8; margin-top: 2px; line-height: 1.5; }
.cr-ref-choose { font-size: 13px; font-weight: 700; color: #6C4DF8; background: #efe9ff;
  border-radius: 10px; padding: 8px 16px; flex: 0 0 auto; }

.cr-style-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 12px 2px 4px;
  -webkit-overflow-scrolling: touch; }
.cr-style-scroll::-webkit-scrollbar { display: none; }
.cr-style-item { flex: 0 0 auto; text-align: center; border: 2px solid transparent; border-radius: 14px;
  padding: 5px; cursor: pointer; }
.cr-style-item.active { border-color: var(--purple); background: #f6f3ff; }
.cr-style-cover { width: 64px; height: 64px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 26px; }
.cr-style-name { font-size: 11px; margin-top: 6px; color: #4a4653; }

.cr-api-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #3c3847;
  border: 1.5px solid #6C4DF8; border-radius: 10px; padding: 9px 18px; margin-top: 12px; cursor: pointer;
  transition: .12s; }
.cr-api-chip:active { background: #f3efff; }
.cr-api-chip::first-letter { color: #6C4DF8; }
.cr-api-arrow { color: var(--purple); font-size: 12px; font-weight: 500; }

/* 生成接口：网格排列，格内圆点 + 模型名（价格见右上角与长按提示）
   自适应要求：模型名必须完整可见，不能靠省略号截断。
   做法：minmax(min(100%,X)) 防窄屏溢出；名字允许换行并按任意字符断行；格子等高由 grid 拉伸保证 */
/* padding-top 给悬出的「专属」角标留位（不预留会被上一行遮住） */
.api-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; margin-top: 12px; padding-top: 8px; }
.api-chip { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1.5px solid #eceaf4; background: #fff; border-radius: 10px; cursor: pointer; transition: .12s; }
.api-chip:active { background: #f3efff; }
.api-chip.active { border-color: #6C4DF8; background: #f6f2ff; }
.api-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: #cfc9dd; flex: none; }
.api-chip.active .api-chip-dot { background: #6C4DF8; }
/* 完整显示：允许换行 + 任意位置断行（含长英文/型号），去掉 ellipsis 与 nowrap */
.api-chip-name { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 600; color: #4a4653; line-height: 1.35;
  white-space: normal; overflow-wrap: anywhere; word-break: break-word; text-align: left; }
.api-chip-off { opacity: .55; }
/* 专属模型角标：悬出卡片右上角，避免遮挡模型名（模型名现在允许换行，横向没有富余空间了） */
.api-chip-vip { position: absolute; top: -8px; right: 6px; font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 7px;
  border-radius: 8px; color: #7b5cff; background: #f1edff; letter-spacing: .3px;
  box-shadow: 0 0 0 2px #fff; pointer-events: none; }
.api-chip.active .api-chip-vip { color: #fff; background: #6C4DF8; }

/* 窄屏：进一步压缩留白，保证长模型名仍有足够行宽 */
@media (max-width: 420px) {
  .api-chips { grid-template-columns: repeat(auto-fit, minmax(min(100%, 124px), 1fr)); gap: 10px 7px; }
  .api-chip { padding: 9px 9px; gap: 6px; }
  .api-chip-name { font-size: 12px; }
}

/* 接口选择列表 */
.api-opt { display: flex; align-items: center; gap: 10px; padding: 12px 12px; border-radius: 12px;
  border: 1.5px solid #eceaf4; margin-top: 10px; cursor: pointer; transition: .12s; }
.api-opt.active { border-color: var(--purple); background: #f6f2ff; }
.api-opt-dot { width: 8px; height: 8px; border-radius: 50%; background: #cfc9dd; flex: none; }
.api-opt.active .api-opt-dot { background: var(--purple); }
.api-opt-main { flex: 1; min-width: 0; }
.api-opt-name { font-size: 14px; font-weight: 600; color: #332f3d; }
.api-opt-sub { font-size: 11.5px; color: #9a94a8; margin-top: 3px; }
.api-opt-cost { font-size: 12px; color: var(--purple); font-weight: 700; flex: none; }
.api-opt-off { opacity: .55; }

/* 谁可以看（大块选项） */
.pub-opt { text-align: left; padding: 13px 14px; }
.pub-opt .pub-t { font-weight: 700; font-size: 14px; color: #332f3d; }
.pub-opt .pub-s { font-size: 11.5px; color: #9a94a8; margin-top: 4px; line-height: 1.5; }
.pub-opt.active .pub-t { color: var(--purple); }

/* 大块选项（生成数量/清晰度/思考程度） */
.cr-opt-grid { display: grid; gap: 10px; margin-top: 4px; }
.cr-opt { text-align: center; padding: 12px 0; border-radius: 12px; border: 1.5px solid #eceaf4;
  background: #fff; font-size: 14px; color: #4a4653; cursor: pointer; user-select: none;
  transition: .12s; }
/* 清晰度选项档位价格角标 */
.cr-opt .q-p { display: block; font-style: normal; font-size: 10.5px; color: #9b96a8;
  margin-top: 2px; line-height: 1.2; }
.cr-opt.active .q-p { color: #6C4DF8; font-weight: 600; }
/* ===== 登录弹窗（浅色紧凑版：白底 + 平台紫主色 + 金色礼包，与主页卡片一致） ===== */
.lg-mask { position: fixed; inset: 0; background: rgba(28, 20, 58, .46); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 99; padding: 14px; }
.lg-mask.show { display: flex; }
.lg-modal { position: relative; width: min(92vw, 330px); max-height: 90vh; overflow-y: auto;
  padding: 16px 16px 13px; color: var(--text); text-align: left; border-radius: 16px;
  border: 1px solid #ecebf2;
  background:
    radial-gradient(125% 58% at 50% -8%, rgba(142, 123, 255, .20), rgba(142, 123, 255, 0) 62%),
    radial-gradient(70% 30% at 92% 2%, rgba(255, 190, 92, .22), rgba(255, 190, 92, 0) 70%),
    linear-gradient(180deg, #ffffff 0%, #fbfaff 55%, #f6f3ff 100%);
  box-shadow: 0 18px 44px rgba(40, 24, 92, .22), inset 0 1px 0 rgba(255, 255, 255, .9); }
.lg-close { position: absolute; right: 11px; top: 6px; font-size: 21px; line-height: 1; z-index: 3;
  color: #b6b2c0; cursor: pointer; }
.lg-gift { text-align: center; }
.lg-gift-circle { width: 44px; height: 44px; margin: 0 auto; display: flex; align-items: center;
  justify-content: center; font-size: 21px; border-radius: 50%;
  background: linear-gradient(135deg, #ffe2a0, #ffb33f);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 7px 16px rgba(255, 172, 64, .3), inset 0 1px 0 rgba(255, 255, 255, .7); }
.lg-big-title { text-align: center; font-size: 17px; font-weight: 800; color: #26232e;
  margin-top: 8px; letter-spacing: .3px; }
.lg-gold { font-weight: 800; background: linear-gradient(135deg, #e79b1c, #f4c65c);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-chips { display: flex; justify-content: center; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.lg-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #6C4DF8;
  background: #f4f1ff; border: 1px solid #e6e0ff; padding: 4px 10px; border-radius: 999px;
  user-select: none; }
.lg-chip i { font-style: normal; font-size: 12px; }
.lg-chips-sub { text-align: center; font-size: 11px; color: #9b96a8; margin-top: 6px; }
.lg-tabs { display: flex; margin-top: 13px; border-bottom: 1px solid #ecebf2; }
.lg-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 9px 0 7px; font-size: 13px; color: #9b96a8; cursor: pointer; position: relative;
  white-space: nowrap; }
.lg-tab.on { color: #6C4DF8; font-weight: 700; }
.lg-tab.on::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -1px; width: 22px; height: 2.5px; border-radius: 2px;
  background: linear-gradient(90deg, #9d84ff, #6C4DF8); }
.lg-panel { padding-top: 2px; }
.lg-fld { margin-top: 10px; }
.lg-fld:first-child { margin-top: 9px; }
.lg-label { display: block; font-size: 12px; color: #6b6678; margin-bottom: 6px; }
.lg-row { display: flex; gap: 8px; align-items: center; }
.lg-ipt { width: 100%; height: 40px; background: #fff; border: 1px solid #e6e2f2;
  border-radius: 10px; padding: 0 12px; color: var(--text); font-size: 13.5px; outline: none;
  font-family: inherit; min-width: 0; transition: .15s; }
.lg-ipt:focus { border-color: #8E7BFF; box-shadow: 0 0 0 3px rgba(108, 77, 248, .14); }
.lg-ipt::placeholder { color: #b6b2c0; }
.lg-ipt:read-only { background: #f7f6fb; }
.lg-btn-code { height: 40px; padding: 0 11px; flex: 0 0 auto; white-space: nowrap; cursor: pointer;
  background: #f1edff; border: 1px solid #ded6ff; color: #6C4DF8; border-radius: 10px;
  font-size: 12.5px; font-family: inherit; }
.lg-btn-code:disabled { opacity: .5; cursor: default; }
.lg-cap-img { height: 40px; width: 127px; border-radius: 10px; cursor: pointer; flex: 0 0 auto;
  background: #f5f3fb; border: 1px solid #e6e2f2; object-fit: cover; }
.lg-tip-line { font-size: 11.5px; color: #9b96a8; margin-top: 8px; }
.lg-btn-main { width: 100%; margin-top: 13px; padding: 11px 0; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #8E7BFF, #6C4DF8); color: #fff; font-size: 15px; font-weight: 700;
  letter-spacing: 1.5px; cursor: pointer; font-family: inherit;
  box-shadow: 0 8px 18px rgba(108, 77, 248, .26); }
.lg-btn-main:active { opacity: .92; }
.lg-sub-btn { text-align: center; margin-top: 9px; font-size: 12.5px; color: #9b96a8; }
.lg-sub-btn b { color: #6C4DF8; font-weight: 600; cursor: pointer; }
.lg-agree { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 11px;
  font-size: 11.5px; color: #9b96a8; cursor: pointer; user-select: none; }
.lg-agree a { color: #6C4DF8; text-decoration: none; }
.lg-cb { width: 14px; height: 14px; border: 1px solid #cfcbe0; border-radius: 4px;
  flex: 0 0 auto; position: relative; background: #fff; }
.lg-cb.on { background: linear-gradient(135deg, #8E7BFF, #6C4DF8); border-color: transparent; }
.lg-cb.on::after { content: ''; position: absolute; left: 4px; top: 1px; width: 3px; height: 7px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lg-doc { width: min(92vw, 320px); }
.lg-doc-body { font-size: 12.5px; color: #6b6678; line-height: 1.85; margin-top: 11px;
  max-height: 52vh; overflow-y: auto; }

/* ---------- 登录弹窗：移动端自适应 ---------- */
.lg-mask {
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
  align-items: center;
}
.lg-modal {
  width: 100%;
  max-width: 400px;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 16px 16px;
  border-radius: 18px;
}
@supports not (height: 100dvh) {
  .lg-modal { max-height: calc(100vh - 24px); }
}
.lg-close {
  top: 10px; right: 10px; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .72); font-size: 18px;
}
.lg-ipt { height: 44px; font-size: 16px; }
.lg-btn-code { height: 44px; }
.lg-cap-img { width: 104px; height: 44px; }
.lg-row { gap: 8px; }
.lg-row .lg-ipt { flex: 1 1 auto; width: auto; }
@media (max-width: 360px) {
  .lg-modal { padding: 16px 12px 14px; }
  .lg-chips { gap: 5px; }
  .lg-chip { font-size: 11px; padding: 4px 8px; }
  .lg-cap-img { width: 92px; }
}
@media (max-height: 640px) {
  .lg-gift-circle { width: 36px; height: 36px; font-size: 18px; }
  .lg-big-title { margin-top: 6px; font-size: 16px; }
  .lg-chips { margin-top: 6px; }
  .lg-fld { margin-top: 8px; }
}.lg-ipt::placeholder { font-size: 13.5px; letter-spacing: .2px; }
/* ---------- 首页公告条：文字不挤、完整可读 ---------- */
.notice { align-items: flex-start; gap: 8px; padding: 9px 12px; }
.notice-tag { flex: 0 0 auto; white-space: nowrap; line-height: 1.7; font-size: 12px; }
.notice-text {
  flex: 1 1 auto; min-width: 0; white-space: normal; word-break: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; font-size: 12px; line-height: 1.7;
}
/* 公告条：固定单行，不换行 */
.notice { align-items: center; }
.notice-text {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-line-clamp: unset; word-break: normal;
}
/* 公告条：跑马灯（文字自左向右循环滚动） */
.notice { overflow: hidden; align-items: center; }
.notice-track { flex: 0 0 auto; display: flex; width: max-content; will-change: transform; }
.notice-track .notice-text {
  flex: 0 0 auto; white-space: nowrap; overflow: visible; text-overflow: clip;
  padding-right: 56px; display: block; -webkit-line-clamp: unset;
}
.notice-track.is-scroll { animation: notice-marquee var(--dur, 20s) linear infinite; }
@keyframes notice-marquee {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .notice-track.is-scroll { animation: none; }
}.notice-track:not(.is-scroll) .notice-text[aria-hidden="true"] { display: none; }
/* 公告条：静止单行（取消滚动） */
.notice .notice-text { flex: 1 1 auto; min-width: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-track { animation: none !important; }
/* 公告条：文案水平居中 */
.notice .notice-text { text-align: center; }
/* 首页 · 模型广场（2×2 卡片，含品牌 Logo 与小字介绍） */
.mg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mg-card {
  display: block; padding: 12px 12px 11px; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 2px 10px rgba(31, 29, 43, .04);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.mg-card:active { transform: scale(.985); }
@media (hover: hover) {
  .mg-card:hover { border-color: #DDD6FF; transform: translateY(-1px); box-shadow: 0 8px 20px -12px rgba(108, 77, 248, .35); }
}
.mg-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mg-ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; }
.mg-ico svg { width: 20px; height: 20px; display: block; }
.mg-ico.ic-openai { background: #fff; border: 1px solid var(--line); color: #0D0D0D; }
.mg-ico.ic-banana { background: #FFF8E3; border: 1px solid #F3E4BE; color: #E0A008; }
.mg-ico.ic-jimeng { background: #EEF3FF; border: 1px solid #DCE6FF; color: #2F62FF; }
.mg-tag { font-size: 10px; line-height: 1; color: #8A8598; background: #F5F4FA; border-radius: 999px; padding: 4px 7px; white-space: nowrap; }
.mg-name { margin-top: 9px; font-size: 13.5px; font-weight: 800; letter-spacing: -.2px; color: #1F1D2B; }
.mg-desc { margin-top: 4px; font-size: 11.5px; line-height: 1.5; color: #8A8598; min-height: 35px; }
.mg-go { margin-top: 7px; font-size: 11.5px; font-weight: 700; color: var(--purple); }