/* ===== AI 绘画工坊 · 玻璃悬浮主题（精修版） =====
   浅色极光底 · 磨砂玻璃 · 柔和悬浮 · 青绿主色
*/
:root{
  --ink:#101a2b;--text:#17202e;--muted:#68758a;--muted-2:#93a0b4;
  --teal:#b34a63;--teal-2:#e58aa0;--sky:#4f8dff;--violet:#7c6cf0;--coral:#ff8a68;
  --red:#e5484d;--green:#0f9d6f;
  --accent:var(--teal);--accent-2:var(--teal-2);--accent-soft:rgba(179,74,99,.10);
  --gold:var(--teal);
  --glass:rgba(255,255,255,.66);--glass-strong:rgba(255,255,255,.84);--glass-soft:rgba(255,255,255,.42);
  --stroke:rgba(255,255,255,.88);--line:rgba(16,26,43,.08);--line-strong:rgba(16,26,43,.14);
  --radius:24px;--radius-sm:14px;
  --shadow:0 30px 70px -24px rgba(22,41,71,.34),0 2px 10px rgba(22,41,71,.05);
  --shadow-soft:0 16px 36px -18px rgba(22,41,71,.26);
  --shadow-hover:0 40px 80px -24px rgba(22,41,71,.4);
  --ring:0 0 0 4px rgba(179,74,99,.12);
  --font:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
*{box-sizing:border-box;margin:0;padding:0}
[hidden]{display:none !important}
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--font);color:var(--text);line-height:1.65;
  background:#faf5f3;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
body::before{
  content:'';position:fixed;inset:0;z-index:-2;pointer-events:none;
  background:
    radial-gradient(46% 40% at 6% 0%,rgba(255,208,218,.85),transparent 72%),
    radial-gradient(42% 38% at 96% 4%,rgba(255,229,205,.92),transparent 74%),
    radial-gradient(50% 42% at 90% 96%,rgba(255,216,201,.8),transparent 76%),
    radial-gradient(40% 38% at 4% 92%,rgba(255,204,218,.62),transparent 76%),
    radial-gradient(30% 30% at 55% 55%,rgba(244,222,226,.5),transparent 80%),
    linear-gradient(165deg,#fdf8f7 0%,#faf1f1 45%,#fbf3ec 100%);
}
body::after{
  content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.5;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='n' opacity='.16'/></svg>");
  mix-blend-mode:soft-light;
}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
button{font-family:inherit;color:inherit;cursor:pointer;background:none;border:0}
input,textarea,select{font-family:inherit}
::selection{background:rgba(179,74,99,.16);color:#5a1f30}
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:rgba(16,26,43,.14);border-radius:99px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:rgba(179,74,99,.35);background-clip:padding-box}

/* ---------- 通用组件 ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  padding:10px 18px;border-radius:999px;border:1px solid var(--stroke);
  background:linear-gradient(180deg,rgba(255,255,255,.85),rgba(255,255,255,.55));
  color:var(--text);font-size:14px;font-weight:500;white-space:nowrap;
  box-shadow:0 2px 8px rgba(22,41,71,.06),inset 0 1px 0 #fff;
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  transition:transform .22s cubic-bezier(.2,.8,.2,1),box-shadow .22s,border-color .22s,background .22s;
}
.btn:hover{transform:translateY(-2px);border-color:rgba(179,74,99,.3);box-shadow:0 10px 24px -8px rgba(22,41,71,.28),inset 0 1px 0 #fff}
.btn:active{transform:translateY(0);box-shadow:0 3px 10px rgba(22,41,71,.12)}
.btn.primary{
  background:linear-gradient(135deg,#e79aae 0%,#b34a63 48%,#8e3550 100%);
  border-color:rgba(255,255,255,.34);color:#fff;font-weight:600;letter-spacing:.02em;
  box-shadow:0 12px 26px -8px rgba(179,74,99,.6),inset 0 1px 0 rgba(255,255,255,.45);
}
.btn.primary:hover{box-shadow:0 18px 34px -8px rgba(179,74,99,.66),inset 0 1px 0 rgba(255,255,255,.5)}
.btn.ghost{background:rgba(255,255,255,.5)}
.btn.sm{padding:7px 14px;font-size:13px}
.btn.block{width:100%}
.btn[disabled]{opacity:.55;pointer-events:none;box-shadow:none}

.mini-link{color:var(--teal);font-size:12.5px;font-weight:500;transition:.18s}
.mini-link:hover{color:#7d2d45;text-decoration:underline;text-underline-offset:2px}
.mini-link.danger{color:var(--red)}
.mini-btn{
  padding:5px 11px;font-size:11.5px;border-radius:999px;border:1px solid var(--line-strong);
  background:rgba(255,255,255,.65);color:var(--text);white-space:nowrap;transition:.18s
}
.mini-btn:hover{border-color:rgba(179,74,99,.4);color:var(--teal);background:#fff}
.mini-btn.danger{color:var(--red);border-color:rgba(229,72,77,.24)}
.mini-btn.danger:hover{background:rgba(229,72,77,.07);color:#b52b30}

.field{display:block;position:relative}
.field-label{display:flex;align-items:baseline;gap:8px;font-size:12px;font-weight:600;
  letter-spacing:.04em;color:#41506a;margin-bottom:8px}
.field-label i{font-style:normal;font-size:10.5px;font-weight:400;letter-spacing:.02em;color:var(--muted-2)}
.field input,.field textarea,.field select{
  width:100%;padding:12px 15px;border-radius:15px;
  background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,255,255,.62));
  border:1px solid rgba(16,26,43,.1);color:var(--text);font-size:14px;outline:none;
  box-shadow:inset 0 1px 2px rgba(22,41,71,.04),0 1px 0 #fff;
  transition:border-color .2s,box-shadow .2s,background .2s;
}
.field textarea{resize:vertical;min-height:46px;line-height:1.72}
.field input:hover,.field textarea:hover{border-color:rgba(179,74,99,.24)}
.field input:focus,.field textarea:focus,.field select:focus{
  border-color:rgba(179,74,99,.5);background:#fff;box-shadow:var(--ring),inset 0 1px 2px rgba(22,41,71,.03)
}
.field input::placeholder,.field textarea::placeholder{color:#a2adc0}

.alert{padding:12px 16px;border-radius:14px;font-size:13.5px;margin-bottom:16px;border:1px solid;backdrop-filter:blur(10px)}
.alert.ok{background:rgba(15,157,111,.08);border-color:rgba(15,157,111,.24);color:#5a1f30}
.alert.err{background:rgba(229,72,77,.08);border-color:rgba(229,72,77,.26);color:#a32a2e}
.muted{color:var(--muted)}.sm{font-size:12.5px}.center{text-align:center}.right{text-align:right}.gold{color:var(--teal)}
.tag{display:inline-block;padding:2px 9px;border-radius:999px;font-size:11.5px;background:rgba(16,26,43,.05);
  border:1px solid var(--line);color:var(--muted)}
.tag.gold-t{color:var(--teal);border-color:rgba(179,74,99,.24);background:var(--accent-soft)}
.tag.green{color:var(--green);border-color:rgba(15,157,111,.24);background:rgba(15,157,111,.08)}
.tag.red{color:var(--red);border-color:rgba(229,72,77,.2);background:rgba(229,72,77,.07)}
.badge{font-size:11px;padding:2px 9px;border-radius:999px;background:var(--accent-soft);color:var(--teal)}

/* ---------- 背景光斑（前台） ---------- */
.app-body{position:relative;min-height:100vh;overflow-x:hidden}
.app-bg{position:fixed;inset:0;z-index:-3;overflow:hidden;pointer-events:none}
.app-bg .glow{position:absolute;border-radius:50%;filter:blur(78px);opacity:.72}
.app-bg .g1{width:480px;height:480px;left:-120px;top:-60px;background:rgba(255,196,210,.75);animation:drift 22s ease-in-out infinite}
.app-bg .g2{width:620px;height:620px;right:-200px;top:180px;background:rgba(255,220,190,.6);animation:drift 28s ease-in-out infinite reverse}
.app-bg .g3{width:420px;height:420px;left:32%;bottom:-180px;background:rgba(255,196,168,.52);animation:drift 26s ease-in-out infinite}
.app-bg .grid-mask{display:none}
@keyframes drift{50%{transform:translate(40px,-32px) scale(1.08)}}

/* ---------- 顶栏 ---------- */
.topbar{
  position:sticky;top:0;z-index:40;display:flex;align-items:center;justify-content:space-between;
  gap:14px;padding:14px 30px;background:rgba(255,255,255,.62);
  backdrop-filter:blur(26px) saturate(170%);-webkit-backdrop-filter:blur(26px) saturate(170%);
  border-bottom:1px solid rgba(255,255,255,.7);
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 12px 32px -20px rgba(22,41,71,.4);
}
.brand{position:relative;display:flex;align-items:center;gap:12px;min-width:0}
.logo{
  position:relative;width:40px;height:40px;border-radius:13px;flex:none;display:grid;place-items:center;
  background:linear-gradient(145deg,#f0a6b8,#c25872 62%,#8f3550);
  color:#fff;font-weight:800;font-size:15px;letter-spacing:.06em;
  box-shadow:0 10px 22px -8px rgba(179,74,99,.7),inset 0 1px 0 rgba(255,255,255,.5);
  overflow:hidden;
}
.logo::after{content:'';position:absolute;inset:0;background:linear-gradient(120deg,transparent 35%,rgba(255,255,255,.45) 48%,transparent 62%);transform:translateX(-120%);transition:transform .6s}
.brand:hover .logo::after{transform:translateX(120%)}
.brand-txt{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.brand-txt strong{font-size:16.5px;font-weight:750;letter-spacing:.01em;white-space:nowrap}
.brand-txt em{font-style:normal;font-size:9.5px;letter-spacing:.2em;color:var(--muted-2);text-transform:uppercase}
.top-right{display:flex;align-items:center;gap:9px;flex:none}
.credit-pill{
  display:inline-flex;align-items:center;gap:7px;padding:7px 13px;border-radius:999px;
  background:linear-gradient(180deg,#fff,rgba(255,255,255,.66));border:1px solid rgba(179,74,99,.2);
  box-shadow:0 6px 18px -8px rgba(179,74,99,.4),inset 0 1px 0 #fff;
  color:#7d2d45;font-size:13px;font-weight:600;cursor:pointer;transition:.2s
}
.credit-pill:hover{transform:translateY(-1px);border-color:rgba(179,74,99,.4);box-shadow:0 10px 24px -10px rgba(179,74,99,.55)}
.credit-pill .coin{font-size:12px;opacity:.85}
.credit-pill .pill-plus{width:17px;height:17px;border-radius:50%;display:grid;place-items:center;
  font-size:11px;font-weight:700;color:#fff;background:linear-gradient(135deg,var(--teal-2),var(--teal));
  box-shadow:0 2px 6px rgba(179,74,99,.4)}
.user-name{font-size:13px;color:var(--muted);max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notice-bar{max-width:1500px;margin:0 auto;padding:10px 30px 0;font-size:12.5px;color:#7d2d45}
.notice-bar:not(:empty){display:flex;align-items:center;gap:8px}
.notice-bar:not(:empty)::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 4px rgba(179,74,99,.12)}

/* ---------- 主布局 ---------- */
.layout{display:grid;grid-template-columns:396px minmax(0,1fr);gap:26px;max-width:1500px;
  margin:0 auto;padding:24px 30px 44px;align-items:start}
.panel{
  position:relative;background:linear-gradient(155deg,rgba(255,255,255,.82),rgba(255,255,255,.58));
  border:1px solid var(--stroke);border-radius:var(--radius);padding:24px;
  box-shadow:var(--shadow);backdrop-filter:blur(28px) saturate(160%);-webkit-backdrop-filter:blur(28px) saturate(160%);
}
.panel::before{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 -1px 0 rgba(16,26,43,.04)}
.create-panel{position:sticky;top:84px;display:flex;flex-direction:column;gap:16px}
.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:2px}
.panel-head h2{font-size:18px;font-weight:750;letter-spacing:.01em;display:flex;align-items:center;gap:9px}
.panel-head h2::before{content:'';width:7px;height:7px;border-radius:2px;transform:rotate(45deg);
  background:linear-gradient(135deg,var(--teal-2),var(--teal));box-shadow:0 0 0 4px rgba(179,74,99,.1)}
#prompt{min-height:118px}
.counter{position:absolute;right:14px;bottom:10px;font-size:10.5px;color:var(--muted-2);font-variant-numeric:tabular-nums}
.counter b{color:var(--teal);font-weight:600}

.chips{display:flex;flex-wrap:wrap;gap:7px}
.chip{
  padding:6px 13px;border-radius:999px;font-size:12.5px;color:#55637a;
  background:rgba(255,255,255,.6);border:1px solid rgba(16,26,43,.09);
  box-shadow:inset 0 1px 0 #fff;transition:.18s
}
.chip:hover{color:var(--ink);border-color:rgba(179,74,99,.32);transform:translateY(-1px);background:#fff}
.chip.active{color:#fff;font-weight:600;border-color:transparent;
  background:linear-gradient(135deg,var(--teal-2),var(--teal));
  box-shadow:0 8px 18px -8px rgba(179,74,99,.7),inset 0 1px 0 rgba(255,255,255,.4)}

.ratio-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}
.ratio{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  padding:9px 2px 8px;border-radius:13px;border:1px solid rgba(16,26,43,.09);
  background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,255,255,.6));
  box-shadow:inset 0 1px 0 #fff;transition:.18s
}
.ratio .r{display:block;border:1.5px solid #9aa7ba;border-radius:3px;transition:.18s}
.ratio span{font-size:10px;color:var(--muted);letter-spacing:.02em}
.ratio .r11{width:14px;height:14px}.ratio .r34{width:11px;height:15px}.ratio .r43{width:15px;height:11px}
.ratio .r916{width:9px;height:16px}.ratio .r169{width:16px;height:9px}.ratio .r23{width:11px;height:16px}
.ratio .r32{width:16px;height:11px}
.ratio:hover{border-color:rgba(179,74,99,.3);transform:translateY(-1px)}
.ratio.active{border-color:rgba(179,74,99,.5);background:linear-gradient(180deg,#fff,rgba(255,240,238,.9));
  box-shadow:0 8px 18px -10px rgba(179,74,99,.6),inset 0 1px 0 #fff}
.ratio.active .r{border-color:var(--teal);box-shadow:0 0 0 3px rgba(179,74,99,.08)}
.ratio.active span{color:var(--teal);font-weight:600}

.quality-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.quality{
  display:flex;flex-direction:column;gap:1px;padding:11px 13px;border-radius:15px;text-align:left;
  border:1px solid rgba(16,26,43,.09);
  background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,255,255,.62));
  box-shadow:inset 0 1px 0 #fff;transition:.18s
}
.quality b{font-size:15px;font-weight:750;letter-spacing:.03em}
.quality em{font-style:normal;font-size:10.5px;color:var(--muted)}
.quality .cost{font-size:10px;color:var(--teal);margin-top:4px;font-weight:500}
.quality:hover{transform:translateY(-1px);border-color:rgba(179,74,99,.3)}
.quality.active{border-color:rgba(179,74,99,.48);background:linear-gradient(180deg,#fff,rgba(255,240,238,.94));
  box-shadow:0 10px 22px -12px rgba(179,74,99,.65),inset 0 1px 0 #fff}
.quality.active b{color:#8f3550}

.ref-box{border:1.5px dashed rgba(16,26,43,.16);border-radius:16px;background:rgba(255,255,255,.45);overflow:hidden;transition:.2s}
.ref-box:hover{border-color:rgba(179,74,99,.35);background:rgba(255,255,255,.65)}
.ref-empty{display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 12px;cursor:pointer;color:var(--muted);font-size:12.5px}
.ref-plus{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;font-size:17px;font-weight:600;
  color:var(--teal);background:rgba(179,74,99,.08);border:1px solid rgba(179,74,99,.16)}
.ref-empty em{font-style:normal;font-size:10.5px;color:var(--muted-2)}
.ref-preview{display:flex;gap:11px;padding:11px;align-items:center}
.ref-preview img{width:74px;height:74px;object-fit:cover;border-radius:12px;border:1px solid var(--stroke);box-shadow:0 8px 18px -10px rgba(22,41,71,.4)}
.ref-acts{display:flex;flex-direction:column;gap:6px;justify-content:center}
.ref-hint{font-size:11.5px;color:var(--muted)}

.advanced{border-top:1px solid var(--line);padding-top:13px;margin-top:2px}
.advanced summary{font-size:12.5px;color:var(--muted);cursor:pointer;list-style:none;display:flex;align-items:center;gap:7px;transition:.18s}
.advanced summary:hover{color:var(--teal)}
.advanced summary::-webkit-details-marker{display:none}
.advanced summary::before{content:'+';width:18px;height:18px;border-radius:6px;display:grid;place-items:center;
  font-size:12px;color:var(--teal);background:rgba(179,74,99,.08);border:1px solid rgba(179,74,99,.16)}
.advanced[open] summary::before{content:'−'}
.adv-body{display:flex;flex-direction:column;gap:12px;padding-top:13px}

.generate-btn{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  width:100%;padding:16px;border-radius:18px;overflow:hidden;
  background:linear-gradient(135deg,#e79aae 0%,#b34a63 48%,#8e3550 100%);
  color:#fff;box-shadow:0 18px 34px -12px rgba(179,74,99,.75),inset 0 1px 0 rgba(255,255,255,.45);
  transition:transform .24s cubic-bezier(.2,.8,.2,1),box-shadow .24s
}
.generate-btn::before{content:'';position:absolute;inset:0;
  background:linear-gradient(115deg,transparent 32%,rgba(255,255,255,.4) 46%,transparent 60%);
  transform:translateX(-130%);transition:transform .7s}
.generate-btn:hover::before{transform:translateX(130%)}
.generate-btn:hover{transform:translateY(-2px);box-shadow:0 24px 44px -12px rgba(179,74,99,.8),inset 0 1px 0 rgba(255,255,255,.5)}
.generate-btn:active{transform:translateY(0)}
.generate-btn[disabled]{filter:saturate(.75);opacity:.72;pointer-events:none}
.gb-main{position:relative;font-size:16px;font-weight:700;letter-spacing:.16em}
.gb-sub{position:relative;font-size:11px;letter-spacing:.04em;color:rgba(255,255,255,.82)}
.gb-sub b{font-weight:700;color:#fff}
.tip{font-size:11px;color:var(--muted-2);text-align:center}

/* ---------- 舞台 ---------- */
.works-area{display:flex;flex-direction:column;gap:20px;min-width:0}
.stage{
  position:relative;min-height:470px;border-radius:var(--radius);overflow:hidden;
  border:1px solid var(--stroke);
  background:linear-gradient(160deg,rgba(255,255,255,.88),rgba(255,255,255,.52));
  box-shadow:var(--shadow),inset 0 1px 0 #fff;
  backdrop-filter:blur(26px) saturate(155%);-webkit-backdrop-filter:blur(26px) saturate(155%);
  display:flex;align-items:center;justify-content:center
}
.stage::before{content:'';position:absolute;width:420px;height:420px;left:-160px;bottom:-220px;border-radius:50%;
  background:radial-gradient(circle,rgba(229,138,160,.28),transparent 68%);pointer-events:none}
.stage::after{content:'';position:absolute;width:380px;height:380px;right:-140px;top:-180px;border-radius:50%;
  background:radial-gradient(circle,rgba(230,185,150,.24),transparent 68%);pointer-events:none}
.stage-empty{position:relative;z-index:1;text-align:center;padding:52px 24px;max-width:560px}
.stage-eyebrow{display:inline-flex;align-items:center;gap:7px;margin-bottom:20px;padding:5px 13px;border-radius:999px;
  font-size:10px;letter-spacing:.18em;color:#8f3550;text-transform:uppercase;
  background:rgba(255,255,255,.7);border:1px solid rgba(179,74,99,.18);
  box-shadow:0 6px 16px -10px rgba(179,74,99,.5)}
.stage-eyebrow::before{content:'';width:5px;height:5px;border-radius:50%;background:var(--teal-2);box-shadow:0 0 0 3px rgba(229,138,160,.18)}
.stage-art{position:relative;width:150px;height:150px;margin:0 auto 26px;display:grid;place-items:center}
.stage-art .ring{position:absolute;inset:0;border-radius:50%;border:1px solid rgba(179,74,99,.24);animation:spin 22s linear infinite}
.stage-art .ring.r2{inset:19px;border-color:rgba(190,150,105,.2);animation-direction:reverse;animation-duration:30s}
.stage-art::after{content:'';position:absolute;width:110px;height:110px;border-radius:50%;
  background:radial-gradient(circle,rgba(229,138,160,.22),transparent 70%);filter:blur(6px)}
.stage-art-core{position:relative;z-index:1;width:72px;height:72px;border-radius:50%;display:grid;place-items:center;
  font-size:27px;color:#8f3550;
  background:radial-gradient(circle at 32% 26%,#fff,rgba(255,255,255,.62));
  border:1px solid rgba(255,255,255,.95);
  box-shadow:0 18px 34px -14px rgba(179,74,99,.55),inset 0 1px 0 #fff}
@keyframes spin{to{transform:rotate(360deg)}}
.stage-empty h3{font-size:23px;font-weight:750;letter-spacing:-.01em;margin-bottom:10px;color:#142133}
.stage-empty p{color:var(--muted);font-size:13px;line-height:1.8}
.stage-feats{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:26px}
.stage-feats span{padding:6px 12px;border-radius:999px;font-size:11.5px;color:#40516a;
  background:rgba(255,255,255,.66);border:1px solid rgba(255,255,255,.9);
  box-shadow:0 6px 16px -12px rgba(22,41,71,.5)}
.stage-feats span b{color:var(--teal);font-weight:600}

.stage-running{position:relative;z-index:1;width:100%;padding:26px}
.skeleton{position:relative;width:100%;aspect-ratio:4/3;max-height:430px;border-radius:20px;overflow:hidden;
  background:linear-gradient(110deg,rgba(255,255,255,.62) 18%,rgba(226,240,252,.92) 38%,rgba(255,255,255,.62) 58%);
  background-size:220% 100%;animation:shimmer 2.4s linear infinite;
  box-shadow:inset 0 1px 0 #fff}
.skeleton .scan{position:absolute;left:0;right:0;height:2px;
  background:linear-gradient(90deg,transparent,rgba(179,74,99,.5),transparent);animation:scan 2.8s ease-in-out infinite}
@keyframes shimmer{to{background-position:-220% 0}}
@keyframes scan{0%{top:0;opacity:.15}50%{top:100%;opacity:1}100%{top:0;opacity:.15}}
.run-meta{display:flex;align-items:center;gap:13px;margin-top:20px}
.spinner{width:22px;height:22px;border-radius:50%;border:2px solid rgba(179,74,99,.16);
  border-top-color:var(--teal);animation:spin 1s linear infinite;flex:none}
.run-meta b{display:block;font-size:14px;font-weight:650}
.run-meta em{font-style:normal;font-size:11.5px;color:var(--muted)}
.run-time{margin-left:auto;font-size:12px;font-weight:600;color:var(--teal);font-variant-numeric:tabular-nums;
  padding:3px 10px;border-radius:999px;background:rgba(179,74,99,.08)}

.stage-result{position:relative;z-index:1;width:100%;display:flex;flex-direction:column}
.result-img-wrap{display:grid;place-items:center;padding:24px;background:rgba(255,255,255,.34)}
.result-img-wrap img{max-height:62vh;border-radius:18px;box-shadow:0 30px 60px -22px rgba(16,26,43,.5)}
.result-bar{display:flex;align-items:center;gap:12px;padding:15px 24px;border-top:1px solid var(--line);
  background:rgba(255,255,255,.5);flex-wrap:wrap;backdrop-filter:blur(14px)}
.result-info b{display:block;font-size:14px;font-weight:650}
.result-info em{font-style:normal;font-size:11.5px;color:var(--muted)}
.result-acts{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}

/* ---------- 画廊 ---------- */
.gallery-head{display:flex;align-items:center;justify-content:space-between;padding:2px 4px;gap:12px;flex-wrap:wrap}
.tabs{display:flex;gap:3px;padding:4px;border-radius:999px;background:rgba(255,255,255,.5);
  border:1px solid rgba(255,255,255,.9);box-shadow:inset 0 1px 0 #fff}
.tab{padding:6px 16px;border-radius:999px;font-size:12.5px;color:var(--muted);transition:.18s;white-space:nowrap}
.tab:hover{color:var(--ink)}
.tab.active{color:#8f3550;background:#fff;font-weight:600;box-shadow:0 4px 12px -6px rgba(22,41,71,.35)}
.gallery-filters{display:flex;gap:6px;flex-wrap:wrap}
.gallery-filters select{font-size:12px;padding:6px 8px;border-radius:10px;border:1px solid rgba(120,140,160,.3);background:rgba(255,255,255,.8);color:#33465a;outline:none}
.gallery-filters select:focus{border-color:#6a8cff}
.gallery-count{font-size:11.5px;color:var(--muted-2);letter-spacing:.02em}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
.gcard{position:relative;border-radius:20px;overflow:hidden;cursor:pointer;aspect-ratio:3/4;
  border:1px solid rgba(255,255,255,.9);background:rgba(255,255,255,.55);
  box-shadow:0 14px 32px -20px rgba(22,41,71,.4);
  transition:transform .28s cubic-bezier(.2,.8,.2,1),box-shadow .28s}
.gcard img{width:100%;height:100%;object-fit:cover;transition:transform .5s cubic-bezier(.2,.8,.2,1)}
.gcard:hover{transform:translateY(-5px);box-shadow:0 28px 52px -20px rgba(22,41,71,.45)}
.gcard:hover img{transform:scale(1.05)}
.gcard::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}
.gcard .gmask{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;gap:6px;
  padding:13px;opacity:0;transition:opacity .28s;
  background:linear-gradient(180deg,transparent 40%,rgba(12,22,36,.92) 100%)}
.gcard:hover .gmask{opacity:1}
.gcard .gprompt{font-size:11.5px;line-height:1.55;color:#fbf2f1;display:-webkit-box;-webkit-line-clamp:3;
  -webkit-box-orient:vertical;overflow:hidden}
.gcard .gmeta{font-size:10px;color:#9de9dd;letter-spacing:.03em}
.gcard .gfav{position:absolute;top:10px;right:10px;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;
  font-size:13px;color:var(--teal);background:rgba(255,255,255,.92);
  box-shadow:0 6px 16px -8px rgba(22,41,71,.6);z-index:2}
.gallery-more{text-align:center;padding:10px 0 2px}
.gallery-note{text-align:center;font-size:11px;letter-spacing:.02em;color:var(--muted-2);padding:2px 10px 4px}
.gallery-empty{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;gap:10px;
  padding:52px 24px;border-radius:20px;border:1px dashed rgba(16,26,43,.13);
  background:linear-gradient(160deg,rgba(255,255,255,.66),rgba(255,255,255,.4));
  color:var(--muted);font-size:12.5px;text-align:center}
.gallery-empty::before{content:none;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;
  font-size:22px;color:var(--teal);background:rgba(255,255,255,.8);
  border:1px solid rgba(179,74,99,.18);box-shadow:0 12px 26px -14px rgba(179,74,99,.5)}

/* ---------- 页脚 ---------- */
.app-footer{max-width:1500px;margin:0 auto;padding:20px 30px 44px;display:flex;justify-content:space-between;
  align-items:center;flex-wrap:wrap;gap:12px;font-size:11.5px;color:var(--muted-2);letter-spacing:.02em}
.foot-links{display:flex;gap:18px}
.foot-links a{transition:.18s}
.foot-links a:hover{color:var(--teal)}

/* ---------- 弹窗 ---------- */
.modal{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:22px;
  background:rgba(18,30,48,.28);backdrop-filter:blur(12px) saturate(120%);-webkit-backdrop-filter:blur(12px);
  animation:fadeIn .22s ease}
@keyframes fadeIn{from{opacity:0}}
.modal-card{position:relative;width:100%;max-width:392px;display:flex;flex-direction:column;gap:15px;
  padding:26px;border-radius:26px;
  background:linear-gradient(160deg,rgba(255,255,255,.92),rgba(255,255,255,.72));
  border:1px solid rgba(255,255,255,.95);
  box-shadow:0 50px 100px -30px rgba(14,28,48,.55),inset 0 1px 0 #fff;
  backdrop-filter:blur(34px) saturate(170%);-webkit-backdrop-filter:blur(34px) saturate(170%);
  animation:modalIn .28s cubic-bezier(.2,.8,.2,1)}
@keyframes modalIn{from{opacity:0;transform:translateY(14px) scale(.97)}}
.modal-card::before{content:'';position:absolute;left:26px;right:26px;top:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(229,138,160,.6),rgba(190,150,105,.45),transparent)}
.modal-card h3{font-size:17.5px;font-weight:750}
.modal-x{position:absolute;top:14px;right:16px;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;
  font-size:19px;line-height:1;color:var(--muted);background:rgba(16,26,43,.04);transition:.18s}
.modal-x:hover{color:var(--ink);background:rgba(16,26,43,.08);transform:rotate(90deg)}
.modal-card form{display:flex;flex-direction:column;gap:13px}
.modal-switch{font-size:12px;color:var(--muted);text-align:center}
.toast-wrap{position:fixed;left:50%;bottom:36px;transform:translateX(-50%);z-index:120;display:flex;flex-direction:column;
  gap:9px;align-items:center;pointer-events:none}
.toast{padding:11px 19px;border-radius:999px;font-size:12.5px;max-width:84vw;color:var(--text);
  background:rgba(255,255,255,.94);border:1px solid var(--stroke);
  box-shadow:0 16px 36px -16px rgba(14,28,48,.5);backdrop-filter:blur(18px);
  animation:toastIn .26s cubic-bezier(.2,.8,.2,1)}
.toast.ok{border-color:rgba(15,157,111,.34);color:#5a1f30}
.toast.err{border-color:rgba(229,72,77,.34);color:#a32a2e}
@keyframes toastIn{from{opacity:0;transform:translateY(12px)}}

/* 大图预览 */
.lightbox{position:fixed;inset:0;z-index:100;background:rgba(18,30,48,.42);backdrop-filter:blur(16px);
  display:grid;place-items:center;padding:26px}
.lightbox img{max-width:92vw;max-height:76vh;border-radius:20px;box-shadow:0 40px 80px -20px rgba(6,14,26,.6)}
.lightbox-bar{display:flex;gap:10px;margin-top:18px;justify-content:center;flex-wrap:wrap}
.lightbox-prompt{max-width:740px;margin:14px auto 0;font-size:11.5px;color:#e8f2fb;text-align:center;line-height:1.7}

/* ---------- 安装 / 登录 ---------- */
.install-page,.login-page{min-height:100vh;display:grid;place-items:center;padding:34px 16px}
.install-box,.login-card{position:relative;width:100%;max-width:590px;padding:32px;border-radius:26px;
  background:linear-gradient(160deg,rgba(255,255,255,.9),rgba(255,255,255,.7));
  border:1px solid rgba(255,255,255,.95);
  box-shadow:var(--shadow),inset 0 1px 0 #fff;
  backdrop-filter:blur(30px) saturate(160%);-webkit-backdrop-filter:blur(30px)}
.login-card{max-width:396px;display:flex;flex-direction:column;gap:17px}
.login-card h2{font-size:17px;font-weight:700;text-align:center}
.login-card .brand.center{justify-content:center}
.install-box h1{font-size:21px;font-weight:750;margin-bottom:20px;display:flex;align-items:center;gap:10px}
.install-box h1 small{font-size:11.5px;font-weight:400;color:var(--muted);padding:3px 10px;border-radius:999px;
  background:rgba(179,74,99,.08);border:1px solid rgba(179,74,99,.16)}
.checks{width:100%;border-collapse:collapse;margin-bottom:22px;font-size:12.5px}
.checks tr{border-bottom:1px solid var(--line)}
.checks tr:last-child{border-bottom:0}
.checks td{padding:9px 4px}
.checks .ok-t{color:var(--green);text-align:right;font-weight:600}
.checks .err-t{color:var(--red);text-align:right;font-weight:600}
.install-form h3{font-size:12px;color:var(--teal);letter-spacing:.08em;margin:20px 0 11px;text-transform:uppercase}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.grid2 label{display:flex;flex-direction:column;gap:6px;font-size:11.5px;color:var(--muted)}
.grid2 input{padding:10px 13px;border-radius:12px;background:rgba(255,255,255,.7);
  border:1px solid rgba(16,26,43,.1);color:var(--text);outline:none;transition:.2s}
.grid2 input:focus{border-color:rgba(179,74,99,.5);box-shadow:var(--ring);background:#fff}
.install-form .btn{margin-top:20px;width:100%}

/* ---------- 后台 ---------- */
.admin-body{min-height:100vh}
.admin-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 26px;
  position:sticky;top:0;z-index:30;background:rgba(255,255,255,.68);
  border-bottom:1px solid rgba(255,255,255,.8);
  backdrop-filter:blur(26px) saturate(165%);-webkit-backdrop-filter:blur(26px) saturate(165%);
  box-shadow:0 1px 0 #fff inset,0 12px 30px -22px rgba(22,41,71,.45)}
.admin-top .brand strong{font-size:15px}
.admin-tag{font-size:10.5px;color:var(--muted);padding:3px 9px;border:1px solid var(--line);border-radius:999px;
  background:rgba(255,255,255,.7);letter-spacing:.04em}
.admin-nav{display:flex;gap:4px;padding:10px 26px;overflow-x:auto;scrollbar-width:none;
  border-bottom:1px solid rgba(16,26,43,.06);background:rgba(255,255,255,.45);
  position:sticky;top:65px;z-index:25;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.admin-nav::-webkit-scrollbar{display:none}
.admin-nav a{padding:7px 15px;font-size:12.5px;color:var(--muted);border-radius:999px;white-space:nowrap;transition:.18s}
.admin-nav a:hover{color:var(--ink);background:rgba(255,255,255,.8)}
.admin-nav a.active{color:#8f3550;font-weight:600;background:#fff;
  box-shadow:0 6px 16px -8px rgba(22,41,71,.35),inset 0 1px 0 #fff}
.admin-main{max-width:1280px;margin:0 auto;padding:26px 26px 40px}
.admin-title{font-size:21px;font-weight:750;margin-bottom:20px;display:flex;align-items:center;gap:10px}
.admin-title::before{content:'';width:8px;height:8px;border-radius:2px;transform:rotate(45deg);
  background:linear-gradient(135deg,var(--teal-2),var(--teal));box-shadow:0 0 0 4px rgba(179,74,99,.1)}
.admin-foot{text-align:center;padding:28px;font-size:11.5px;color:var(--muted-2)}

.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(212px,1fr));gap:15px;margin-bottom:18px}
.stat-card{position:relative;overflow:hidden;padding:19px 20px 18px;border-radius:20px;
  background:linear-gradient(160deg,rgba(255,255,255,.85),rgba(255,255,255,.6));
  border:1px solid var(--stroke);box-shadow:var(--shadow-soft),inset 0 1px 0 #fff;
  backdrop-filter:blur(22px)}
.stat-card::before{content:'';position:absolute;left:20px;right:20px;top:0;height:2px;border-radius:2px;
  background:linear-gradient(90deg,var(--teal-2),rgba(190,150,105,.6))}
.stat-card:nth-child(2n)::before{background:linear-gradient(90deg,#e0a08f,#c97387)}
.stat-card:nth-child(3n)::before{background:linear-gradient(90deg,#ffb08a,#ff8a68)}
.stat-card:nth-child(4n)::before{background:linear-gradient(90deg,#efb3c2,#c97387)}
.stat-card em{font-style:normal;display:block;margin-bottom:8px;font-size:11.5px;color:var(--muted);letter-spacing:.02em}
.stat-card b{display:block;font-size:28px;font-weight:750;line-height:1.3;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.stat-card span{font-size:11px;color:var(--muted-2)}
.stat-card b.good{font-size:19px;color:var(--green)}
.stat-card b.warn{font-size:19px;color:var(--coral)}
.stat-card b small{font-size:12.5px;font-weight:400;color:var(--muted)}

.admin-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.admin-card{padding:20px;border-radius:20px;margin-bottom:16px;
  background:linear-gradient(160deg,rgba(255,255,255,.82),rgba(255,255,255,.58));
  border:1px solid var(--stroke);box-shadow:var(--shadow-soft),inset 0 1px 0 #fff;
  backdrop-filter:blur(22px)}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.card-head h3{font-size:14.5px;font-weight:700}
.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quick{display:block;padding:15px;border-radius:15px;border:1px solid rgba(16,26,43,.07);
  background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,255,255,.62));
  transition:transform .2s,box-shadow .2s,background .2s}
.quick:hover{transform:translateY(-2px);background:#fff;box-shadow:0 14px 28px -16px rgba(22,41,71,.45)}
.quick b{display:block;font-size:13px;font-weight:650;margin-bottom:3px}
.quick em{font-style:normal;font-size:11px;color:var(--muted)}
.admin-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:11px}
.admin-gallery>p{grid-column:1/-1;padding:14px 4px;color:var(--muted);font-size:12.5px}
.admin-thumb{border-radius:14px;overflow:hidden;border:1px solid var(--stroke);background:rgba(255,255,255,.6);
  box-shadow:0 10px 24px -18px rgba(22,41,71,.5)}
.admin-thumb img{width:100%;aspect-ratio:1;object-fit:cover}
.admin-thumb figcaption{padding:8px 9px;font-size:10.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.admin-table{width:100%;border-collapse:collapse;font-size:12.5px}
.admin-table th{text-align:left;padding:11px 9px;font-size:10.5px;color:var(--muted-2);font-weight:600;
  letter-spacing:.06em;text-transform:uppercase;border-bottom:1px solid var(--line);white-space:nowrap}
.admin-table td{padding:12px 9px;border-bottom:1px solid rgba(16,26,43,.055);vertical-align:middle}
.admin-table tbody tr{transition:background .16s}
.admin-table tbody tr:hover{background:rgba(255,255,255,.7)}
.admin-table tbody tr:last-child td{border-bottom:0}
.admin-table code{font-family:var(--mono);font-size:11.5px;color:#8f3550;background:rgba(179,74,99,.08);
  padding:2px 7px;border-radius:6px}
.table-wrap{overflow-x:auto;padding:4px 18px 10px;margin-bottom:16px;border-radius:20px;
  background:rgba(255,255,255,.66);border:1px solid var(--stroke);
  box-shadow:var(--shadow-soft),inset 0 1px 0 #fff;backdrop-filter:blur(22px)}
.ops{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.inline-form{display:inline-flex;gap:4px;align-items:center}
.tiny{width:64px;padding:5px 8px;font-size:11px;border-radius:8px;border:1px solid rgba(16,26,43,.1);
  background:#fff;color:var(--text);outline:none}
.tiny:focus{border-color:rgba(179,74,99,.45);box-shadow:var(--ring)}
.toolbar{display:flex;gap:8px;align-items:center;margin-bottom:15px;flex-wrap:wrap}
.toolbar input,.toolbar select{padding:9px 14px;border-radius:999px;background:rgba(255,255,255,.75);
  border:1px solid rgba(16,26,43,.1);color:var(--text);outline:none;font-size:12.5px;min-width:180px;
  box-shadow:inset 0 1px 0 #fff;transition:.18s}
.toolbar input:focus,.toolbar select:focus{border-color:rgba(179,74,99,.45);box-shadow:var(--ring);background:#fff}
.pager{display:flex;align-items:center;gap:6px;padding:11px 0}
.pager a{padding:5px 12px;font-size:12px;border-radius:999px;border:1px solid rgba(16,26,43,.08);
  color:var(--muted);background:rgba(255,255,255,.6);transition:.18s}
.pager a:hover{color:var(--teal);border-color:rgba(179,74,99,.3)}
.pager a.active{color:#fff;font-weight:600;border-color:transparent;
  background:linear-gradient(135deg,var(--teal-2),var(--teal));box-shadow:0 6px 14px -8px rgba(179,74,99,.7)}
.pager-info{margin-left:8px;font-size:11px;color:var(--muted-2)}

.work-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(222px,1fr));gap:14px}
.work-card{border:1px solid var(--stroke);border-radius:18px;overflow:hidden;background:rgba(255,255,255,.7);
  box-shadow:var(--shadow-soft),inset 0 1px 0 #fff;transition:transform .2s,box-shadow .2s}
.work-card:hover{transform:translateY(-3px);box-shadow:0 24px 44px -24px rgba(22,41,71,.5)}
.work-card .work-img img{width:100%;aspect-ratio:4/3;object-fit:cover}
.work-body{padding:11px 13px 13px}
.work-prompt{font-size:11.5px;line-height:1.6;color:#39485f;margin-bottom:8px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.work-meta{display:flex;flex-wrap:wrap;gap:5px;font-size:10px;color:var(--muted);margin-bottom:10px}
.work-meta span{padding:1px 7px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.5)}
.work-ops{display:flex;gap:5px;flex-wrap:wrap}

.admin-form{display:flex;flex-direction:column}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-bottom:15px}
.form-grid.two{margin-bottom:0}
.form-grid .field{min-width:0}
.hint-box{margin-top:15px;padding:15px 17px;border-radius:15px;font-size:12px;color:#41506a;
  background:rgba(255,255,255,.62);border:1px solid var(--stroke);line-height:1.8}
.hint-box b{display:block;margin-bottom:7px;color:#8f3550;font-size:12px}
.hint-box ul{margin-left:18px}
.hint-box li{margin-bottom:3px}
.hint-box code{font-family:var(--mono);font-size:11px;color:#8f3550;background:rgba(179,74,99,.08);padding:1px 6px;border-radius:5px}
.switches{display:flex;gap:24px;flex-wrap:wrap;margin-top:16px}
.switch{display:flex;align-items:center;gap:9px;font-size:12.5px;color:var(--muted);cursor:pointer}
.switch input{appearance:none;width:38px;height:22px;border-radius:999px;position:relative;
  background:rgba(16,26,43,.12);border:1px solid rgba(16,26,43,.08);transition:.22s;flex:none}
.switch input::after{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;
  background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.18);transition:.22s}
.switch input:checked{background:linear-gradient(135deg,var(--teal-2),var(--teal));border-color:transparent;
  box-shadow:0 4px 12px -4px rgba(179,74,99,.5)}
.switch input:checked::after{left:18px}
.switch input:checked+span{color:var(--ink);font-weight:600}
.qr-preview{margin-top:11px;display:flex;align-items:center;gap:11px}
.qr-preview img{width:92px;height:92px;object-fit:contain;background:#fff;border-radius:11px;padding:5px;
  border:1px solid var(--stroke);box-shadow:0 8px 18px -12px rgba(22,41,71,.4)}

/* ---------- 接口文档 ---------- */
.doc-wrap{max-width:920px;margin:0 auto;padding:44px 26px 76px}
.back-link{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--teal);font-weight:500}
.back-link::before{content:'←';font-size:13px}
.doc-wrap h1{font-size:26px;font-weight:750;letter-spacing:-.01em;margin:16px 0 8px}
.doc-wrap h2{font-size:15px;margin:34px 0 12px;color:#8f3550;display:flex;align-items:center;gap:8px}
.doc-wrap h2::before{content:'';width:6px;height:6px;border-radius:2px;transform:rotate(45deg);background:var(--teal)}
.api-list{display:flex;flex-direction:column;gap:12px;margin-top:22px}
.api-item{padding:17px 19px;border-radius:17px;background:linear-gradient(160deg,rgba(255,255,255,.85),rgba(255,255,255,.6));
  border:1px solid var(--stroke);box-shadow:var(--shadow-soft),inset 0 1px 0 #fff;backdrop-filter:blur(18px)}
.api-item h3{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-family:var(--mono);font-size:13px}
.api-item p{font-size:12.5px;color:var(--muted);margin-top:7px;line-height:1.75}
.api-item code{font-family:var(--mono);font-size:11.5px;color:#8f3550;background:rgba(179,74,99,.08);padding:1px 6px;border-radius:5px}
.method{font-family:var(--font);font-size:10px;font-weight:600;padding:2px 8px;border-radius:999px;letter-spacing:.06em}
.method.post{color:#5a1f30;background:rgba(15,157,111,.1);border:1px solid rgba(15,157,111,.2)}
.method.get{color:#215ec9;background:rgba(190,150,105,.1);border:1px solid rgba(190,150,105,.22)}
.doc-wrap pre{margin-top:11px;padding:15px 17px;border-radius:15px;overflow-x:auto;
  background:rgba(255,255,255,.72);border:1px solid var(--stroke);
  font-family:var(--mono);font-size:11.5px;line-height:1.85;color:#33465e;
  box-shadow:inset 0 1px 2px rgba(22,41,71,.04)}

/* ---------- 充值中心 ---------- */
.modal-card.wide{max-width:524px;max-height:88vh;overflow-y:auto}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:30px}
.modal-credit{font-size:11.5px;color:var(--muted);padding:4px 11px;border-radius:999px;
  background:rgba(255,255,255,.7);border:1px solid rgba(179,74,99,.16)}
.modal-credit b{color:var(--teal);font-weight:700;font-size:13px}
.pay-tabs{display:flex;gap:4px;padding:4px;border-radius:999px;background:rgba(255,255,255,.55);
  border:1px solid rgba(255,255,255,.9)}
.pay-tabs .tab{flex:1;text-align:center;padding:7px 10px}
.pay-pane{display:flex;flex-direction:column;gap:14px;padding-top:4px}
.custom-row{display:flex;flex-direction:column;gap:10px}
.amount-row{display:flex;align-items:center;gap:7px;padding:5px 15px;border-radius:16px;
  background:linear-gradient(180deg,#fff,rgba(255,255,255,.7));
  border:1px solid rgba(16,26,43,.11);box-shadow:inset 0 1px 2px rgba(22,41,71,.04),0 1px 0 #fff;
  transition:.2s}
.amount-row:focus-within{border-color:rgba(179,74,99,.5);box-shadow:var(--ring),inset 0 1px 2px rgba(22,41,71,.03)}
.amount-prefix{font-size:18px;font-weight:650;color:var(--teal)}
.amount-row input{flex:1;min-width:0;border:0;outline:none;background:transparent;padding:9px 0;
  font-size:21px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.amount-row input::placeholder{font-size:13.5px;font-weight:400;color:#a2adc0;letter-spacing:0}
.rate-hint{font-size:10.5px;color:var(--muted);white-space:nowrap}
.amount-quick{display:flex;gap:8px;flex-wrap:wrap}
.amount-quick button{flex:1;min-width:62px;padding:8px 10px;border-radius:12px;font-size:12px;color:#55637a;
  border:1px solid rgba(16,26,43,.09);background:rgba(255,255,255,.65);transition:.18s;box-shadow:inset 0 1px 0 #fff}
.amount-quick button:hover{color:var(--teal);border-color:rgba(179,74,99,.32);transform:translateY(-1px)}
.amount-quick button.active{color:#8f3550;font-weight:600;border-color:rgba(179,74,99,.45);
  background:rgba(179,74,99,.09);box-shadow:0 6px 14px -10px rgba(179,74,99,.6)}
.amount-preview{font-size:12px;color:var(--muted);padding:1px 2px 0}
.amount-preview.active{color:#8f3550;font-weight:600}
.pay-types{display:flex;gap:9px;flex-wrap:wrap}
.pay-type{flex:1;min-width:104px;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 14px;border-radius:14px;font-size:12.5px;color:#55637a;
  border:1px solid rgba(16,26,43,.09);background:rgba(255,255,255,.62);transition:.18s;box-shadow:inset 0 1px 0 #fff}
.pay-type i{font-style:normal;width:24px;height:24px;border-radius:7px;display:grid;place-items:center;
  font-size:10.5px;color:var(--teal);background:rgba(179,74,99,.09);border:1px solid rgba(179,74,99,.14)}
.pay-type:hover{border-color:rgba(179,74,99,.28);transform:translateY(-1px)}
.pay-type.active{color:var(--ink);font-weight:600;border-color:rgba(179,74,99,.42);background:#fff;
  box-shadow:0 10px 22px -14px rgba(22,41,71,.5),inset 0 1px 0 #fff}
.pay-type.active i{color:#fff;border-color:transparent;background:linear-gradient(135deg,var(--teal-2),var(--teal))}
.manual-panel{display:flex;flex-direction:column;gap:11px;padding:17px;border-radius:16px;
  border:1px solid rgba(179,74,99,.22);background:linear-gradient(160deg,rgba(255,255,255,.9),rgba(253,244,242,.8));
  box-shadow:var(--shadow-soft)}
.manual-head{font-size:13px;font-weight:600}
.manual-head b{color:var(--teal);font-size:15px}
.manual-panel img{width:190px;max-width:100%;margin:0 auto;padding:6px;border-radius:12px;background:#fff;
  border:1px solid var(--stroke);box-shadow:0 10px 22px -14px rgba(22,41,71,.45)}
.manual-no{font-size:11.5px;color:var(--muted)}
.manual-no code{font-family:var(--mono);color:#8f3550;background:rgba(179,74,99,.08);padding:2px 7px;border-radius:6px}
.manual-acts{display:flex;gap:8px;flex-wrap:wrap}
.order-list{display:flex;flex-direction:column;gap:9px}
.order-empty{text-align:center;padding:32px 0;color:var(--muted);font-size:12.5px}
.order-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border-radius:15px;
  border:1px solid rgba(16,26,43,.07);background:linear-gradient(160deg,rgba(255,255,255,.9),rgba(255,255,255,.62));
  box-shadow:0 8px 20px -18px rgba(22,41,71,.45)}
.order-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.order-main b{font-size:12.5px;font-weight:600}
.order-main em{font-style:normal;font-size:10.5px;color:var(--muted)}
.order-no{font-family:var(--mono);font-size:10px;color:var(--muted-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-side{display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex:none}
.order-side b{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}
.order-side em{font-style:normal;font-size:10.5px;color:var(--muted)}
.order-side b.accent{color:var(--teal)}

/* ---------- 支付结果 / 模拟支付 ---------- */
.pay-result-page{min-height:100vh;display:grid;place-items:center;padding:34px 16px}
.pay-result-card{position:relative;width:100%;max-width:450px;padding:32px;border-radius:26px;display:flex;
  flex-direction:column;gap:15px;text-align:center;
  background:linear-gradient(160deg,rgba(255,255,255,.92),rgba(255,255,255,.72));
  border:1px solid rgba(255,255,255,.95);
  box-shadow:var(--shadow),inset 0 1px 0 #fff;
  backdrop-filter:blur(30px) saturate(160%);-webkit-backdrop-filter:blur(30px)}
.pay-result-icon{width:68px;height:68px;border-radius:50%;margin:0 auto;display:grid;place-items:center;
  font-size:26px;color:var(--teal);
  background:radial-gradient(circle at 34% 28%,#fff,rgba(255,255,255,.7));
  border:1px solid rgba(179,74,99,.25);
  box-shadow:0 16px 34px -14px rgba(179,74,99,.5);animation:pop .32s cubic-bezier(.2,.8,.2,1)}
.pay-result-icon.ok{color:var(--green);border-color:rgba(15,157,111,.3)}
.pay-result-icon.wait{animation:pulse 1.8s ease infinite}
@keyframes pop{from{transform:scale(.72);opacity:0}}
@keyframes pulse{50%{box-shadow:0 0 0 12px rgba(179,74,99,.08)}}
.pay-result-card h1{font-size:21px;font-weight:750}
.pay-result-info{display:flex;flex-direction:column;gap:9px;padding:16px;border-radius:16px;text-align:left;
  background:rgba(255,255,255,.6);border:1px solid var(--stroke)}
.pay-result-info>div{display:flex;justify-content:space-between;gap:12px;font-size:12px}
.pay-result-info span{color:var(--muted)}
.pay-result-info b{font-weight:600;word-break:break-all;text-align:right}
.pay-amount{color:var(--teal);font-size:16px;font-weight:750}
.pay-result-acts{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:4px}
.pay-demo-tag{align-self:center;padding:3px 12px;border-radius:999px;font-size:10px;letter-spacing:.08em;
  color:#8f3550;background:rgba(179,74,99,.08);border:1px solid rgba(179,74,99,.22)}

/* ---------- 响应式 ---------- */
@media (max-width:1180px){
  .layout{grid-template-columns:348px minmax(0,1fr);gap:20px;padding:22px}
  .admin-cols{grid-template-columns:1fr}
}
@media (max-width:960px){
  .layout{grid-template-columns:1fr}
  .create-panel{position:static}
  .stage{min-height:380px}
  .form-grid,.grid2{grid-template-columns:1fr}
  .admin-cols{grid-template-columns:1fr}
  .stage-empty{padding:42px 20px}
}
@media (max-width:640px){
  body::before{background:
    radial-gradient(70% 46% at 0% 0%,rgba(255,206,216,.9),transparent 72%),
    radial-gradient(60% 40% at 100% 6%,rgba(255,228,202,.92),transparent 74%),
    radial-gradient(70% 46% at 100% 100%,rgba(255,214,198,.78),transparent 76%),
    linear-gradient(170deg,#fdf7f6,#fbf2ef)}
  .topbar{padding:11px 15px;gap:8px}
  .logo{width:36px;height:36px;border-radius:11px;font-size:13.5px}
  .brand{gap:9px}
  .brand-txt em{display:none}
  .brand-txt strong{font-size:14.5px}
  .top-right{gap:6px}
  .user-name{display:none}
  .credit-pill{padding:6px 11px;font-size:12px}
  .topbar .btn.sm{padding:6px 12px;font-size:12px}
  .layout{padding:14px 14px 32px;gap:14px}
  .panel{padding:17px;border-radius:20px}
  .panel-head h2{font-size:16.5px}
  .ratio-grid{grid-template-columns:repeat(4,1fr)}
  .quality{padding:10px 11px}
  .stage{min-height:330px}
  .stage-empty{padding:34px 18px;max-width:100%}
  .stage-art{width:112px;height:112px;margin-bottom:20px}
  .stage-art-core{width:58px;height:58px;font-size:23px}
  .stage-empty h3{font-size:18.5px}
  .stage-empty p{font-size:12px}
  .stage-feats{gap:6px;margin-top:20px}
  .stage-feats span{font-size:10.5px;padding:5px 10px}
  .result-img-wrap{padding:14px}
  .result-bar{padding:12px 15px}
  .result-acts{width:100%;margin-left:0}
  .gallery{grid-template-columns:repeat(auto-fill,minmax(142px,1fr));gap:10px}
  .tabs{padding:3px}
  .tab{padding:5px 12px;font-size:12px}
  .app-footer{padding:16px 15px 32px;justify-content:center;text-align:center}
  .notice-bar{padding:9px 15px 0;font-size:12px}
  .admin-main{padding:17px 13px 32px}
  .admin-top{padding:10px 14px}
  .admin-nav{padding:8px 13px;top:59px}
  .stat-grid{grid-template-columns:1fr 1fr;gap:10px}
  .stat-card{padding:15px 16px}
  .stat-card b{font-size:23px}
  .quick-grid{grid-template-columns:1fr}
  .work-grid{grid-template-columns:1fr 1fr;gap:10px}
  .admin-table td,.admin-table th{padding:9px 6px}
  .table-wrap{padding:4px 12px 8px}
  .install-box,.login-card{padding:23px;border-radius:22px}
  .install-box h1{font-size:18px}
  .modal-card.wide{padding:20px;border-radius:22px;max-height:90vh}
  .modal-card{padding:23px;border-radius:22px}
  .order-row{flex-direction:column;align-items:flex-start}
  .order-side{flex-direction:row;align-items:center;gap:9px}
  .manual-panel img{width:152px}
  .amount-quick button{min-width:56px}
  .doc-wrap{padding:30px 17px 60px}
  .doc-wrap h1{font-size:21px}
  .pay-result-card{padding:26px 20px;border-radius:22px}
}
@media (max-width:400px){
  .ratio-grid{gap:5px}
  .ratio{padding:8px 1px}
  .quality-row{gap:6px}
  .quality{padding:9px 9px}
  .quality b{font-size:14px}
  .stat-grid{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms !important;transition-duration:.001ms !important}
}

/* 后台顶栏右侧 */
.admin-top-right{display:flex;align-items:center;gap:9px;flex:none}

/* ===== 画廊搜索 ===== */
.gallery-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-left:auto}
.gsearch{position:relative;display:flex;align-items:center;width:216px;max-width:100%;
  background:rgba(255,255,255,.62);border:1px solid rgba(255,255,255,.9);border-radius:999px;
  box-shadow:inset 0 1px 0 #fff,0 4px 14px -8px rgba(22,41,71,.28);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  transition:.2s}
.gsearch:focus-within{border-color:rgba(179,74,99,.34);box-shadow:0 0 0 4px rgba(179,74,99,.1),inset 0 1px 0 #fff}
.gsearch-icon{position:absolute;left:12px;font-size:15px;color:var(--muted-2);pointer-events:none;transform:rotate(-15deg)}
.gsearch input{width:100%;padding:8px 30px 8px 32px;border:0;background:transparent;font-size:12.5px;color:var(--text);outline:none}
.gsearch input::placeholder{color:var(--muted-2)}
.gsearch-clear{position:absolute;right:8px;width:20px;height:20px;border-radius:50%;font-size:14px;line-height:1;
  color:var(--muted);background:rgba(16,26,43,.06);display:flex;align-items:center;justify-content:center}
.gsearch-clear:hover{color:var(--red);background:rgba(229,72,77,.1)}
.acct-entry{display:none}

/* ===== 用户中心 ===== */
.account-main{position:relative;z-index:1;width:min(1120px,calc(100% - 42px));margin:26px auto 0}
.acct-hero{position:relative;display:flex;align-items:center;gap:20px;padding:28px 32px;border-radius:28px;
  background:linear-gradient(135deg,rgba(255,255,255,.78),rgba(255,255,255,.5));
  border:1px solid rgba(255,255,255,.95);box-shadow:var(--shadow),inset 0 1px 0 #fff;
  backdrop-filter:blur(26px);-webkit-backdrop-filter:blur(26px);overflow:hidden}
.acct-hero::before{content:'';position:absolute;width:220px;height:220px;right:-70px;top:-110px;border-radius:50%;
  background:radial-gradient(circle,rgba(229,138,160,.28),transparent 68%);pointer-events:none}
.acct-avatar{width:62px;height:62px;flex:none;border-radius:22px;display:grid;place-items:center;
  font-size:24px;font-weight:750;color:#7d2d45;background:linear-gradient(145deg,#d8fff8,#c7e2ff);
  border:1px solid rgba(255,255,255,.95);box-shadow:0 12px 26px -12px rgba(179,74,99,.5),inset 0 1px 0 #fff}
.acct-identity{min-width:0;flex:1}
.acct-identity .stage-eyebrow{margin-bottom:8px}
.acct-identity h1{font-size:25px;line-height:1.2;font-weight:750;letter-spacing:-.01em}
.acct-identity p{font-size:12.5px;color:var(--muted);margin-top:6px;word-break:break-all}
.acct-credit{flex:none;text-align:right;padding-left:24px;border-left:1px solid var(--line)}
.acct-credit em{display:block;font-style:normal;font-size:11.5px;color:var(--muted-2);letter-spacing:.08em}
.acct-credit b{display:block;font-size:34px;line-height:1.15;color:var(--teal);font-weight:750;letter-spacing:-.02em}
.acct-credit .mini-link{display:inline-block;margin-top:3px}
.acct-tabs{display:flex;gap:4px;padding:5px;margin:20px 0 18px;border-radius:999px;
  background:rgba(255,255,255,.5);border:1px solid rgba(255,255,255,.9);width:max-content;max-width:100%;overflow:auto;
  box-shadow:inset 0 1px 0 #fff;backdrop-filter:blur(14px)}
.acct-tabs a{padding:7px 18px;border-radius:999px;font-size:12.5px;color:var(--muted);white-space:nowrap;transition:.18s}
.acct-tabs a:hover{color:var(--ink)}
.acct-tabs a.active{background:#fff;color:#8f3550;font-weight:650;box-shadow:0 4px 12px -6px rgba(22,41,71,.35)}
.acct-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}
.acct-stat{padding:20px 22px;border-radius:20px;background:rgba(255,255,255,.62);border:1px solid rgba(255,255,255,.92);
  box-shadow:0 16px 34px -24px rgba(22,41,71,.42),inset 0 1px 0 #fff;backdrop-filter:blur(18px)}
.acct-stat em{display:block;font-style:normal;font-size:11.5px;color:var(--muted-2);letter-spacing:.06em}
.acct-stat b{display:block;font-size:27px;line-height:1.25;font-weight:750;color:var(--ink);margin-top:4px}
.acct-stat b small{font-size:12px;color:var(--muted);font-weight:500}
.acct-stat span{display:block;font-size:11.5px;color:var(--muted);margin-top:2px}
.acct-cols{display:grid;grid-template-columns:1.15fr .85fr;gap:16px;align-items:start}
.acct-card{padding:22px 24px;border-radius:22px;background:rgba(255,255,255,.66);
  border:1px solid rgba(255,255,255,.94);box-shadow:0 20px 44px -28px rgba(22,41,71,.45),inset 0 1px 0 #fff;
  backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);margin-bottom:16px}
.acct-card .card-head h3{font-size:15px}
.ledger-list{display:flex;flex-direction:column}
.ledger-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px dashed var(--line)}
.ledger-row:last-child{border-bottom:0;padding-bottom:0}
.ledger-row b{font-size:13px;font-weight:650}
.ledger-row em{display:block;font-style:normal;font-size:11px;color:var(--muted-2);margin-top:1px}
.ledger-right{text-align:right;flex:none}
.ledger-right b{font-size:15px;font-variant-numeric:tabular-nums}
.ledger-table{width:100%;border-collapse:collapse;font-size:13px}
.ledger-table th{text-align:left;font-size:11px;font-weight:600;letter-spacing:.06em;color:var(--muted-2);padding:0 10px 10px}
.ledger-table td{padding:11px 10px;border-top:1px dashed var(--line);vertical-align:middle}
.ledger-table tr:first-child td{border-top:0}
.ledger-table.plain td{padding:10px 4px;border-top:1px dashed var(--line)}
.ledger-table.plain tr:first-child td{border-top:0}
.ledger-table .right{text-align:right}
.plus{color:var(--green)}
.minus{color:var(--red)}
.mono{font-family:var(--mono);font-size:12px}
.acct-mini-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.acct-mini{display:block;aspect-ratio:1;border-radius:14px;overflow:hidden;border:1px solid rgba(255,255,255,.9);
  box-shadow:0 10px 20px -14px rgba(22,41,71,.5)}
.acct-mini img{width:100%;height:100%;object-fit:cover;transition:transform .35s}
.acct-mini:hover img{transform:scale(1.05)}
.acct-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
.acct-work{border-radius:18px;overflow:hidden;background:rgba(255,255,255,.7);border:1px solid rgba(255,255,255,.92);
  box-shadow:0 14px 30px -22px rgba(22,41,71,.5)}
.acct-work a{position:relative;display:block;aspect-ratio:4/5;overflow:hidden}
.acct-work img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.acct-work:hover img{transform:scale(1.04)}
.acct-work figcaption{padding:10px 12px 12px}
.acct-work figcaption b{display:block;font-size:12.5px;font-weight:600;line-height:1.5;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.acct-work figcaption em{display:block;font-style:normal;font-size:10.5px;color:var(--muted-2);margin-top:3px}
.acct-form{display:flex;flex-direction:column;gap:2px;max-width:420px}
.order-badge{display:inline-block;padding:2px 9px;border-radius:999px;font-size:11px;border:1px solid transparent}
.order-badge.paid{color:#5a1f30;background:rgba(15,157,111,.09);border-color:rgba(15,157,111,.22)}
.order-badge.pending{color:#9a6a15;background:rgba(255,184,76,.12);border-color:rgba(255,184,76,.3)}
.order-badge.closed{color:var(--muted);background:rgba(16,26,43,.05);border-color:rgba(16,26,43,.08)}

@media (max-width:900px){
  .acct-stats{grid-template-columns:1fr 1fr}
  .acct-cols{grid-template-columns:1fr}
  .acct-hero{padding:22px 22px;gap:15px}
  .acct-credit b{font-size:28px}
}
@media (max-width:720px){
  .account-main{width:calc(100% - 26px);margin-top:16px}
  .acct-entry{display:inline-flex}
  .gallery-tools{width:100%;margin-left:0;justify-content:space-between}
  .gsearch{width:100%;max-width:260px}
  .acct-tabs{width:100%;justify-content:flex-start;gap:3px;padding:4px;flex-wrap:wrap}
  .acct-tabs a{flex:1 1 30%;text-align:center;padding:6px 8px;font-size:12px}
  .acct-hero{flex-wrap:wrap;padding:20px;border-radius:22px}
  .acct-avatar{width:52px;height:52px;border-radius:18px;font-size:20px}
  .acct-identity h1{font-size:21px}
  .acct-credit{width:100%;text-align:left;padding:12px 0 0;border-left:0;border-top:1px dashed var(--line);
    display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
  .acct-credit b{font-size:26px}
  .acct-card{padding:18px 16px;border-radius:18px}
  .acct-gallery{grid-template-columns:1fr 1fr;gap:10px}
  .ledger-table.credits-table th:nth-child(2),.ledger-table.credits-table td:nth-child(2){display:none}
  .ledger-table{font-size:12px}
  .ledger-table td{padding:10px 5px}
}

.admin-form{display:flex;flex-direction:column;gap:4px}
.admin-form .field{margin-bottom:8px}
.admin-form .btn{align-self:flex-start;margin-top:2px}

.acct-mini-add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  background:rgba(255,255,255,.45);border:1px dashed rgba(179,74,99,.34);color:var(--teal);
  font-size:11.5px;transition:.2s}
.acct-mini-add span{font-size:24px;line-height:1;font-weight:300}
.acct-mini-add:hover{background:rgba(216,255,248,.7);border-color:rgba(179,74,99,.55);transform:translateY(-2px)}

.order-badge.failed{color:#a32a2e;background:rgba(229,72,77,.08);border-color:rgba(229,72,77,.24)}
.task-err{display:block;font-style:normal;font-size:10.5px;color:var(--red);margin-top:3px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 作品点赞 */
.gcard{position:relative}
.glike{position:absolute;right:8px;top:8px;z-index:2;border:0;border-radius:999px;padding:3px 10px;font-size:12px;line-height:1.4;background:rgba(255,255,255,.88);color:#5b6b7a;cursor:pointer;box-shadow:0 2px 10px rgba(20,40,70,.14)}
.glike:hover{transform:scale(1.06)}
.glike.on{background:#ff5a7a;color:#fff}
/* 提示词收藏夹 */
.prompt-fab{position:fixed;right:16px;bottom:16px;z-index:900;box-shadow:0 8px 24px rgba(16,42,67,.18)}
.prompt-panel{position:fixed;right:16px;bottom:62px;z-index:901;width:min(380px,calc(100vw - 32px));max-height:72vh;overflow:auto;background:#fff;border-radius:16px;box-shadow:0 20px 50px rgba(10,30,60,.25);padding:14px;color:#20303f}
.prompt-panel h4{margin:0 0 6px;font-size:14px}
.prompt-item{padding:8px 0;border-bottom:1px solid rgba(0,0,0,.06)}
.prompt-item b{font-size:13px}
.prompt-item p{margin:2px 0 6px;font-size:12px;color:#5b6b7a;white-space:pre-wrap;word-break:break-word}
.prompt-item .btn{margin-right:6px}

/* ===== 视觉精修：细节质感 / 深色模式 ===== */
:where(.panel,.admin-card,.acct-card,.work-card,.topbar,.prompt-panel,.agent-card,.team-card,.stats-card){
  transition:box-shadow .28s cubic-bezier(.2,.8,.2,1),transform .28s cubic-bezier(.2,.8,.2,1),border-color .28s;
}
.work-img{overflow:hidden}
.work-img img{transition:transform .5s cubic-bezier(.2,.8,.2,1),filter .35s}
.work-card:hover .work-img img{transform:scale(1.045);filter:saturate(1.06)}
.btn.primary{position:relative;overflow:hidden}
.btn.primary::after{
  content:'';position:absolute;top:-60%;left:-40%;width:35%;height:220%;transform:rotate(22deg);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.32),transparent);
  transition:left .55s ease;pointer-events:none;
}
.btn.primary:hover::after{left:120%}
:where(a,button,input,textarea,select):focus-visible{outline:2px solid var(--teal);outline-offset:3px}
.panel-head h2{letter-spacing:.02em}
.gallery .work-card:hover{box-shadow:var(--shadow-hover)}
.admin-table tbody tr{transition:background .18s}
.admin-table tbody tr:hover{background:rgba(179,74,99,.045)}
@media (max-width:640px){
  .panel,.admin-card,.acct-card{padding:16px;border-radius:18px}
  .topbar{padding:10px 14px}
  .gallery{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
  .btn{padding:9px 14px}
}

/* 跟随系统深色模式：所有前台 / 后台页面自动适配 */
@media (prefers-color-scheme: dark){
  :root{
    --ink:#f8eff0;--text:#f6eaec;--muted:#9caabd;--muted-2:#7f8ea3;
    --glass:rgba(22,32,48,.72);--glass-strong:rgba(22,32,48,.9);--glass-soft:rgba(22,32,48,.5);
    --stroke:rgba(255,255,255,.09);--line:rgba(255,255,255,.11);--line-strong:rgba(255,255,255,.18);
    --shadow:0 30px 70px -24px rgba(0,0,0,.7),0 2px 10px rgba(0,0,0,.3);
    --shadow-soft:0 16px 36px -18px rgba(0,0,0,.6);
    --shadow-hover:0 40px 80px -24px rgba(0,0,0,.75);
    --ring:0 0 0 4px rgba(229,138,160,.18);
  }
  body{background:#0c1420;color:var(--text)}
  body::before{
    background:
      radial-gradient(46% 40% at 6% 0%,rgba(13,90,84,.55),transparent 72%),
      radial-gradient(42% 38% at 96% 4%,rgba(34,62,120,.5),transparent 74%),
      radial-gradient(50% 42% at 90% 96%,rgba(110,62,40,.4),transparent 76%),
      radial-gradient(40% 38% at 4% 92%,rgba(88,38,70,.36),transparent 76%),
      linear-gradient(165deg,#0c1420 0%,#101a29 45%,#141722 100%);
  }
  body::after{opacity:.16}
  :where(.panel,.admin-card,.acct-card,.work-card,.topbar,.prompt-panel,.agent-card,.team-card,.stats-card,
         .share-card,.lightbox,.modal,.card,.acct-mini-add,.gallery-empty){
    background:rgba(22,32,48,.74);border-color:rgba(255,255,255,.1);color:var(--text);
    backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  }
  :where(.panel::before){opacity:.25}
  :where(.btn,.mini-btn,.tag,.badge,.order-badge){
    background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.14);color:var(--text);
  }
  :where(.btn.primary){background:linear-gradient(135deg,#e79aae 0%,#b34a63 48%,#8e3550 100%);color:#fff;border-color:rgba(255,255,255,.2)}
  :where(.btn.ghost){background:rgba(255,255,255,.05)}
  :where(input,textarea,select,.field input,.field textarea,.field select){
    background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.14);color:var(--text);
    box-shadow:inset 0 1px 2px rgba(0,0,0,.2);
  }
  :where(input::placeholder,textarea::placeholder){color:#7d8ca1}
  :where(.field-label,.panel-head h2,.card-head h3,.admin-table th,.ledger-table th){color:#dce6f2}
  :where(.admin-table,.ledger-table,.admin-table td,.ledger-table td){border-color:rgba(255,255,255,.09)}
  :where(.admin-table tbody tr:hover){background:rgba(229,138,160,.07)}
  :where(.alert.ok){background:rgba(15,157,111,.14);border-color:rgba(15,157,111,.3);color:#8fe3c4}
  :where(.alert.err){background:rgba(229,72,77,.14);border-color:rgba(229,72,77,.3);color:#ffb3b5}
  :where(.prompt-item,.prompt-item p,.muted.sm,.gallery-note,.gallery-count){color:var(--muted)}
  :where(.prompt-item){border-color:rgba(255,255,255,.08)}
  :where(.glike){background:rgba(255,255,255,.14);color:#fff}
  :where(.glike.on){background:#ff5a7a;color:#fff}
  :where(.app-bg .glow){opacity:.42}
  :where(.grid-mask){opacity:.12}
  ::-webkit-scrollbar-thumb{background:rgba(255,255,255,.16)}
  ::-webkit-scrollbar-thumb:hover{background:rgba(229,138,160,.4)}
}

/* ===== 用户头像 ===== */
.avatar{display:inline-block;object-fit:cover;border-radius:50%;background:#e6f4f0;border:1px solid rgba(255,255,255,.9);box-shadow:0 2px 8px rgba(22,41,71,.12);vertical-align:middle;flex:none}
.avatar.xs{width:22px;height:22px}
.avatar.sm{width:28px;height:28px}
.avatar.lg{width:72px;height:72px}
.avatar.xl{width:64px;height:64px}
.user-name{display:inline-flex;align-items:center;gap:6px}
.rank-txt{display:inline-flex;align-items:center;gap:6px}

/* ===== 手动主题切换 ===== */
html[data-theme="light"]{color-scheme:light}
html[data-theme="light"] body{background:#f6f8fb;color:#1b2735}
html[data-theme="light"] :root{--ink:#1b2735;--text:#33465a;--muted:#6b7c8f;--muted-2:#93a1b0;--glass:rgba(255,255,255,.82);--glass-strong:rgba(255,255,255,.95);--glass-soft:rgba(255,255,255,.6);--stroke:rgba(20,40,60,.08);--line:rgba(20,40,60,.1);--line-strong:rgba(20,40,60,.16)}
html[data-theme="dark"]{color-scheme:dark}
html[data-theme="dark"] body{background:#0d1520;color:#f8eff0}
html[data-theme="dark"] :root{--ink:#f8eff0;--text:#f6eaec;--muted:#9caabd;--muted-2:#7f8ea3;--glass:rgba(22,32,48,.72);--glass-strong:rgba(22,32,48,.9);--glass-soft:rgba(22,32,48,.5);--stroke:rgba(255,255,255,.09);--line:rgba(255,255,255,.11);--line-strong:rgba(255,255,255,.18)}
.theme-toggle{position:fixed;right:16px;bottom:16px;z-index:80;width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--glass-strong);color:var(--ink);font-size:17px;cursor:pointer;box-shadow:var(--shadow-soft);backdrop-filter:blur(12px)}
.theme-toggle:hover{transform:translateY(-2px)}

/* ===== 全站自适应增强（含所有弹窗） ===== */
/* 基础防溢出 */
html,body{max-width:100%;overflow-x:hidden}
img,svg,video,canvas{max-width:100%}
button,input,textarea,select{max-width:100%}
*,*::before,*::after{box-sizing:border-box}

/* 弹窗：内容可滚动、关闭按钮常驻可见、宽度不溢出 */
.modal{display:flex;align-items:flex-start;justify-content:center;overflow-y:auto;overscroll-behavior:contain;
  padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))}
.modal-card{margin:auto;width:100%;max-width:min(392px,100%);max-height:calc(100dvh - 28px);
  overflow-y:auto;overscroll-behavior:contain}
.modal-card.wide{max-width:min(524px,100%)}
.modal-card>*{min-width:0}
.modal-x{position:sticky;top:0;right:auto;align-self:flex-end;flex:none;margin:-8px -8px -43px 0;z-index:5}
.modal-head,.pay-tabs,.amount-row,.amount-quick,.pay-types,.manual-acts,.order-row{min-width:0}
.rate-hint{white-space:normal}

/* 大图预览：可滚动、图片自适应、关闭按钮可见 */
.lightbox{overflow-y:auto;overscroll-behavior:contain;
  padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
.lightbox>div{max-width:100%;min-width:0}
.lightbox img{max-width:100%;max-height:min(70vh,640px);height:auto;object-fit:contain}
.lightbox-prompt{max-width:min(740px,100%);overflow-wrap:anywhere}
.lightbox-bar{max-width:100%}

/* 站点公告弹窗 */
.notice-pop{position:fixed;inset:0;z-index:9998;background:rgba(12,20,32,.55);backdrop-filter:blur(8px);
  display:flex;align-items:flex-start;justify-content:center;overflow-y:auto;overscroll-behavior:contain;padding:16px}
.notice-pop-card{margin:auto;background:#fff;border-radius:18px;max-width:min(420px,100%);width:100%;padding:22px;
  box-shadow:0 24px 60px rgba(10,30,60,.3);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
.notice-pop-title{font-size:16px;font-weight:600;margin-bottom:10px;color:#20303f}
.notice-pop-body{color:#44566a;font-size:14px;line-height:1.7;white-space:pre-line;word-break:break-word}
.notice-pop-acts{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:18px}
.notice-pop-btn{border-radius:10px;padding:7px 14px;font-size:13px;cursor:pointer;max-width:100%}
.notice-pop-btn.ghost{border:1px solid #d7e0ea;background:#fff;color:#5b6b7a}
.notice-pop-btn.primary{border:0;background:#b34a63;color:#fff}

/* 顶栏窄屏换行，避免横向溢出 */
@media (max-width:640px){
  .topbar{flex-wrap:wrap;gap:8px}
  .top-right{flex:1 1 100%;justify-content:flex-start;flex-wrap:wrap;gap:6px}
  .credit-pill{flex:1 1 auto;justify-content:center}
  .toolbar input,.toolbar select{min-width:0;width:100%}
  input[style*="min-width"],textarea[style*="min-width"]{min-width:0!important;max-width:100%}
  .table-wrap{max-width:100%;-webkit-overflow-scrolling:touch}
  .admin-table{min-width:0}
  .acct-hero{flex-wrap:wrap;padding:20px}
  .gallery-tools{width:100%;margin-left:0}
  .gsearch{width:100%}
  .modal-card{padding:20px;border-radius:20px}
  .modal-card.wide{padding:18px;border-radius:20px}
}
@media (max-width:480px){
  .gallery{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
  .work-grid,.admin-gallery{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
  .rank-grid,.vip-grid,.fl-grid,.col-grid,.profile-grid,.ms-grid,.stats-grid,.ms-top{grid-template-columns:1fr}
  .share-body{padding:14px 15px 18px}
  .share-acts .btn,.pay-result-acts .btn{flex:1 1 auto}
  .amount-row{padding:5px 11px}
  .amount-row input{font-size:18px}
  .pay-type{min-width:calc(50% - 5px)}
  .notice-pop-acts .notice-pop-btn{flex:1 1 auto}
}
@media (max-width:360px){
  .top-right .btn.sm{padding:5px 9px;font-size:11px}
  .stat-grid{grid-template-columns:1fr}
  .ratio-grid{grid-template-columns:repeat(3,1fr)}
}

/* ===== 选择控件统一下拉样式 ===== */
/* 创作台三个下拉（位于 .field 内，已继承 .field select 基础样式），补充统一箭头 */
.field select#styleSelect,.field select#ratioSelect,.field select#qualitySelect{
  appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f9d8f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 15px center
}
/* 图库分类下拉，替代原 tabs */
.gallery-tab-select{
  appearance:none;-webkit-appearance:none;cursor:pointer;font-size:12.5px;font-weight:600;color:#8f3550;
  padding:8px 34px 8px 16px;border-radius:999px;border:1px solid rgba(255,255,255,.9);
  background-color:rgba(255,255,255,.7);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f9d8f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;
  box-shadow:0 4px 12px -6px rgba(22,41,71,.35);outline:none;max-width:100%
}
.gallery-tab-select:focus{border-color:rgba(179,74,99,.5);box-shadow:var(--ring)}
/* 账号中心栏目下拉，替代原 acct-tabs */
.acct-tabs{display:flex;justify-content:center}
.acct-tab-select{
  appearance:none;-webkit-appearance:none;cursor:pointer;font-size:12.5px;font-weight:650;color:#8f3550;
  padding:9px 40px 9px 18px;border-radius:999px;border:1px solid rgba(255,255,255,.9);
  background-color:rgba(255,255,255,.85);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f9d8f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 16px center;
  box-shadow:0 4px 12px -6px rgba(22,41,71,.35);outline:none;max-width:100%
}
.acct-tab-select:focus{border-color:rgba(179,74,99,.5);box-shadow:var(--ring)}
/* 合集可见性小下拉 */
.mini-select{
  appearance:none;-webkit-appearance:none;cursor:pointer;font-size:12px;color:#8f3550;
  padding:4px 24px 4px 10px;border-radius:8px;border:1px solid rgba(179,74,99,.28);
  background-color:rgba(255,255,255,.9);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f9d8f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 8px center;outline:none;vertical-align:middle
}
.mini-select:focus{border-color:rgba(179,74,99,.5)}
/* 后台多选下拉（支付方式）高度自适应 */
select[multiple]{min-height:64px;padding:8px 12px}
@media (max-width:640px){
  .gallery-tab-select,.acct-tab-select{width:100%}
}

/* ============================================================
   new-api 风格增强层（融合排版）
   参考 new-api 美化版的视觉语言，用本工坊既有变量实现，保持青绿主题与深浅模式不变。
   1) 统一 focus-visible 光环  2) 表格触摸滚动  3) 卡片悬停上浮
   4) 窄屏表单堆叠  5) 减少透明/动效降级  6) 弹性子项防溢出
   ============================================================ */
:root{
  --glass-blur:18px;
  --glass-saturate:1.35;
  --fx-ease:cubic-bezier(.22,1,.36,1);
}

/* 弹性/网格子项允许收缩，长内容不撑破父级（对齐 new-api 的 min-width:0 策略） */
.panel,.admin-card,.stat-card,.acct-card,.work-card,.modal-card,.table-wrap,
form,.field,.form-grid,.admin-cols,.stat-grid,.quick-grid{ min-width:0 }

/* 表格容器：触摸横向滚动 + 惯性 + 隔离滚动链，窄屏可左右滑动查看 */
.table-wrap,.ledger-wrap{
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
}
.admin-table th,.admin-table td,.ledger-table th,.ledger-table td{ overflow-wrap:anywhere }

/* 统一 focus-visible 光环：键盘聚焦时柔和描边，替代生硬默认轮廓 */
:where(button,a,input,textarea,select,[tabindex]):focus-visible{
  outline:none;
  box-shadow:var(--ring);
}
:where(.btn,.mini-btn,.quick,.pager a):focus-visible{ outline:none;box-shadow:var(--ring) }

/* 卡片悬停上浮：仅桌面端启用，减少动效偏好下关闭 */
@media (prefers-reduced-motion:no-preference){
  .admin-card,.stat-card,.panel,.acct-card,.work-card,.agent-card,.team-card{
    transition:transform 180ms var(--fx-ease),box-shadow 180ms ease,border-color 180ms ease;
  }
  @media (min-width:641px){
    .admin-card:hover,.panel:hover,.acct-card:hover{
      transform:translateY(-2px);
      box-shadow:var(--shadow-hover);
      border-color:rgba(179,74,99,.28);
    }
  }
}

/* 窄屏细化：表单字段纵向堆叠、卡片内边距收紧、表格更紧凑 */
@media (max-width:640px){
  .form-grid,.form-grid.two{ grid-template-columns:1fr }
  .admin-main{ padding:18px 14px 32px }
  .admin-card,.panel{ padding:16px }
  .admin-table th,.admin-table td{ padding-inline:7px;white-space:nowrap }
  .card-head{ flex-wrap:wrap }
}

/* 玻璃质感增强：卡片/弹窗/顶栏在支持 backdrop-filter 时叠加轻微模糊与饱和 */
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .modal-card,.notice-pop-card{
    -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(var(--glass-saturate));
    backdrop-filter:blur(var(--glass-blur)) saturate(var(--glass-saturate));
  }
}

/* 可访问性降级：用户偏好减少透明时，回退为不透明背景，保证可读性 */
@media (prefers-reduced-transparency:reduce){
  .admin-top,.admin-nav,.table-wrap,.stat-card,.admin-card,.panel,.modal-card{
    -webkit-backdrop-filter:none !important;
    backdrop-filter:none !important;
    background-color:#fff !important;
  }
}
@media (prefers-reduced-motion:reduce){
  .admin-card,.stat-card,.panel,.acct-card,.work-card,.agent-card,.team-card,
  :where(button,a,input,textarea,select){ transition:none !important }
  .admin-card:hover,.panel:hover,.acct-card:hover{ transform:none !important }
}


/* 充值方式切换：按金额 / 积分套餐 */
.topup-modes{display:flex;gap:8px;margin:2px 0 12px}
.topup-modes .tm{flex:1;padding:8px 10px;font-size:13px;border-radius:10px;border:1px solid var(--line-strong);background:transparent;color:var(--muted);cursor:pointer;transition:background .15s,color .15s,border-color .15s}
.topup-modes .tm.active{background:var(--accent-soft);border-color:rgba(179,74,99,.35);color:var(--teal)}
#packageModeBox .amount-quick{margin-bottom:6px}

/* ===== 卡片式自定义下拉（select 增强） ===== */
.cs-wrap{position:relative;width:100%}
.cs-native{display:none !important}
.cs-trigger{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:12px 16px;min-height:48px;cursor:pointer;
  font:inherit;font-size:15px;color:var(--text);text-align:left;
  background:rgba(255,255,255,.86);
  border:1px solid var(--line-strong);border-radius:var(--radius-sm);
  box-shadow:0 1px 2px rgba(22,41,71,.04);
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.cs-trigger:hover{border-color:rgba(179,74,99,.45);background:#fff}
.cs-trigger.is-open,
.cs-trigger[aria-expanded="true"]{
  border-color:var(--teal);
  box-shadow:var(--ring),0 6px 18px -10px rgba(179,74,99,.4);
  background:#fff;
}
.cs-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cs-caret{display:inline-flex;align-items:center;color:var(--muted);transition:transform .2s ease}
.cs-wrap.is-open .cs-caret{transform:rotate(180deg);color:var(--teal)}

.cs-panel{
  position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:60;
  padding:10px;background:#fff;border:1px solid rgba(16,26,43,.10);
  border-radius:16px;box-shadow:0 24px 50px -18px rgba(22,41,71,.35),0 2px 8px rgba(22,41,71,.06);
  max-height:320px;overflow:auto;
  animation:cs-pop .18s ease;
}
@keyframes cs-pop{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

.cs-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cs-grid.cs-grid-1{grid-template-columns:1fr}
.cs-opt{
  display:flex;align-items:center;justify-content:center;
  min-height:44px;padding:9px 12px;cursor:pointer;
  font:inherit;font-size:14px;line-height:1.35;color:var(--text);text-align:center;
  background:#f6f9fd;border:1px solid rgba(16,26,43,.10);border-radius:12px;
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}
.cs-opt:hover{background:#eef4ff;border-color:rgba(190,150,105,.45);color:#2b64d8}
.cs-opt.is-active{
  background:var(--accent-soft);border-color:var(--teal);color:var(--teal);font-weight:600;
  box-shadow:0 0 0 3px rgba(179,74,99,.08) inset;
}
@media (max-width:520px){
  .cs-grid{grid-template-columns:1fr 1fr}
  .cs-opt{font-size:13px;min-height:42px;padding:8px 10px}
}
.cs-grid.cs-grid-wide{grid-template-columns:1fr}
.cs-opt.is-long{justify-content:flex-start;text-align:left;font-size:13px;line-height:1.45}

/* 紧凑版下拉：用于小额筛选/行内开关这类小选择框 */
.cs-wrap.cs-compact .cs-trigger{min-height:34px;padding:6px 10px;font-size:12px;border-radius:10px;gap:6px}
.cs-wrap.cs-compact .cs-caret svg{width:13px;height:13px}
.cs-wrap.cs-compact .cs-panel{padding:6px;border-radius:12px;max-height:260px}
.cs-wrap.cs-compact .cs-opt{min-height:32px;font-size:12px;padding:6px 8px;border-radius:9px}

/* 生成失败时在预览区展示的原因与退款信息 */
.fail-meta{margin-top:10px;font-size:13px;color:var(--muted);line-height:1.7}

/* ================= UI 2.0 · 前台视觉精修 ================= */
.app-body{
  background:
    radial-gradient(1200px 520px at 92% -6%, rgba(255,176,196,.2), transparent 64%),
    radial-gradient(900px 460px at 4% 4%, rgba(255,216,182,.18), transparent 60%),
    linear-gradient(180deg,#fdf8f6 0%,#f9efef 100%);
  letter-spacing:.1px;
}
.topbar{
  padding:12px 28px;
  background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(255,255,255,.6));
  border-bottom:1px solid rgba(255,255,255,.85);
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 16px 40px -30px rgba(22,41,71,.55);
}
.brand .logo{border-radius:14px;font-size:14.5px}
.brand-txt strong{font-size:16px;font-weight:760}
.credit-pill{
  padding:8px 14px;font-weight:650;
  background:linear-gradient(180deg,#fff,rgba(245,255,253,.85));
  border-color:rgba(179,74,99,.24);
  box-shadow:0 8px 20px -12px rgba(179,74,99,.55),inset 0 1px 0 #fff;
}
.credit-pill b{font-size:14px;letter-spacing:.02em}
.btn{border-radius:12px;font-weight:550;letter-spacing:.01em}
.btn.ghost{background:rgba(255,255,255,.62);border-color:rgba(16,26,43,.12);box-shadow:0 2px 6px -4px rgba(22,41,71,.3)}
.btn.ghost:hover{background:#fff;border-color:rgba(179,74,99,.35)}

.panel{
  border-radius:22px;padding:22px 22px 20px;
  background:linear-gradient(165deg,rgba(255,255,255,.9),rgba(255,255,255,.62));
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 2px 4px rgba(22,41,71,.04),0 30px 60px -44px rgba(22,41,71,.6);
}
.panel-head h2{font-size:17.5px;font-weight:760}
.panel-head .mini-link{
  padding:6px 12px;border-radius:999px;background:rgba(179,74,99,.07);
  border:1px solid rgba(179,74,99,.14);font-size:11.5px;font-weight:600;
}
.panel-head .mini-link:hover{background:rgba(179,74,99,.11);text-decoration:none}

.field-label{font-size:11.5px;letter-spacing:.06em;text-transform:none;color:#66768c}
.field-label i{letter-spacing:.02em}
.field textarea,.field input,.field select{
  border-radius:14px;background:rgba(255,255,255,.9);
  border-color:rgba(16,26,43,.12);
  box-shadow:inset 0 1px 2px rgba(16,26,43,.035);
  transition:border-color .18s,box-shadow .18s,background .18s;
}
.field textarea{line-height:1.75;padding:14px 15px 26px}
.field input:focus,.field textarea:focus,.field select:focus{
  background:#fff;border-color:rgba(179,74,99,.55);
  box-shadow:0 0 0 3.5px rgba(179,74,99,.12),0 10px 24px -20px rgba(179,74,99,.7);
}
.field select{
  appearance:none;-webkit-appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,#7c8ea6 50%),linear-gradient(135deg,#7c8ea6 50%,transparent 50%);
  background-position:calc(100% - 20px) calc(50% - 1px),calc(100% - 15px) calc(50% - 1px);
  background-size:5px 5px,5px 5px;background-repeat:no-repeat;
  padding-right:40px;
}
.field select:hover{background-color:#fff}

.ref-box{border-radius:16px;border-color:rgba(16,26,43,.14);background:rgba(255,255,255,.55)}
.ref-empty{padding:20px 12px}
.ref-empty:hover{color:#8f3550}
.ref-plus{width:34px;height:34px;border-radius:11px;font-size:18px}

.generate-btn{
  border-radius:16px;padding:17px;
  box-shadow:0 18px 36px -16px rgba(179,74,99,.75),0 2px 0 rgba(255,255,255,.35) inset;
  letter-spacing:.02em;
}
.gb-main{font-size:15.5px;letter-spacing:.2em}
.gb-sub{font-size:11px;opacity:.92}
.tip{letter-spacing:.02em}

.stage{border-radius:22px;border-color:rgba(255,255,255,.9);
  box-shadow:0 2px 4px rgba(22,41,71,.04),0 30px 60px -46px rgba(22,41,71,.6)}

.work-card{border-radius:18px!important;overflow:hidden;border-color:rgba(255,255,255,.9)!important;
  box-shadow:0 2px 6px rgba(22,41,71,.05),0 18px 34px -30px rgba(22,41,71,.55)!important;
  transition:transform .22s cubic-bezier(.2,.8,.2,1),box-shadow .22s!important;
}
.work-card:hover{transform:translateY(-3px);
  box-shadow:0 6px 14px rgba(22,41,71,.07),0 28px 48px -34px rgba(22,41,71,.6)!important}

.gallery-filters select{border-radius:999px;padding:7px 12px;background:rgba(255,255,255,.85);
  border-color:rgba(16,26,43,.12);box-shadow:0 4px 12px -10px rgba(22,41,71,.5)}
.gallery-empty{border-radius:18px}

@media (max-width:820px){
  .topbar{padding:11px 16px}
  .layout{padding:16px 14px 32px;gap:16px}
  .panel{border-radius:18px;padding:18px 16px 16px}
  .stage{border-radius:18px}
}

/* 画廊工具栏排布修正：分类 / 搜索 / 筛选同一行，右对齐不挤压 */
.gallery-head{display:flex;flex-wrap:nowrap;align-items:center;gap:10px}
.gallery-tab-select{flex:0 0 auto;width:auto!important}
.gallery-tools{flex:1 1 auto;min-width:0;justify-content:flex-end;gap:8px;flex-wrap:nowrap;margin-left:0}
.gsearch{flex:0 0 196px;width:196px}
.gallery-filters{flex:0 0 auto;flex-wrap:nowrap;gap:6px}
.gallery-filters select{width:auto;min-width:0}
.gallery-count{flex:0 0 auto}
@media (max-width:860px){
  .gallery-head{flex-wrap:wrap;gap:8px}
  .gallery-tools{flex-wrap:wrap;justify-content:space-between;width:100%}
  .gsearch{flex:1 1 100%;width:100%}
  .gallery-filters{flex:1 1 100%;flex-wrap:wrap}
  .gallery-filters select{flex:1 1 auto}
}
.gallery-tab-select{max-width:148px;min-width:132px;text-overflow:ellipsis}
.gallery-filters select{min-width:106px}
.gallery-head .gallery-count{white-space:nowrap}

/* ============================================================
   v3 视觉升级：更克制的层级、更细腻的玻璃质感
   ============================================================ */
.topbar{
  background:linear-gradient(180deg,rgba(255,255,255,.8),rgba(255,255,255,.62));
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 14px 34px -26px rgba(22,41,71,.5);
  padding:12px 28px;
}
.topbar::after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:1px;
  background:linear-gradient(90deg,transparent,rgba(179,74,99,.28) 22%,rgba(190,150,105,.24) 62%,transparent)}
.logo{width:42px;height:42px;border-radius:14px;font-size:15px;letter-spacing:.02em;
  box-shadow:0 10px 22px -10px rgba(179,74,99,.72),inset 0 1px 0 rgba(255,255,255,.35)}
.brand-txt strong{font-size:17px;font-weight:800;letter-spacing:.005em}
.brand-txt em{font-size:9px;opacity:.75}
.topbar .btn.sm{height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;
  padding:0 15px;font-weight:600;background:var(--glass-strong);border:1px solid rgba(16,26,43,.07);
  box-shadow:0 6px 16px -12px rgba(22,41,71,.5),inset 0 1px 0 #fff}
.topbar .btn.sm:hover{background:#fff;border-color:rgba(179,74,99,.28)}
.topbar .btn.primary.sm{background:linear-gradient(135deg,#e58aa0,#b34a63 60%,#8e3550);color:#fff;
  border-color:transparent;box-shadow:0 12px 24px -12px rgba(179,74,99,.85),inset 0 1px 0 rgba(255,255,255,.4)}
.credit-pill{
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(253,244,242,.9));
  border:1px solid rgba(179,74,99,.2);
  box-shadow:0 8px 20px -14px rgba(179,74,99,.8),inset 0 1px 0 #fff;
  padding:6px 10px 6px 12px;border-radius:999px;
}
.credit-pill .coin{color:#b34a63;font-size:13px}
.credit-pill b{font-size:15px;color:#0b8076;font-variant-numeric:tabular-nums}
.credit-pill .pill-plus{width:19px;height:19px;font-size:11px;
  background:linear-gradient(135deg,#e58aa0,#b34a63);box-shadow:0 4px 10px -4px rgba(179,74,99,.8)}

.panel{padding:26px;border-radius:26px;
  background:linear-gradient(160deg,rgba(255,255,255,.9),rgba(255,255,255,.62) 60%,rgba(240,250,249,.66));
  box-shadow:0 34px 78px -30px rgba(22,41,71,.38),0 2px 8px rgba(22,41,71,.04)}
.panel-head h2{font-size:19px}
.panel-head h2::before{width:8px;height:8px;box-shadow:0 0 0 5px rgba(179,74,99,.09)}
.field{gap:0}
.field-label{margin-bottom:7px;letter-spacing:.02em;color:#3d4d63}
.field-label i{opacity:.85}
.field input,.field textarea,.field select{
  background:rgba(255,255,255,.82);border:1px solid rgba(16,26,43,.09);border-radius:14px;
  padding:12px 15px;box-shadow:inset 0 1px 2px rgba(16,26,43,.03);transition:border-color .2s,box-shadow .2s,background .2s}
.field input:focus,.field textarea:focus,.field select:focus{background:#fff;border-color:rgba(179,74,99,.45);
  box-shadow:0 0 0 4px rgba(179,74,99,.1),inset 0 1px 2px rgba(16,26,43,.02)}
#prompt{min-height:132px;line-height:1.8;font-size:13.5px}
.ref-box{border-radius:18px;border-color:rgba(179,74,99,.18);
  background:linear-gradient(180deg,rgba(255,255,255,.7),rgba(252,241,238,.55))}
.ref-empty{padding:22px 12px}
.ref-empty em{opacity:.8}
.generate-btn{padding:18px 16px;border-radius:17px;
  background:linear-gradient(125deg,#ef9db0 0%,#b34a63 44%,#8e3550 100%);
  box-shadow:0 22px 42px -16px rgba(179,74,99,.8),inset 0 1px 0 rgba(255,255,255,.5),inset 0 -8px 18px rgba(90,31,48,.16)}
.generate-btn::after{content:'';position:absolute;left:0;right:0;top:0;height:52%;pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,.22),transparent)}
.gb-main{font-size:16px;font-weight:750;letter-spacing:.14em}
.gb-sub{opacity:.92;letter-spacing:.06em}

.stage{background:
  radial-gradient(120% 90% at 12% 0%,rgba(255,196,212,.5),transparent 58%),
  radial-gradient(90% 80% at 100% 12%,rgba(255,224,196,.48),transparent 62%),
  linear-gradient(160deg,var(--glass-strong),rgba(255,255,255,.6));
  border-radius:28px;border:1px solid var(--stroke);
  box-shadow:0 34px 78px -34px rgba(22,41,71,.36),inset 0 1px 0 #fff}
.stage-empty h3{font-size:26px;letter-spacing:-.02em;font-weight:800;color:#132135}
.stage-empty p{font-size:13.5px}
.stage-eyebrow{background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(255,240,239,.85));
  border-color:rgba(179,74,99,.22);letter-spacing:.16em}
.stage-feats span{background:rgba(255,255,255,.75);border-color:rgba(179,74,99,.16);
  box-shadow:0 6px 16px -14px rgba(22,41,71,.6),inset 0 1px 0 #fff;font-weight:500}

.gallery-head{gap:14px;padding:4px 4px 2px}
.gallery-tab-select{min-width:138px;padding:10px 38px 10px 18px;font-size:13px;font-weight:700;
  background-color:rgba(255,255,255,.86);border-color:rgba(179,74,99,.16);
  box-shadow:0 8px 20px -16px rgba(22,41,71,.7),inset 0 1px 0 #fff}
.gsearch{width:230px;background:rgba(255,255,255,.82);border:1px solid rgba(16,26,43,.08);border-radius:999px;
  box-shadow:inset 0 1px 2px rgba(16,26,43,.03)}
.gallery-filters select{
  min-width:108px;width:auto;appearance:none;-webkit-appearance:none;cursor:pointer;
  padding:9px 32px 9px 14px;border-radius:999px;font-size:12.5px;font-weight:550;color:#33465a;
  background-color:rgba(255,255,255,.82);border:1px solid rgba(16,26,43,.08);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7c8f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 13px center;
  box-shadow:0 6px 16px -14px rgba(22,41,71,.7),inset 0 1px 0 #fff;outline:none}
.gallery-filters select:hover{border-color:rgba(179,74,99,.3);background-color:#fff}
.gallery-filters select:focus{border-color:rgba(179,74,99,.45);box-shadow:0 0 0 4px rgba(179,74,99,.1)}
.gallery{grid-template-columns:repeat(auto-fill,minmax(196px,1fr));gap:16px}
.gcard{border-radius:22px;border-color:rgba(255,255,255,.95);
  box-shadow:0 18px 38px -24px rgba(22,41,71,.45)}
.gcard:hover{box-shadow:0 32px 58px -22px rgba(22,41,71,.48)}
.gallery-empty{border-radius:22px}

.app-footer{border-top:1px solid var(--line);margin:26px auto 0;padding:20px 30px 30px;max-width:1500px;color:var(--muted-2)}

/* 移动端跟随收敛 */
@media (max-width:640px){
  .topbar{padding:10px 14px}
  .logo{width:37px;height:37px;border-radius:12px;font-size:13.5px}
  .brand-txt strong{font-size:14.5px}
  .credit-pill{padding:5px 9px 5px 10px}
  .credit-pill b{font-size:14px}
  .panel{padding:18px;border-radius:22px}
  .panel-head h2{font-size:17px}
  .stage{border-radius:22px;min-height:340px}
  .stage-art{width:116px;height:116px}
  .stage-art-core{width:60px;height:60px}
  .stage-empty h3{font-size:19px}
  #prompt{min-height:118px;font-size:13px}
  .generate-btn{padding:16px;border-radius:15px}
  .gallery{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:11px}
  .gallery-tab-select{width:100%;max-width:none;min-width:0}
  .gallery-filters select{flex:1 1 0;min-width:0;padding:9px 26px 9px 12px;background-position:right 10px center}
  .gsearch{width:100%;max-width:none}
  .app-footer{margin-top:18px;padding:16px 15px 30px}
}
@media (max-width:960px){
  .create-panel{position:static}
}

/* v3.1 细节修正：筛选下拉不再截断、窄屏工具条换行更自然 */
.gallery-filters select{min-width:124px;padding-right:34px;text-overflow:clip;white-space:nowrap}
.gallery-tools{flex-wrap:wrap;row-gap:9px}
.gallery-empty{border:1px dashed rgba(179,74,99,.2);border-radius:22px;background:rgba(255,255,255,.55)}
@media (max-width:760px){
  .gallery-head{row-gap:10px}
  .gallery-tools{width:100%;margin-left:0}
  .gallery-tools .gsearch{order:2;flex:1 1 190px;width:auto;max-width:none}
  .gallery-filters{order:1;flex:1 1 100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .gallery-filters select{width:100%;min-width:0}
  .gallery-count{order:3;flex:1 1 100%;text-align:right}
}
@media (max-width:640px){
  .topbar .btn.sm{padding:0 13px}
  .credit-pill{gap:6px}
  .stage-feats{gap:7px}
}

/* v3.2 画廊下拉：custom-select 外层宽度收敛，文字不再截断 */
.gallery-head{gap:12px}
.gallery-head > .cs-wrap{width:auto;flex:0 0 auto;min-width:140px;max-width:172px}
.gallery-head > .cs-wrap .cs-trigger{min-height:38px;padding:8px 16px;font-size:13px;font-weight:700;
  color:#8f3550;border-radius:999px;background:rgba(255,255,255,.88);border-color:rgba(179,74,99,.16);
  box-shadow:0 8px 20px -16px rgba(22,41,71,.7),inset 0 1px 0 #fff}
.gallery-tools{flex:1 1 auto;min-width:0;flex-wrap:nowrap;gap:10px;justify-content:flex-end;margin-left:0}
.gallery-tools .gsearch{flex:0 1 224px;width:224px}
.gallery-filters{flex:0 0 auto;flex-wrap:nowrap;gap:8px}
.gallery-filters .cs-wrap{width:auto;flex:0 0 auto;min-width:116px}
.gallery-filters .cs-wrap .cs-trigger,.gallery-filters .cs-wrap.cs-compact .cs-trigger{
  min-height:38px;padding:8px 13px;font-size:12.5px;font-weight:550;color:#33465a;border-radius:999px;
  background:rgba(255,255,255,.82);border-color:rgba(16,26,43,.08);
  box-shadow:0 6px 16px -14px rgba(22,41,71,.7),inset 0 1px 0 #fff}
.gallery-filters .cs-wrap .cs-trigger:hover,.gallery-head > .cs-wrap .cs-trigger:hover{
  border-color:rgba(179,74,99,.32);background:#fff}
@media (max-width:820px){
  .gallery-head{flex-wrap:wrap;row-gap:9px}
  .gallery-head > .cs-wrap{width:100%;max-width:none;min-width:0}
  .gallery-tools{flex:1 1 100%;flex-wrap:wrap;gap:9px}
  .gallery-tools .gsearch{flex:1 1 100%;width:100%;order:2}
  .gallery-filters{flex:1 1 100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;order:1}
  .gallery-filters .cs-wrap{width:100%;min-width:0}
  .gallery-count{order:3;flex:1 1 100%;text-align:right}
}

/* ============================================================
   v4 全局自适应：任意屏幕宽度不出现横向滚动 / 元素挤压
   ============================================================ */
html{overflow-x:hidden}
body{max-width:100%}
:where(img,svg,video,canvas){max-width:100%;height:auto}
:where(pre,code,blockquote,textarea){max-width:100%}
:where(.layout,.works-area,.panel,.stage,.gallery,.modal-card,.table-wrap){min-width:0}

@media (max-width:1024px){
  .layout{grid-template-columns:340px minmax(0,1fr);gap:20px;padding:20px 20px 40px}
  .app-footer{padding-left:20px;padding-right:20px}
}
@media (max-width:900px){
  .layout{grid-template-columns:minmax(0,1fr);gap:16px}
  .create-panel{position:static}
  .notice-bar{padding-left:20px;padding-right:20px}
}
@media (max-width:640px){
  .top-right{min-width:0;flex-wrap:wrap}
  .topbar .btn.sm{padding:0 11px}
  .brand{min-width:0}
  .brand-txt strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .result-acts .btn,.gallery-more .btn,.pay-result-acts .btn{flex:1 1 auto;justify-content:center}
  .stage-feats span{flex:1 1 auto;text-align:center;justify-content:center}
  .amount-quick button{flex:1 1 calc(50% - 6px)}
  .modal-card.wide{width:calc(100vw - 24px);max-width:calc(100vw - 24px)}
  .gallery-tools{min-width:0}
  .field select,.field input{min-width:0;width:100%}
}
@media (max-width:400px){
  .topbar .btn.sm{padding:0 9px;font-size:11.5px}
  .credit-pill{padding:5px 8px}
  .credit-pill .pill-plus{width:17px;height:17px}
  .stage-empty h3{font-size:17.5px}
  .quality{padding:9px 8px}
}

/* ---------- 多张生成结果缩略条 ---------- */
.result-multi{display:flex;gap:8px;padding:10px 12px;overflow-x:auto;background:rgba(255,255,255,.6);border-top:1px solid rgba(16,26,43,.06)}
.result-multi img{width:64px;height:64px;object-fit:cover;border-radius:10px;cursor:pointer;flex:none;
  border:2px solid transparent;opacity:.72;transition:.16s}
.result-multi img:hover{opacity:1}
.result-multi img.active{border-color:var(--accent,#b34a63);opacity:1;box-shadow:0 4px 12px -6px rgba(179,74,99,.6)}
@media (max-width:640px){.result-multi img{width:54px;height:54px}}

/* ---------- 生成张数步进器 ---------- */
/* 生成张数：四挡点选 */
.count-seg{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.cs-opt{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:54px;
  border:1px solid rgba(16,26,43,.12);border-radius:14px;background:#fff;color:#0f2a3d;
  cursor:pointer;font-family:inherit;transition:border-color .18s,background .18s,box-shadow .18s,color .18s}
.cs-opt b{font-size:18px;font-weight:700;line-height:1;letter-spacing:.2px}
.cs-opt span{font-size:10px;color:#7b8794;line-height:1;letter-spacing:1px}
.cs-opt:hover{border-color:rgba(179,74,99,.55);background:rgba(179,74,99,.06)}
.cs-opt.is-on{background:linear-gradient(135deg,#b34a63,#8f3550);border-color:transparent;color:#fff;
  box-shadow:0 8px 18px -8px rgba(179,74,99,.7)}
.cs-opt.is-on span{color:rgba(255,255,255,.82)}
.count-cost{margin:9px 0 0;font-size:12px;color:#7b8794;letter-spacing:.2px}
.count-cost b{color:#b34a63}
@media (max-width:560px){.cs-opt{height:46px;border-radius:12px}.cs-opt b{font-size:17px}.count-cost{font-size:11px}}

/* ---------- 作品卡：比例标签 / 上传者 ---------- */
.gtag{position:absolute;left:8px;top:8px;padding:2px 7px;border-radius:8px;font-size:11px;
  color:#0b3d3a;background:rgba(255,255,255,.86);backdrop-filter:blur(6px);letter-spacing:.3px}
.gauthor{font-size:12px;color:rgba(255,255,255,.92);margin-bottom:2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------- 上传作品选择器 ---------- */
.publish-picker{z-index:2100}
.pp-card{width:min(720px,92vw);max-height:82vh;display:flex;flex-direction:column;
  background:#fff;border-radius:22px;overflow:hidden;box-shadow:0 30px 80px -20px rgba(10,25,45,.45)}
.pp-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;
  border-bottom:1px solid rgba(16,26,43,.08);font-size:15px;color:#0f2a3d}
.pp-x{width:32px;height:32px;border:0;border-radius:10px;background:rgba(16,26,43,.06);cursor:pointer;font-size:16px}
.pp-body{padding:14px 16px 18px;overflow:auto}
.pp-empty{padding:40px 0;text-align:center;color:#7b8794;font-size:13px}
.pp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
.pp-cell{padding:0;border:1px solid rgba(16,26,43,.08);border-radius:14px;background:#fff;overflow:hidden;
  cursor:pointer;text-align:left;transition:.16s}
.pp-cell:hover{border-color:rgba(179,74,99,.55);box-shadow:0 8px 20px -12px rgba(179,74,99,.5)}
.pp-cell:disabled{opacity:.5;cursor:default}
.pp-cell img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover}
.pp-cell span{display:block;padding:7px 9px;font-size:11px;color:#5d6772;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------- 作品卡撤下按钮 ---------- */
.gunpub{position:absolute;right:8px;top:8px;z-index:3;padding:3px 9px;border:0;border-radius:9px;
  font-size:11px;color:#fff;background:rgba(20,32,48,.72);backdrop-filter:blur(6px);cursor:pointer}
.gunpub:hover{background:rgba(214,66,60,.86)}
.gunpub:disabled{opacity:.5;cursor:default}

/* ================= 细节与动效 v2 ================= */
@keyframes uiRise{from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0}}
@keyframes uiCardIn{from{opacity:0;translate:0 16px;scale:.97}to{opacity:1;translate:0 0;scale:1}}
@keyframes uiPopIn{0%{opacity:0;scale:.96;translate:0 10px}100%{opacity:1;scale:1;translate:0 0}}
@keyframes uiToast{0%{opacity:0;translate:0 14px;scale:.94}60%{opacity:1;translate:0 -2px;scale:1.01}100%{opacity:1;translate:0 0;scale:1}}
@keyframes uiRipple{to{scale:1;opacity:0}}
@keyframes uiNumPop{0%{scale:1}40%{scale:1.22}100%{scale:1}}
@keyframes uiHintFlash{0%{color:#7b8794}30%{color:#b34a63}100%{color:#7b8794}}
@keyframes uiFloat{0%,100%{translate:0 0}50%{translate:0 -6px}}
@keyframes uiGlow{0%,100%{opacity:.34;scale:1}50%{opacity:.62;scale:1.03}}
@keyframes uiDot{0%{box-shadow:0 0 0 0 rgba(179,74,99,.35)}70%{box-shadow:0 0 0 9px rgba(179,74,99,0)}100%{box-shadow:0 0 0 0 rgba(179,74,99,0)}}
@keyframes uiSheen{0%,62%{translate:-140% 0}100%{translate:140% 0}}
@keyframes uiHeart{0%{scale:1}45%{scale:1.28}100%{scale:1}}

/* 进场：左侧创作台逐项浮现 */
.create-panel > *{animation:uiRise .55s cubic-bezier(.2,.8,.2,1) both}
.create-panel > *:nth-child(1){animation-delay:.02s}
.create-panel > *:nth-child(2){animation-delay:.06s}
.create-panel > *:nth-child(3){animation-delay:.1s}
.create-panel > *:nth-child(4){animation-delay:.14s}
.create-panel > *:nth-child(5){animation-delay:.18s}
.create-panel > *:nth-child(6){animation-delay:.22s}
.create-panel > *:nth-child(7){animation-delay:.26s}
.create-panel > *:nth-child(8){animation-delay:.3s}
.create-panel > *:nth-child(9){animation-delay:.34s}
.create-panel > *:nth-child(n+10){animation-delay:.38s}

/* 输入聚焦：标签点亮 + 柔光环 */
.field-label{transition:color .2s ease}
.field-label i{transition:color .2s ease}
.field:focus-within .field-label{color:var(--teal)}
.field:focus-within .field-label i{color:var(--teal-2, #0aa)}
.field input:focus,.field textarea:focus,.field select:focus{
  border-color:rgba(179,74,99,.55)!important;
  box-shadow:0 0 0 3px rgba(179,74,99,.12),0 8px 20px -12px rgba(179,74,99,.5)!important;
  transition:box-shadow .22s ease,border-color .22s ease}
.cselect:focus-within{box-shadow:0 0 0 3px rgba(179,74,99,.12);border-radius:14px}
.counter b{transition:color .2s ease;font-variant-numeric:tabular-nums}

/* 张数：按下回弹、选中数字弹跳、积分提示闪动 */
.cs-opt{transition:transform .16s cubic-bezier(.34,1.56,.64,1),border-color .18s,background .18s,box-shadow .18s,color .18s}
.cs-opt:hover{transform:translateY(-1px)}
.cs-opt:active{transform:scale(.955)}
.cs-opt.is-on{transform:translateY(-1px)}
.cs-opt.is-on b{display:inline-block;animation:uiNumPop .34s cubic-bezier(.34,1.56,.64,1);text-shadow:0 1px 0 rgba(0,0,0,.08)}
.cs-opt.is-on{box-shadow:0 10px 22px -8px rgba(179,74,99,.75),inset 0 1px 0 rgba(255,255,255,.28)}
.count-cost{transition:color .2s}
.count-cost.flash{animation:uiHintFlash .55s ease}

/* 主按钮：呼吸光晕 + 轻扫光 */
.generate-btn{position:relative}
.generate-btn::after{content:'';position:absolute;inset:-3px;border-radius:inherit;z-index:-1;pointer-events:none;
  background:radial-gradient(60% 60% at 50% 60%,rgba(179,74,99,.55),rgba(179,74,99,0) 72%);
  filter:blur(16px);animation:uiGlow 4.2s ease-in-out infinite}
.generate-btn:hover::after{opacity:.8}
.generate-btn .gb-main{transition:letter-spacing .25s ease}
.generate-btn:hover .gb-main{letter-spacing:.22em}

/* 通用按钮：波纹 + 细节 */
.btn{position:relative;overflow:hidden}
.chip,.ratio,.mini-btn,.cs-opt{position:relative;overflow:hidden}
.ripple{position:absolute;border-radius:50%;pointer-events:none;background:currentColor;opacity:.26;
  transform:scale(0);animation:uiRipple .6s ease-out forwards;z-index:1}

/* 作品卡：入场 + 悬浮细节 */
.gcard{animation:uiCardIn .5s cubic-bezier(.2,.8,.2,1) both}
.gcard:nth-child(1){animation-delay:.03s}.gcard:nth-child(2){animation-delay:.06s}
.gcard:nth-child(3){animation-delay:.09s}.gcard:nth-child(4){animation-delay:.12s}
.gcard:nth-child(5){animation-delay:.15s}.gcard:nth-child(6){animation-delay:.18s}
.gcard:nth-child(7){animation-delay:.21s}.gcard:nth-child(8){animation-delay:.24s}
.gcard:nth-child(n+9){animation-delay:.26s}
.gcard .gmask .gprompt{translate:0 8px;transition:translate .3s ease .04s}
.gcard:hover .gmask .gprompt{translate:0 0}
.gcard .gmeta{opacity:0;translate:0 6px;transition:opacity .3s ease .1s,translate .3s ease .1s}
.gcard:hover .gmeta{opacity:1;translate:0 0}
.gcard:active{transform:translateY(-2px) scale(.99)}
.gcard .gfav{transition:transform .18s ease,background .18s}
.gcard .gfav:hover{transform:scale(1.12);background:#fff}
.gcard .gfav:active{animation:uiHeart .35s ease}
.gallery-empty::before{animation:uiFloat 4.5s ease-in-out infinite}

/* 结果图：淡入 */
.result-img-wrap img{animation:uiPopIn .5s cubic-bezier(.2,.8,.2,1) both}
#resultMulti > *{animation:uiPopIn .42s cubic-bezier(.2,.8,.2,1) both}
#resultMulti > *:nth-child(2){animation-delay:.05s}
#resultMulti > *:nth-child(3){animation-delay:.1s}
#resultMulti > *:nth-child(4){animation-delay:.15s}

/* 顶部栏滚动态 & 链接细节 */
.topbar{transition:box-shadow .25s ease,background .25s ease}
body.scrolled .topbar{box-shadow:0 12px 30px -18px rgba(16,26,43,.35)}
.panel-head h2::before{animation:uiFloat 5.5s ease-in-out infinite}
.mini-link{position:relative}
.mini-link::after{content:'';position:absolute;left:0;right:0;bottom:-2px;height:1px;background:currentColor;
  scale:0 1;transform-origin:left;transition:scale .22s ease}
.mini-link:hover::after{scale:1 1}

/* 提示条与通知 */
.toast{animation:uiToast .32s cubic-bezier(.2,.8,.2,1) both}
.toast::after{content:'';position:absolute;left:14px;top:50%;width:5px;height:5px;margin-top:-2.5px;border-radius:50%;
  background:currentColor;opacity:.55;animation:uiDot 2s ease-out infinite}

/* 长列表/说明的呼吸点缀 */
.gallery-head h3{transition:letter-spacing .25s ease}
.gallery:hover .gallery-head h3{letter-spacing:.02em}

/* 滚动条 */
.layout ::-webkit-scrollbar{width:8px;height:8px}
.layout ::-webkit-scrollbar-thumb{background:rgba(16,26,43,.16);border-radius:8px}
.layout ::-webkit-scrollbar-thumb:hover{background:rgba(16,26,43,.26)}

/* 无障碍 & 省电 */
@media (prefers-reduced-motion: reduce){
  .create-panel > *,.gcard,.result-img-wrap img,#resultMulti > *,.toast,.gallery-empty::before,
  .generate-btn::after,.panel-head h2::before,.cs-opt.is-on b{animation:none!important}
}
@media (max-width:760px){
  .ripple{display:none}
}

/* ---------- 细节增强 v3 ---------- */
@keyframes lineFlow{to{background-position:200% 0}}
@keyframes chipSheen{0%,55%{left:-45%}85%,100%{left:120%}}
@keyframes logoRing{0%,100%{box-shadow:0 10px 24px -10px rgba(179,74,99,.55),0 0 0 0 rgba(229,138,160,.3)}50%{box-shadow:0 14px 30px -8px rgba(179,74,99,.75),0 0 0 7px rgba(229,138,160,0)}}
@keyframes bgDrift{0%,100%{translate:0 0}50%{translate:14px -10px}}

/* 创作台顶部流光 + 步骤编号 */
.create-panel{counter-reset:fstep}
.create-panel::after{content:'';position:absolute;top:0;left:26px;right:26px;height:2px;border-radius:2px;
  background:linear-gradient(90deg,transparent,rgba(229,138,160,.9),rgba(190,150,105,.8),transparent);
  background-size:200% 100%;animation:lineFlow 6.5s linear infinite;opacity:.55;pointer-events:none}
.field{counter-increment:fstep}
.field-label::before{content:counter(fstep,decimal-leading-zero);display:inline-block;margin-right:7px;
  font:600 9px/1 var(--mono);letter-spacing:.08em;color:var(--teal);opacity:.5;translate:0 -1px}

/* 品牌 logo 呼吸 */
.logo{animation:logoRing 4.6s ease-in-out infinite}

/* 选中张数流光扫过 */
.cs-opt b,.cs-opt span{position:relative;z-index:2}
.cs-opt.is-on::after{content:'';position:absolute;top:0;bottom:0;left:-45%;width:40%;pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.38),transparent);
  transform:skewX(-14deg);animation:chipSheen 4.2s ease-in-out infinite;z-index:1}

/* 舞台极光缓慢漂移 */
.stage::before{animation:bgDrift 11s ease-in-out infinite}
.stage::after{animation:bgDrift 13s ease-in-out infinite reverse}

/* 入场按钮：图标呼吸、按压回弹 */
.generate-btn .gb-main{position:relative}
.generate-btn:active{scale:.985}

/* 结果底栏滑入 */
.result-bar{animation:uiRise .45s .12s cubic-bezier(.2,.8,.2,1) both}

/* 空状态文案轻微上浮 */
.stage-empty h3{animation:uiRise .6s .08s both}
.stage-empty p{animation:uiRise .6s .16s both}
.stage-feats{animation:uiRise .6s .24s both}

@media (max-width:560px){
  .field-label::before{font-size:8px;margin-right:5px}
  .create-panel::after{left:18px;right:18px}
}

/* ================= 创作台重排 v4 ================= */
.layout{grid-template-columns:424px minmax(0,1fr)}
.create-panel{gap:14px;padding:22px}
.panel-head-right{display:flex;align-items:center;gap:9px}
.panel-badge{font-size:9.5px;letter-spacing:.14em;color:#8f3550;background:rgba(179,74,99,.09);
  border:1px solid rgba(179,74,99,.2);padding:3px 8px;border-radius:999px;white-space:nowrap}
.panel-sub{margin:-9px 0 2px;font-size:11px;letter-spacing:.03em;color:var(--muted-2)}

.style-chips{display:flex;flex-wrap:wrap;gap:6px}
.style-chips .chip{padding:6px 12px;font-size:12px;cursor:pointer;line-height:1.4}
.style-chips .chip.active{box-shadow:0 8px 16px -9px rgba(179,74,99,.7),inset 0 1px 0 rgba(255,255,255,.4)}

.ratio-grid{gap:6px}
.ratio{cursor:pointer;font-family:inherit;padding:8px 1px 7px;gap:4px}
.ratio .r{border-radius:4px}

.quality-row{gap:7px}
.quality{cursor:pointer;font-family:inherit;padding:10px 11px;gap:1px}
.quality b{font-size:14.5px}
.quality em{font-size:10px;margin-top:1px}
.quality .cost{font-size:9.5px;letter-spacing:.02em}
.quality.active{box-shadow:0 10px 22px -13px rgba(179,74,99,.7),inset 0 1px 0 #fff}

.ref-empty{flex-direction:row;align-items:center;gap:10px;padding:10px 12px;text-align:left}
.ref-plus{width:28px;height:28px;font-size:16px;flex:none}
.ref-empty>span:nth-child(2){font-weight:600;color:var(--text);font-size:12.5px}
.ref-empty em{margin-left:auto;white-space:nowrap}

.gen-dock{position:sticky;bottom:-8px;z-index:8;margin:0 -8px -8px;padding:10px 8px 8px;
  background:linear-gradient(180deg,rgba(253,247,245,0),rgba(253,247,245,.9) 30%,rgba(253,247,245,.98));
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-radius:0 0 18px 18px}
.gen-dock .generate-btn{width:100%}
.gen-dock .tip{margin-top:7px;text-align:center}

@media (max-width:1080px){.layout{grid-template-columns:1fr}}
@media (max-width:560px){
  .create-panel{padding:18px 16px}
  .panel-badge{display:none}
  .quality{padding:9px 9px}
  .ref-empty em{display:none}
  .gen-dock{bottom:-6px;margin:0 -6px -6px;padding:8px 6px 6px}
}

/* 桌面端创作台内部滚动，生成按钮常驻 */
@media (min-width:1081px){
  .create-panel{max-height:calc(100vh - 104px);overflow-y:auto;overscroll-behavior:contain;
    padding-bottom:4px;scrollbar-width:thin;scrollbar-color:rgba(16,26,43,.16) transparent}
  .create-panel::-webkit-scrollbar{width:6px}
  .create-panel::-webkit-scrollbar-thumb{background:rgba(16,26,43,.16);border-radius:6px}
  .create-panel::-webkit-scrollbar-thumb:hover{background:rgba(16,26,43,.26)}
}

/* ================= 顶栏重排 v2 ================= */
.topbar{padding:11px 26px;gap:12px}
.top-sep{width:1px;height:20px;background:rgba(16,26,43,.12);flex:none;margin:0 2px}
.top-nav{display:flex;align-items:center;gap:2px}
.nav-link{font-size:12.5px;color:var(--muted);padding:7px 12px;border-radius:999px;
  transition:color .18s,background .18s}
.nav-link:hover{color:var(--ink);background:rgba(255,255,255,.72)}
.nav-link.on{color:#7d2d45;background:rgba(179,74,99,.1);font-weight:600;box-shadow:inset 0 0 0 1px rgba(179,74,99,.16)}
.top-right{margin-left:auto;gap:8px}
.cp-level{font-size:10.5px;padding-left:8px;border-left:1px solid rgba(179,74,99,.18)}

.chip-checkin{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border-radius:999px;
  border:1px solid rgba(16,26,43,.1);background:rgba(255,255,255,.72);color:#41526a;font-size:12px;
  font-family:inherit;cursor:pointer;transition:.18s}
.chip-checkin i{width:6px;height:6px;border-radius:50%;background:var(--teal);
  box-shadow:0 0 0 3px rgba(179,74,99,.14)}
.chip-checkin:hover{border-color:rgba(179,74,99,.35);background:#fff;transform:translateY(-1px)}
.chip-checkin.is-done{color:var(--muted);cursor:default;opacity:.8}
.chip-checkin.is-done i{background:var(--muted-2);box-shadow:none}
.chip-checkin:disabled{pointer-events:none}

.user-menu{position:relative}
.user-trigger{position:relative;display:flex;align-items:center;gap:8px;height:38px;padding:3px 10px 3px 5px;
  border-radius:999px;border:1px solid rgba(16,26,43,.1);background:rgba(255,255,255,.78);
  cursor:pointer;font-family:inherit;transition:.18s;box-shadow:inset 0 1px 0 #fff}
.user-trigger:hover{border-color:rgba(179,74,99,.32);background:#fff;box-shadow:0 8px 18px -12px rgba(22,41,71,.5)}
.user-trigger .avatar.sm{width:27px;height:27px;border-radius:50%;object-fit:cover}
.ut-name{font-size:12.5px;color:#33465a;max-width:92px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ut-caret{font-size:9px;color:var(--muted-2);transition:transform .22s}
.user-menu.is-open .ut-caret{transform:rotate(180deg)}
.ut-dot{position:absolute;top:2px;right:6px;width:7px;height:7px;border-radius:50%;background:#e0675f;
  box-shadow:0 0 0 2px rgba(255,255,255,.95)}

.user-pop{position:absolute;right:0;top:calc(100% + 9px);width:238px;padding:8px;z-index:70;
  background:rgba(255,255,255,.94);backdrop-filter:blur(22px) saturate(160%);
  border:1px solid rgba(255,255,255,.9);border-radius:18px;
  box-shadow:0 28px 64px -24px rgba(16,26,43,.42),inset 0 1px 0 #fff;
  animation:uiPopIn .22s cubic-bezier(.2,.8,.2,1) both}
.up-head{display:flex;align-items:center;gap:10px;padding:9px 10px 11px;margin-bottom:5px;
  border-bottom:1px solid rgba(16,26,43,.07)}
.up-head .avatar.sm{width:32px;height:32px;border-radius:50%;object-fit:cover}
.up-id{display:flex;flex-direction:column;line-height:1.35;min-width:0}
.up-id b{font-size:13px;font-weight:650;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.up-id em{font-style:normal;font-size:10.5px;color:var(--muted-2)}
.up-links{display:flex;flex-direction:column;gap:1px}
.up-links a{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;
  font-size:12.5px;color:#3b4a5e;transition:.16s}
.up-links a span{margin-left:auto;color:var(--muted-2);font-size:11px;transition:.16s}
.up-links a:hover{background:rgba(179,74,99,.08);color:#7d2d45}
.up-links a:hover span{color:#7d2d45;translate:2px 0}
.up-badge{margin-left:auto;min-width:17px;height:17px;padding:0 5px;border-radius:999px;
  display:inline-grid;place-items:center;font-style:normal;font-size:10px;font-weight:700;color:#fff;
  background:#e0675f}
.up-actions{padding:8px 4px 4px;border-top:1px solid rgba(16,26,43,.06);margin-top:6px}
.up-btn{width:100%;padding:8px;border-radius:10px;border:1px solid rgba(179,74,99,.18);
  background:rgba(179,74,99,.07);color:#7d2d45;font-size:12.5px;font-family:inherit;cursor:pointer;transition:.18s}
.up-btn:hover{background:rgba(179,74,99,.13);border-color:rgba(179,74,99,.3)}
.up-logout{width:100%;margin-top:5px;padding:8px;border:0;border-radius:10px;background:transparent;
  color:#c0424a;font-size:12.5px;font-family:inherit;cursor:pointer;transition:.18s}
.up-logout:hover{background:rgba(224,103,95,.09)}

@media (max-width:760px){
  .topbar{flex-wrap:nowrap;padding:9px 13px;gap:7px}
  .top-sep,.top-nav{display:none}
  .top-right{flex:0 0 auto;margin-left:auto;flex-wrap:nowrap;gap:6px}
  .brand{gap:8px}
  .logo{width:34px;height:34px;border-radius:11px;font-size:13px}
  .brand-txt strong{font-size:13.5px}
  .brand-txt em{display:none}
  .credit-pill{padding:6px 10px;font-size:12px;gap:5px;flex:0 0 auto}
  .credit-pill .cp-level,.credit-pill .pill-plus{display:none}
  .chip-checkin{height:32px;padding:0 9px;font-size:11.5px;gap:4px}
  .chip-checkin i{display:none}
  .user-trigger{width:36px;height:36px;padding:3px;justify-content:center}
  .ut-name,.ut-caret{display:none}
  .user-trigger .avatar.sm{width:28px;height:28px}
  .user-pop{width:224px;right:-2px}
  .nav-link{padding:6px 10px;font-size:12px}
}
@media (max-width:380px){
  .brand-txt strong{max-width:96px;overflow:hidden;text-overflow:ellipsis}
  .credit-pill b{font-size:11.5px}
}

/* ================= 张数：横向胶囊 v5 ================= */
.count-seg{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;padding:0}
.cs-opt{flex-direction:row;align-items:baseline;justify-content:center;gap:4px;height:46px;
  border-radius:13px;background:linear-gradient(180deg,#fff,rgba(255,255,255,.72))}
.cs-opt b{font-size:17px;font-weight:700;line-height:1;letter-spacing:0}
.cs-opt span{font-size:10.5px;line-height:1;letter-spacing:0;color:var(--muted-2);
  translate:0 1px}
.cs-opt.is-on span{color:rgba(255,255,255,.85)}
.cs-opt:hover{background:#fff}
.cs-opt.is-on:hover{background:linear-gradient(135deg,#b34a63,#8f3550)}
@media (max-width:560px){
  .count-seg{gap:6px}
  .cs-opt{height:44px;gap:3px}
  .cs-opt b{font-size:16px}
  .cs-opt span{font-size:10px}
}

/* 张数强制横向（兼容旧内核/无 Grid 的浏览器） */
.count-seg{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:stretch;gap:8px;width:100%}
.count-seg>.cs-opt{flex:1 1 0!important;width:auto!important;min-width:0;max-width:none}
@media (max-width:400px){.count-seg{gap:6px}.count-seg>.cs-opt{height:42px}}

/* 下拉展开时抬升层级，避免面板被下方“参考图/高级参数”等半透明卡片盖住 */
.cs-wrap.is-open{position:relative;z-index:120}

/* ---------- 微表情：会眨眼的小脸 ---------- */
.micro-face{position:relative;display:inline-flex;width:20px;height:20px;border-radius:50%;flex:none;
  background:
    radial-gradient(circle at 22% 63%,rgba(255,140,168,.45),transparent 26%),
    radial-gradient(circle at 78% 63%,rgba(255,140,168,.45),transparent 26%),
    linear-gradient(150deg,#fff1f3,#ffdfe6);
  box-shadow:inset 0 0 0 1px rgba(179,74,99,.18),0 4px 10px -6px rgba(179,74,99,.55)}
.micro-face i{position:absolute;top:38%;width:2.6px;height:2.6px;border-radius:50%;background:#8e3550;
  animation:mfBlink 4.6s infinite}
.micro-face i:first-child{left:30%}
.micro-face i:last-child{right:30%;animation-delay:.08s}
.micro-face b{position:absolute;left:50%;bottom:27%;width:34%;height:16%;margin-left:-17%;
  border-bottom:1.5px solid #8e3550;border-radius:0 0 999px 999px;transition:height .2s,border-radius .2s}
.micro-face:hover b{height:26%;border-radius:999px;background:#8e3550;border-bottom-color:transparent}
.micro-face:hover i:last-child{animation:none;transform:scaleY(.2)}
.mf-nano{position:absolute;left:33px;bottom:-2px;width:18px;height:18px;box-shadow:0 2px 6px -4px rgba(0,0,0,.5)}
.mf-nano i{width:2px;height:2px}
.mf-nano b{border-bottom-width:1px}
.mf-lg{width:58px;height:58px;margin-bottom:2px;box-shadow:inset 0 0 0 1px rgba(179,74,99,.14),0 16px 30px -18px rgba(179,74,99,.6)}
.mf-lg i{width:5px;height:5px}
.mf-lg b{border-bottom-width:2.5px}
.mf-lg:hover{transform:translateY(-2px) rotate(-4deg)}
.mf-lg{transition:transform .25s cubic-bezier(.2,.8,.2,1)}
@keyframes mfBlink{0%,90%,100%{transform:scaleY(1)}93%,96%{transform:scaleY(.15)}}
@media (prefers-reduced-motion:reduce){.micro-face i{animation:none}}

/* 按钮/标签内的小表情 */
.mf-xs{width:15px;height:15px;margin-left:6px;vertical-align:-3px}
.mf-xs i{width:2px;height:2px;top:36%}
.mf-xs b{border-bottom-width:1px}
.mf-check i:last-child{animation:none;transform:scaleY(.2)}
.mf-btn{width:19px;height:19px;margin-right:7px;vertical-align:-4px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.45),0 3px 8px -5px rgba(90,31,48,.7)}
.mf-btn i{background:#5a1f30}
.mf-btn b{border-bottom-color:#5a1f30}
.generate-btn:hover .mf-btn b{height:25%;background:#5a1f30;border-bottom-color:transparent}
.generate-btn:hover .mf-btn i:last-child{animation:none;transform:scaleY(.2)}
.generate-btn:active .mf-btn{transform:scale(.94)}
.generate-btn[disabled] .mf-btn{animation:mfNod 1.5s ease-in-out infinite}
.generate-btn[disabled] .mf-btn b{width:7px;height:7px;margin-left:-3.5px;border:0;background:#5a1f30;border-radius:50%}
@keyframes mfNod{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(2px) rotate(-6deg)}}
.mf-puzzled b{width:11px;height:2px;margin-left:-5.5px;border:0;background:#8e3550;border-radius:3px}
.mf-puzzled:hover b{height:2px;border-radius:3px;background:#8e3550}

/* ---------- 生成失败预览卡 ---------- */
.stage-fail{position:relative;z-index:1;width:100%;padding:34px 26px;display:flex;justify-content:center}
.stage-fail[hidden]{display:none!important}
.fail-card{
  position:relative;width:min(650px,100%);padding:26px 28px 22px;border-radius:18px;overflow:hidden;
  background:linear-gradient(165deg,rgba(255,255,255,.96),rgba(255,247,249,.86));
  border:1px solid rgba(179,74,99,.23);
  box-shadow:0 28px 60px -34px rgba(83,27,43,.55),inset 0 1px 0 #fff;
}
.fail-card::before{
  content:'';position:absolute;left:28px;right:28px;top:0;height:3px;border-radius:0 0 3px 3px;
  background:linear-gradient(90deg,#b34a63,#e9a7b8 55%,transparent);
}
.fail-top{display:flex;align-items:center;gap:14px;margin-bottom:18px}
.fail-icon{
  width:46px;height:46px;border-radius:14px;flex:none;display:grid;place-items:center;
  font-size:21px;font-weight:800;color:#fff;
  background:linear-gradient(140deg,#d97b95,#a44058);
  box-shadow:0 12px 22px -13px rgba(179,74,99,.9),inset 0 1px 0 rgba(255,255,255,.4);
}
.fail-eyebrow{display:block;font-size:9.5px;letter-spacing:.18em;text-transform:uppercase;color:#a95168;margin-bottom:3px}
.fail-card h3{font-size:22px;line-height:1.2;font-weight:760;letter-spacing:-.02em;color:#2b1420}
.fail-label{margin:0 0 7px;font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:#9b7281;font-weight:650}
.fail-reason{
  margin:0;padding:12px 14px;border-radius:10px;border-left:3px solid #c25a75;
  background:rgba(179,74,99,.06);color:#3b202c;font-size:13px;line-height:1.85;
  white-space:pre-wrap;word-break:break-word;max-height:190px;overflow:auto;
}
.fail-tags{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}
.fail-tags[hidden]{display:none!important}
.fail-tags span{
  padding:4px 10px;border-radius:999px;font-size:11px;color:#7d3448;
  border:1px solid rgba(179,74,99,.19);background:rgba(255,255,255,.72);
}
.fail-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}
.fail-actions .btn{height:34px}
.fail-id{margin:12px 0 0;font:10.5px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;color:#a58e98;word-break:break-all}
.fail-id[hidden]{display:none!important}

/* 多张生成时的部分失败提示 */
.result-notice{
  display:flex;align-items:center;gap:8px;padding:10px 24px;font-size:12px;line-height:1.6;
  color:#7d4b0f;background:rgba(196,123,26,.085);border-bottom:1px solid rgba(196,123,26,.16);
}
.result-notice[hidden]{display:none!important}
.result-notice b{flex:none;color:#9a5c0b;font-weight:700}
.result-notice span{min-width:0;overflow-wrap:anywhere}

@media (max-width:640px){
  .stage-fail{padding:20px 14px}
  .fail-card{padding:20px 18px 18px;border-radius:16px}
  .fail-card::before{left:18px;right:18px}
  .fail-icon{width:38px;height:38px;border-radius:11px;font-size:17px}
  .fail-card h3{font-size:19px}
  .fail-reason{font-size:12.5px;max-height:170px}
  .fail-actions .btn{flex:1 1 auto;justify-content:center}
  .result-notice{padding:9px 14px;align-items:flex-start}
}

/* 个人资料编辑 */
.profile-edit-wrap{display:grid;grid-template-columns:110px minmax(0,1fr);gap:18px;align-items:start}
.profile-avatar-col{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.profile-avatar-col .avatar.lg{width:96px;height:96px;border-radius:22px}
.profile-avatar-col form{display:flex;flex-direction:column;gap:6px;align-items:center;width:100%}
.profile-avatar-col input[type=file]{width:100%;max-width:150px;font-size:10.5px;color:var(--muted)}
.profile-avatar-col .btn{width:100%;max-width:130px;justify-content:center}
.profile-basic-form{min-width:0}
.profile-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.profile-field-grid .field{margin:0}
.profile-field-grid .field small{display:block;margin-top:4px;font-size:10px;line-height:1.4}
.profile-bio-field{grid-column:1/-1}
.profile-bio-field textarea{resize:vertical;min-height:74px}
.profile-form-foot{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
@media (max-width:620px){
  .profile-edit-wrap{grid-template-columns:1fr;gap:14px}
  .profile-avatar-col{flex-direction:row;text-align:left;align-items:center;flex-wrap:wrap}
  .profile-avatar-col .avatar.lg{width:72px;height:72px;border-radius:18px;flex:none}
  .profile-avatar-col form{flex:1;min-width:150px;align-items:flex-start}
  .profile-avatar-col input[type=file]{max-width:100%}
  .profile-avatar-col .btn{width:auto}
  .profile-field-grid{grid-template-columns:1fr}
  .profile-bio-field{grid-column:auto}
}
.file-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.avatar-file-btn{display:inline-flex;align-items:center;justify-content:center;padding:6px 11px;border:1px solid rgba(179,74,99,.22);border-radius:9px;background:#fff;color:var(--teal,#b34a63);font-size:11px;font-weight:600;cursor:pointer;transition:background .18s ease,border-color .18s ease}
.avatar-file-btn:hover{background:#fff7f9;border-color:rgba(179,74,99,.4)}
.avatar-file-name{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--muted,#8b7a82)}
