:root {
  --bg: #07070b;
  --bg-2: #0d0f16;
  --panel: rgba(18, 20, 30, 0.78);
  --panel-solid: #12141e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f1ea;
  --text-2: #c7c4d2;
  --muted: #9a97a8;
  --dim: #6d6a7c;
  --cyan: #57f2e5;
  --violet: #9b7bff;
  --pink: #ff6fb5;
  --amber: #ffc857;
  --green: #67f5a2;
  --danger: #ff6b7a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Syne", "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font-display);
  color: var(--text);
  background: radial-gradient(1200px 700px at 10% -10%, rgba(155, 123, 255, 0.18), transparent 50%),
              radial-gradient(900px 600px at 100% 0%, rgba(87, 242, 229, 0.12), transparent 45%),
              var(--bg);
  overflow-x: hidden;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
code {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.92em;
}

.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.45;
  animation: float 14s ease-in-out infinite;
}
.orb-a { width: 380px; height: 380px; left: -80px; top: 10%; background: rgba(155, 123, 255, 0.35); }
.orb-b { width: 320px; height: 320px; right: -60px; top: 30%; background: rgba(87, 242, 229, 0.22); animation-delay: -4s; }
.orb-c { width: 260px; height: 260px; left: 40%; bottom: -80px; background: rgba(255, 111, 181, 0.18); animation-delay: -8s; }
.grid-mask {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
  opacity: 0.5;
}
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-28px) scale(1.05); }
}

.topbar, main, .modal, .toast-stack { position: relative; z-index: 1; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  background: rgba(7, 7, 11, 0.72);
  position: sticky; top: 0; z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800; letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #081018; box-shadow: 0 0 0 1px rgba(255,255,255,0.15), 0 10px 30px rgba(155,123,255,0.35);
}
.brand-name { font-weight: 800; letter-spacing: 0.12em; font-size: 15px; }
.brand-sub { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

.main-nav {
  display: flex; gap: 6px; padding: 5px; border-radius: 999px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
}
.nav-btn {
  padding: 9px 14px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600;
  transition: 0.2s ease;
}
.nav-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-btn.active {
  color: #081018; background: linear-gradient(135deg, var(--cyan), #8ef0ff);
  box-shadow: 0 8px 24px rgba(87,242,229,0.25);
}

.top-actions { display: flex; align-items: center; gap: 10px; }
.quota-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px; font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(103, 245, 162, 0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(103, 245, 162, 0); }
  100% { box-shadow: 0 0 0 0 rgba(103, 245, 162, 0); }
}

.ghost-btn, .solid-btn, .text-btn, .primary-cta {
  border-radius: 12px; transition: 0.2s ease; font-weight: 650;
}
.ghost-btn {
  padding: 10px 14px; border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.03); color: var(--text);
}
.ghost-btn:hover { border-color: rgba(87,242,229,0.4); background: rgba(87,242,229,0.06); }
.solid-btn {
  padding: 10px 14px; color: #081018;
  background: linear-gradient(135deg, var(--violet), #6d8dff);
  box-shadow: 0 10px 28px rgba(155,123,255,0.28);
}
.solid-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.text-btn { color: var(--cyan); font-size: 13px; font-weight: 650; }
.primary-cta {
  position: relative; overflow: hidden; width: 100%;
  margin-top: 16px; padding: 15px 16px; border-radius: 14px;
  color: #061018; font-weight: 800; letter-spacing: 0.02em;
  background: linear-gradient(120deg, var(--cyan), var(--violet) 55%, var(--pink));
  box-shadow: 0 16px 40px rgba(155,123,255,0.28);
}
.primary-cta:hover { transform: translateY(-1px); filter: brightness(1.04); }
.primary-cta:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.cta-shine {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.35) 45%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 3.2s infinite;
}
@keyframes shine {
  0%, 55% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

main { padding: 18px; }
.view { display: none; }
.view.active { display: block; }

/* 仅站长可见：普通用户隐藏「文件库 / 任务 / 日志」。
   按 Ctrl+Shift+L 或访问 ?owner=1 进入站长模式后可显示。 */
.owner-only { display: none !important; }
body.owner-mode .nav-btn.owner-only { display: inline-flex !important; }
body.owner-mode .view.owner-only { display: none !important; }
body.owner-mode .view.owner-only.active { display: block !important; }
/* 站长模式下通用 .owner-only 块恢复显示（提示词等） */
body.owner-mode .prompt-box.owner-only { display: block !important; }
body.owner-mode .owner-only:not(.nav-btn):not(.view) { display: block !important; }

/* 站长专用按钮：普通用户隐藏，进入站长模式(Ctrl+Shift+L / ?owner=1)后显示，如「设置」入口 */
.owner-btn { display: none !important; }
body.owner-mode .owner-btn { display: inline-flex !important; }

.studio-layout {
  display: grid;
  grid-template-columns: 340px minmax(320px, 1fr) 320px;
  gap: 16px;
  min-height: calc(100vh - 110px);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow: auto;
  max-height: calc(100vh - 110px);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.panel-head h2 {
  margin: 0; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2);
}
.badge {
  font-size: 11px; padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,0.03);
}
.badge.warn { color: var(--amber); border-color: rgba(255,200,87,0.3); }
.mt { margin-top: 20px; }

.upload-zone {
  border: 1px dashed rgba(155,123,255,0.45);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(155,123,255,0.08), rgba(87,242,229,0.03)),
    rgba(255,255,255,0.02);
  min-height: 180px;
  transition: 0.2s ease;
}
.upload-zone.dragover {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(87,242,229,0.4), 0 0 0 4px rgba(87,242,229,0.08);
}
.upload-inner, .upload-preview { padding: 18px; }
.upload-inner { text-align: center; }
.upload-icon {
  width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 14px;
  display: grid; place-items: center; font-size: 22px; font-weight: 800;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
}
.upload-inner h3 { margin: 0 0 6px; font-size: 16px; }
.upload-inner p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.hidden { display: none !important; }

.upload-preview img {
  width: 100%; height: 180px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--line);
}
.upload-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px;
}
.upload-meta strong { display: block; font-size: 13px; }
.upload-meta span { color: var(--muted); font-size: 12px; }

.style-cats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.cat-chip {
  padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 650;
  color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,0.02);
}
.cat-chip.active {
  color: #081018;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  border-color: transparent;
}

.style-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px;
}
.style-card {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); text-align: left; padding: 0;
  background: #10121a;
  transition: 0.18s ease;
  display: block;
  padding: 12px 14px;
  border-left: 3px solid var(--swatch, var(--cyan));
}
.style-card .thumb {
  display: none;
}
.style-card .meta {
  padding: 0;
  background: transparent;
}
.style-card strong {
  display: block; font-size: 12px; margin-bottom: 2px; color: var(--text);
  letter-spacing: 0.02em;
}
.style-card span {
  display: block; font-size: 10px; color: var(--muted); line-height: 1.35;
}
.style-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.22); }
.style-card.active {
  border-color: rgba(87,242,229,0.7);
  box-shadow: 0 0 0 1px rgba(87,242,229,0.35), 0 12px 30px rgba(0,0,0,0.3);
}

.control-stack { display: grid; gap: 10px; }
.field { display: grid; gap: 6px; }
.field span { color: var(--muted); font-size: 12px; font-weight: 600; }
.field input, .field select {
  width: 100%; padding: 11px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0,0,0,0.28); outline: none;
  color: var(--text-2);
}
.field input:focus, .field select:focus {
  border-color: rgba(87,242,229,0.5);
  box-shadow: 0 0 0 3px rgba(87,242,229,0.1);
}
.field select option { background: #16181f; color: var(--text-2); }
.hint { color: var(--dim); font-size: 12px; line-height: 1.5; margin: 10px 0 0; }

.center-stage {
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
}
.stage-toolbar, .quick-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.tabs {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
}
.tab {
  padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700;
}
.tab.active {
  color: #081018; background: linear-gradient(135deg, var(--amber), #ffe29a);
}
.stage-status {
  color: var(--muted); font-size: 12px; font-family: var(--font-mono);
  padding: 8px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
}

.canvas-frame {
  position: relative; flex: 1;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 20%, rgba(155,123,255,0.12), transparent 40%),
    rgba(8, 9, 14, 0.92);
  box-shadow: var(--shadow);
  min-height: 620px;
  display: grid; place-items: center;
  overflow: hidden;
}
.canvas-glow {
  position: absolute; width: 55%; height: 40%; top: 8%;
  background: radial-gradient(circle, rgba(87,242,229,0.18), transparent 70%);
  filter: blur(10px); pointer-events: none;
}
#coverCanvas {
  width: auto;
  max-width: min(100%, 430px);
  height: auto;
  max-height: 78vh;
  aspect-ratio: 3 / 4;
  border-radius: 10px; background: #111;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative; z-index: 1;
  display: block;
  object-fit: contain;
}
.empty-stage {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px; z-index: 2;
}
.empty-stage .ring {
  width: 72px; height: 72px; margin: 0 auto 8px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: inset 0 0 0 10px rgba(255,255,255,0.03), 0 0 40px rgba(155,123,255,0.15);
}
.empty-stage h3 { margin: 0; font-family: var(--font-serif); font-size: 30px; font-weight: 400; }
.empty-stage p { margin: 0; color: var(--muted); }

.gen-overlay {
  position: absolute; inset: 0; z-index: 3;
  background: rgba(5,6,10,0.72); backdrop-filter: blur(4px);
  display: grid; place-items: center;
}
.scanner {
  position: absolute; left: 12%; right: 12%; height: 2px; top: 18%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 20px var(--cyan);
  animation: scan 1.6s linear infinite;
}
@keyframes scan {
  0% { top: 16%; opacity: 0; }
  10% { opacity: 1; }
  100% { top: 84%; opacity: 0.2; }
}
.gen-copy { text-align: center; display: grid; gap: 8px; justify-items: center; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15); border-top-color: var(--cyan);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gen-copy strong { font-size: 16px; }
.gen-copy span { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

.right-panel .switch-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.02); margin-bottom: 10px;
}
.switch-row strong { display: block; font-size: 13px; margin-bottom: 4px; }
.switch-row p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--cyan); }

.slider-field { display: grid; gap: 8px; margin-bottom: 12px; }
.slider-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.slider-top b { color: var(--text-2); font-family: var(--font-mono); font-weight: 500; }
.slider-field input[type="range"] { width: 100%; accent-color: var(--violet); }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); font-size: 12px; font-weight: 650; background: rgba(255,255,255,0.02);
}
.chip.active {
  color: #081018; background: linear-gradient(135deg, var(--violet), var(--cyan)); border-color: transparent;
}

.selected-style-card {
  border-radius: 16px; padding: 14px; margin-bottom: 12px;
  border: 1px solid rgba(155,123,255,0.28);
  background:
    linear-gradient(160deg, rgba(155,123,255,0.18), rgba(87,242,229,0.06)),
    rgba(0,0,0,0.2);
}
.ssc-label { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.ssc-name { font-size: 24px; margin: 6px 0 4px; font-family: var(--font-serif); }
.ssc-desc { color: var(--muted); font-size: 13px; }

.api-card {
  border-radius: 14px; padding: 14px; border: 1px dashed rgba(87,242,229,0.3);
  background: rgba(87,242,229,0.04);
}
.api-card h3 { margin: 0 0 6px; font-size: 13px; }
.api-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.prompt-box {
  margin-top: 14px; border-radius: 14px; border: 1px solid rgba(155,123,255,0.28);
  background: rgba(0,0,0,0.28); overflow: hidden;
}
.prompt-box-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.prompt-box-head strong { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
#promptPreview, #gsPromptPreview {
  margin: 0; padding: 12px; max-height: 180px; overflow: auto;
  white-space: pre-wrap; word-break: break-word;
  color: #cfc8e8; font-family: var(--font-mono); font-size: 11px; line-height: 1.55;
}

.page-shell { max-width: 1200px; margin: 0 auto; }
.page-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  margin-bottom: 18px; padding: 8px 4px 0;
}
.page-hero h1 {
  margin: 6px 0 8px; font-size: clamp(28px, 4vw, 42px);
  font-family: var(--font-serif); font-weight: 400;
}
.page-hero p { margin: 0; color: var(--muted); max-width: 620px; line-height: 1.6; }
.eyebrow {
  margin: 0; color: var(--cyan); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 700;
}
.muted { color: var(--muted); }

.batch-grid, .library-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}
.batch-card, .library-card {
  border-radius: 16px; border: 1px solid var(--line); overflow: hidden;
  background: var(--panel-solid); box-shadow: var(--shadow);
}
.batch-card .thumb, .library-card .thumb {
  aspect-ratio: 3 / 4; background: #10121a; position: relative;
}
.batch-card .thumb::before, .library-card .thumb::before {
  content: ""; position: absolute; inset: 0; background: var(--swatch, linear-gradient(160deg, #333, #111));
  opacity: 0.9;
}
.batch-card .body, .library-card .body { padding: 12px; }
.batch-card strong, .library-card strong { display: block; margin-bottom: 4px; }
.batch-card span, .library-card span { color: var(--muted); font-size: 12px; }

.queue-list, .logs-panel {
  display: grid; gap: 10px;
}
.queue-item, .log-item {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  background: var(--panel); backdrop-filter: blur(12px);
}
.queue-item {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center;
}
.queue-item .meta { color: var(--muted); font-size: 12px; font-family: var(--font-mono); }
.status-pill {
  padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--line);
}
.status-pill.running { color: var(--cyan); border-color: rgba(87,242,229,0.35); }
.status-pill.done { color: var(--green); border-color: rgba(103,245,162,0.35); }
.status-pill.failed { color: var(--danger); border-color: rgba(255,107,122,0.35); }
.status-pill.queued { color: var(--amber); border-color: rgba(255,200,87,0.35); }
.log-item {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted); line-height: 1.55;
}
.log-item b { color: var(--text); font-weight: 500; }

.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.62); backdrop-filter: blur(8px);
  padding: 18px;
}
.modal-card {
  width: min(440px, 100%); border-radius: 20px; padding: 22px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(28,30,42,0.98), rgba(14,16,24,0.98));
  box-shadow: var(--shadow); position: relative;
}
.modal-card h2 { margin: 6px 0 8px; font-size: 28px; font-family: var(--font-serif); font-weight: 400; }
.modal-card .field { margin-top: 12px; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); font-size: 20px;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.04); }

/* Lightbox for album card preview */
.lightbox-card {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(14,16,24,0.96);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: 1fr auto;
}
.lightbox-card img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
  background: #000;
  display: block;
  margin: 0 auto;
}
.lightbox-actions {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
}
.lightbox-actions .solid-btn { flex-shrink: 0; }
.lightbox-actions .muted { font-size: 12px; color: var(--muted); text-align: right; }

@media (max-width: 760px) {
  .lightbox-card img { max-height: 70vh; }
  .lightbox-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .lightbox-actions .muted { text-align: center; }
}

/* 移动端长按保存浮层（微信/QQ 等内置浏览器 <a download> 失效） */
.mobile-save-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: none; place-items: center;
  background: rgba(0,0,0,0.85); padding: 16px;
}
.mobile-save-overlay.show { display: grid; }
.mobile-save-card {
  position: relative; max-width: 92vw; max-height: 92vh;
  display: grid; gap: 14px; justify-items: center; padding: 24px 16px 16px;
}
.mobile-save-card img {
  max-width: 86vw; max-height: 68vh; object-fit: contain;
  border-radius: 12px; background: #000; display: block;
  -webkit-touch-callout: default; -webkit-user-select: none; user-select: none;
}
.mobile-save-hint {
  color: #fff; font-size: 15px; font-weight: 600; text-align: center;
  padding: 10px 18px; background: rgba(255,255,255,0.14); border-radius: 12px;
}
.mobile-save-filename {
  color: rgba(255,255,255,0.5); font-size: 12px; word-break: break-all;
  text-align: center; max-width: 80vw;
}
.mobile-save-overlay .modal-close {
  position: absolute; top: 4px; right: 4px; width: 36px; height: 36px;
  border-radius: 10px; border: 1px solid var(--line);
  color: var(--muted); font-size: 22px; background: rgba(0,0,0,0.5);
}
.mobile-save-overlay .modal-close:active { color: #fff; background: rgba(255,255,255,0.12); }

.toast-stack {
  position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 60;
}
.toast {
  min-width: 240px; max-width: 360px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(16,18,28,0.95);
  box-shadow: var(--shadow); color: var(--text); font-size: 13px;
  animation: toast-in 0.25s ease;
}
@keyframes toast-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.empty-block {
  border: 1px dashed var(--line-strong); border-radius: 16px; padding: 36px 18px;
  text-align: center; color: var(--muted); background: rgba(255,255,255,0.02);
}

/* —— GodStudio / 摄影棚 —— */
/* 摄影棚复用封面工作室三栏 .studio-layout；保留类名兼容旧样式钩子 */
.godstudio-layout {
  /* 与 .studio-layout 相同三栏，这里只做微调 */
  padding: 0;
  align-items: stretch;
}
.godstudio-controls {
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.godstudio-stage {
  max-height: none;
  overflow: visible;
}
/* 中间写真舞台：单图铺满，对齐封面 canvas 比例 */
.gs-result-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  aspect-ratio: 3 / 4;
  max-height: min(78vh, 820px);
  display: grid;
  place-items: center;
  border-radius: 12px;
  overflow: hidden;
}
.gs-result-stage .empty-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
}
.gs-result-stage .gs-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.gs-result-stage .gs-stage-card {
  position: relative;
  width: 100%;
  height: 100%;
}
.gs-result-stage .gs-stage-card .status {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: rgba(10,12,18,0.78);
  color: var(--muted);
}
.gs-result-stage .gs-stage-fail {
  color: var(--danger);
  text-align: center;
  padding: 20px;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.gs-result-stage .gs-stage-fail strong { font-size: 15px; }
.gs-result-stage .gs-stage-fail p { margin: 0; max-width: 420px; }
.gs-fail-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: rgba(255,180,0,0.15);
  color: #e8a200;
  border: 1px solid rgba(255,180,0,0.3);
}
.gs-fail-badge-err {
  background: rgba(255,80,80,0.15);
  color: var(--danger);
  border-color: rgba(255,80,80,0.3);
}
.gs-fail-hint {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}
.gs-fail-actions { margin-top: 6px; }
.gs-fail-actions .btn { font-size: 13px; padding: 8px 18px; }
.godstudio-stage .quick-actions {
  align-items: flex-start;
}
.godstudio-stage .album-meta {
  flex: 1;
  margin: 0;
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.studio-intro { margin: 0 0 12px; font-size: 13px; line-height: 1.55; }
.control-section {
  border-top: 1px solid var(--line);
  padding: 14px 0 4px;
  display: grid;
  gap: 10px;
}
.section-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 700;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: 0.15s ease;
}
.choice-chip:hover { border-color: var(--line-strong); color: var(--text); }
.choice-chip.active {
  color: #0b0b10;
  background: linear-gradient(120deg, var(--cyan), #8d7bff);
  border-color: transparent;
}
.choice-chip .swatch {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2);
}
.bio-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.brand-picker { display: grid; gap: 12px; }
.brand-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.02);
}
.brand-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}
.brand-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.brand-counter strong { color: var(--cyan); }
.studio-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(12,14,20,0.95) 28%);
  padding-top: 16px !important;
  padding-bottom: 8px !important;
}
.studio-actions .primary-cta,
.studio-actions .ghost-btn {
  width: 100%;
}
.album-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-top: 4px;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.album-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel-solid);
  display: grid;
  grid-template-rows: auto 1fr;
}
.album-card .thumb {
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(145deg, rgba(87,242,229,0.08), rgba(155,123,255,0.12)),
    #10121a;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 12px;
}
.album-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-card .meta {
  padding: 10px;
  display: grid;
  gap: 6px;
}
.album-card .meta strong {
  font-size: 13px;
}
.album-card .meta span {
  color: var(--muted);
  font-size: 11px;
  font-family: var(--font-mono);
  line-height: 1.4;
}
.album-card .actions {
  display: flex;
  gap: 8px;
}
.album-card .status {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: rgba(10,12,18,0.78);
  color: var(--muted);
}
.album-card .status.running { color: var(--cyan); border-color: rgba(87,242,229,0.35); }
.album-card .status.done { color: var(--green); border-color: rgba(103,245,162,0.35); }
.album-card .status.failed { color: var(--danger); border-color: rgba(255,107,122,0.35); }
.album-card .status.pending { color: var(--amber); border-color: rgba(255,200,87,0.35); }

@media (max-width: 1180px) {
  .studio-layout,
  .godstudio-layout.studio-layout { grid-template-columns: 1fr; }
  .godstudio-controls { max-height: none; }
  .panel { max-height: none; }
  .canvas-frame { min-height: 520px; }
  .gs-result-stage { width: min(100%, 360px); }
  .main-nav { overflow-x: auto; max-width: 48vw; }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .brand { min-width: auto; }
  .main-nav { max-width: 100%; order: 3; width: 100%; }
  .page-hero { flex-direction: column; align-items: flex-start; }
  .stage-toolbar, .quick-actions { flex-wrap: wrap; }
}
